diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-02-09 13:50:00 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-02-09 13:50:00 (GMT) |
commit | 17c1d04baa9a77ee3785645eb8bed03e38a0035a (patch) | |
tree | 7192b79b9de24d564cab1a92e6c069fc540afc3d /generic/tkMain.c | |
parent | 6dd0c346d2f87e21fa0de8ceec3d64c9764e87d6 (diff) | |
download | tk-17c1d04baa9a77ee3785645eb8bed03e38a0035a.zip tk-17c1d04baa9a77ee3785645eb8bed03e38a0035a.tar.gz tk-17c1d04baa9a77ee3785645eb8bed03e38a0035a.tar.bz2 |
Eliminate 'shadowed variable' warning for win32. Eliminate '-file' argument for wish when built with Tcl 9.
Diffstat (limited to 'generic/tkMain.c')
-rw-r--r-- | generic/tkMain.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/generic/tkMain.c b/generic/tkMain.c index 67617f4..e1234f9 100644 --- a/generic/tkMain.c +++ b/generic/tkMain.c @@ -206,10 +206,10 @@ Tk_MainEx( return; } } else { - int i; + int j; - for (i = 1; i < argc; ++i) { - if (!_tcscmp(argv[i], TEXT("-display"))) { + for (j = 1; j < argc; ++j) { + if (!strcmp(argv[j], "-display")) { goto loadCygwinTk; } } @@ -252,7 +252,7 @@ Tk_MainEx( * or like * FILENAME * or like - * -file FILENAME (ancient history support only) + * -file FILENAME (ancient history support only, removed with Tcl 9.0) */ /* mind argc is being adjusted as we proceed */ @@ -268,6 +268,7 @@ Tk_MainEx( Tcl_SetStartupScript(NewNativeObj(argv[1]), NULL); argc--; i++; +#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 } else if ((argc >= 2) && (length = _tcslen(argv[1])) && (length > 1) && (0 == _tcsncmp(TEXT("-file"), argv[1], length)) && ('-' != argv[2][0])) { @@ -275,6 +276,7 @@ Tk_MainEx( argc -= 2; i += 2; } +#endif } path = Tcl_GetStartupScript(&encodingName); |