mirror of
https://git.code.sf.net/p/quake/nuq
synced 2025-02-16 09:01:16 +00:00
%s/HAS_ZLIB/HAVE_ZLIB/g
This commit is contained in:
parent
899598f79a
commit
baa3489074
5 changed files with 26 additions and 26 deletions
|
@ -80,7 +80,7 @@
|
|||
#undef HAVE_DLOPEN
|
||||
|
||||
/* Define if you have zlib */
|
||||
#undef HAS_ZLIB
|
||||
#undef HAVE_ZLIB
|
||||
|
||||
/* If your version of OpenGL uses APIENTRY, define GLAPIENTRY to be APIENTRY */
|
||||
#undef GLAPIENTRY
|
||||
|
|
14
configure.in
14
configure.in
|
@ -197,14 +197,14 @@ AC_CHECK_LIB(m, pow,, AC_MSG_ERROR([math library (-lm) appears broken]))
|
|||
if test "x$enable_zlib" != "xno"; then
|
||||
dnl Check for working -lz
|
||||
dnl Note - must have gztell *and* gzgets in -lz *and* zlib.h
|
||||
AC_CHECK_LIB(z, gztell, HAS_ZLIB=yes, HAS_ZLIB=no, [$LIBS])
|
||||
if test "x$HAS_ZLIB" = "xyes"; then
|
||||
AC_CHECK_LIB(z, gzgets, HAS_ZLIB=yes, HAS_ZLIB=no, [$LIBS])
|
||||
if test "x$HAS_ZLIB" = "xyes"; then
|
||||
AC_CHECK_HEADER(zlib.h, HAS_ZLIB=yes, HAS_ZLIB=no)
|
||||
if test "x$HAS_ZLIB" = "xyes"; then
|
||||
AC_CHECK_LIB(z, gztell, HAVE_ZLIB=yes, HAVE_ZLIB=no, [$LIBS])
|
||||
if test "x$HAVE_ZLIB" = "xyes"; then
|
||||
AC_CHECK_LIB(z, gzgets, HAVE_ZLIB=yes, HAVE_ZLIB=no, [$LIBS])
|
||||
if test "x$HAVE_ZLIB" = "xyes"; then
|
||||
AC_CHECK_HEADER(zlib.h, HAVE_ZLIB=yes, HAVE_ZLIB=no)
|
||||
if test "x$HAVE_ZLIB" = "xyes"; then
|
||||
LIBS="-lz $LIBS"
|
||||
AC_DEFINE(HAS_ZLIB)
|
||||
AC_DEFINE(HAVE_ZLIB)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef HAS_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
#include <zlib.h>
|
||||
#endif
|
||||
|
||||
|
@ -43,7 +43,7 @@
|
|||
|
||||
typedef struct {
|
||||
FILE *file;
|
||||
#ifdef HAS_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
gzFile *gzfile;
|
||||
#endif
|
||||
} QFile;
|
||||
|
|
|
@ -424,7 +424,7 @@ COM_FOpenFile (char *filename, QFile **gzfile)
|
|||
pack_t *pak;
|
||||
int i;
|
||||
int findtime;
|
||||
#ifdef HAS_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
char gzfilename[MAX_OSPATH];
|
||||
int filenamelen;;
|
||||
|
||||
|
@ -447,7 +447,7 @@ COM_FOpenFile (char *filename, QFile **gzfile)
|
|||
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;
|
||||
|
@ -478,7 +478,7 @@ COM_FOpenFile (char *filename, QFile **gzfile)
|
|||
|
||||
findtime = Sys_FileTime (netpath);
|
||||
if (findtime == -1) {
|
||||
#ifdef HAS_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
snprintf(netpath, sizeof(netpath), "%s/%s",search->filename,
|
||||
gzfilename);
|
||||
findtime = Sys_FileTime (netpath);
|
||||
|
|
|
@ -114,7 +114,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) {
|
||||
|
@ -153,7 +153,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) {
|
||||
|
@ -184,7 +184,7 @@ Qclose(QFile *file)
|
|||
{
|
||||
if (file->file)
|
||||
fclose(file->file);
|
||||
#ifdef HAS_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
else
|
||||
gzclose(file->gzfile);
|
||||
#endif
|
||||
|
@ -196,7 +196,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
|
||||
|
@ -209,7 +209,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
|
||||
|
@ -226,7 +226,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);
|
||||
|
@ -250,7 +250,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
|
||||
|
@ -263,7 +263,7 @@ Qgetc(QFile *file)
|
|||
{
|
||||
if (file->file)
|
||||
return fgetc(file->file);
|
||||
#ifdef HAS_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
else
|
||||
return gzgetc(file->gzfile);
|
||||
#else
|
||||
|
@ -276,7 +276,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
|
||||
|
@ -289,7 +289,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
|
||||
|
@ -302,7 +302,7 @@ Qtell(QFile *file)
|
|||
{
|
||||
if (file->file)
|
||||
return ftell(file->file);
|
||||
#ifdef HAS_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
else
|
||||
return gztell(file->gzfile);
|
||||
#else
|
||||
|
@ -315,7 +315,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
|
||||
|
@ -328,7 +328,7 @@ Qeof(QFile *file)
|
|||
{
|
||||
if (file->file)
|
||||
return feof(file->file);
|
||||
#ifdef HAS_ZLIB
|
||||
#ifdef HAVE_ZLIB
|
||||
else
|
||||
return gzeof(file->gzfile);
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue