aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-03-21 21:58:39 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-03-21 21:58:39 +0000
commitd24fa0e61d1bd4424954b5b4fcafab25cb63706d (patch)
tree448f49c14e6261bda812181e86217f346119c067
parent77b338bf2ce121a427bd1b9d1fcd9085a1f46bc4 (diff)
downloadioquake3-aero-d24fa0e61d1bd4424954b5b4fcafab25cb63706d.tar.gz
ioquake3-aero-d24fa0e61d1bd4424954b5b4fcafab25cb63706d.zip
* LCC bug fix from the how-the-fuck-did-that-ever-work? department
git-svn-id: svn://svn.icculus.org/quake3/trunk@651 edf5b092-35ff-0310-97b2-ce42778d08ea
-rw-r--r--code/tools/lcc/cpp/unix.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/code/tools/lcc/cpp/unix.c b/code/tools/lcc/cpp/unix.c
index 9d8e568..b7850df 100644
--- a/code/tools/lcc/cpp/unix.c
+++ b/code/tools/lcc/cpp/unix.c
@@ -19,6 +19,8 @@ setup(int argc, char **argv)
char *fp, *dp;
Tokenrow tr;
extern void setup_kwtab(void);
+ char *includeDirs[ NINCLUDE ] = { 0 };
+ int numIncludeDirs = 0;
setup_kwtab();
while ((c = getopt(argc, argv, "MNOVv+I:D:U:F:lg")) != -1)
@@ -29,7 +31,7 @@ setup(int argc, char **argv)
includelist[i].deleted = 1;
break;
case 'I':
- appendDirToIncludeList( optarg );
+ includeDirs[ numIncludeDirs++ ] = newstring( (uchar *)optarg, strlen( optarg ), 0 );
break;
case 'D':
case 'U':
@@ -73,6 +75,10 @@ setup(int argc, char **argv)
setobjname(fp);
includelist[NINCLUDE-1].always = 0;
includelist[NINCLUDE-1].file = dp;
+
+ for( i = 0; i < numIncludeDirs; i++ )
+ appendDirToIncludeList( includeDirs[ i ] );
+
setsource(fp, fd, NULL);
}