summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--unix/tclAppInit.c14
-rw-r--r--win/tclAppInit.c21
-rw-r--r--win/tclWinPort.h8
3 files changed, 21 insertions, 22 deletions
diff --git a/unix/tclAppInit.c b/unix/tclAppInit.c
index f3edcff..9bbc88b 100644
--- a/unix/tclAppInit.c
+++ b/unix/tclAppInit.c
@@ -22,14 +22,14 @@ extern Tcl_PackageInitProc Tcltest_SafeInit;
#endif /* TCL_TEST */
#ifdef TCL_XT_TEST
-extern void XtToolkitInitialize(void);
-extern int Tclxttest_Init(Tcl_Interp *interp);
-#endif
+extern void XtToolkitInitialize(void);
+extern Tcl_PackageInitProc Tclxttest_Init;
+#endif /* TCL_XT_TEST */
/*
* The following #if block allows you to change the AppInit function by using
* a #define of TCL_LOCAL_APPINIT instead of rewriting this entire file. The
- * #if checks for that #define and uses Tcl_AppInit if it doesn't exist.
+ * #if checks for that #define and uses Tcl_AppInit if it does not exist.
*/
#ifndef TCL_LOCAL_APPINIT
@@ -71,7 +71,7 @@ MODULE_SCOPE int TCL_LOCAL_MAIN_HOOK(int *argc, char ***argv);
int
main(
int argc, /* Number of command-line arguments. */
- char **argv) /* Values of command-line arguments. */
+ char *argv[]) /* Values of command-line arguments. */
{
#ifdef TCL_XT_TEST
XtToolkitInitialize();
@@ -145,8 +145,8 @@ Tcl_AppInit(
/*
* Specify a user-specific startup file to invoke if the application is
* run interactively. Typically the startup file is "~/.apprc" where "app"
- * is the name of the application. If this line is deleted then no user-
- * specific startup file will be run under any conditions.
+ * is the name of the application. If this line is deleted then no
+ * user-specific startup file will be run under any conditions.
*/
#ifdef DJGPP
diff --git a/win/tclAppInit.c b/win/tclAppInit.c
index 753eaff..88699d3 100644
--- a/win/tclAppInit.c
+++ b/win/tclAppInit.c
@@ -3,7 +3,8 @@
*
* Provides a default version of the main program and Tcl_AppInit
* procedure for tclsh and other Tcl-based applications (without Tk).
- * Note that this program must be built in Win32 console mode to work properly.
+ * Note that this program must be built in Win32 console mode to work
+ * properly.
*
* Copyright (c) 1993 The Regents of the University of California.
* Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -34,12 +35,12 @@ extern Tcl_PackageInitProc Dde_SafeInit;
#ifdef TCL_BROKEN_MAINARGS
static void setargv(int *argcPtr, TCHAR ***argvPtr);
-#endif
+#endif /* TCL_BROKEN_MAINARGS */
/*
* The following #if block allows you to change the AppInit function by using
* a #define of TCL_LOCAL_APPINIT instead of rewriting this entire file. The
- * #if checks for that #define and uses Tcl_AppInit if it doesn't exist.
+ * #if checks for that #define and uses Tcl_AppInit if it does not exist.
*/
#ifndef TCL_LOCAL_APPINIT
@@ -80,15 +81,15 @@ MODULE_SCOPE int TCL_LOCAL_MAIN_HOOK(int *argc, TCHAR ***argv);
#ifdef TCL_BROKEN_MAINARGS
int
main(
- int argc,
- char *dummy[])
+ int argc, /* Number of command-line arguments. */
+ char *dummy[]) /* Not used. */
{
TCHAR **argv;
#else
int
_tmain(
- int argc,
- TCHAR *argv[])
+ int argc, /* Number of command-line arguments. */
+ TCHAR *argv[]) /* Values of command-line arguments. */
{
#endif
TCHAR *p;
@@ -102,7 +103,7 @@ _tmain(
#ifdef TCL_BROKEN_MAINARGS
/*
- * Get our args from the c-runtime. Ignore lpszCmdLine.
+ * Get our args from the c-runtime. Ignore command line.
*/
setargv(&argc, &argv);
@@ -192,8 +193,8 @@ Tcl_AppInit(
/*
* Specify a user-specific startup file to invoke if the application is
* run interactively. Typically the startup file is "~/.apprc" where "app"
- * is the name of the application. If this line is deleted then no user-
- * specific startup file will be run under any conditions.
+ * is the name of the application. If this line is deleted then no
+ * user-specific startup file will be run under any conditions.
*/
(Tcl_ObjSetVar2)(interp, Tcl_NewStringObj("tcl_rcFileName", -1), NULL,
diff --git a/win/tclWinPort.h b/win/tclWinPort.h
index ca35f38..026cf9e 100644
--- a/win/tclWinPort.h
+++ b/win/tclWinPort.h
@@ -93,11 +93,9 @@ typedef DWORD_PTR * PDWORD_PTR;
#include <signal.h>
#include <limits.h>
-#ifndef strncasecmp
-# define strncasecmp strnicmp
-#endif
-#ifndef strcasecmp
-# define strcasecmp stricmp
+#ifndef __GNUC__
+# define strncasecmp _strnicmp
+# define strcasecmp _stricmp
#endif
/*