quakeforge/ruamoko/include/qfile.h
Bill Currie 4868a245b3 Fix the "for new syntax" FIXME.
Empty structs are now (correctly) invalid. The hack of using an empty
struct to represent a handle returned from a builtin has been unnecessary
since opaque structs were implemented: now a pointer to an opaque struct
can be used. This is mostly safe as handles are aways negative and thus
attempting to dereference such a pointer should result in a VM error. It
will be even safer once const is implemented and the pointers can be made
constant (eg, typedef struct handle * const handle;)
2012-12-20 10:10:41 +09:00

24 lines
832 B
C

#ifndef __ruamoko_qfile_h
#define __ruamoko_qfile_h
typedef struct _qfile_t *QFile;
@extern int Qrename (string old, string new);
@extern int Qremove (string path);
@extern QFile Qopen (string path, string mode);
@extern void Qclose (QFile file);
@extern string Qgetline (QFile file);
@extern string Qreadstring (QFile file, int len);
@extern int Qread (QFile file, void *buf, int count);
@extern int Qwrite (QFile file, void *buf, int count);
@extern int Qputs (QFile file, string str);
//@extern int Qgets (QFile file, void *buf, int count);
@extern int Qgetc (QFile file);
@extern int Qputc (QFile file, int c);
@extern int Qseek (QFile file, int offset, int whence);
@extern int Qtell (QFile file);
@extern int Qflush (QFile file);
@extern int Qeof (QFile file);
@extern int Qfilesize (QFile file);
#endif//__ruamoko_qfile_h