Check-in [5dc6b2220b]
Overview
Comment:Cleaned up winMain

Updated main to return in failure if Tcl_Main() returns

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:5dc6b2220bd5f4c7fcec1676fa5552aed77f51cb
User & Date: rkeene on 2010-09-26 04:46:35
Other Links: manifest | tags
Context
2010-09-26
04:46
Added StaticTk builds

Updated to move failed builds into failed directory check-in: fdb515dc70 user: rkeene tags: trunk

04:46
Cleaned up winMain

Updated main to return in failure if Tcl_Main() returns check-in: 5dc6b2220b user: rkeene tags: trunk

04:46
Fixed bug with zlib static linking check-in: 91b460f024 user: rkeene tags: trunk
Changes

Modified kitsh/buildsrc/kitsh-0.0/main.c from [f0d4d5a170] to [cac11ec6a8].

     6      6   int main(int argc, char **argv) {
     7      7   	Tcl_Interp *x;
     8      8   
     9      9   	x = Tcl_CreateInterp();
    10     10   
    11     11   	Tcl_Main(argc, argv, TclKit_AppInit);
    12     12   
    13         -	return(0);
           13  +	/* If Tcl_Main() returns, something went wrong */
           14  +	return(1);
    14     15   }
    15     16   #endif

Modified kitsh/buildsrc/kitsh-0.0/winMain.c from [7676f90af4] to [34460f486a].

    32     32   /*
    33     33    * Forward declarations for procedures defined later in this file:
    34     34    */
    35     35   
    36     36   static void		setargv _ANSI_ARGS_((int *argcPtr, char ***argvPtr));
    37     37   static Tcl_PanicProc	WishPanic;
    38     38   
    39         -#ifdef TK_TEST
    40         -extern int		Tktest_Init(Tcl_Interp *interp);
    41         -#endif /* TK_TEST */
    42         -
    43     39   static BOOL consoleRequired = TRUE;
    44     40   
    45     41   /*
    46     42    * The following #if block allows you to change the AppInit
    47     43    * function by using a #define of TCL_LOCAL_APPINIT instead
    48     44    * of rewriting this entire file.  The #if checks for that
    49     45    * #define and uses Tcl_AppInit if it doesn't exist.
................................................................................
   210    206   	if (Dde_Init(interp) == TCL_ERROR) {
   211    207   	    return TCL_ERROR;
   212    208   	}
   213    209   	Tcl_StaticPackage(interp, "dde", Dde_Init, NULL);
   214    210      }
   215    211   #endif
   216    212   
   217         -#ifdef TK_TEST
   218         -    if (Tktest_Init(interp) == TCL_ERROR) {
   219         -	goto error;
   220         -    }
   221         -    Tcl_StaticPackage(interp, "Tktest", Tktest_Init,
   222         -            (Tcl_PackageInitProc *) NULL);
   223         -#endif /* TK_TEST */
   224         -
   225    213       Tcl_SetVar(interp, "tcl_rcFileName", "~/wishrc.tcl", TCL_GLOBAL_ONLY);
   226    214       return TCL_OK;
   227    215   
   228    216   error:
   229    217       MessageBeep(MB_ICONEXCLAMATION);
   230    218       MessageBox(NULL, Tcl_GetStringResult(interp), "Error in Wish",
   231    219   	    MB_ICONSTOP | MB_OK | MB_TASKMODAL | MB_SETFOREGROUND);
................................................................................
   380    368   	argSpace = arg + 1;
   381    369       }
   382    370       argv[argc] = NULL;
   383    371   
   384    372       *argcPtr = argc;
   385    373       *argvPtr = argv;
   386    374   }
   387         -
   388         -#if !defined(__GNUC__) || defined(TK_TEST)
   389         -/*
   390         - *----------------------------------------------------------------------
   391         - *
   392         - * main --
   393         - *
   394         - *	Main entry point from the console.
   395         - *
   396         - * Results:
   397         - *	None: Tk_Main never returns here, so this procedure never
   398         - *      returns either.
   399         - *
   400         - * Side effects:
   401         - *	Whatever the applications does.
   402         - *
   403         - *----------------------------------------------------------------------
   404         - */
   405         -
   406         -int main(int argc, char **argv)
   407         -{
   408         -    Tcl_SetPanicProc(WishPanic);
   409         -
   410         -    /*
   411         -     * Set up the default locale to be standard "C" locale so parsing
   412         -     * is performed correctly.
   413         -     */
   414         -#ifndef UNDER_CE
   415         -    setlocale(LC_ALL, "C");
   416         -#endif
   417         -
   418         -    /*
   419         -     * Create the console channels and install them as the standard
   420         -     * channels.  All I/O will be discarded until Tk_CreateConsoleWindow is
   421         -     * called to attach the console to a text widget.
   422         -     */
   423         -
   424         -    consoleRequired = FALSE;
   425         -
   426         -    Tk_Main(argc, argv, Tcl_AppInit);
   427         -    return 0;
   428         -}
   429         -#endif /* !__GNUC__ || TK_TEST */
   430    375   #endif