mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-14 17:01:22 +00:00
4868a245b3
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;)
24 lines
832 B
C
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
|