Skip to content

Commit 5dc0439

Browse files
committed
cleanup and doxify files in include/express
1 parent 3e8c116 commit 5dc0439

20 files changed

Lines changed: 260 additions & 518 deletions

include/express/alg.h

Lines changed: 14 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
#ifndef ALGORITHM_H
22
#define ALGORITHM_H
33

4-
/* $Id: alg.h,v 1.4 1997/01/21 19:17:11 dar Exp $ */
5-
6-
/************************************************************************
7-
** Module: Algorithm
4+
/** **********************************************************************
5+
** Module: Algorithm \file alg.h
86
** Description: This module implements the Algorithm abstraction. An
97
** algorithm can be a procedure, a function, or a rule. It consists
108
** of a name, a return type (for functions and rules), a list of
@@ -69,50 +67,47 @@ typedef struct Where_ * Where;
6967
/* hidden type definitions */
7068
/***************************/
7169

72-
/* each formal tag has one of these structs allocated to it */
73-
/* As each (real) call is resolved, the tag->type is temporarily borrowed */
70+
/** each formal tag has one of these structs allocated to it
71+
* As each (real) call is resolved, the tag->type is temporarily borrowed
72+
*/
7473
struct tag {
7574
char * name;
7675
Type type;
7776
};
7877

79-
/* location of fulltext of algorithm in source file */
78+
/** location of fulltext of algorithm in source file */
8079
struct FullText {
8180
char * filename;
8281
unsigned int start, end;
8382
};
8483

85-
/* 'parameters' are lists of lists of (type) expressions */
84+
/** 'parameters' are lists of lists of (type) expressions */
8685
struct Procedure_ {
87-
int pcount; /* # of parameters */
88-
int tag_count; /* # of different parameter tags */
86+
int pcount; /**< # of parameters */
87+
int tag_count; /**< # of different parameter tags */
8988
Linked_List parameters;
9089
Linked_List body;
9190
struct FullText text;
92-
int builtin; /* builtin if true */
91+
int builtin; /**< builtin if true */
9392
};
9493

9594
struct Function_ {
96-
int pcount; /* # of parameters */
97-
int tag_count; /* # of different parameter/return value tags */
95+
int pcount; /**< # of parameters */
96+
int tag_count; /**< # of different parameter/return value tags */
9897
Linked_List parameters;
9998
Linked_List body;
10099
Type return_type;
101100
struct FullText text;
102-
int builtin; /* builtin if true */
101+
int builtin; /**< builtin if true */
103102
};
104103

105104
struct Rule_ {
106105
Linked_List parameters;
107106
Linked_List body;
108107
struct FullText text;
109-
/*
110-
Linked_List where;
111-
moved to Scope - DEL 22-Jul-1993
112-
*/
113108
};
114109

115-
/* define a where clause */
110+
/** define a where clause */
116111
struct Where_ {
117112
Symbol * label;
118113
Expression expr;
@@ -175,19 +170,9 @@ GLOBAL SCL_EXPRESS_EXPORT struct freelist_head WHERE_fl;
175170
#define FUNCget_return_type(f) ((f)->u.func->return_type)
176171
#define RULEget_where(r) ((r)->where)
177172
#define RULEput_where(r,w) ((r)->where = (w))
178-
/*
179-
#define RULEget_where_clause(r) ((r)->u.rule->where)
180-
*/
181173
#define WHEREget_label(w) ((w)->label)
182174
#define WHEREget_expression(w) ((w)->expr)
183175

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-
191176
/***********************/
192177
/* function prototypes */
193178
/***********************/
@@ -196,11 +181,5 @@ extern SCL_EXPRESS_EXPORT Scope ALGcreate PROTO( ( char ) );
196181
extern SCL_EXPRESS_EXPORT void ALGinitialize PROTO( ( void ) );
197182
extern SCL_EXPRESS_EXPORT void ALGput_full_text PROTO( ( Scope, int, int ) );
198183

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

206185
#endif /* ALGORITHM_H */

include/express/basic.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#ifndef BASIC_H
22
#define BASIC_H
33

4-
/* $Id: basic.h,v 1.8 1997/10/22 16:06:28 sauderd Exp $ */
54

65
/*
76
* This work was supported by the United States Government, and is
@@ -146,12 +145,6 @@ typedef int ( *intFuncptr )();
146145
# endif
147146
#endif
148147

149-
150-
/* pacify IBM's c89 */
151-
#if !defined(_POSIX_SOURCE)
152-
#define _POSIX_SOURCE
153-
#endif
154-
155148
#endif /* */
156149

157150

include/express/caseitem.h

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
#ifndef CASE_ITEM_H
22
#define CASE_ITEM_H
33

4-
/* $Id: caseitem.h,v 1.3 1997/01/21 19:17:11 dar Exp $ */
5-
6-
/************************************************************************
7-
** Module: Case_Item
4+
/** **********************************************************************
5+
** Module: Case_Item \file caseitem.h
86
** Description: This module implements the Case_Item abstraction. A
97
** case item represents a single branch in a case statement; it
108
** thus consists of a list of labels and a statement to execute
@@ -99,11 +97,4 @@ GLOBAL SCL_EXPRESS_EXPORT struct freelist_head CASE_IT_fl;
9997
extern SCL_EXPRESS_EXPORT Case_Item CASE_ITcreate PROTO( ( Linked_List, struct Statement_ * ) );
10098
extern SCL_EXPRESS_EXPORT void CASE_ITinitialize PROTO( ( void ) );
10199

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-
109100
#endif /*CASE_ITEM_H*/

include/express/dict.h

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
#ifndef DICTIONARY_H
22
#define DICTIONARY_H
33

4-
/* $Id: dict.h,v 1.4 1997/01/21 19:17:11 dar Exp $ */
5-
6-
/************************************************************************
7-
** Module: Dictionary
4+
/** **********************************************************************
5+
** Module: Dictionary \file dict.h
86
** Description: This module implements the dictionary abstraction. A
97
** dictionary is a repository for a number of objects, all of which
108
** can be named using the same function. A dictionary is limited to
@@ -80,8 +78,7 @@ typedef HashEntry DictionaryEntry;
8078
#include "decstart.h"
8179
#endif /*DICTIONARY_C*/
8280

83-
GLOBAL SCL_EXPRESS_EXPORT char DICT_type; /* set as a side-effect of DICT lookup routines */
84-
/* to type of object found */
81+
GLOBAL SCL_EXPRESS_EXPORT char DICT_type; /**< set as a side-effect of DICT lookup routines to type of object found */
8582

8683
#include "de_end.h"
8784

@@ -90,12 +87,12 @@ GLOBAL SCL_EXPRESS_EXPORT char DICT_type; /* set as a side-effect of DICT looku
9087
/*******************************/
9188

9289
#define DICTcreate(estimated_max_size) HASHcreate(estimated_max_size)
93-
/* should really can DICTdo_init and rename do_type_init to do_init! */
90+
/** should really can DICTdo_init and rename do_type_init to do_init! */
9491
#define DICTdo_init(dict,de) HASHlistinit((dict),(de))
9592
#define DICTdo_type_init(dict,de,t) HASHlistinit_by_type((dict),(de),(t))
9693
#define DICTdo_end(hash_entry) HASHlistend(hash_entry)
9794

98-
/* modify dictionary entry in-place */
95+
/** modify dictionary entry in-place */
9996
#define DICTchange(e,obj,sym,typ) { \
10097
(e)->data = (obj); \
10198
(e)->symbol = (sym); \
@@ -117,11 +114,4 @@ extern SCL_EXPRESS_EXPORT Generic DICTlookup_symbol PROTO( ( Dictionary, ch
117114
extern SCL_EXPRESS_EXPORT Generic DICTdo PROTO( ( DictionaryEntry * ) );
118115
extern SCL_EXPRESS_EXPORT void DICTprint PROTO( ( Dictionary ) );
119116

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

include/express/entity.h

Lines changed: 14 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
#ifndef ENTITY_H
22
#define ENTITY_H
33

4-
/* $Id: entity.h,v 1.12 1997/01/21 19:17:11 dar Exp $ */
5-
6-
/************************************************************************
7-
** Module: Entity
4+
/** **********************************************************************
5+
** Module: Entity \file entity.h
86
** Description: This module represents Express entity definitions. An
97
** entity definition consists of a name, a list of attributes, a
108
** collection of uniqueness sets, a specification of the entity's
@@ -86,25 +84,18 @@ typedef struct Scope_ * Entity;
8684
/***************************/
8785

8886
struct Entity_ {
89-
Linked_List supertype_symbols; /* linked list of original symbols*/
90-
/* as generated by parser */
91-
Linked_List supertypes; /* linked list of supertypes (as entities) */
92-
Linked_List subtypes; /* simple list of subtypes */
93-
/* useful for simple lookups */
94-
Expression subtype_expression; /* DAG of subtypes, with complete */
95-
/* information including, OR, AND, and ONEOF */
96-
Linked_List attributes; /* explicit attributes */
97-
int inheritance; /* total number of attributes */
98-
/* inherited from supertypes */
99-
int attribute_count;
100-
Linked_List unique; /* list of identifiers that are unique */
101-
Linked_List instances; /* hook for applications */
102-
int mark; /* usual hack - prevent traversing sub/super */
103-
/* graph twice */
104-
bool abstract;/* is this an abstract supertype? */
105-
Type type; /* type pointing back to ourself */
106-
/* Useful to have when evaluating */
107-
/* expressions involving entities */
87+
Linked_List supertype_symbols; /**< linked list of original symbols as generated by parser */
88+
Linked_List supertypes; /**< linked list of supertypes (as entities) */
89+
Linked_List subtypes; /**< simple list of subtypes useful for simple lookups */
90+
Expression subtype_expression; /**< DAG of subtypes, with complete information including, OR, AND, and ONEOF */
91+
Linked_List attributes; /**< explicit attributes */
92+
int inheritance; /**< total number of attributes inherited from supertypes */
93+
int attribute_count;
94+
Linked_List unique; /**< list of identifiers that are unique */
95+
Linked_List instances; /**< hook for applications */
96+
int mark; /**< usual hack - prevent traversing sub/super graph twice */
97+
bool abstract; /**< is this an abstract supertype? */
98+
Type type; /**< type pointing back to ourself, useful to have when evaluating expressions involving entities */
10899
};
109100

110101
/********************/
@@ -173,25 +164,4 @@ extern SCL_EXPRESS_EXPORT void ENTITYadd_instance PROTO( ( Entity, Generic )
173164
extern SCL_EXPRESS_EXPORT int ENTITYget_initial_offset PROTO( ( Entity ) );
174165
extern SCL_EXPRESS_EXPORT bool ENTITYdeclares_variable PROTO( ( Entity, struct Variable_ * ) );
175166

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

include/express/expbasic.h

Lines changed: 29 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* $Id: expbasic.h,v 1.7 1997/01/21 19:17:11 dar Exp $ */
21

32
/*
43
* This software was developed by U.S. Government employees as part of
@@ -72,84 +71,81 @@ typedef char * Binary;
7271
#define UNRESOLVED 0x0
7372
#define RESOLVED 0x1
7473
#define RESOLVE_FAILED 0x2
75-
#define RESOLVE_IN_PROGRESS 0x4 /* only if actively being resolved */
76-
/* not if it's just between passes */
74+
#define RESOLVE_IN_PROGRESS 0x4 /**< only if actively being resolved not if it's just between passes */
7775

78-
/* used during rename resolution to catch recursive USE/REFs */
76+
/** used during rename resolution to catch recursive USE/REFs */
7977
#define is_resolve_in_progress_raw(x) ((x)->resolved & RESOLVE_IN_PROGRESS)
8078
#define resolve_in_progress_raw(x) (x)->resolved |= RESOLVE_IN_PROGRESS
8179
#define resolve_not_in_progress_raw(x) (x)->resolved &= ~RESOLVE_IN_PROGRESS
8280

83-
/* and type resolution to catch recursive types (A = B and B = A) */
81+
/** and type resolution to catch recursive types (A = B and B = A) */
8482
#define resolve_in_progress(x) (x)->symbol.resolved |= RESOLVE_IN_PROGRESS
8583

86-
/* test/set whether anything has failed resolution */
84+
/** test/set whether anything has failed resolution */
8785
#define is_resolve_failed(x) ((x)->symbol.resolved & RESOLVE_FAILED)
8886
#define is_resolve_failed_raw(x) ((x)->resolved & RESOLVE_FAILED)
8987
#define resolve_failed(x) (x)->symbol.resolved |= RESOLVE_FAILED
9088
#define resolve_failed_raw(x) (x)->resolved |= RESOLVE_FAILED
9189

92-
/* test/set whether anything has succeeded resolution */
90+
/** test/set whether anything has succeeded resolution */
9391
#define is_resolved(x) ((x)->symbol.resolved & RESOLVED)
9492

95-
/* test possibility of future resolution */
93+
/** test possibility of future resolution */
9694
#define is_resolvable(x) (!is_not_resolvable(x))
9795
#define is_not_resolvable(x) ((x)->symbol.resolved & (RESOLVE_FAILED|RESOLVED|RESOLVE_IN_PROGRESS))
9896

99-
/* mark something resolved */
97+
/** mark something resolved */
10098
#define resolved_all(x) x->symbol.resolved = RESOLVED
10199

102100

103-
/* define the object types that can appear in a symbol table */
104-
/* basically anything that is usefully named, but that cannot be */
105-
/* differentiated from another type when handed a generic pointer */
106-
/* Entity, schema and alg can be differentiated but it is just very */
107-
/* useful to be able to differentiate this way. */
108-
#define OBJ_ANY '*' /* Matches anything - special to DICT funcs */
109-
#define OBJ_EXPRESS '!' /* I can't figure out the mnemonic either! */
101+
/** define the object types that can appear in a symbol table
102+
* basically anything that is usefully named, but that cannot be
103+
* differentiated from another type when handed a generic pointer
104+
* Entity, schema and alg can be differentiated but it is just very
105+
* useful to be able to differentiate this way. */
106+
#define OBJ_ANY '*' /**< Matches anything - special to DICT funcs */
107+
#define OBJ_EXPRESS '!' /**< I can't figure out the mnemonic either! */
110108
#define OBJ_PASS '#'
111109

112-
/* The following are all odd-ball scopes, that aren't ever looked up by */
113-
/* type - but the data structures might as well be descriptive */
110+
/** The following are all odd-ball scopes, that aren't ever looked up by
111+
* type - but the data structures might as well be descriptive */
114112
#define OBJ_INCREMENT '+'
115113
#define OBJ_ALIAS 'a'
116-
#define OBJ_QUERY 'q' /* isn't even stored anywhere! */
114+
#define OBJ_QUERY 'q' /**< isn't even stored anywhere! */
117115

118116
#define OBJ_PROCEDURE 'p'
119117
#define OBJ_RENAME 'n'
120118
#define OBJ_RULE 'r'
121119
#define OBJ_FUNCTION 'f'
122-
#define OBJ_TAG 'g' /* a type, but only when used as a type tag */
120+
#define OBJ_TAG 'g' /**< a type, but only when used as a type tag */
123121
#define OBJ_ENTITY 'e'
124122
#define OBJ_SCHEMA 's'
125123
#define OBJ_TYPE 't'
126-
#define OBJ_UNKNOWN 'u' /*things that won't ever be looked up by type*/
124+
#define OBJ_UNKNOWN 'u' /**< things that won't ever be looked up by type*/
127125
#define OBJ_VARIABLE 'v'
128126
#define OBJ_WHERE 'w'
129-
#define OBJ_EXPRESSION 'x' /* so far only enums get looked up by name & */
130-
#define OBJ_ENUM 'x' /* appear this way, perhaps they should be */
131-
/* variables? */
132-
#define OBJ_AMBIG_ENUM 'z' /* enumerations of the same name which are */
133-
/* visible in the same scope when qualified */
134-
/* z is of no mnemonic significance (so far) */
127+
#define OBJ_EXPRESSION 'x' /**< so far only enums get looked up by name & */
128+
#define OBJ_ENUM 'x' /**< appear this way, perhaps they should be variables? */
129+
#define OBJ_AMBIG_ENUM 'z' /**< enumerations of the same name which are
130+
* visible in the same scope when qualified
131+
* z is of no mnemonic significance (so far) */
135132
#define IS_ENUM(x) (((x) == OBJ_ENUM) || ((x) == OBJ_AMBIG_ENUM))
136133

137-
/* these represent a different way of selecting classes of objects */
138-
/* these are particularly useful when looking for multiple types concurrently */
134+
/** these represent a different way of selecting classes of objects
135+
* these are particularly useful when looking for multiple types concurrently */
139136
#define OBJ_TYPE_BITS 0x1
140137
#define OBJ_ENTITY_BITS 0x2
141138
#define OBJ_FUNCTION_BITS 0x4
142139
#define OBJ_PROCEDURE_BITS 0x8
143-
#define OBJ_PASS_BITS 0x10 /* i.e., EXPRESSpass */
140+
#define OBJ_PASS_BITS 0x10 /**< i.e., EXPRESSpass */
144141
#define OBJ_RULE_BITS 0x20
145-
#define OBJ_EXPRESSION_BITS 0x40 /* as above, only used for */
146-
/* finding enums */
142+
#define OBJ_EXPRESSION_BITS 0x40 /**< as above, only used for finding enums */
147143
#define OBJ_SCHEMA_BITS 0x80
148144
#define OBJ_VARIABLE_BITS 0x100
149145
#define OBJ_WHERE_BITS 0x200
150146

151147
#define OBJ_ANYTHING_BITS 0x0fffffff
152-
#define OBJ_UNFINDABLE_BITS 0x10000000 /* should never be found */
148+
#define OBJ_UNFINDABLE_BITS 0x10000000 /**< should never be found */
153149
#define OBJ_ALGORITHM_BITS (OBJ_FUNCTION_BITS | OBJ_PROCEDURE_BITS | \
154150
OBJ_RULE_BITS)
155151
#define OBJ_SCOPE_BITS (OBJ_ALGORITHM_BITS | OBJ_ENTITY_BITS | \

0 commit comments

Comments
 (0)