Skip to content

Commit 34679b7

Browse files
committed
* Added Fixcprt.py: script to fix copyright message.
* various modules: added 1993 to copyright. * thread.c: added copyright notice. * ceval.c: minor change to error message for "+" * stdwinmodule.c: check for error from wfetchcolor * config.c: MS-DOS fixes (define PYTHONPATH, use DELIM, use osdefs.h) * Add declaration of inittab to import.h * sysmodule.c: added sys.builtin_module_names * xxmodule.c, xxobject.c: fix minor errors
1 parent 35fb82a commit 34679b7

20 files changed

Lines changed: 122 additions & 51 deletions

Include/allobjects.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/***********************************************************
2-
Copyright 1991, 1992 by Stichting Mathematisch Centrum, Amsterdam, The
3-
Netherlands.
2+
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
3+
Amsterdam, The Netherlands.
44
55
All Rights Reserved
66

Include/import.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/***********************************************************
2-
Copyright 1991, 1992 by Stichting Mathematisch Centrum, Amsterdam, The
3-
Netherlands.
2+
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
3+
Amsterdam, The Netherlands.
44
55
All Rights Reserved
66
@@ -29,3 +29,8 @@ object *add_module PROTO((char *name));
2929
object *import_module PROTO((char *name));
3030
object *reload_module PROTO((object *m));
3131
void doneimport PROTO((void));
32+
33+
extern struct {
34+
char *name;
35+
void (*initfunc)();
36+
} inittab[];

Modules/audioop.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/***********************************************************
2-
Copyright 1991, 1992 by Stichting Mathematisch Centrum, Amsterdam, The
3-
Netherlands.
2+
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
3+
Amsterdam, The Netherlands.
44
55
All Rights Reserved
66

Modules/config.c.in

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,15 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2828
#define USE_MARSHAL 1 /* This is linked anyway */
2929
#define USE_MATH 1
3030
#define USE_STRUCT 1
31-
#define USE_STROP 1
3231
#define USE_TIME 1
3332

3433
#ifdef macintosh
3534
#define USE_AUDIOOP 1
3635
#define USE_IMAGEOP 1
3736
#define USE_MAC 1
3837
#define USE_REGEX 1
39-
#define USE_ROTOR 1
4038
#define USE_STDWIN 1 /* You may turn this off */
39+
#define USE_STROP
4140
#endif
4241

4342
#ifdef unix
@@ -48,10 +47,18 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
4847
#define USE_SOCKET 1
4948
#endif
5049

50+
#ifdef MSDOS
51+
#define USE_POSIX 1 /* Subset defined in posixmodule.c */
52+
#define USE_REGEX 1
53+
#define USE_STROP 1
54+
#define USE_PC 1
55+
#endif
56+
5157
#include <stdio.h>
5258

5359
#include "PROTO.h"
5460
#include "mymalloc.h"
61+
#include "osdefs.h"
5562

5663
#include "patchlevel.h"
5764

@@ -116,12 +123,25 @@ donecalls()
116123
}
117124

118125
#ifndef PYTHONPATH
126+
119127
#ifdef macintosh
120128
/* On the Mac, the search path is a space-separated list of directories */
121129
#define PYTHONPATH ": :lib :demo"
122-
#else /* !macintosh */
130+
#endif /* macintosh */
131+
132+
#ifdef unix
123133
#define PYTHONPATH ".:/usr/local/lib/python"
124-
#endif /* !macintosh */
134+
#endif /* unix */
135+
136+
#ifdef MSDOS
137+
/* In MS-DOS, the delimiter is a semicolon */
138+
#define PYTHONPATH ".;C\\python\\lib"
139+
#endif /* MSDOS */
140+
141+
#ifndef PYTHONPATH
142+
ERROR; ERROR; On what kind of system are you?;
143+
#endif
144+
125145
#endif /* !PYTHONPATH */
126146

127147
extern char *getenv();
@@ -135,6 +155,7 @@ getpythonpath()
135155
char *path = getenv("PYTHONPATH");
136156
char *defpath = PYTHONPATH;
137157
char *buf;
158+
char *p;
138159
int n;
139160

140161
if (path == 0 || *path == '\0')
@@ -144,8 +165,9 @@ getpythonpath()
144165
if (buf == NULL)
145166
return path; /* XXX too bad -- but not likely */
146167
strcpy(buf, path);
147-
strcat(buf, ":");
148-
strcat(buf, defpath);
168+
p = buf + strlen(buf);
169+
*p++ = DELIM;
170+
strcpy(p, defpath);
149171
return buf;
150172
#endif /* !macintosh */
151173
}

Modules/imageop.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/***********************************************************
2-
Copyright 1991, 1992 by Stichting Mathematisch Centrum, Amsterdam, The
3-
Netherlands.
2+
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
3+
Amsterdam, The Netherlands.
44
55
All Rights Reserved
66

Modules/imgfile.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/***********************************************************
2-
Copyright 1991, 1992 by Stichting Mathematisch Centrum, Amsterdam, The
3-
Netherlands.
2+
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
3+
Amsterdam, The Netherlands.
44
55
All Rights Reserved
66

Modules/rotormodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/***********************************************************
2-
Copyright 1991, 1992 by Stichting Mathematisch Centrum, Amsterdam, The
3-
Netherlands.
2+
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
3+
Amsterdam, The Netherlands.
44
55
All Rights Reserved
66

Modules/stdwinmodule.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2119,9 +2119,17 @@ stdwin_fetchcolor(self, args)
21192119
object *args;
21202120
{
21212121
char *colorname;
2122+
COLOR color;
21222123
if (!getstrarg(args, &colorname))
21232124
return NULL;
2124-
return newintobject((long)wfetchcolor(colorname));
2125+
color = wfetchcolor(colorname);
2126+
#ifdef BADCOLOR
2127+
if (color == BADCOLOR) {
2128+
err_setstr(StdwinError, "color name not found");
2129+
return NULL;
2130+
}
2131+
#endif
2132+
return newintobject((long)color);
21252133
}
21262134

21272135
static object *

Modules/svmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**********************************************************
2-
Copyright 1991, 1992 by Stichting Mathematisch Centrum, Amsterdam, The
3-
Netherlands.
2+
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
3+
Amsterdam, The Netherlands.
44
55
All Rights Reserved
66

Modules/threadmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/***********************************************************
2-
Copyright 1991, 1992 by Stichting Mathematisch Centrum, Amsterdam, The
3-
Netherlands.
2+
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
3+
Amsterdam, The Netherlands.
44
55
All Rights Reserved
66

0 commit comments

Comments
 (0)