Tcl Source Code

Artifact [4f3975b96e]
Login

Artifact 4f3975b96e805644e3c03d89531172d069730148:

Attachment "load.patch" to ticket [501096ffff] added by dgp 2002-01-09 07:11:16.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/tcl/tcl/ChangeLog,v
retrieving revision 1.781
diff -u -u -r1.781 ChangeLog
--- ChangeLog	2002/01/07 23:09:12	1.781
+++ ChangeLog	2002/01/09 00:08:42
@@ -1,3 +1,24 @@
+2002-01-08  Don Porter <[email protected]>
+
+	* doc/StaticPkg.3 (Tcl_StaticPackage):
+	* generic/tcl.decls (Tcl_StaticPackage):
+	* generic/tclInt.decls (TclGuessPackageName):
+	* generic/tclInt.h (TclGuessPackageName):
+	* generic/tclLoad.c (Tcl_StaticPackage):
+	* generic/tclLoadNone.c (TclGuessPackageName):
+	* mac/tclMacLoad.c (TclGuessPackageName):
+	* unix/tclLoadAout.c (TclGuessPackageName):
+	* unix/tclLoadDl.c (TclGuessPackageName):
+	* unix/tclLoadDld.c (TclGuessPackageName):
+	* unix/tclLoadDyld.c (TclGuessPackageName):
+	* unix/tclLoadNext.c (TclGuessPackageName):
+	* unix/tclLoadOSF.c (TclGuessPackageName):
+	* unix/tclLoadShl.c (TclGuessPackageName):
+	* win/tclWinLoad.c (TclGuessPackageName):  Updated APIs in 
+	the files */tcl*Load*.c according to the guidelines of TIP 27.
+
+	* generic/tclIntDecls.h: make genstubs
+
 2002-01-07  Don Porter <[email protected]>
 
 	* generic/tclEvent.c (TclInExit):
Index: doc/StaticPkg.3
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/StaticPkg.3,v
retrieving revision 1.3
diff -u -u -r1.3 StaticPkg.3
--- doc/StaticPkg.3	2000/04/14 23:01:54	1.3
+++ doc/StaticPkg.3	2002/01/09 00:08:42
@@ -23,7 +23,7 @@
 already been loaded (i.e., the caller has already invoked the
 appropriate initialization procedure).  NULL means the package
 hasn't yet been incorporated into any interpreter.
-.AP char *pkgName in
+.AP "CONST char" *pkgName in
 Name of the package;  should be properly capitalized (first letter
 upper-case, all others lower-case).
 .AP Tcl_PackageInitProc *initProc in
Index: generic/tcl.decls
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tcl.decls,v
retrieving revision 1.67
diff -u -u -r1.67 tcl.decls
--- generic/tcl.decls	2001/12/18 15:21:20	1.67
+++ generic/tcl.decls	2002/01/09 00:08:42
@@ -855,7 +855,7 @@
     void Tcl_SplitPath(CONST char *path, int *argcPtr, char ***argvPtr)
 }
 declare 244 generic {
-    void Tcl_StaticPackage(Tcl_Interp *interp, char *pkgName, \
+    void Tcl_StaticPackage(Tcl_Interp *interp, CONST char *pkgName, \
 	    Tcl_PackageInitProc *initProc, Tcl_PackageInitProc *safeInitProc)
 }
 declare 245 generic {
Index: generic/tclInt.decls
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclInt.decls,v
retrieving revision 1.39
diff -u -u -r1.39 tclInt.decls
--- generic/tclInt.decls	2002/01/05 22:55:51	1.39
+++ generic/tclInt.decls	2002/01/09 00:08:42
@@ -184,7 +184,7 @@
     int TclGlobalInvoke(Tcl_Interp *interp, int argc, char **argv, int flags)
 }
 declare 44 generic {
-    int TclGuessPackageName(char *fileName, Tcl_DString *bufPtr)
+    int TclGuessPackageName(CONST char *fileName, Tcl_DString *bufPtr)
 }
 declare 45 generic {
     int TclHideUnsafeCommands(Tcl_Interp *interp)
Index: generic/tclInt.h
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclInt.h,v
retrieving revision 1.72
diff -u -u -r1.72 tclInt.h
--- generic/tclInt.h	2002/01/08 20:44:39	1.72
+++ generic/tclInt.h	2002/01/09 00:08:43
@@ -1699,8 +1699,6 @@
 			    int globFlags, Tcl_GlobTypeData* types));
 EXTERN int		TclGlobalInvoke _ANSI_ARGS_((Tcl_Interp *interp,
 			    int argc, char **argv, int flags));
-EXTERN int		TclGuessPackageName _ANSI_ARGS_((char *fileName,
-			    Tcl_DString *bufPtr));
 EXTERN int		TclHideUnsafeCommands _ANSI_ARGS_((
 			    Tcl_Interp *interp));
 EXTERN int		TclInExit _ANSI_ARGS_((void));
Index: generic/tclIntDecls.h
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclIntDecls.h,v
retrieving revision 1.32
diff -u -u -r1.32 tclIntDecls.h
--- generic/tclIntDecls.h	2002/01/05 22:55:51	1.32
+++ generic/tclIntDecls.h	2002/01/09 00:08:43
@@ -167,8 +167,8 @@
 EXTERN int		TclGlobalInvoke _ANSI_ARGS_((Tcl_Interp * interp, 
 				int argc, char ** argv, int flags));
 /* 44 */
-EXTERN int		TclGuessPackageName _ANSI_ARGS_((char * fileName, 
-				Tcl_DString * bufPtr));
+EXTERN int		TclGuessPackageName _ANSI_ARGS_((
+				CONST char * fileName, Tcl_DString * bufPtr));
 /* 45 */
 EXTERN int		TclHideUnsafeCommands _ANSI_ARGS_((
 				Tcl_Interp * interp));
@@ -567,7 +567,7 @@
     Tcl_Command (*tclGetOriginalCommand) _ANSI_ARGS_((Tcl_Command command)); /* 41 */
     char * (*tclpGetUserHome) _ANSI_ARGS_((CONST char * name, Tcl_DString * bufferPtr)); /* 42 */
     int (*tclGlobalInvoke) _ANSI_ARGS_((Tcl_Interp * interp, int argc, char ** argv, int flags)); /* 43 */
-    int (*tclGuessPackageName) _ANSI_ARGS_((char * fileName, Tcl_DString * bufPtr)); /* 44 */
+    int (*tclGuessPackageName) _ANSI_ARGS_((CONST char * fileName, Tcl_DString * bufPtr)); /* 44 */
     int (*tclHideUnsafeCommands) _ANSI_ARGS_((Tcl_Interp * interp)); /* 45 */
     int (*tclInExit) _ANSI_ARGS_((void)); /* 46 */
     Tcl_Obj * (*tclIncrElementOfIndexedArray) _ANSI_ARGS_((Tcl_Interp * interp, int localIndex, Tcl_Obj * elemPtr, long incrAmount)); /* 47 */
Index: generic/tclLoad.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclLoad.c,v
retrieving revision 1.6
diff -u -u -r1.6 tclLoad.c
--- generic/tclLoad.c	2001/08/23 17:37:08	1.6
+++ generic/tclLoad.c	2002/01/09 00:08:43
@@ -451,7 +451,7 @@
 					 * package has already been loaded
 					 * into the given interpreter by
 					 * calling the appropriate init proc. */
-    char *pkgName;			/* Name of package (must be properly
+    CONST char *pkgName;		/* Name of package (must be properly
 					 * capitalized: first letter upper
 					 * case, others lower case). */
     Tcl_PackageInitProc *initProc;	/* Procedure to call to incorporate
Index: generic/tclLoadNone.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclLoadNone.c,v
retrieving revision 1.6
diff -u -u -r1.6 tclLoadNone.c
--- generic/tclLoadNone.c	2001/09/28 01:21:53	1.6
+++ generic/tclLoadNone.c	2002/01/09 00:08:43
@@ -76,7 +76,7 @@
 
 int
 TclGuessPackageName(fileName, bufPtr)
-    char *fileName;		/* Name of file containing package (already
+    CONST char *fileName;	/* Name of file containing package (already
 				 * translated to local form if needed). */
     Tcl_DString *bufPtr;	/* Initialized empty dstring.  Append
 				 * package name to this if possible. */
Index: mac/tclMacLoad.c
===================================================================
RCS file: /cvsroot/tcl/tcl/mac/tclMacLoad.c,v
retrieving revision 1.8
diff -u -u -r1.8 tclMacLoad.c
--- mac/tclMacLoad.c	2001/11/23 01:27:45	1.8
+++ mac/tclMacLoad.c	2002/01/09 00:08:44
@@ -286,7 +286,7 @@
 
 int
 TclGuessPackageName(
-    char *fileName,		/* Name of file containing package (already
+    CONST char *fileName,	/* Name of file containing package (already
 				 * translated to local form if needed). */
     Tcl_DString *bufPtr)	/* Initialized empty dstring.  Append
 				 * package name to this if possible. */
Index: unix/tclLoadAout.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclLoadAout.c,v
retrieving revision 1.8
diff -u -u -r1.8 tclLoadAout.c
--- unix/tclLoadAout.c	2001/10/16 21:13:50	1.8
+++ unix/tclLoadAout.c	2002/01/09 00:08:44
@@ -474,12 +474,13 @@
 
 int
 TclGuessPackageName(fileName, bufPtr)
-    char *fileName;		/* Name of file containing package (already
+    CONST char *fileName;	/* Name of file containing package (already
 				 * translated to local form if needed). */
     Tcl_DString *bufPtr;	/* Initialized empty dstring.  Append
 				 * package name to this if possible. */
 {
-    char *p, *q, *r;
+    CONST char *p, *q;
+    char *r;
 
     if ((q = strrchr(fileName,'/'))) {
 	q++;
Index: unix/tclLoadDl.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclLoadDl.c,v
retrieving revision 1.7
diff -u -u -r1.7 tclLoadDl.c
--- unix/tclLoadDl.c	2001/09/28 01:21:53	1.7
+++ unix/tclLoadDl.c	2002/01/09 00:08:44
@@ -181,7 +181,7 @@
 
 int
 TclGuessPackageName(fileName, bufPtr)
-    char *fileName;		/* Name of file containing package (already
+    CONST char *fileName;	/* Name of file containing package (already
 				 * translated to local form if needed). */
     Tcl_DString *bufPtr;	/* Initialized empty dstring.  Append
 				 * package name to this if possible. */
Index: unix/tclLoadDld.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclLoadDld.c,v
retrieving revision 1.6
diff -u -u -r1.6 tclLoadDld.c
--- unix/tclLoadDld.c	2001/09/28 01:21:53	1.6
+++ unix/tclLoadDld.c	2002/01/09 00:08:44
@@ -161,7 +161,7 @@
 
 int
 TclGuessPackageName(fileName, bufPtr)
-    char *fileName;		/* Name of file containing package (already
+    CONST char *fileName;	/* Name of file containing package (already
 				 * translated to local form if needed). */
     Tcl_DString *bufPtr;	/* Initialized empty dstring.  Append
 				 * package name to this if possible. */
Index: unix/tclLoadDyld.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclLoadDyld.c,v
retrieving revision 1.6
diff -u -u -r1.6 tclLoadDyld.c
--- unix/tclLoadDyld.c	2001/11/23 01:40:10	1.6
+++ unix/tclLoadDyld.c	2002/01/09 00:08:44
@@ -160,7 +160,7 @@
 
 int
 TclGuessPackageName(fileName, bufPtr)
-    char *fileName;	       /* Name of file containing package (already
+    CONST char *fileName;      /* Name of file containing package (already
 				* translated to local form if needed). */
     Tcl_DString *bufPtr;       /* Initialized empty dstring.  Append
 				* package name to this if possible. */
Index: unix/tclLoadNext.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclLoadNext.c,v
retrieving revision 1.6
diff -u -u -r1.6 tclLoadNext.c
--- unix/tclLoadNext.c	2001/09/28 01:21:53	1.6
+++ unix/tclLoadNext.c	2002/01/09 00:08:44
@@ -140,7 +140,7 @@
 
 int
 TclGuessPackageName(fileName, bufPtr)
-    char *fileName;		/* Name of file containing package (already
+    CONST char *fileName;	/* Name of file containing package (already
 				 * translated to local form if needed). */
     Tcl_DString *bufPtr;	/* Initialized empty dstring.  Append
 				 * package name to this if possible. */
Index: unix/tclLoadOSF.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclLoadOSF.c,v
retrieving revision 1.6
diff -u -u -r1.6 tclLoadOSF.c
--- unix/tclLoadOSF.c	2001/09/28 01:21:53	1.6
+++ unix/tclLoadOSF.c	2002/01/09 00:08:44
@@ -158,7 +158,7 @@
 
 int
 TclGuessPackageName(fileName, bufPtr)
-    char *fileName;		/* Name of file containing package (already
+    CONST char *fileName;	/* Name of file containing package (already
 				 * translated to local form if needed). */
     Tcl_DString *bufPtr;	/* Initialized empty dstring.  Append
 				 * package name to this if possible. */
Index: unix/tclLoadShl.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclLoadShl.c,v
retrieving revision 1.8
diff -u -u -r1.8 tclLoadShl.c
--- unix/tclLoadShl.c	2001/09/28 01:21:53	1.8
+++ unix/tclLoadShl.c	2002/01/09 00:08:44
@@ -174,7 +174,7 @@
 
 int
 TclGuessPackageName(fileName, bufPtr)
-    char *fileName;		/* Name of file containing package (already
+    CONST char *fileName;	/* Name of file containing package (already
 				 * translated to local form if needed). */
     Tcl_DString *bufPtr;	/* Initialized empty dstring.  Append
 				 * package name to this if possible. */
Index: win/tclWinLoad.c
===================================================================
RCS file: /cvsroot/tcl/tcl/win/tclWinLoad.c,v
retrieving revision 1.9
diff -u -u -r1.9 tclWinLoad.c
--- win/tclWinLoad.c	2001/09/28 01:21:53	1.9
+++ win/tclWinLoad.c	2002/01/09 00:08:44
@@ -193,7 +193,7 @@
 
 int
 TclGuessPackageName(fileName, bufPtr)
-    char *fileName;		/* Name of file containing package (already
+    CONST char *fileName;	/* Name of file containing package (already
 				 * translated to local form if needed). */
     Tcl_DString *bufPtr;	/* Initialized empty dstring.  Append
 				 * package name to this if possible. */