Annotation For tclsh-local.c

Origin for each line in tclsh-local.c from check-in a178887263:

a178887263 2020-04-13    1: #include <tcl.h>
a178887263 2020-04-13    2: 
a178887263 2020-04-13    3: /*
a178887263 2020-04-13    4:  * tclAppInit.c --
a178887263 2020-04-13    5:  *
a178887263 2020-04-13    6:  *	Provides a default version of the main program and Tcl_AppInit
a178887263 2020-04-13    7:  *	function for Tcl applications (without Tk).
a178887263 2020-04-13    8:  *
a178887263 2020-04-13    9:  * Copyright (c) 1993 The Regents of the University of California.
a178887263 2020-04-13   10:  * Copyright (c) 1994-1997 Sun Microsystems, Inc.
a178887263 2020-04-13   11:  * Copyright (c) 1998-1999 by Scriptics Corporation.
a178887263 2020-04-13   12:  *
a178887263 2020-04-13   13:  * See the file "license.terms" for information on usage and redistribution of
a178887263 2020-04-13   14:  * this file, and for a DISCLAIMER OF ALL WARRANTIES.
a178887263 2020-04-13   15:  */
a178887263 2020-04-13   16: 
a178887263 2020-04-13   17: /*
a178887263 2020-04-13   18:  *----------------------------------------------------------------------
a178887263 2020-04-13   19:  *
a178887263 2020-04-13   20:  * Tcl_AppInit --
a178887263 2020-04-13   21:  *
a178887263 2020-04-13   22:  *	This function performs application-specific initialization. Most
a178887263 2020-04-13   23:  *	applications, especially those that incorporate additional packages,
a178887263 2020-04-13   24:  *	will have their own version of this function.
a178887263 2020-04-13   25:  *
a178887263 2020-04-13   26:  * Results:
a178887263 2020-04-13   27:  *	Returns a standard Tcl completion code, and leaves an error message in
a178887263 2020-04-13   28:  *	the interp's result if an error occurs.
a178887263 2020-04-13   29:  *
a178887263 2020-04-13   30:  * Side effects:
a178887263 2020-04-13   31:  *	Depends on the startup script.
a178887263 2020-04-13   32:  *
a178887263 2020-04-13   33:  *----------------------------------------------------------------------
a178887263 2020-04-13   34:  */
a178887263 2020-04-13   35: 
a178887263 2020-04-13   36: int Tcl_AppInit(Tcl_Interp *interp) {
a178887263 2020-04-13   37:     if (Tcl_Init(interp) == TCL_ERROR) {
a178887263 2020-04-13   38: 	return TCL_ERROR;
a178887263 2020-04-13   39:     }
a178887263 2020-04-13   40: 
a178887263 2020-04-13   41: #ifdef DJGPP
a178887263 2020-04-13   42:     Tcl_SetVar(interp, "tcl_rcFileName", "~/tclsh.rc", TCL_GLOBAL_ONLY);
a178887263 2020-04-13   43: #else
a178887263 2020-04-13   44:     Tcl_SetVar(interp, "tcl_rcFileName", "~/.tclshrc", TCL_GLOBAL_ONLY);
a178887263 2020-04-13   45: #endif
a178887263 2020-04-13   46: 
a178887263 2020-04-13   47:     return TCL_OK;
a178887263 2020-04-13   48: }
a178887263 2020-04-13   49: 
a178887263 2020-04-13   50: int main(int argc, char **argv) {
a178887263 2020-04-13   51: 	Tcl_Main(argc, argv, Tcl_AppInit);
a178887263 2020-04-13   52: 	return(1);
a178887263 2020-04-13   53: }