Skip to content

Commit

Permalink
Overhaul tons of #includes
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin authored and ChrisJefferson committed Dec 8, 2017
1 parent 08f56f0 commit a595a53
Show file tree
Hide file tree
Showing 139 changed files with 992 additions and 2,121 deletions.
25 changes: 4 additions & 21 deletions src/ariths.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,12 @@
**
** This file contains the functions of the arithmetic operations package.
*/
#include <src/system.h> /* system dependent part */


#include <src/gasman.h> /* garbage collector */
#include <src/objects.h> /* objects */
#include <src/scanner.h> /* scanner */

#include <src/gap.h> /* error handling, initialisation */

#include <src/gvars.h> /* global variables */
#include <src/calls.h> /* generic call mechanism */
#include <src/opers.h> /* generic operations */

#include <src/ariths.h> /* basic arithmetic */

#include <src/bool.h> /* booleans */

#include <src/records.h> /* generic records */
#include <src/precord.h> /* plain records */

#include <src/lists.h> /* generic lists */

#include <src/ariths.h>

#include <src/bool.h>
#include <src/gap.h>
#include <src/opers.h>


/****************************************************************************
Expand Down
2 changes: 2 additions & 0 deletions src/ariths.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#ifndef GAP_ARITHS_H
#define GAP_ARITHS_H

#include <src/objects.h>

/****************************************************************************
**
*T CompaMethod . . . . . . . . . . type of methods for comparison operations
Expand Down
38 changes: 10 additions & 28 deletions src/blister.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,37 +69,19 @@
**
*N 1992/12/16 martin should have 'LtBlist'
*/
#include <src/system.h> /* system dependent part */

#include <src/blister.h>

#include <src/gasman.h> /* garbage collector */
#include <src/objects.h> /* objects */
#include <src/scanner.h> /* scanner */

#include <src/gap.h> /* error handling, initialisation */

#include <src/gvars.h> /* global variables */
#include <src/calls.h> /* generic call mechanism */
#include <src/opers.h> /* generic operations */

#include <src/ariths.h> /* basic arithmetic */

#include <src/bool.h> /* booleans */

#include <src/records.h> /* generic records */
#include <src/precord.h> /* plain records */

#include <src/lists.h> /* generic lists */
#include <src/plist.h> /* plain lists */
#include <src/set.h> /* plain sets */
#include <src/blister.h> /* boolean lists */
#include <src/range.h> /* ranges */

#include <src/saveload.h> /* saving and loading */

#include <src/hpc/guards.h>

#include <src/ariths.h>
#include <src/bool.h>
#include <src/gap.h>
#include <src/gaputils.h>
#include <src/io.h>
#include <src/lists.h>
#include <src/plist.h>
#include <src/range.h>
#include <src/saveload.h>
#include <src/set.h>


/****************************************************************************
Expand Down
3 changes: 2 additions & 1 deletion src/blister.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
#ifndef GAP_BLISTER_H
#define GAP_BLISTER_H

#include <src/system.h>
#include <src/bool.h>
#include <src/objects.h>

/****************************************************************************
**
Expand Down
24 changes: 11 additions & 13 deletions src/boehm_gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,25 @@
** where the non-boehm versions of these methods live.
**/

#include <src/system.h> /* Ints, UInts */
#include <src/system.h>
#include <src/gapstate.h>
#include <src/gasman.h>
#include <src/objects.h>

#include <src/gasman.h> /* garbage collector */

#include <src/objects.h> /* objects */
#include <src/hpc/misc.h>
#include <src/hpc/thread.h>
#include <src/hpc/guards.h>

#ifdef TRACK_CREATOR
#include <src/calls.h>
#include <src/vars.h>
#endif

#ifndef BOEHM_GC
#error This file can only be used when the Boehm GC collector is enabled
#endif

#include <pthread.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
Expand All @@ -36,15 +43,6 @@
#endif


#include <src/hpc/misc.h>
#include <src/hpc/thread.h> /* threads */
#include <src/hpc/guards.h>
#ifdef TRACK_CREATOR
/* Need CURR_FUNC and NAME_FUNC() */
#include <src/calls.h> /* calls */
#include <src/vars.h> /* variables */
#endif


enum { NTYPES = 256 };

Expand Down
27 changes: 7 additions & 20 deletions src/bool.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,15 @@
** are distinguished by their addresses, kept in the C globals False,
** True and Fail.
*/
#include <src/system.h> /* system dependent part */

#include <src/bool.h>

#include <src/gasman.h> /* garbage collector */
#include <src/objects.h> /* objects */
#include <src/scanner.h> /* scanner */

#include <src/gap.h> /* error handling, initialisation */

#include <src/gvars.h> /* global variables */
#include <src/calls.h> /* generic call mechanism */
#include <src/opers.h> /* generic operations */

#include <src/ariths.h> /* basic arithmetic */

#include <src/bool.h> /* booleans */

#include <src/records.h> /* generic records */
#include <src/precord.h> /* plain records */

#include <src/lists.h> /* generic lists */

#include <src/ariths.h>
#include <src/calls.h>
#include <src/gap.h>
#include <src/gvars.h>
#include <src/io.h>
#include <src/opers.h>


/****************************************************************************
Expand Down
1 change: 1 addition & 0 deletions src/bool.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#ifndef GAP_BOOL_H
#define GAP_BOOL_H

#include <src/objects.h>

/****************************************************************************
**
Expand Down
48 changes: 14 additions & 34 deletions src/calls.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,41 +33,21 @@
** ...what the handlers are..
** ...what the other components are...
*/
#include <src/system.h> /* system dependent part */



#include <src/gasman.h> /* garbage collector */
#include <src/objects.h> /* objects */
#include <src/scanner.h> /* scanner */

#include <src/gap.h> /* error handling, initialisation */

#include <src/gvars.h> /* global variables */

#include <src/calls.h> /* generic call mechanism */

#include <src/opers.h> /* generic operations */

#include <src/records.h> /* generic records */
#include <src/precord.h> /* plain records */

#include <src/lists.h> /* generic lists */

#include <src/bool.h> /* booleans */

#include <src/plist.h> /* plain lists */
#include <src/stringobj.h> /* strings */

#include <src/code.h> /* coder */

#include <src/stats.h> /* statements */

#include <src/saveload.h> /* saving and loading */

#include <src/vars.h> /* variables */

#include <assert.h>
#include <src/calls.h>

#include <src/bool.h>
#include <src/code.h>
#include <src/gap.h>
#include <src/gvars.h>
#include <src/integer.h>
#include <src/lists.h>
#include <src/opers.h>
#include <src/plist.h>
#include <src/saveload.h>
#include <src/stats.h>
#include <src/stringobj.h>
#include <src/vars.h>


void SET_NAME_FUNC(Obj func, Obj name)
Expand Down
4 changes: 1 addition & 3 deletions src/calls.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,8 @@
#ifndef GAP_CALLS_H
#define GAP_CALLS_H

#include <src/gap.h>
#include <src/gaputils.h>
#include <src/lists.h>
#include <src/integer.h>
#include <src/objects.h>


typedef Obj (* ObjFunc_0ARGS) (Obj self);
Expand Down
57 changes: 21 additions & 36 deletions src/code.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,48 +12,33 @@
** The coder package is the part of the interpreter that creates the
** expressions. Its functions are called from the reader.
*/
#include <stdio.h> /* on SunOS, assert.h uses stderr
but does not include stdio.h */
#include <assert.h> /* assert */
#include <src/system.h> /* Ints, UInts */
#include <src/gapstate.h>


#include <src/gasman.h> /* garbage collector */
#include <src/objects.h> /* objects */
#include <src/scanner.h> /* scanner */

#include <src/gap.h> /* error handling, initialisation */

#include <src/calls.h> /* generic call mechanism */
/*N 1996/06/16 mschoene func expressions should be different from funcs */

#include <src/records.h> /* generic records */

#include <src/integer.h> /* integers */

#include <src/records.h> /* generic records */
#include <src/precord.h> /* plain records */

#include <src/lists.h> /* generic lists */
#include <src/plist.h> /* plain lists */
#include <src/stringobj.h> /* strings */
#include <src/code.h>

#include <src/funcs.h> /* functions */

#include <src/code.h> /* coder */
#include <src/bool.h>
#include <src/calls.h>
#include <src/funcs.h>
#include <src/gap.h>
#include <src/gapstate.h>
#include <src/gvars.h>
#include <src/hookintrprtr.h>
#include <src/lists.h>
#include <src/plist.h>
#include <src/read.h>
#include <src/records.h>
#include <src/saveload.h>
#include <src/scanner.h>
#include <src/stringobj.h>
#include <src/vars.h>

#include <src/bool.h> /* For fail */
#include <src/hpc/thread.h>

#include <src/saveload.h> /* saving and loading */
#include <src/read.h> /* to access stack of for loop globals */
#include <src/gvars.h>
#include <src/hpc/thread.h> /* threads */
#include <src/hpc/aobjects.h> /* atomic objects */
#ifdef HPCGAP
#include <src/hpc/aobjects.h>
#endif

#include <src/vars.h> /* variables */
#include <src/hookintrprtr.h>

/*N 1996/06/16 mschoene func expressions should be different from funcs */

GAP_STATIC_ASSERT(sizeof(StatHeader) == 8, "StatHeader has wrong size");

Expand Down
1 change: 0 additions & 1 deletion src/code.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#define GAP_CODE_H

#include <src/debug.h>
#include <src/gasman.h>
#include <src/objects.h>

/****************************************************************************
Expand Down
Loading

0 comments on commit a595a53

Please sign in to comment.