summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXAppInit.c
diff options
context:
space:
mode:
authordas <das>2002-10-21 04:37:33 (GMT)
committerdas <das>2002-10-21 04:37:33 (GMT)
commit61c2582f32b8c8a81a4746264335c35953b66896 (patch)
treed45c7338357175f46c5b980081a0f1e3a3c80dae /macosx/tkMacOSXAppInit.c
parenta1cf501392a9e4748afd25b97cead4a22de206f8 (diff)
downloadtk-61c2582f32b8c8a81a4746264335c35953b66896.zip
tk-61c2582f32b8c8a81a4746264335c35953b66896.tar.gz
tk-61c2582f32b8c8a81a4746264335c35953b66896.tar.bz2
* macosx/README: revised according to Jim's suggestions
* macosx/tkMacOSXAppInit.c: use standard PATH_MAX from <limits.h>
Diffstat (limited to 'macosx/tkMacOSXAppInit.c')
-rw-r--r--macosx/tkMacOSXAppInit.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/macosx/tkMacOSXAppInit.c b/macosx/tkMacOSXAppInit.c
index 55863a1..ec141d0 100644
--- a/macosx/tkMacOSXAppInit.c
+++ b/macosx/tkMacOSXAppInit.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXAppInit.c,v 1.3 2002/09/12 17:34:16 das Exp $
+ * RCS: @(#) $Id: tkMacOSXAppInit.c,v 1.4 2002/10/21 04:37:34 das Exp $
*/
#include <pthread.h>
#include <sys/stat.h>
@@ -20,13 +20,10 @@
#include "locale.h"
#include <Carbon/Carbon.h>
+#include "tkPort.h"
#include "tkMacOSX.h"
#include "tkMacOSXEvent.h"
-#ifndef MAX_PATH_LEN
- #define MAX_PATH_LEN 1024
-#endif
-
/*
* If the App is in an App package, then we want to add the Scripts
* directory to the auto_path. But we have to wait till after the
@@ -34,7 +31,7 @@
* figured out in main.
*/
-char scriptPath[MAX_PATH_LEN + 1];
+char scriptPath[PATH_MAX + 1];
extern Tcl_Interp *gStdoutInterp;
@@ -116,17 +113,17 @@ main(argc, argv)
if (appMainURL != NULL) {
CFURLRef scriptFldrURL;
- char *startupScript = malloc(MAX_PATH_LEN + 1);
+ char *startupScript = malloc(PATH_MAX + 1);
if (CFURLGetFileSystemRepresentation (appMainURL, true,
- startupScript, MAX_PATH_LEN)) {
+ startupScript, PATH_MAX)) {
TclSetStartupScriptFileName(startupScript);
scriptFldrURL = CFBundleCopyResourceURL(bundleRef,
CFSTR("Scripts"),
NULL,
NULL);
CFURLGetFileSystemRepresentation(scriptFldrURL,
- true, scriptPath, MAX_PATH_LEN);
+ true, scriptPath, PATH_MAX);
CFRelease(scriptFldrURL);
} else {
free(startupScript);