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

Skip to content

Commit d88296d

Browse files
committed
ANSIfication step 1: get rid of Py_PROTO and Py_FPROTO.
1 parent 4d4daed commit d88296d

6 files changed

Lines changed: 33 additions & 33 deletions

File tree

Mac/Include/macbuildno.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
#define BUILD 54
1+
#define BUILD 55

Mac/Include/macglue.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ typedef struct {
5454
#endif
5555

5656
#ifdef USE_GUSI1
57-
void PyMac_FixGUSIcd Py_PROTO((void)); /* Workaround for GUSI chdir() call */
57+
void PyMac_FixGUSIcd(void); /* Workaround for GUSI chdir() call */
5858
extern void PyMac_SetGUSISpin(void); /* Install our private GUSI spin routine */
5959
#endif
6060

@@ -69,22 +69,22 @@ extern void PyMac_StopGUSISpin(void); /* Stop eventprocessing during exit() */
6969
extern short PyMac_AppRefNum; /* RefNum of application rsrcfork (from macmain.c) */
7070
extern FSSpec PyMac_ApplicationFSSpec; /* Application location (from macargv.c) */
7171
extern char PyMac_ApplicationPath[]; /* Application location (from macargv.c) */
72-
extern OSErr PyMac_init_application_location Py_PROTO((void)); /* Init the above */
73-
extern OSErr PyMac_GetFullPath Py_PROTO((FSSpec *, char *)); /* convert fsspec->path (macargv.c) */
74-
extern int PyMac_GetArgv Py_PROTO((char ***, int)); /* Get argc, argv (from macargv.c) */
72+
extern OSErr PyMac_init_application_location(void); /* Init the above */
73+
extern OSErr PyMac_GetFullPath(FSSpec *, char *); /* convert fsspec->path (macargv.c) */
74+
extern int PyMac_GetArgv(char ***, int); /* Get argc, argv (from macargv.c) */
7575
extern int PyMac_AppearanceCompliant; /* True if in appearance support mode */
7676

7777
extern PyObject *PyMac_OSErrException; /* Exception for OSErr */
7878
PyObject *PyMac_GetOSErrException(void); /* Initialize & return it */
7979

80-
void PyMac_GetSchedParams Py_PROTO((PyMacSchedParams *)); /* Get schedulers params */
81-
void PyMac_SetSchedParams Py_PROTO((PyMacSchedParams *)); /* Set schedulers params */
80+
void PyMac_GetSchedParams(PyMacSchedParams *); /* Get schedulers params */
81+
void PyMac_SetSchedParams(PyMacSchedParams *); /* Set schedulers params */
8282
PyObject *PyErr_Mac(PyObject *, int); /* Exception with a mac error */
8383
PyObject *PyMac_Error(OSErr); /* Uses PyMac_GetOSErrException */
84-
int PyMac_DoYield Py_PROTO((int, int)); /* Yield cpu. First arg is maxtime, second ok to call python */
85-
int PyMac_HandleEvent Py_PROTO((EventRecord *)); /* Handle one event, possibly in Python */
86-
void PyMac_HandleEventIntern Py_PROTO((EventRecord *)); /* Handle one event internal only */
87-
int PyMac_SetEventHandler Py_PROTO((PyObject *)); /* set python-coded event handler */
84+
int PyMac_DoYield(int, int); /* Yield cpu. First arg is maxtime, second ok to call python */
85+
int PyMac_HandleEvent(EventRecord *); /* Handle one event, possibly in Python */
86+
void PyMac_HandleEventIntern(EventRecord *); /* Handle one event internal only */
87+
int PyMac_SetEventHandler(PyObject *); /* set python-coded event handler */
8888

8989
void PyMac_InitMenuBar(void); /* Setup menu bar as we want it */
9090
void PyMac_RestoreMenuBar(void); /* Restore menu bar for ease of exiting */

Mac/Include/pythonresources.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,6 @@ typedef struct PyMac_PrefRecord {
170170

171171
#ifndef rez
172172
/* From macgetpath.c: */
173-
void PyMac_PreferenceOptions Py_PROTO((PyMac_PrefRecord *));
174-
char * PyMac_GetPythonDir Py_PROTO((void));
173+
void PyMac_PreferenceOptions(PyMac_PrefRecord *);
174+
char * PyMac_GetPythonDir(void);
175175
#endif

Mac/Modules/macmodule.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -97,24 +97,24 @@ int sync(void);
9797

9898
#ifndef USE_GUSI
9999

100-
int chdir Py_PROTO((const char *path));
101-
int mkdir Py_PROTO((const char *path, int mode));
102-
DIR * opendir Py_PROTO((char *));
103-
void closedir Py_PROTO((DIR *));
104-
struct dirent * readdir Py_PROTO((DIR *));
105-
int rmdir Py_PROTO((const char *path));
106-
int sync Py_PROTO((void));
100+
int chdir(const char *path);
101+
int mkdir(const char *path, int mode);
102+
DIR * opendir(char *);
103+
void closedir(DIR *);
104+
struct dirent * readdir(DIR *);
105+
int rmdir(const char *path);
106+
int sync(void);
107107

108108
#if defined(__SC__)
109-
int unlink Py_PROTO((char *));
109+
int unlink(char *);
110110
#else
111-
int unlink Py_PROTO((const char *));
111+
int unlink(const char *);
112112
#endif
113113

114114
#endif /* USE_GUSI */
115115

116-
char *getwd Py_PROTO((char *));
117-
char *getbootvol Py_PROTO((void));
116+
char *getwd(char *);
117+
char *getbootvol(void);
118118

119119

120120
static PyObject *MacError; /* Exception mac.error */
@@ -132,7 +132,7 @@ mac_error()
132132
static PyObject *
133133
mac_1str(args, func)
134134
PyObject *args;
135-
int (*func) Py_FPROTO((const char *));
135+
int (*func)(const char *);
136136
{
137137
char *path1;
138138
int res;
@@ -150,7 +150,7 @@ mac_1str(args, func)
150150
static PyObject *
151151
mac_2str(args, func)
152152
PyObject *args;
153-
int (*func) Py_FPROTO((const char *, const char *));
153+
int (*func)(const char *, const char *);
154154
{
155155
char *path1, *path2;
156156
int res;
@@ -168,7 +168,7 @@ mac_2str(args, func)
168168
static PyObject *
169169
mac_strint(args, func)
170170
PyObject *args;
171-
int (*func) Py_FPROTO((const char *, int));
171+
int (*func)(const char *, int);
172172
{
173173
char *path;
174174
int i;
@@ -248,7 +248,7 @@ mac_fdopen(self, args)
248248
PyObject *self;
249249
PyObject *args;
250250
{
251-
extern int fclose Py_PROTO((FILE *));
251+
extern int fclose(FILE *);
252252
int fd;
253253
char *mode;
254254
FILE *fp;

Mac/Python/macglue.c

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

105105
/* Declared in macfsmodule.c: */
106106
extern FSSpec *mfs_GetFSSpecFSSpec();
107-
extern PyObject *newmfssobject Py_PROTO((FSSpec *));
107+
extern PyObject *newmfssobject(FSSpec *);
108108

109109
/* Interrupt code variables: */
110110
static int interrupted; /* Set to true when cmd-. seen */
111-
static RETSIGTYPE intcatcher Py_PROTO((int));
111+
static RETSIGTYPE intcatcher(int);
112112

113-
static int PyMac_Yield Py_PROTO((void));
113+
static int PyMac_Yield(void);
114114

115115
/*
116116
** These are the real scheduling parameters that control what we check

Mac/Python/macmain.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ static int orig_argc;
6262

6363
PyMac_PrefRecord options;
6464

65-
static void Py_Main Py_PROTO((int, char **)); /* Forward */
66-
void PyMac_Exit Py_PROTO((int)); /* Forward */
65+
static void Py_Main(int, char **); /* Forward */
66+
void PyMac_Exit(int); /* Forward */
6767

6868
static void init_appearance()
6969
{

0 commit comments

Comments
 (0)