add Qputs

This commit is contained in:
Bill Currie 2002-08-07 18:43:35 +00:00
parent ca92e5885f
commit c05db51069
2 changed files with 14 additions and 0 deletions

View file

@ -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);

View file

@ -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)
{