Jake Todd avatar Jake Todd committed e612a4d

Fixed all of the included include files and document
what needs to be included before each file.

Comments (0)

Files changed (16)

-// entities.c
-
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <ctype.h>
+#include <time.h>
+#include <stdarg.h>
+#include <unistd.h>
+#include "../common/cmdlib.h"
+#include <math.h>
+#include "../common/mathlib.h"
+#include "../common/bspfile.h"
+#include "entities.h"
+#include "threads.h"
 #include "light.h"
 
 entity_t entities[MAX_MAP_ENTITIES];
+/* bspfile.h needs to be included before this file */
 #define DEFAULTLIGHTLEVEL	300
 
 typedef struct epair_s
-// lighting.c
-
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <ctype.h>
+#include <time.h>
+#include <stdarg.h>
+#include <unistd.h>
+#include "../common/cmdlib.h"
+#include <math.h>
+#include "../common/mathlib.h"
+#include "../common/bspfile.h"
+#include "entities.h"
+#include "threads.h"
 #include "light.h"
 
 /*
-#include "cmdlib.h"
-#include "mathlib.h"
-#include "bspfile.h"
-#include "entities.h"
-#include "threads.h"
-
+/* cmdlib.h mathlib.h bspfile.h entities.h and threads.h
+ * must be included before this file */
 #define	ON_EPSILON	0.1
 
 #define	MAXLIGHTS			1024
-
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <ctype.h>
+#include <time.h>
+#include <stdarg.h>
+#include <unistd.h>
+#include "../common/cmdlib.h"
+#include <math.h>
+#include "../common/mathlib.h"
+#include "../common/bspfile.h"
+#include "entities.h"
+#include "threads.h"
 #include "light.h"
 
 /*
 
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <ctype.h>
+#include <time.h>
+#include <stdarg.h>
+#include <unistd.h>
 #include "cmdlib.h"
 #include "threads.h"
 
+/* cmdlib.h mathlib.h bspfile.h must be included before this file */
 #include "cmdlib.h"
 #include "mathlib.h"
 #include "bspfile.h"
-
 #include "qcc.h"
 
 int pr_source_line;
 
 void PR_LexWhitespace(void);
 
-
 /*
 ==============
 PR_PrintNextLine
 	PR_ParseError("Unknown punctuation");
 }
 
-
 /*
 ==============
 PR_LexWhitespace
 	}
 }
 
-//============================================================================
-
 #define	MAX_FRAMES	256
 
 char pr_framemacros[MAX_FRAMES][16];
 		PR_FindMacro();
 }
 
-//============================================================================
-
 /*
 ==============
 PR_Lex
 	PR_LexPunctuation();
 }
 
-//=============================================================================
-
 /*
 ============
 PR_ParseError
 	longjmp(pr_parse_abort, 1);
 }
 
-
 /*
 =============
 PR_Expect
 	PR_Lex();
 }
 
-
 /*
 =============
 PR_Check
 	return check;
 }
 
-
 /*
 ============
 PR_SkipToSemicolon
 	} while(pr_token[0]);		// eof will return a null token
 }
 
-
 /*
 ============
 PR_ParseType
-
 #include "qcc.h"
 
 char sourcedir[1024];
 		def_parms[i].ofs = OFS_PARM0 + 3 * i;
 }
 
-
 void
 WriteData(int crc)
 {
 
 }
 
-
-
 /*
 ===============
 PR_String
 	return !errors;
 }
 
-//=============================================================================
-
 /*
 ============
 PR_WriteProgdefs
 	}
 }
 
-
-//============================================================================
-
 /*
 ============
 main
 extern	int			numfiles;
 
 int	CopyString (char *str);
-
-
-
-#include "cmdlib.h"
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <ctype.h>
+#include <time.h>
+#include <stdarg.h>
+#include <unistd.h>
+#include "../common/cmdlib.h"
 
 #define	MAX_SOUNDS		1024
 #define	MAX_MODELS		1024
-//
 // spritegen.c: generates a .spr file from a series of .lbm frame files.
 // Result is stored in /raid/quake/id1/sprites/<scriptname>.spr.
-//
 
-#define INCLUDELIBS
-
-
-#ifdef NeXT
-#   include <libc.h>
-#endif
-
-#include "spritegn.h"
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <ctype.h>
+#include <time.h>
+#include <stdarg.h>
+#include <unistd.h>
+#include "../common/cmdlib.h"
+#include "../common/scriptlib.h"
+#include "../common/lbmlib.h"
+#include "spritegen.h"
+#include <math.h>
 
 #define MAX_BUFFER_SIZE		0x100000
 #define MAX_FRAMES			1000

sprgen/spritegen.h

-//
+/* cmdlib.h scriptlib.h lbmlib.h must be included before this file
+ * and it must be linked with the math library */
 // spritegn.h: header file for sprite generation program
 //
 
 // <endrepeat>
 //-------------------------------------------------------
 
-#ifdef INCLUDELIBS
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <math.h>
-#include <string.h>
-
-#include "cmdlib.h"
-#include "scriplib.h"
-#include "lbmlib.h"
-
-#endif
-
 #define SPRITE_VERSION	1
 
 // must match definition in modelgen.h

texmake/texmake.c

-#include "cmdlib.h"
-#include "mathlib.h"
-#include "lbmlib.h"
-#include "trilib.h"
+/* link with the math library */
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <ctype.h>
+#include <time.h>
+#include <stdarg.h>
+#include <unistd.h>
+#include "../common/cmdlib.h"
+#include <math.h>
+#include "../common/mathlib.h"
+#include "../common/lbmlib.h"
+#include "../common/trilib.h"
 
 
 triangle_t *faces;
-// vis.c
-
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <ctype.h>
+#include <time.h>
+#include <stdarg.h>
+#include <unistd.h>
+#include "../common/cmdlib.h"
+#include <math.h>
+#include "../common/mathlib.h"
+#include "../common/bspfile.h"
 #include "vis.h"
 
 #define	MAX_THREADS		4
-// vis.h
-
-#include "cmdlib.h"
-#include "mathlib.h"
-#include "bspfile.h"
-
+/* cmdlib.h mathlib.h bspfile.h need to be included before this file */
 #define	MAX_PORTALS	32768
 
 #define	PORTALFILE	"PRT1"
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.