mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-02-21 10:51:06 +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
|
@ -29,9 +29,9 @@ To compile under "free" Borland C++, see couple of paragraphs below.
|
|||
|
||||
or:
|
||||
open include/vc/config.h and change the line that reads
|
||||
#define HAS_ZLIB
|
||||
#define HAVE_ZLIB
|
||||
to
|
||||
#undef HAS_ZLIB
|
||||
#undef HAVE_ZLIB
|
||||
and remove zlib.lib and zlibd.lib from the project settings
|
||||
(not reccommended)
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
#undef HAVE_DLOPEN
|
||||
|
||||
/* Define if you have zlib */
|
||||
#undef HAS_ZLIB
|
||||
#undef HAVE_ZLIB
|
||||
|
||||
/* Define if you have pthread support. */
|
||||
#undef HAVE_LIBPTHREAD
|
||||
|
|
14
configure.in
14
configure.in
|
@ -189,14 +189,14 @@ AC_ARG_ENABLE(zlib,
|
|||
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;
|
||||
|
|
|
@ -244,7 +244,7 @@
|
|||
#undef HAVE_LIBM
|
||||
|
||||
/* Define if you have the zlib library (-lz). */
|
||||
#define HAS_ZLIB
|
||||
#define HAVE_ZLIB
|
||||
|
||||
/* Posix, needed for limits.h and Unix stuffs to work right */
|
||||
#define _POSIX_
|
||||
|
|
|
@ -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…
Reference in a new issue