mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-05-30 08:40:39 +00:00
%s/HAS_ZLIB/HAVE_ZLIB/g
This commit is contained in:
parent
e4c9ccff8f
commit
677b7de94d
7 changed files with 29 additions and 29 deletions
|
@ -425,7 +425,7 @@ _COM_FOpenFile (char *filename, QFile **gzfile, char *foundname, int zip)
|
|||
pack_t *pak;
|
||||
int i;
|
||||
int findtime;
|
||||
#ifdef HAS_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
char gzfilename[MAX_OSPATH];
|
||||
int filenamelen;;
|
||||
|
||||
|
@ -448,7 +448,7 @@ _COM_FOpenFile (char *filename, QFile **gzfile, char *foundname, int zip)
|
|||
pak = search->pack;
|
||||
for (i=0 ; i<pak->numfiles ; i++) {
|
||||
char *fn=0;
|
||||
#ifdef HAS_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
if (!strncmp(pak->files[i].name, filename, filenamelen)) {
|
||||
if (!pak->files[i].name[filenamelen])
|
||||
fn=filename;
|
||||
|
@ -481,7 +481,7 @@ _COM_FOpenFile (char *filename, QFile **gzfile, char *foundname, int zip)
|
|||
strncpy(foundname, filename, MAX_OSPATH);
|
||||
findtime = Sys_FileTime (netpath);
|
||||
if (findtime == -1) {
|
||||
#ifdef HAS_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
strncpy(foundname, gzfilename, MAX_OSPATH);
|
||||
snprintf(netpath, sizeof(netpath), "%s/%s",search->filename,
|
||||
gzfilename);
|
||||
|
|
|
@ -121,7 +121,7 @@ Qopen(const char *path, const char *mode)
|
|||
file=calloc(sizeof(*file),1);
|
||||
if (!file)
|
||||
return 0;
|
||||
#ifdef HAS_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
if (zip) {
|
||||
file->gzfile=gzopen(path,m);
|
||||
if (!file->gzfile) {
|
||||
|
@ -160,7 +160,7 @@ Qdopen(int fd, const char *mode)
|
|||
file=calloc(sizeof(*file),1);
|
||||
if (!file)
|
||||
return 0;
|
||||
#ifdef HAS_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
if (zip) {
|
||||
file->gzfile=gzdopen(fd,m);
|
||||
if (!file->gzfile) {
|
||||
|
@ -188,7 +188,7 @@ Qclose(QFile *file)
|
|||
{
|
||||
if (file->file)
|
||||
fclose(file->file);
|
||||
#ifdef HAS_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
else
|
||||
gzclose(file->gzfile);
|
||||
#endif
|
||||
|
@ -200,7 +200,7 @@ Qread(QFile *file, void *buf, int count)
|
|||
{
|
||||
if (file->file)
|
||||
return fread(buf, 1, count, file->file);
|
||||
#ifdef HAS_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
else
|
||||
return gzread(file->gzfile,buf,count);
|
||||
#else
|
||||
|
@ -213,7 +213,7 @@ Qwrite (QFile *file, void *buf, int count)
|
|||
{
|
||||
if (file->file)
|
||||
return fwrite(buf, 1, count, file->file);
|
||||
#ifdef HAS_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
else
|
||||
return gzwrite(file->gzfile,buf,count);
|
||||
#else
|
||||
|
@ -230,7 +230,7 @@ Qprintf(QFile *file, const char *fmt, ...)
|
|||
va_start(args,fmt);
|
||||
if (file->file)
|
||||
ret=vfprintf(file->file, fmt, args);
|
||||
#ifdef HAS_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
else {
|
||||
char buf[4096];
|
||||
va_start(args, fmt);
|
||||
|
@ -254,7 +254,7 @@ Qgets(QFile *file, char *buf, int count)
|
|||
{
|
||||
if (file->file)
|
||||
return fgets(buf, count, file->file);
|
||||
#ifdef HAS_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
else
|
||||
return gzgets(file->gzfile,buf,count);
|
||||
#else
|
||||
|
@ -267,7 +267,7 @@ Qgetc(QFile *file)
|
|||
{
|
||||
if (file->file)
|
||||
return fgetc(file->file);
|
||||
#ifdef HAS_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
else
|
||||
return gzgetc(file->gzfile);
|
||||
#else
|
||||
|
@ -280,7 +280,7 @@ Qputc(QFile *file, int c)
|
|||
{
|
||||
if (file->file)
|
||||
return fputc(c, file->file);
|
||||
#ifdef HAS_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
else
|
||||
return gzputc(file->gzfile,c);
|
||||
#else
|
||||
|
@ -293,7 +293,7 @@ Qseek(QFile *file, long offset, int whence)
|
|||
{
|
||||
if (file->file)
|
||||
return fseek(file->file, offset, whence);
|
||||
#ifdef HAS_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
else
|
||||
return gzseek(file->gzfile,offset,whence);
|
||||
#else
|
||||
|
@ -306,7 +306,7 @@ Qtell(QFile *file)
|
|||
{
|
||||
if (file->file)
|
||||
return ftell(file->file);
|
||||
#ifdef HAS_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
else
|
||||
return gztell(file->gzfile);
|
||||
#else
|
||||
|
@ -319,7 +319,7 @@ Qflush(QFile *file)
|
|||
{
|
||||
if (file->file)
|
||||
return fflush(file->file);
|
||||
#ifdef HAS_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
else
|
||||
return gzflush(file->gzfile,Z_SYNC_FLUSH);
|
||||
#else
|
||||
|
@ -332,7 +332,7 @@ Qeof(QFile *file)
|
|||
{
|
||||
if (file->file)
|
||||
return feof(file->file);
|
||||
#ifdef HAS_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
else
|
||||
return gzeof(file->gzfile);
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue