Skip to content

Commit 582646a

Browse files
committed
grand renaming; added copyright to some files
1 parent 0a8626e commit 582646a

8 files changed

Lines changed: 154 additions & 37 deletions

File tree

Modules/getpath.c

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,46 @@
1+
/***********************************************************
2+
Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
3+
The Netherlands.
4+
5+
All Rights Reserved
6+
7+
Permission to use, copy, modify, and distribute this software and its
8+
documentation for any purpose and without fee is hereby granted,
9+
provided that the above copyright notice appear in all copies and that
10+
both that copyright notice and this permission notice appear in
11+
supporting documentation, and that the names of Stichting Mathematisch
12+
Centrum or CWI not be used in advertising or publicity pertaining to
13+
distribution of the software without specific, written prior permission.
14+
15+
STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
16+
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
17+
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
18+
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
20+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
21+
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22+
23+
******************************************************************/
24+
25+
/* Return the initial module search path. */
26+
127
#include "Python.h"
228
#include "osdefs.h"
329

4-
#ifdef HAVE_STDLIB_H
5-
#include <stdlib.h>
6-
#else
7-
extern char *getenv Py_PROTO((const char *));
8-
#endif
9-
1030

1131
#ifndef PYTHONPATH
1232
#define PYTHONPATH ".:/usr/local/lib/python"
1333
#endif
1434

1535

16-
/* Return the initial python search path. This is called once from
17-
initsys() to initialize sys.path. The environment variable
18-
PYTHONPATH is fetched and the default path appended. The default
19-
path may be passed to the preprocessor; if not, a system-dependent
20-
default is used. */
36+
/* This is called once from pythonrun to initialize sys.path. The
37+
environment variable PYTHONPATH is fetched and the default path
38+
appended. The default path may be passed to the preprocessor; if
39+
not, a hardcoded default is used, which only makes (some) sense on
40+
Unix. */
2141

2242
char *
23-
getpythonpath()
43+
Py_GetPath()
2444
{
2545
char *path = getenv("PYTHONPATH");
2646
char *defpath = PYTHONPATH;

Modules/main.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,9 @@ extern char *optarg;
3333
extern int getopt(); /* PROTO((int, char **, char *)); -- not standardized */
3434

3535

36-
extern int Py_DebugFlag; /* For parser.c, declared in pythonrun.c */
37-
extern int Py_VerboseFlag; /* For import.c, declared in pythonrun.c */
38-
extern int Py_SuppressPrintingFlag; /* For ceval.c, declared in pythonrun.c */
39-
40-
4136
/* Subroutines that live in their own file */
42-
extern char *getversion();
43-
extern char *getcopyright();
37+
extern char *Py_GetVersion();
38+
extern char *Py_GetCopyright();
4439

4540

4641
/* For getprogramname(); set by main() */
@@ -174,7 +169,7 @@ main(argc, argv)
174169
if (Py_VerboseFlag ||
175170
command == NULL && filename == NULL && isatty((int)fileno(fp)))
176171
fprintf(stderr, "Python %s\n%s\n",
177-
getversion(), getcopyright());
172+
Py_GetVersion(), Py_GetCopyright());
178173

179174
if (filename != NULL) {
180175
if ((fp = fopen(filename, "r")) == NULL) {

Python/frozen.c

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
/***********************************************************
2+
Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
3+
The Netherlands.
4+
5+
All Rights Reserved
6+
7+
Permission to use, copy, modify, and distribute this software and its
8+
documentation for any purpose and without fee is hereby granted,
9+
provided that the above copyright notice appear in all copies and that
10+
both that copyright notice and this permission notice appear in
11+
supporting documentation, and that the names of Stichting Mathematisch
12+
Centrum or CWI not be used in advertising or publicity pertaining to
13+
distribution of the software without specific, written prior permission.
14+
15+
STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
16+
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
17+
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
18+
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
20+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
21+
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22+
23+
******************************************************************/
24+
25+
/* Dummy frozen modules initializer */
26+
27+
#include "Python.h"
28+
129
/* In order to test the support for frozen modules, by default we
230
define a single frozen module, __hello__. Loading it will print
331
some famous words... */
@@ -15,7 +43,7 @@ struct frozen {
1543
char *name;
1644
unsigned char *code;
1745
int size;
18-
} frozen_modules[] = {
46+
} _PyImport_FrozenModules[] = {
1947
{"__hello__", M___hello__, 81},
2048
{0, 0, 0} /* sentinel */
2149
};

Python/frozenmain.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,9 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2626

2727
#include "Python.h"
2828

29-
extern int Py_DebugFlag; /* For parser.c, declared in pythonrun.c */
30-
extern int Py_VerboseFlag; /* For import.c, declared in pythonrun.c */
31-
extern int Py_SuppressPrintingFlag; /* For ceval.c, declared in pythonrun.c */
32-
3329
/* Subroutines that live in their own file */
34-
extern char *getversion();
35-
extern char *getcopyright();
30+
extern char *Py_GetVersion();
31+
extern char *Py_GetCopyright();
3632

3733
/* For getprogramname(); set by main() */
3834
static char *argv0;
@@ -69,7 +65,7 @@ main(argc, argv)
6965

7066
if (Py_VerboseFlag)
7167
fprintf(stderr, "Python %s\n%s\n",
72-
getversion(), getcopyright());
68+
Py_GetVersion(), Py_GetCopyright());
7369
Py_Initialize();
7470
PySys_SetArgv(argc, argv);
7571

Python/getcompiler.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,30 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2222
2323
******************************************************************/
2424

25-
#ifdef HAVE_CONFIG_H
26-
#include "config.h"
27-
#endif
25+
/* Return the compiler identification, if possible. */
26+
27+
#include "Python.h"
2828

2929
#ifndef COMPILER
30+
3031
#ifdef __GNUC__
3132
#define COMPILER " [GCC " __VERSION__ "]"
3233
#endif
34+
3335
#endif /* !COMPILER */
3436

3537
#ifndef COMPILER
38+
3639
#ifdef __cplusplus
3740
#define COMPILER "[C++]"
3841
#else
3942
#define COMPILER "[C]"
4043
#endif
44+
4145
#endif /* !COMPILER */
4246

4347
char *
44-
getcompiler()
48+
Py_GetCompiler()
4549
{
4650
return COMPILER;
4751
}

Python/getcopyright.c

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,33 @@
1+
/***********************************************************
2+
Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
3+
The Netherlands.
4+
5+
All Rights Reserved
6+
7+
Permission to use, copy, modify, and distribute this software and its
8+
documentation for any purpose and without fee is hereby granted,
9+
provided that the above copyright notice appear in all copies and that
10+
both that copyright notice and this permission notice appear in
11+
supporting documentation, and that the names of Stichting Mathematisch
12+
Centrum or CWI not be used in advertising or publicity pertaining to
13+
distribution of the software without specific, written prior permission.
14+
15+
STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
16+
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
17+
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
18+
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
20+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
21+
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22+
23+
******************************************************************/
24+
125
/* Return the copyright string. This is updated manually. */
226

327
#include "Python.h"
428

529
const char *
6-
getcopyright()
30+
Py_GetCopyright()
731
{
832
return "Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam";
933
}

Python/getplatform.c

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,35 @@
1+
/***********************************************************
2+
Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
3+
The Netherlands.
4+
5+
All Rights Reserved
6+
7+
Permission to use, copy, modify, and distribute this software and its
8+
documentation for any purpose and without fee is hereby granted,
9+
provided that the above copyright notice appear in all copies and that
10+
both that copyright notice and this permission notice appear in
11+
supporting documentation, and that the names of Stichting Mathematisch
12+
Centrum or CWI not be used in advertising or publicity pertaining to
13+
distribution of the software without specific, written prior permission.
14+
15+
STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
16+
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
17+
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
18+
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
20+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
21+
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22+
23+
******************************************************************/
24+
25+
#include "Python.h"
26+
127
#ifndef PLATFORM
228
#define PLATFORM "unknown"
329
#endif
430

531
char *
6-
getplatform()
32+
Py_GetPlatform()
733
{
834
return PLATFORM;
935
}

Python/getversion.c

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
/***********************************************************
2+
Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
3+
The Netherlands.
4+
5+
All Rights Reserved
6+
7+
Permission to use, copy, modify, and distribute this software and its
8+
documentation for any purpose and without fee is hereby granted,
9+
provided that the above copyright notice appear in all copies and that
10+
both that copyright notice and this permission notice appear in
11+
supporting documentation, and that the names of Stichting Mathematisch
12+
Centrum or CWI not be used in advertising or publicity pertaining to
13+
distribution of the software without specific, written prior permission.
14+
15+
STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
16+
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
17+
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
18+
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
20+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
21+
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22+
23+
******************************************************************/
24+
125
/* Return the full version string. */
226

327
#include "Python.h"
@@ -12,12 +36,12 @@
1236
#define DATE "October 13 1995"
1337
#endif
1438

15-
extern const char *getcompiler();
39+
extern const char *Py_GetCompiler();
1640

1741
const char *
18-
getversion()
42+
Py_GetVersion()
1943
{
2044
static char version[80];
21-
sprintf(version, VERSION, PATCHLEVEL, DATE, getcompiler());
45+
sprintf(version, VERSION, PATCHLEVEL, DATE, Py_GetCompiler());
2246
return version;
2347
}

0 commit comments

Comments
 (0)