summaryrefslogtreecommitdiffstats
path: root/Mac/Modules
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1995-02-24 22:53:16 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1995-02-24 22:53:16 (GMT)
commit76efd8e7a193d5e17f0f607ec5a2756636f9a9a5 (patch)
treefbd1495cc56a17715fbf6e8d175bcc7503c6330c /Mac/Modules
parent397c3fb4d7b0e3bca7471e2f3e166b59d769880f (diff)
downloadcpython-76efd8e7a193d5e17f0f607ec5a2756636f9a9a5.zip
cpython-76efd8e7a193d5e17f0f607ec5a2756636f9a9a5.tar.gz
cpython-76efd8e7a193d5e17f0f607ec5a2756636f9a9a5.tar.bz2
MAde a few things more orthogonal and did some cleanups:
- Applications now have their (minimal) main prrogram in macapplication.c and the rest of the init code in macglue.c. - A new define, USE_MAC_APPLET_SUPPORT, independent of USE_MAC_SHARED_LIB - chdir to script directory now done in PyMac_InitApplication.
Diffstat (limited to 'Mac/Modules')
-rw-r--r--Mac/Modules/config.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/Mac/Modules/config.c b/Mac/Modules/config.c
index 32313a7..1ce7f77 100644
--- a/Mac/Modules/config.c
+++ b/Mac/Modules/config.c
@@ -29,9 +29,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#endif
#ifdef macintosh
-/* The Macintosh main program is in macmain.c */
+/* The Macintosh main program is in either macapplet.c or macapplication.c */
#define NO_MAIN
-char *fileargument; /* So main() can tell us the program name */
#endif
#include <stdio.h>
@@ -42,7 +41,6 @@ char *fileargument; /* So main() can tell us the program name */
#include "osdefs.h"
#include "intrcheck.h"
-char *PyMac_GetPythonDir();
#ifndef NO_MAIN
@@ -168,12 +166,13 @@ getpythonpath()
** - Prepend the python home-directory (which is obtained from a Preferences
** resource)
** - Add :
- ** - Chdir to where the source file (if any) lives
*/
static char *pythonpath;
char *curwd;
char *p, *endp;
int newlen;
+ extern char *PyMac_GetPythonDir();
+ extern char *PyMac_GetScriptPath();
if ( pythonpath ) return pythonpath;
curwd = PyMac_GetPythonDir();
@@ -205,14 +204,6 @@ getpythonpath()
pythonpath[newlen] = '\0';
p = endp + 1;
}
- if ( fileargument ) {
- strcpy(curwd, fileargument);
- endp = strrchr(curwd, ':');
- if ( endp && endp > curwd ) {
- *endp = '\0';
- chdir(curwd);
- }
- }
return pythonpath;
#else /* !macintosh */
char *path = getenv("PYTHONPATH");
@@ -346,13 +337,17 @@ struct {
{"mactcp", initmactcp},
#endif
{"AE", initAE},
+#ifndef __MWERKS__
{"Ctl", initCtl},
{"Dlg", initDlg},
+#endif
{"Evt", initEvt},
{"Menu", initMenu},
+#ifndef __MWERKS__
{"Qd", initQd},
{"Snd", initSnd},
{"Win", initWin},
+#endif
{"Res", initRes},
/* -- ADDMODULE MARKER 2 -- */