37 #include <sys/types.h> 57 "AMI_ERROR_END_OF_STREAM",
58 "AMI_ERROR_OUT_OF_RANGE",
59 "AMI_ERROR_READ_ONLY",
62 "AMI_ERROR_OBJECT_INITIALIZATION",
63 "AMI_ERROR_PERMISSION_DENIED",
64 "AMI_ERROR_INSUFFICIENT_MAIN_MEMORY",
65 "AMI_ERROR_INSUFFICIENT_AVAILABLE_STREAMS",
66 "AMI_ERROR_ENV_UNDEFINED",
67 "AMI_ERROR_NO_MAIN_MEMORY_OPERATION",
86 sprintf(tmp_path,
"%s/%s_XXXXXX", base_dir, base.c_str());
91 cerr <<
"ami_single_temp_name: ";
92 perror(
"G_mkstemp() failed: ");
110 fp = fdopen(fd,
"rb");
113 fp = fdopen(fd,
"wb");
116 fp = fdopen(fd,
"ab");
119 fp = fdopen(fd,
"ab+");
122 fp = fdopen(fd,
"rb+");
125 fp = fdopen(fd,
"wb+");
148 fp = fopen(pathname,
"rb");
151 fp = fopen(pathname,
"wb");
154 fp = fopen(pathname,
"ab");
157 fp = fopen(pathname,
"ab+");
162 fp = fopen(pathname,
"rb+");
165 fp = fopen(pathname,
"wb+");
const char * ami_str_error[]
FILE * open_stream(int fd, AMI_stream_type st)
#define assert(condition)
void G_fseek(FILE *, off_t, int)
Change the file position of the stream.
int ami_single_temp_name(const std::string &base, char *tmp_path)
int G_mkstemp(char *, int, int)
Returns a file descriptor.