fix RELEASE build, make sure path separator gets added to hogdir

This commit is contained in:
Bradley Bell 2004-12-02 09:48:57 +00:00
parent f81fcb88a6
commit 7dce7ab24d
3 changed files with 15 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2004-12-02 Bradley Bell <btb@icculus.org>
* include/cfile.h, include/physfsx.h: fix RELEASE build, make sure
path separator gets added to hogdir
2004-12-01 Bradley Bell <btb@icculus.org>
* README, configure.ac, VisualC/d2x/d2x.dsp,

View file

@ -1,4 +1,4 @@
/* $Id: cfile.h,v 1.13 2004-12-01 13:01:00 btb Exp $ */
/* $Id: cfile.h,v 1.14 2004-12-02 09:48:57 btb Exp $ */
/*
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
@ -44,6 +44,12 @@ static inline PHYSFS_file *cfopen(char *filename, char *mode)
PHYSFS_uint64 bufSize;
mode = mode; // no warning
if (filename[0] == '\x01')
{
//FIXME: don't look in dir, only in hogfile
filename++;
}
fp = PHYSFS_openRead(filename);
if (!fp)
return NULL;

View file

@ -1,4 +1,4 @@
/* $Id: physfsx.h,v 1.3 2004-12-02 08:52:59 btb Exp $ */
/* $Id: physfsx.h,v 1.4 2004-12-02 09:48:57 btb Exp $ */
/*
*
@ -85,6 +85,8 @@ static inline int PHYSFSX_getRealPath(char *stdPath, char *realPath)
strncpy(realPath, realDir, PATH_MAX); // some compilers (like MPW) don't have snprintf
p = realPath + strlen(realPath);
*p++ = sep;
*p = '\0';
strncat(realPath, stdPath, PATH_MAX - strlen(realPath));
while ((p = strchr(p, '/')))
*p++ = sep;