Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 97f0277

Browse files
committed
Restructured (yet again) to treat all modules more alike.
1 parent cf7448b commit 97f0277

1 file changed

Lines changed: 132 additions & 31 deletions

File tree

Modules/config.c.in

Lines changed: 132 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2424

2525
/* Configurable Python configuration file */
2626

27+
/* These modules are normally always included, but *may* be taken out */
28+
#define USE_GRP 1 /* Use together with pwd */
29+
#define USE_MARSHAL 1 /* This is linked anyway */
30+
#define USE_PWD 1 /* Use together with grp */
31+
#define USE_POSIX 1
32+
#define USE_SELECT 1
33+
#define USE_SOCKET 1
34+
#define USE_TIME 1
35+
#define USE_MATH 1
36+
2737
#include "PROTO.h"
2838
#include "mymalloc.h"
2939

@@ -85,7 +95,7 @@ donecalls()
8595
}
8696

8797
#ifndef PYTHONPATH
88-
#define PYTHONPATH ".:/usr/local/lib/python"
98+
#define PYTHONPATH ".:/usr/local/lib/python"
8999
#endif
90100

91101
extern char *getenv();
@@ -115,27 +125,25 @@ getpythonpath()
115125
These are initialized when first imported. */
116126

117127
/* Standard modules */
118-
extern void initgrp();
119-
extern void initmarshal();
120-
extern void initmath();
121-
extern void initposix();
122-
extern void initpwd();
123-
extern void initselect();
124-
extern void initsocket();
125-
extern void inittime();
126128

127-
#ifdef USE_AUDIO
128-
extern void initaudio();
129-
#endif
130129
#ifdef USE_AL
131130
extern void inital();
132131
#endif
133132
#ifdef USE_AMOEBA
134133
extern void initamoeba();
135134
#endif
135+
#ifdef USE_AUDIO
136+
extern void initaudio();
137+
#endif
136138
#ifdef USE_CD
137139
extern void initcd();
138140
#endif
141+
#ifdef USE_DBM
142+
extern void initdbm();
143+
#endif
144+
#ifdef USE_FCNTL
145+
extern void initfcntl();
146+
#endif
139147
#ifdef USE_FL
140148
extern void initfl();
141149
#endif
@@ -145,50 +153,75 @@ extern void initfm();
145153
#ifdef USE_GL
146154
extern void initgl();
147155
#endif
156+
#ifdef USE_GRP
157+
extern void initgrp();
158+
#endif
159+
#ifdef USE_IMGFILE
160+
extern void initimgfile();
161+
#endif
148162
#ifdef USE_JPEG
149163
extern void initjpeg();
150164
#endif
165+
#ifdef USE_MARSHAL
166+
extern void initmarshal();
167+
#endif
168+
#ifdef USE_MATH
169+
extern void initmath();
170+
#endif
151171
#ifdef USE_NIS
152172
extern void initnis();
153173
#endif
154174
#ifdef USE_PANEL
155175
extern void initpanel();
156176
#endif
177+
#ifdef USE_POSIX
178+
extern void initposix();
179+
#endif
180+
#ifdef USE_PWD
181+
extern void initpwd();
182+
#endif
157183
#ifdef USE_REGEX
158184
extern void initregex();
159185
#endif
186+
#ifdef USE_ROTOR
187+
extern void initrotor();
188+
#endif
189+
#ifdef USE_SELECT
190+
extern void initselect();
191+
#endif
192+
#ifdef USE_SGI
193+
extern void initsgi();
194+
#endif
195+
#ifdef USE_SOCKET
196+
extern void initsocket();
197+
#endif
160198
#ifdef USE_STDWIN
161199
extern void initstdwin();
162200
#endif
201+
#ifdef USE_STROP
202+
extern void initstrop();
203+
#endif
204+
#ifdef USE_STRUCT
205+
extern void initstruct();
206+
#endif
207+
#ifdef USE_SUNAUDIODEV
208+
extern void initsunaudiodev();
209+
#endif
163210
#ifdef USE_THREAD
164211
extern void initthread();
165212
#endif
166213
#ifdef USE_SV
167214
extern void initsv();
168215
#endif
216+
#ifdef USE_TIME
217+
extern void inittime();
218+
#endif
169219

170220
struct {
171221
char *name;
172222
void (*initfunc)();
173223
} inittab[] = {
174224

175-
/* Standard modules, in alphabetical order */
176-
177-
{"grp", initgrp},
178-
{"marshal", initmarshal},
179-
{"math", initmath},
180-
{"posix", initposix},
181-
{"pwd", initpwd},
182-
{"select", initselect},
183-
{"socket", initsocket},
184-
{"time", inittime},
185-
186-
/* Optional modules, in alphabetical order */
187-
188-
#ifdef USE_AUDIO
189-
{"audio", initaudio},
190-
#endif
191-
192225
#ifdef USE_AL
193226
{"al", inital},
194227
#endif
@@ -197,10 +230,22 @@ struct {
197230
{"amoeba", initamoeba},
198231
#endif
199232

233+
#ifdef USE_AUDIO
234+
{"audio", initaudio},
235+
#endif
236+
200237
#ifdef USE_CD
201238
{"cd", initcd},
202239
#endif
203240

241+
#ifdef USE_DBM
242+
{"dbm", initdbm},
243+
#endif
244+
245+
#ifdef USE_FCNTL
246+
{"fcntl", initfcntl},
247+
#endif
248+
204249
#ifdef USE_FL
205250
{"fl", initfl},
206251
#endif
@@ -213,10 +258,26 @@ struct {
213258
{"gl", initgl},
214259
#endif
215260

261+
#ifdef USE_GRP
262+
{"grp", initgrp},
263+
#endif
264+
265+
#ifdef USE_IMGFILE
266+
{"imgfile", initimgfile},
267+
#endif
268+
216269
#ifdef USE_JPEG
217270
{"jpeg", initjpeg},
218271
#endif
219272

273+
#ifdef USE_MARSHAL
274+
{"marshal", initmarshal},
275+
#endif
276+
277+
#ifdef USE_MATH
278+
{"math", initmath},
279+
#endif
280+
220281
#ifdef USE_NIS
221282
{"nis", initnis},
222283
#endif
@@ -225,21 +286,61 @@ struct {
225286
{"pnl", initpanel},
226287
#endif
227288

289+
#ifdef USE_POSIX
290+
{"posix", initposix},
291+
#endif
292+
293+
#ifdef USE_PWD
294+
{"pwd", initpwd},
295+
#endif
296+
228297
#ifdef USE_REGEX
229298
{"regex", initregex},
230299
#endif
231300

301+
#ifdef USE_ROTOR
302+
{"rotor", initrotor},
303+
#endif
304+
305+
#ifdef USE_SELECT
306+
{"select", initselect},
307+
#endif
308+
309+
#ifdef USE_SGI
310+
{"sgi", initsgi},
311+
#endif
312+
313+
#ifdef USE_SOCKET
314+
{"socket", initsocket},
315+
#endif
316+
232317
#ifdef USE_STDWIN
233318
{"stdwin", initstdwin},
234319
#endif
235320

236-
#ifdef USE_THREAD
237-
{"thread", initthread},
321+
#ifdef USE_STRUCT
322+
{"strop", initstrop},
323+
#endif
324+
325+
#ifdef USE_STRUCT
326+
{"struct", initstruct},
327+
#endif
328+
329+
#ifdef USE_SUNAUDIODEV
330+
{"sunaudiodev", initsunaudiodev},
238331
#endif
239332

240333
#ifdef USE_SV
241334
{"sv", initsv},
242335
#endif
243336

337+
#ifdef USE_THREAD
338+
{"thread", initthread},
339+
#endif
340+
341+
#ifdef USE_TIME
342+
{"time", inittime},
343+
#endif
344+
244345
{0, 0} /* Sentinel */
245346
};

0 commit comments

Comments
 (0)