Skip to content

Commit 389ef8a

Browse files
author
Nicholas Reed
committed
start adding symbols for MSVC dll import/export; SCL git ba12196
1 parent e997b59 commit 389ef8a

File tree

21 files changed

+550
-478
lines changed

21 files changed

+550
-478
lines changed

include/express/alg.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,11 @@ struct Where_ {
109109
/* global variables */
110110
/********************/
111111

112-
extern struct freelist_head ALG_fl;
113-
extern struct freelist_head FUNC_fl;
114-
extern struct freelist_head RULE_fl;
115-
extern struct freelist_head PROC_fl;
116-
extern struct freelist_head WHERE_fl;
112+
extern SCL_EXPRESS_EXPORT struct freelist_head ALG_fl;
113+
extern SCL_EXPRESS_EXPORT struct freelist_head FUNC_fl;
114+
extern SCL_EXPRESS_EXPORT struct freelist_head RULE_fl;
115+
extern SCL_EXPRESS_EXPORT struct freelist_head PROC_fl;
116+
extern SCL_EXPRESS_EXPORT struct freelist_head WHERE_fl;
117117

118118
/******************************/
119119
/* macro function definitions */
@@ -161,8 +161,8 @@ extern struct freelist_head WHERE_fl;
161161
/* function prototypes */
162162
/***********************/
163163

164-
extern Scope ALGcreate PROTO( ( char ) );
165-
extern void ALGinitialize PROTO( ( void ) );
166-
extern void ALGput_full_text PROTO( ( Scope, int, int ) );
164+
extern SCL_EXPRESS_EXPORT Scope ALGcreate PROTO( ( char ) );
165+
extern SCL_EXPRESS_EXPORT void ALGinitialize PROTO( ( void ) );
166+
extern SCL_EXPRESS_EXPORT void ALGput_full_text PROTO( ( Scope, int, int ) );
167167

168168
#endif /* ALGORITHM_H */

include/express/basic.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
*
7272
*/
7373

74+
#include <scl_export.h>
7475
#include <stdio.h>
7576

7677
/******************************/

include/express/caseitem.h

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

75-
extern struct freelist_head CASE_IT_fl;
75+
extern SCL_EXPRESS_EXPORT struct freelist_head CASE_IT_fl;
7676

7777
/******************************/
7878
/* macro function definitions */
@@ -88,7 +88,7 @@ extern struct freelist_head CASE_IT_fl;
8888
#define CASE_IT_new() (struct Case_Item_ *)MEM_new(&CASE_IT_fl)
8989
#define CASE_IT_destroy(x) MEM_destroy(&CASE_IT_fl,(Freelist *)(Generic)x)
9090

91-
extern Case_Item CASE_ITcreate PROTO( ( Linked_List, struct Statement_ * ) );
92-
extern void CASE_ITinitialize PROTO( ( void ) );
91+
extern SCL_EXPRESS_EXPORT Case_Item CASE_ITcreate PROTO( ( Linked_List, struct Statement_ * ) );
92+
extern SCL_EXPRESS_EXPORT void CASE_ITinitialize PROTO( ( void ) );
9393

9494
#endif /*CASE_ITEM_H*/

include/express/dict.h

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ typedef HashEntry DictionaryEntry;
7575
/* global variables */
7676
/********************/
7777

78-
extern char DICT_type; /* set as a side-effect of DICT lookup routines */
79-
/* to type of object found */
78+
extern SCL_EXPRESS_EXPORT char DICT_type; /**< set as a side-effect of DICT lookup routines to type of object found */
8079

8180
/*******************************/
8281
/* macro function definitions */
@@ -101,13 +100,13 @@ extern char DICT_type; /* set as a side-effect of DICT lookup routines */
101100
/* function prototypes */
102101
/***********************/
103102

104-
extern void DICTinitialize PROTO( ( void ) );
105-
extern int DICTdefine PROTO( ( Dictionary, char *, Generic, Symbol *, char ) );
106-
extern int DICT_define PROTO( ( Dictionary, char *, Generic, Symbol *, char ) );
107-
extern void DICTundefine PROTO( ( Dictionary, char * ) );
108-
extern Generic DICTlookup PROTO( ( Dictionary, char * ) );
109-
extern Generic DICTlookup_symbol PROTO( ( Dictionary, char *, Symbol ** ) );
110-
extern Generic DICTdo PROTO( ( DictionaryEntry * ) );
111-
extern void DICTprint PROTO( ( Dictionary ) );
103+
extern SCL_EXPRESS_EXPORT void DICTinitialize PROTO( ( void ) );
104+
extern SCL_EXPRESS_EXPORT int DICTdefine PROTO( ( Dictionary, char *, Generic, Symbol *, char ) );
105+
extern SCL_EXPRESS_EXPORT int DICT_define PROTO( ( Dictionary, char *, Generic, Symbol *, char ) );
106+
extern SCL_EXPRESS_EXPORT void DICTundefine PROTO( ( Dictionary, char * ) );
107+
extern SCL_EXPRESS_EXPORT Generic DICTlookup PROTO( ( Dictionary, char * ) );
108+
extern SCL_EXPRESS_EXPORT Generic DICTlookup_symbol PROTO( ( Dictionary, char *, Symbol ** ) );
109+
extern SCL_EXPRESS_EXPORT Generic DICTdo PROTO( ( DictionaryEntry * ) );
110+
extern SCL_EXPRESS_EXPORT void DICTprint PROTO( ( Dictionary ) );
112111

113112
#endif /*DICTIONARY_H*/

include/express/entity.h

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
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-
/************************************************************************
4+
/** **********************************************************************
75
** Module: Entity
86
** Description: This module represents Express entity definitions. An
97
** entity definition consists of a name, a list of attributes, a
@@ -62,6 +60,7 @@
6260
/* packages used */
6361
/*****************/
6462

63+
#include <scl_export.h>
6564
#include "expbasic.h" /* get basic definitions */
6665
#include "symbol.h"
6766
#include "scope.h"
@@ -110,8 +109,8 @@ struct Entity_ {
110109
/* global variables */
111110
/********************/
112111

113-
extern struct freelist_head ENTITY_fl;
114-
extern int ENTITY_MARK;
112+
extern SCL_EXPRESS_EXPORT struct freelist_head ENTITY_fl;
113+
extern SCL_EXPRESS_EXPORT int ENTITY_MARK;
115114

116115
/******************************/
117116
/* macro function definitions */
@@ -148,19 +147,19 @@ extern int ENTITY_MARK;
148147
/* function prototypes */
149148
/***********************/
150149

151-
extern struct Scope_ * ENTITYcreate PROTO( ( struct Symbol_ * ) );
152-
extern void ENTITYinitialize PROTO( ( void ) );
153-
extern void ENTITYadd_attribute PROTO( ( struct Scope_ *, struct Variable_ * ) );
154-
extern struct Scope_ * ENTITYcopy PROTO( ( struct Scope_ * ) );
155-
extern Entity ENTITYfind_inherited_entity PROTO( ( struct Scope_ *, char *, int ) );
156-
extern Variable ENTITYfind_inherited_attribute PROTO( ( struct Scope_ *, char *, struct Symbol_ ** ) );
157-
extern Variable ENTITYresolve_attr_ref PROTO( ( Entity, Symbol *, Symbol * ) );
158-
extern bool ENTITYhas_immediate_supertype PROTO( ( Entity, Entity ) );
159-
extern Variable ENTITYget_named_attribute PROTO( ( Entity, char * ) );
160-
extern Linked_List ENTITYget_all_attributes PROTO( ( Entity ) );
161-
extern bool ENTITYhas_supertype PROTO( ( Entity, Entity ) );
162-
extern void ENTITYadd_instance PROTO( ( Entity, Generic ) );
163-
extern int ENTITYget_initial_offset PROTO( ( Entity ) );
164-
extern int ENTITYdeclares_variable PROTO( ( Entity, struct Variable_ * ) );
150+
extern SCL_EXPRESS_EXPORT struct Scope_ * ENTITYcreate PROTO( ( struct Symbol_ * ) );
151+
extern SCL_EXPRESS_EXPORT void ENTITYinitialize PROTO( ( void ) );
152+
extern SCL_EXPRESS_EXPORT void ENTITYadd_attribute PROTO( ( struct Scope_ *, struct Variable_ * ) );
153+
extern SCL_EXPRESS_EXPORT struct Scope_ * ENTITYcopy PROTO( ( struct Scope_ * ) );
154+
extern SCL_EXPRESS_EXPORT Entity ENTITYfind_inherited_entity PROTO( ( struct Scope_ *, char *, int ) );
155+
extern SCL_EXPRESS_EXPORT Variable ENTITYfind_inherited_attribute PROTO( ( struct Scope_ *, char *, struct Symbol_ ** ) );
156+
extern SCL_EXPRESS_EXPORT Variable ENTITYresolve_attr_ref PROTO( ( Entity, Symbol *, Symbol * ) );
157+
extern SCL_EXPRESS_EXPORT bool ENTITYhas_immediate_supertype PROTO( ( Entity, Entity ) );
158+
extern SCL_EXPRESS_EXPORT Variable ENTITYget_named_attribute PROTO( ( Entity, char * ) );
159+
extern SCL_EXPRESS_EXPORT Linked_List ENTITYget_all_attributes PROTO( ( Entity ) );
160+
extern SCL_EXPRESS_EXPORT bool ENTITYhas_supertype PROTO( ( Entity, Entity ) );
161+
extern SCL_EXPRESS_EXPORT void ENTITYadd_instance PROTO( ( Entity, Generic ) );
162+
extern SCL_EXPRESS_EXPORT int ENTITYget_initial_offset PROTO( ( Entity ) );
163+
extern SCL_EXPRESS_EXPORT int ENTITYdeclares_variable PROTO( ( Entity, struct Variable_ * ) );
165164

166165
#endif /* ENTITY_H */

include/express/error.h

Lines changed: 44 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -80,29 +80,29 @@ typedef struct Error_Warning_ {
8080
/* global variables */
8181
/********************/
8282

83-
extern bool __ERROR_buffer_errors;
84-
extern char * current_filename;
83+
extern SCL_EXPRESS_EXPORT bool __ERROR_buffer_errors;
84+
extern SCL_EXPRESS_EXPORT char * current_filename;
8585

8686
/* flag to remember whether non-warning errors have occurred */
87-
extern bool ERRORoccurred;
87+
extern SCL_EXPRESS_EXPORT bool ERRORoccurred;
8888

8989

90-
extern Error experrc;
91-
extern Error ERROR_subordinate_failed;
92-
extern Error ERROR_syntax_expecting;
90+
extern SCL_EXPRESS_EXPORT Error experrc;
91+
extern SCL_EXPRESS_EXPORT Error ERROR_subordinate_failed;
92+
extern SCL_EXPRESS_EXPORT Error ERROR_syntax_expecting;
9393

9494
/* all of these are 1 if true, 0 if false switches */
9595
/* for debugging fedex */
96-
extern int ERRORdebugging;
96+
extern SCL_EXPRESS_EXPORT int ERRORdebugging;
9797
/* for debugging malloc during resolution */
98-
extern int malloc_debug_resolve;
98+
extern SCL_EXPRESS_EXPORT int malloc_debug_resolve;
9999
/* for debugging yacc/lex */
100-
extern int debug;
100+
extern SCL_EXPRESS_EXPORT int debug;
101101

102-
extern struct Linked_List_ * ERRORwarnings;
103-
extern struct freelist_head ERROR_OPT_fl;
102+
extern SCL_EXPRESS_EXPORT struct Linked_List_ * ERRORwarnings;
103+
extern SCL_EXPRESS_EXPORT struct freelist_head ERROR_OPT_fl;
104104

105-
extern void ( *ERRORusage_function )( void );
105+
extern SCL_EXPRESS_EXPORT void ( *ERRORusage_function )( void );
106106

107107
/******************************/
108108
/* macro function definitions */
@@ -111,6 +111,14 @@ extern void ( *ERRORusage_function )( void );
111111
#define ERROR_OPT_new() (struct Error_Warning_ *)MEM_new(&ERROR_OPT_fl)
112112
#define ERROR_OPT_destroy(x) MEM_destroy(&ERROR_OPT_fl,(Freelist *)(Generic)x)
113113

114+
/***********************/
115+
/* function prototypes */
116+
/***********************/
117+
118+
#if defined(__MSVC__) || defined(__BORLAND__)
119+
extern SCL_EXPRESS_EXPORT void ERROR_start_message_buffer PROTO( ( void ) );
120+
extern SCL_EXPRESS_EXPORT void ERROR_flush_message_buffer PROTO( ( void ) );
121+
#endif
114122

115123
/********************/
116124
/* Inline functions */
@@ -133,9 +141,10 @@ static_inline bool ERRORis_enabled( Error error ) {
133141
}
134142

135143
static_inline void ERRORbuffer_messages( bool flag ) {
144+
#if !defined(__MSVC__) && !defined(__BORLAND__)
136145
extern void ERROR_start_message_buffer( void ),
137146
ERROR_flush_message_buffer( void );
138-
147+
#endif
139148
__ERROR_buffer_errors = flag;
140149
if( __ERROR_buffer_errors ) {
141150
ERROR_start_message_buffer();
@@ -145,8 +154,10 @@ static_inline void ERRORbuffer_messages( bool flag ) {
145154
}
146155

147156
static_inline void ERRORflush_messages( void ) {
157+
#if !defined(__MSVC__) && !defined(__BORLAND__)
148158
extern void ERROR_start_message_buffer( void ),
149159
ERROR_flush_message_buffer( void );
160+
#endif
150161

151162
if( __ERROR_buffer_errors ) {
152163
ERROR_flush_message_buffer();
@@ -158,25 +169,26 @@ static_inline void ERRORflush_messages( void ) {
158169
/* function prototypes */
159170
/***********************/
160171

161-
extern void ERRORinitialize PROTO( ( void ) );
162-
extern void ERRORinitialize_after_LIST PROTO( ( void ) );
163-
extern void ERRORnospace PROTO( ( void ) );
164-
extern void ERRORabort PROTO( ( int ) );
165-
extern Error ERRORcreate PROTO( ( char *, Severity ) );
166-
extern void ERRORreport PROTO( ( Error, ... ) );
172+
extern SCL_EXPRESS_EXPORT void ERRORinitialize PROTO( ( void ) );
173+
extern SCL_EXPRESS_EXPORT void ERRORinitialize_after_LIST PROTO( ( void ) );
174+
extern SCL_EXPRESS_EXPORT void ERRORnospace PROTO( ( void ) );
175+
extern SCL_EXPRESS_EXPORT void ERRORabort PROTO( ( int ) );
176+
extern SCL_EXPRESS_EXPORT Error ERRORcreate PROTO( ( char *, Severity ) );
177+
extern SCL_EXPRESS_EXPORT void ERRORreport PROTO( ( Error, ... ) );
178+
167179
struct Symbol_; /* mention Symbol to avoid warning on following line */
168-
extern void ERRORreport_with_symbol PROTO( ( Error, struct Symbol_ *, ... ) );
169-
extern void ERRORreport_with_line PROTO( ( Error, int, ... ) );
170-
extern void ERRORbuffer_messages PROTO( ( bool ) );
171-
extern void ERRORflush_messages PROTO( ( void ) );
172-
173-
extern void ERROR_start_message_buffer PROTO( ( void ) );
174-
extern void ERROR_flush_message_buffer PROTO( ( void ) );
175-
176-
extern void ERRORcreate_warning PROTO( ( char *, Error ) );
177-
extern void ERRORset_warning PROTO( ( char *, int ) );
178-
extern void ERRORset_all_warnings PROTO( ( int ) );
179-
extern void ERRORsafe PROTO( ( jmp_buf env ) );
180-
extern void ERRORunsafe PROTO( ( void ) );
180+
extern SCL_EXPRESS_EXPORT void ERRORreport_with_symbol PROTO( ( Error, struct Symbol_ *, ... ) );
181+
extern SCL_EXPRESS_EXPORT void ERRORreport_with_line PROTO( ( Error, int, ... ) );
182+
183+
#if !defined(__MSVC__) && !defined(__BORLAND__)
184+
extern SCL_EXPRESS_EXPORT void ERROR_start_message_buffer PROTO( ( void ) );
185+
extern SCL_EXPRESS_EXPORT void ERROR_flush_message_buffer PROTO( ( void ) );
186+
#endif
187+
188+
extern SCL_EXPRESS_EXPORT void ERRORcreate_warning PROTO( ( char *, Error ) );
189+
extern SCL_EXPRESS_EXPORT void ERRORset_warning PROTO( ( char *, int ) );
190+
extern SCL_EXPRESS_EXPORT void ERRORset_all_warnings PROTO( ( int ) );
191+
extern SCL_EXPRESS_EXPORT void ERRORsafe PROTO( ( jmp_buf env ) );
192+
extern SCL_EXPRESS_EXPORT void ERRORunsafe PROTO( ( void ) );
181193

182194
#endif /* ERROR_H */

include/express/expr.h

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
#ifndef EXPRESSION_H
22
#define EXPRESSION_H
33

4-
/* $Id: expr.h,v 1.4 1997/01/21 19:17:11 dar Exp $ */
5-
6-
/************************************************************************
4+
/** **********************************************************************
75
** Module: Expression
86
** Description: This module implements the Expression abstraction.
97
** Several types of expressions are supported: identifiers,
@@ -62,6 +60,7 @@
6260
/* packages used */
6361
/*****************/
6462

63+
#include <scl_export.h>
6564
#include <math.h>
6665
#include "expbasic.h" /* get basic definitions */
6766

@@ -192,23 +191,23 @@ struct EXPop_entry {
192191
/* global variables */
193192
/********************/
194193

195-
extern struct EXPop_entry EXPop_table[OP_LAST];
194+
extern SCL_EXPRESS_EXPORT struct EXPop_entry EXPop_table[OP_LAST];
196195

197-
extern Expression LITERAL_E;
198-
extern Expression LITERAL_INFINITY;
199-
extern Expression LITERAL_PI;
200-
extern Expression LITERAL_ZERO;
201-
extern Expression LITERAL_ONE;
196+
extern SCL_EXPRESS_EXPORT Expression LITERAL_E;
197+
extern SCL_EXPRESS_EXPORT Expression LITERAL_INFINITY;
198+
extern SCL_EXPRESS_EXPORT Expression LITERAL_PI;
199+
extern SCL_EXPRESS_EXPORT Expression LITERAL_ZERO;
200+
extern SCL_EXPRESS_EXPORT Expression LITERAL_ONE;
202201

203-
extern Error ERROR_bad_qualification;
204-
extern Error ERROR_integer_expression_expected;
205-
extern Error ERROR_implicit_downcast;
206-
extern Error ERROR_ambig_implicit_downcast;
202+
extern SCL_EXPRESS_EXPORT Error ERROR_bad_qualification;
203+
extern SCL_EXPRESS_EXPORT Error ERROR_integer_expression_expected;
204+
extern SCL_EXPRESS_EXPORT Error ERROR_implicit_downcast;
205+
extern SCL_EXPRESS_EXPORT Error ERROR_ambig_implicit_downcast;
207206

208-
extern struct freelist_head EXP_fl;
209-
extern struct freelist_head OP_fl;
210-
extern struct freelist_head QUERY_fl;
211-
extern struct freelist_head QUAL_ATTR_fl;
207+
extern SCL_EXPRESS_EXPORT struct freelist_head EXP_fl;
208+
extern SCL_EXPRESS_EXPORT struct freelist_head OP_fl;
209+
extern SCL_EXPRESS_EXPORT struct freelist_head QUERY_fl;
210+
extern SCL_EXPRESS_EXPORT struct freelist_head QUAL_ATTR_fl;
212211

213212
/******************************/
214213
/* macro function definitions */
@@ -261,15 +260,15 @@ extern struct freelist_head QUAL_ATTR_fl;
261260
/* function prototypes */
262261
/***********************/
263262

264-
extern Expression EXPcreate PROTO( ( Type ) );
265-
extern Expression EXPcreate_simple PROTO( ( Type ) );
266-
extern Expression EXPcreate_from_symbol PROTO( ( Type, Symbol * ) );
267-
extern Expression UN_EXPcreate PROTO( ( Op_Code, Expression ) );
268-
extern Expression BIN_EXPcreate PROTO( ( Op_Code, Expression, Expression ) );
269-
extern Expression TERN_EXPcreate PROTO( ( Op_Code, Expression, Expression, Expression ) );
270-
extern Expression QUERYcreate PROTO( ( Symbol *, Expression ) );
271-
extern void EXPinitialize PROTO( ( void ) );
272-
extern Type EXPtype PROTO( ( Expression, struct Scope_ * ) );
273-
extern int EXPget_integer_value PROTO( ( Expression ) );
263+
extern SCL_EXPRESS_EXPORT Expression EXPcreate PROTO( ( Type ) );
264+
extern SCL_EXPRESS_EXPORT Expression EXPcreate_simple PROTO( ( Type ) );
265+
extern SCL_EXPRESS_EXPORT Expression EXPcreate_from_symbol PROTO( ( Type, Symbol * ) );
266+
extern SCL_EXPRESS_EXPORT Expression UN_EXPcreate PROTO( ( Op_Code, Expression ) );
267+
extern SCL_EXPRESS_EXPORT Expression BIN_EXPcreate PROTO( ( Op_Code, Expression, Expression ) );
268+
extern SCL_EXPRESS_EXPORT Expression TERN_EXPcreate PROTO( ( Op_Code, Expression, Expression, Expression ) );
269+
extern SCL_EXPRESS_EXPORT Expression QUERYcreate PROTO( ( Symbol *, Expression ) );
270+
extern SCL_EXPRESS_EXPORT void EXPinitialize PROTO( ( void ) );
271+
extern SCL_EXPRESS_EXPORT Type EXPtype PROTO( ( Expression, struct Scope_ * ) );
272+
extern SCL_EXPRESS_EXPORT int EXPget_integer_value PROTO( ( Expression ) );
274273

275274
#endif /*EXPRESSION_H*/

0 commit comments

Comments
 (0)