mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
add Qputs
This commit is contained in:
parent
ca92e5885f
commit
c05db51069
2 changed files with 14 additions and 0 deletions
|
@ -44,6 +44,7 @@ void Qclose(VFile *file);
|
|||
int Qread(VFile *file, void *buf, int count);
|
||||
int Qwrite(VFile *file, const void *buf, int count);
|
||||
int Qprintf(VFile *file, const char *fmt, ...) __attribute__((format(printf,2,3)));
|
||||
int Qputs(VFile *file, const char *buf);
|
||||
char *Qgets(VFile *file, char *buf, int count);
|
||||
int Qgetc(VFile *file);
|
||||
int Qputc(VFile *file, int c);
|
||||
|
|
|
@ -279,6 +279,19 @@ Qprintf (VFile *file, const char *fmt, ...)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
Qputs (VFile *file, const char *buf)
|
||||
{
|
||||
if (file->file)
|
||||
return fputs (buf, file->file);
|
||||
#ifdef HAVE_ZLIB
|
||||
else
|
||||
return gzputs (file->gzfile, buf);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
char *
|
||||
Qgets (VFile *file, char *buf, int count)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue