r651 - trunk/code/tools/lcc/cpp

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Mar 21 16:58:39 EST 2006


Author: tma
Date: 2006-03-21 16:58:39 -0500 (Tue, 21 Mar 2006)
New Revision: 651

Modified:
   trunk/code/tools/lcc/cpp/unix.c
Log:
* LCC bug fix from the how-the-fuck-did-that-ever-work? department


Modified: trunk/code/tools/lcc/cpp/unix.c
===================================================================
--- trunk/code/tools/lcc/cpp/unix.c	2006-03-19 07:51:28 UTC (rev 650)
+++ trunk/code/tools/lcc/cpp/unix.c	2006-03-21 21:58:39 UTC (rev 651)
@@ -19,6 +19,8 @@
 	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 @@
 					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 @@
 		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);
 }
 




More information about the quake3-commits mailing list