comparison Mac/Python/macgetpath.c @ 13547:db963a615bc9 legacy-trunk

ANSIfication step 2: make sure all needed prototypes are available, and all needed header files included.
author Jack Jansen <jack.jansen@cwi.nl>
date Tue, 11 Jul 2000 21:16:03 +0000
parents e367ad3ea59a
children dc17ef1a7613
comparison
equal deleted inserted replaced
13546:1f82a4bfd294 13547:db963a615bc9
31 31
32 #include "Python.h" 32 #include "Python.h"
33 #include "osdefs.h" 33 #include "osdefs.h"
34 #include "macglue.h" 34 #include "macglue.h"
35 #include "pythonresources.h" 35 #include "pythonresources.h"
36 #ifdef HAVE_UNISTD_H
37 #include <unistd.h>
38 #endif
36 39
37 40
38 /* Return the initial python search path. This is called once from 41 /* Return the initial python search path. This is called once from
39 ** initsys() to initialize sys.path. 42 ** initsys() to initialize sys.path.
40 ** 43 **
54 #include <TextUtils.h> 57 #include <TextUtils.h>
55 #include <Dialogs.h> 58 #include <Dialogs.h>
56 59
57 #ifdef USE_GUSI1 60 #ifdef USE_GUSI1
58 #include <GUSI.h> 61 #include <GUSI.h>
62 #endif
63
64 #ifndef USE_BUILTIN_PATH
65 staticforward char *PyMac_GetPythonPath();
59 #endif 66 #endif
60 67
61 #define PYTHONPATH "\ 68 #define PYTHONPATH "\
62 :\n\ 69 :\n\
63 :Lib\n\ 70 :Lib\n\
141 */ 148 */
142 static char *pythonpath; 149 static char *pythonpath;
143 char *p, *endp; 150 char *p, *endp;
144 int newlen; 151 int newlen;
145 char *curwd; 152 char *curwd;
146 #ifndef USE_BUILTIN_PATH
147 staticforward char *PyMac_GetPythonPath();
148 #endif
149 153
150 if ( pythonpath ) return pythonpath; 154 if ( pythonpath ) return pythonpath;
151 #ifndef USE_BUILTIN_PATH 155 #ifndef USE_BUILTIN_PATH
152 if ( pythonpath = PyMac_GetPythonPath() ) 156 if ( pythonpath = PyMac_GetPythonPath() )
153 return pythonpath; 157 return pythonpath;
292 return name; 296 return name;
293 } 297 }
294 298
295 #ifndef USE_BUILTIN_PATH 299 #ifndef USE_BUILTIN_PATH
296 char * 300 char *
297 PyMac_GetPythonPath() 301 PyMac_GetPythonPath(void)
298 { 302 {
299 short oldrh, prefrh = -1; 303 short oldrh, prefrh = -1;
300 char *rv; 304 char *rv;
301 int i, newlen; 305 int i, newlen;
302 Str255 pathitem; 306 Str255 pathitem;