mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-05-05 04:00:56 +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:
|
or:
|
||||||
open include/vc/config.h and change the line that reads
|
open include/vc/config.h and change the line that reads
|
||||||
#define HAS_ZLIB
|
#define HAVE_ZLIB
|
||||||
to
|
to
|
||||||
#undef HAS_ZLIB
|
#undef HAVE_ZLIB
|
||||||
and remove zlib.lib and zlibd.lib from the project settings
|
and remove zlib.lib and zlibd.lib from the project settings
|
||||||
(not reccommended)
|
(not reccommended)
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@
|
||||||
#undef HAVE_DLOPEN
|
#undef HAVE_DLOPEN
|
||||||
|
|
||||||
/* Define if you have zlib */
|
/* Define if you have zlib */
|
||||||
#undef HAS_ZLIB
|
#undef HAVE_ZLIB
|
||||||
|
|
||||||
/* Define if you have pthread support. */
|
/* Define if you have pthread support. */
|
||||||
#undef HAVE_LIBPTHREAD
|
#undef HAVE_LIBPTHREAD
|
||||||
|
|
14
configure.in
14
configure.in
|
@ -189,14 +189,14 @@ AC_ARG_ENABLE(zlib,
|
||||||
if test "x$enable_zlib" != "xno"; then
|
if test "x$enable_zlib" != "xno"; then
|
||||||
dnl Check for working -lz
|
dnl Check for working -lz
|
||||||
dnl Note - must have gztell *and* gzgets in -lz *and* zlib.h
|
dnl Note - must have gztell *and* gzgets in -lz *and* zlib.h
|
||||||
AC_CHECK_LIB(z, gztell, HAS_ZLIB=yes, HAS_ZLIB=no, [$LIBS])
|
AC_CHECK_LIB(z, gztell, HAVE_ZLIB=yes, HAVE_ZLIB=no, [$LIBS])
|
||||||
if test "x$HAS_ZLIB" = "xyes"; then
|
if test "x$HAVE_ZLIB" = "xyes"; then
|
||||||
AC_CHECK_LIB(z, gzgets, HAS_ZLIB=yes, HAS_ZLIB=no, [$LIBS])
|
AC_CHECK_LIB(z, gzgets, HAVE_ZLIB=yes, HAVE_ZLIB=no, [$LIBS])
|
||||||
if test "x$HAS_ZLIB" = "xyes"; then
|
if test "x$HAVE_ZLIB" = "xyes"; then
|
||||||
AC_CHECK_HEADER(zlib.h, HAS_ZLIB=yes, HAS_ZLIB=no)
|
AC_CHECK_HEADER(zlib.h, HAVE_ZLIB=yes, HAVE_ZLIB=no)
|
||||||
if test "x$HAS_ZLIB" = "xyes"; then
|
if test "x$HAVE_ZLIB" = "xyes"; then
|
||||||
LIBS="-lz $LIBS"
|
LIBS="-lz $LIBS"
|
||||||
AC_DEFINE(HAS_ZLIB)
|
AC_DEFINE(HAVE_ZLIB)
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#ifdef HAS_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
FILE *file;
|
FILE *file;
|
||||||
#ifdef HAS_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
gzFile *gzfile;
|
gzFile *gzfile;
|
||||||
#endif
|
#endif
|
||||||
} QFile;
|
} QFile;
|
||||||
|
|
|
@ -244,7 +244,7 @@
|
||||||
#undef HAVE_LIBM
|
#undef HAVE_LIBM
|
||||||
|
|
||||||
/* Define if you have the zlib library (-lz). */
|
/* 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 */
|
/* Posix, needed for limits.h and Unix stuffs to work right */
|
||||||
#define _POSIX_
|
#define _POSIX_
|
||||||
|
|
|
@ -425,7 +425,7 @@ _COM_FOpenFile (char *filename, QFile **gzfile, char *foundname, int zip)
|
||||||
pack_t *pak;
|
pack_t *pak;
|
||||||
int i;
|
int i;
|
||||||
int findtime;
|
int findtime;
|
||||||
#ifdef HAS_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
char gzfilename[MAX_OSPATH];
|
char gzfilename[MAX_OSPATH];
|
||||||
int filenamelen;;
|
int filenamelen;;
|
||||||
|
|
||||||
|
@ -448,7 +448,7 @@ _COM_FOpenFile (char *filename, QFile **gzfile, char *foundname, int zip)
|
||||||
pak = search->pack;
|
pak = search->pack;
|
||||||
for (i=0 ; i<pak->numfiles ; i++) {
|
for (i=0 ; i<pak->numfiles ; i++) {
|
||||||
char *fn=0;
|
char *fn=0;
|
||||||
#ifdef HAS_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
if (!strncmp(pak->files[i].name, filename, filenamelen)) {
|
if (!strncmp(pak->files[i].name, filename, filenamelen)) {
|
||||||
if (!pak->files[i].name[filenamelen])
|
if (!pak->files[i].name[filenamelen])
|
||||||
fn=filename;
|
fn=filename;
|
||||||
|
@ -481,7 +481,7 @@ _COM_FOpenFile (char *filename, QFile **gzfile, char *foundname, int zip)
|
||||||
strncpy(foundname, filename, MAX_OSPATH);
|
strncpy(foundname, filename, MAX_OSPATH);
|
||||||
findtime = Sys_FileTime (netpath);
|
findtime = Sys_FileTime (netpath);
|
||||||
if (findtime == -1) {
|
if (findtime == -1) {
|
||||||
#ifdef HAS_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
strncpy(foundname, gzfilename, MAX_OSPATH);
|
strncpy(foundname, gzfilename, MAX_OSPATH);
|
||||||
snprintf(netpath, sizeof(netpath), "%s/%s",search->filename,
|
snprintf(netpath, sizeof(netpath), "%s/%s",search->filename,
|
||||||
gzfilename);
|
gzfilename);
|
||||||
|
|
|
@ -121,7 +121,7 @@ Qopen(const char *path, const char *mode)
|
||||||
file=calloc(sizeof(*file),1);
|
file=calloc(sizeof(*file),1);
|
||||||
if (!file)
|
if (!file)
|
||||||
return 0;
|
return 0;
|
||||||
#ifdef HAS_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
if (zip) {
|
if (zip) {
|
||||||
file->gzfile=gzopen(path,m);
|
file->gzfile=gzopen(path,m);
|
||||||
if (!file->gzfile) {
|
if (!file->gzfile) {
|
||||||
|
@ -160,7 +160,7 @@ Qdopen(int fd, const char *mode)
|
||||||
file=calloc(sizeof(*file),1);
|
file=calloc(sizeof(*file),1);
|
||||||
if (!file)
|
if (!file)
|
||||||
return 0;
|
return 0;
|
||||||
#ifdef HAS_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
if (zip) {
|
if (zip) {
|
||||||
file->gzfile=gzdopen(fd,m);
|
file->gzfile=gzdopen(fd,m);
|
||||||
if (!file->gzfile) {
|
if (!file->gzfile) {
|
||||||
|
@ -188,7 +188,7 @@ Qclose(QFile *file)
|
||||||
{
|
{
|
||||||
if (file->file)
|
if (file->file)
|
||||||
fclose(file->file);
|
fclose(file->file);
|
||||||
#ifdef HAS_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
else
|
else
|
||||||
gzclose(file->gzfile);
|
gzclose(file->gzfile);
|
||||||
#endif
|
#endif
|
||||||
|
@ -200,7 +200,7 @@ Qread(QFile *file, void *buf, int count)
|
||||||
{
|
{
|
||||||
if (file->file)
|
if (file->file)
|
||||||
return fread(buf, 1, count, file->file);
|
return fread(buf, 1, count, file->file);
|
||||||
#ifdef HAS_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
else
|
else
|
||||||
return gzread(file->gzfile,buf,count);
|
return gzread(file->gzfile,buf,count);
|
||||||
#else
|
#else
|
||||||
|
@ -213,7 +213,7 @@ Qwrite (QFile *file, void *buf, int count)
|
||||||
{
|
{
|
||||||
if (file->file)
|
if (file->file)
|
||||||
return fwrite(buf, 1, count, file->file);
|
return fwrite(buf, 1, count, file->file);
|
||||||
#ifdef HAS_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
else
|
else
|
||||||
return gzwrite(file->gzfile,buf,count);
|
return gzwrite(file->gzfile,buf,count);
|
||||||
#else
|
#else
|
||||||
|
@ -230,7 +230,7 @@ Qprintf(QFile *file, const char *fmt, ...)
|
||||||
va_start(args,fmt);
|
va_start(args,fmt);
|
||||||
if (file->file)
|
if (file->file)
|
||||||
ret=vfprintf(file->file, fmt, args);
|
ret=vfprintf(file->file, fmt, args);
|
||||||
#ifdef HAS_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
else {
|
else {
|
||||||
char buf[4096];
|
char buf[4096];
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
|
@ -254,7 +254,7 @@ Qgets(QFile *file, char *buf, int count)
|
||||||
{
|
{
|
||||||
if (file->file)
|
if (file->file)
|
||||||
return fgets(buf, count, file->file);
|
return fgets(buf, count, file->file);
|
||||||
#ifdef HAS_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
else
|
else
|
||||||
return gzgets(file->gzfile,buf,count);
|
return gzgets(file->gzfile,buf,count);
|
||||||
#else
|
#else
|
||||||
|
@ -267,7 +267,7 @@ Qgetc(QFile *file)
|
||||||
{
|
{
|
||||||
if (file->file)
|
if (file->file)
|
||||||
return fgetc(file->file);
|
return fgetc(file->file);
|
||||||
#ifdef HAS_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
else
|
else
|
||||||
return gzgetc(file->gzfile);
|
return gzgetc(file->gzfile);
|
||||||
#else
|
#else
|
||||||
|
@ -280,7 +280,7 @@ Qputc(QFile *file, int c)
|
||||||
{
|
{
|
||||||
if (file->file)
|
if (file->file)
|
||||||
return fputc(c, file->file);
|
return fputc(c, file->file);
|
||||||
#ifdef HAS_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
else
|
else
|
||||||
return gzputc(file->gzfile,c);
|
return gzputc(file->gzfile,c);
|
||||||
#else
|
#else
|
||||||
|
@ -293,7 +293,7 @@ Qseek(QFile *file, long offset, int whence)
|
||||||
{
|
{
|
||||||
if (file->file)
|
if (file->file)
|
||||||
return fseek(file->file, offset, whence);
|
return fseek(file->file, offset, whence);
|
||||||
#ifdef HAS_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
else
|
else
|
||||||
return gzseek(file->gzfile,offset,whence);
|
return gzseek(file->gzfile,offset,whence);
|
||||||
#else
|
#else
|
||||||
|
@ -306,7 +306,7 @@ Qtell(QFile *file)
|
||||||
{
|
{
|
||||||
if (file->file)
|
if (file->file)
|
||||||
return ftell(file->file);
|
return ftell(file->file);
|
||||||
#ifdef HAS_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
else
|
else
|
||||||
return gztell(file->gzfile);
|
return gztell(file->gzfile);
|
||||||
#else
|
#else
|
||||||
|
@ -319,7 +319,7 @@ Qflush(QFile *file)
|
||||||
{
|
{
|
||||||
if (file->file)
|
if (file->file)
|
||||||
return fflush(file->file);
|
return fflush(file->file);
|
||||||
#ifdef HAS_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
else
|
else
|
||||||
return gzflush(file->gzfile,Z_SYNC_FLUSH);
|
return gzflush(file->gzfile,Z_SYNC_FLUSH);
|
||||||
#else
|
#else
|
||||||
|
@ -332,7 +332,7 @@ Qeof(QFile *file)
|
||||||
{
|
{
|
||||||
if (file->file)
|
if (file->file)
|
||||||
return feof(file->file);
|
return feof(file->file);
|
||||||
#ifdef HAS_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
else
|
else
|
||||||
return gzeof(file->gzfile);
|
return gzeof(file->gzfile);
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue