36 #include <sys/types.h>
55 "AMI_ERROR_END_OF_STREAM",
56 "AMI_ERROR_OUT_OF_RANGE",
57 "AMI_ERROR_READ_ONLY",
60 "AMI_ERROR_OBJECT_INITIALIZATION",
61 "AMI_ERROR_PERMISSION_DENIED",
62 "AMI_ERROR_INSUFFICIENT_MAIN_MEMORY",
63 "AMI_ERROR_INSUFFICIENT_AVAILABLE_STREAMS",
64 "AMI_ERROR_ENV_UNDEFINED",
65 "AMI_ERROR_NO_MAIN_MEMORY_OPERATION",
84 snprintf(tmp_path,
GPATH_MAX,
"%s/%s_XXXXXX", base_dir, base.c_str());
89 cerr <<
"ami_single_temp_name: ";
90 perror(
"G_mkstemp() failed: ");
107 fp = fdopen(fd,
"rb");
110 fp = fdopen(fd,
"wb");
113 fp = fdopen(fd,
"ab");
116 fp = fdopen(fd,
"ab+");
119 fp = fdopen(fd,
"rb+");
122 fp = fdopen(fd,
"wb+");
144 fp = fopen(pathname,
"rb");
147 fp = fopen(pathname,
"wb");
150 fp = fopen(pathname,
"ab");
153 fp = fopen(pathname,
"ab+");
158 fp = fopen(pathname,
"rb+");
161 fp = fopen(pathname,
"wb+");
const char * ami_str_error[]
int ami_single_temp_name(const std::string &base, char *tmp_path)
FILE * open_stream(int fd, AMI_stream_type st)
@ AMI_APPEND_WRITE_STREAM
int G_mkstemp(char *, int, int)
Returns a file descriptor.
void G_fseek(FILE *, off_t, int)
Change the file position of the stream.
#define assert(condition)