Skip to content

Commit 5909d1e

Browse files
author
Nicholas Reed
committed
Removed toggled declarations/definitions in headers. Headers include only declarations, and explicit definitions found in appropriate sources.
1 parent a6b8716 commit 5909d1e

45 files changed

Lines changed: 609 additions & 832 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

include/express/alg.h

Lines changed: 5 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@
3939
*
4040
*/
4141

42-
/*************/
43-
/* constants */
44-
/*************/
45-
4642
/*****************/
4743
/* packages used */
4844
/*****************/
@@ -61,10 +57,6 @@ typedef struct Scope_ *Function;
6157
typedef struct Scope_ *Rule;
6258
typedef struct Where_ *Where;
6359

64-
/****************/
65-
/* modules used */
66-
/****************/
67-
6860
/***************************/
6961
/* hidden type definitions */
7062
/***************************/
@@ -106,10 +98,6 @@ struct Rule_ {
10698
Linked_List parameters;
10799
Linked_List body;
108100
struct FullText text;
109-
/*
110-
Linked_List where;
111-
moved to Scope - DEL 22-Jul-1993
112-
*/
113101
};
114102

115103
/* define a where clause */
@@ -122,19 +110,11 @@ struct Where_ {
122110
/* global variables */
123111
/********************/
124112

125-
#ifdef ALGORITHM_C
126-
#include "defstart.h"
127-
#else
128-
#include "decstart.h"
129-
#endif /* ALGORITHM_C */
130-
131-
GLOBAL struct freelist_head ALG_fl;
132-
GLOBAL struct freelist_head FUNC_fl;
133-
GLOBAL struct freelist_head RULE_fl;
134-
GLOBAL struct freelist_head PROC_fl;
135-
GLOBAL struct freelist_head WHERE_fl;
136-
137-
#include "de_end.h"
113+
extern struct freelist_head ALG_fl;
114+
extern struct freelist_head FUNC_fl;
115+
extern struct freelist_head RULE_fl;
116+
extern struct freelist_head PROC_fl;
117+
extern struct freelist_head WHERE_fl;
138118

139119
/******************************/
140120
/* macro function definitions */
@@ -181,13 +161,6 @@ GLOBAL struct freelist_head WHERE_fl;
181161
#define WHEREget_label(w) ((w)->label)
182162
#define WHEREget_expression(w) ((w)->expr)
183163

184-
#if 0
185-
extern void ALGput_parameters PROTO((Algorithm, Linked_List ));
186-
extern void ALGput_body PROTO((Algorithm, Linked_List ));
187-
extern void FUNCput_return_type PROTO((Algorithm, Type));
188-
extern void RULEput_where_clause PROTO((Algorithm,Linked_List));
189-
#endif
190-
191164
/***********************/
192165
/* function prototypes */
193166
/***********************/
@@ -196,11 +169,4 @@ extern Scope ALGcreate PROTO((char));
196169
extern void ALGinitialize PROTO((void));
197170
extern void ALGput_full_text PROTO((Scope, int, int));
198171

199-
/********************/
200-
/* inline functions */
201-
/********************/
202-
203-
#if supports_inline_functions || defined(ALGORITHM_C)
204-
#endif /* supports_inline_functions || defined(ALGORITHM_C) */
205-
206172
#endif /* ALGORITHM_H */

include/express/basic.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,7 @@ typedef int (*intFuncptr)();
105105
/* deal with inline functions */
106106
/******************************/
107107

108-
#if !defined(static_inline)
109-
#if !defined(__GNUC__) || defined(__STRICT_ANSI)
110-
#define static_inline
111-
#undef supports_inline_functions
112-
#else
113-
#define static_inline static __inline
114-
#define supports_inline_functions 1L
115-
#endif /* */
116-
#endif /* !defined(static_inline) */
108+
#define static_inline static inline
117109

118110
/* allow same declarations to suffice for both Standard and Classic C */
119111
/* ... at least in header files ... */

include/express/caseitem.h

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,7 @@ struct Case_Item_ {
7272
/* global variables */
7373
/********************/
7474

75-
#ifdef CASE_ITEM_C
76-
#include "defstart.h"
77-
#else
78-
#include "decstart.h"
79-
#endif /*CASE_ITEM_C*/
80-
81-
GLOBAL struct freelist_head CASE_IT_fl;
82-
83-
#include "de_end.h"
75+
extern struct freelist_head CASE_IT_fl;
8476

8577
/******************************/
8678
/* macro function definitions */
@@ -99,11 +91,4 @@ GLOBAL struct freelist_head CASE_IT_fl;
9991
extern Case_Item CASE_ITcreate PROTO((Linked_List, struct Statement_ *));
10092
extern void CASE_ITinitialize PROTO((void));
10193

102-
/********************/
103-
/* inline functions */
104-
/********************/
105-
106-
#if supports_inline_functions || defined(CASE_ITEM_C)
107-
#endif /* supports_inline_functions || defined(CASE_ITEM_C) */
108-
10994
#endif /*CASE_ITEM_H*/

include/express/de_end.h

Lines changed: 0 additions & 25 deletions
This file was deleted.

include/express/decstart.h

Lines changed: 0 additions & 25 deletions
This file was deleted.

include/express/defstart.h

Lines changed: 0 additions & 25 deletions
This file was deleted.

include/express/dict.h

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,9 @@ typedef HashEntry DictionaryEntry;
7575
/* global variables */
7676
/********************/
7777

78-
#ifdef DICTIONARY_C
79-
#include "defstart.h"
80-
#else
81-
#include "decstart.h"
82-
#endif /*DICTIONARY_C*/
83-
84-
GLOBAL char DICT_type; /* set as a side-effect of DICT lookup routines */
78+
extern char DICT_type; /* set as a side-effect of DICT lookup routines */
8579
/* to type of object found */
8680

87-
#include "de_end.h"
88-
8981
/*******************************/
9082
/* macro function definitions */
9183
/*******************************/
@@ -118,11 +110,4 @@ extern Generic DICTlookup_symbol PROTO((Dictionary, char *,Symbol **));
118110
extern Generic DICTdo PROTO((DictionaryEntry *));
119111
extern void DICTprint PROTO((Dictionary));
120112

121-
/********************/
122-
/* inline functions */
123-
/********************/
124-
125-
#if supports_inline_functions || defined(DICTIONARY_C)
126-
#endif /*supports_inline_functions || defined(DICTIONARY_C)*/
127-
128113
#endif /*DICTIONARY_H*/

include/express/entity.h

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,8 @@ struct Entity_ {
110110
/* global variables */
111111
/********************/
112112

113-
#ifdef ENTITY_C
114-
#include "defstart.h"
115-
#else
116-
#include "decstart.h"
117-
#endif /* ENTITY_C */
118-
119-
GLOBAL struct freelist_head ENTITY_fl;
120-
121-
GLOBAL int ENTITY_MARK INITIALLY(0);
122-
123-
#include "de_end.h"
113+
extern struct freelist_head ENTITY_fl;
114+
extern int ENTITY_MARK;
124115

125116
/******************************/
126117
/* macro function definitions */
@@ -172,25 +163,4 @@ extern void ENTITYadd_instance PROTO((Entity, Generic));
172163
extern int ENTITYget_initial_offset PROTO((Entity));
173164
extern int ENTITYdeclares_variable PROTO((Entity, struct Variable_ *));
174165

175-
#if 0
176-
extern void ENTITYdelete_instance PROTO((Entity, Generic));
177-
extern Boolean ENTITYhas_subtype PROTO((Entity, Entity));
178-
extern Entity ENTITYget_supertype PROTO((Entity,String));
179-
extern Entity ENTITYget_subtype PROTO((Entity,String));
180-
extern Boolean ENTITYhas_immediate_subtype PROTO((Entity, Entity));
181-
extern Expression ENTITYget_subtype_expression PROTO((Entity));
182-
extern int ENTITYget_attribute_offset PROTO((Entity, Variable));
183-
extern int ENTITYget_named_attribute_offset PROTO((Entity, String));
184-
extern Linked_List ENTITYget_uniqueness_list PROTO((Entity));
185-
extern Linked_List ENTITYget_constraints PROTO((Entity));
186-
extern Linked_List ENTITYget_instances PROTO((Entity));
187-
#endif /*0*/
188-
189-
/********************/
190-
/* inline functions */
191-
/********************/
192-
193-
#if supports_inline_functions || defined(ENTITY_C)
194-
#endif /* supports_inline_functions || defined(ENTITY_C) */
195-
196166
#endif /* ENTITY_H */

include/express/error.h

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -82,37 +82,29 @@ typedef struct Error_Warning_ {
8282
/* global variables */
8383
/********************/
8484

85-
#ifdef ERROR_C
86-
#include "defstart.h"
87-
#else
88-
#include "decstart.h"
89-
#endif /* ERROR_C */
90-
91-
GLOBAL Boolean __ERROR_buffer_errors INITIALLY(False);
92-
GLOBAL char *current_filename INITIALLY("stdin");
85+
extern Boolean __ERROR_buffer_errors;
86+
extern char *current_filename;
9387

9488
/* flag to remember whether non-warning errors have occurred */
95-
GLOBAL Boolean ERRORoccurred INITIALLY(False);
89+
extern Boolean ERRORoccurred;
9690

9791

98-
GLOBAL Error experrc INITIALLY(ERROR_none);
99-
GLOBAL Error ERROR_subordinate_failed INITIALLY(ERROR_none);
100-
GLOBAL Error ERROR_syntax_expecting INITIALLY(ERROR_none);
92+
extern Error experrc;
93+
extern Error ERROR_subordinate_failed;
94+
extern Error ERROR_syntax_expecting;
10195

10296
/* all of these are 1 if true, 0 if false switches */
10397
/* for debugging fedex */
104-
GLOBAL int ERRORdebugging INITIALLY(0);
98+
extern int ERRORdebugging;
10599
/* for debugging malloc during resolution */
106-
GLOBAL int malloc_debug_resolve INITIALLY(0);
100+
extern int malloc_debug_resolve;
107101
/* for debugging yacc/lex */
108-
GLOBAL int debug INITIALLY(0);
109-
110-
GLOBAL struct Linked_List_ *ERRORwarnings;
111-
GLOBAL struct freelist_head ERROR_OPT_fl;
102+
extern int debug;
112103

113-
GLOBAL void (*ERRORusage_function) PROTO((void));
104+
extern struct Linked_List_ *ERRORwarnings;
105+
extern struct freelist_head ERROR_OPT_fl;
114106

115-
#include "de_end.h"
107+
extern void (*ERRORusage_function)(void);
116108

117109
/******************************/
118110
/* macro function definitions */
@@ -126,8 +118,6 @@ GLOBAL void (*ERRORusage_function) PROTO((void));
126118
/* Inline functions */
127119
/********************/
128120

129-
#if supports_inline_functions || defined(ERROR_C)
130-
131121
static_inline
132122
void
133123
ERRORdisable(Error error)
@@ -178,8 +168,6 @@ ERRORflush_messages(void)
178168
}
179169
}
180170

181-
#endif /*supports_inline_functions || defined(ERROR_C)*/
182-
183171
/***********************/
184172
/* function prototypes */
185173
/***********************/

0 commit comments

Comments
 (0)