diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2005-07-20 23:16:00 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2005-07-20 23:16:00 (GMT) |
commit | 04b1bffa1cc7b07cafdb83dd3f39c271f6493f7b (patch) | |
tree | b2177cb66852e3b087e693c873f7ec770bb087f2 /unix/tclAppInit.c | |
parent | 393e4ad337bfb7cbc972d974b4e9e2218e583738 (diff) | |
download | tcl-04b1bffa1cc7b07cafdb83dd3f39c271f6493f7b.zip tcl-04b1bffa1cc7b07cafdb83dd3f39c271f6493f7b.tar.gz tcl-04b1bffa1cc7b07cafdb83dd3f39c271f6493f7b.tar.bz2 |
Getting more systematic about style
Diffstat (limited to 'unix/tclAppInit.c')
-rw-r--r-- | unix/tclAppInit.c | 72 |
1 files changed, 41 insertions, 31 deletions
diff --git a/unix/tclAppInit.c b/unix/tclAppInit.c index 9f2ab39..8875b92 100644 --- a/unix/tclAppInit.c +++ b/unix/tclAppInit.c @@ -1,17 +1,17 @@ -/* +/* * tclAppInit.c -- * * Provides a default version of the main program and Tcl_AppInit - * procedure for Tcl applications (without Tk). + * function for Tcl applications (without Tk). * * Copyright (c) 1993 The Regents of the University of California. * Copyright (c) 1994-1997 Sun Microsystems, Inc. * Copyright (c) 1998-1999 by Scriptics Corporation. * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclAppInit.c,v 1.15 2004/11/12 22:52:30 dgp Exp $ + * RCS: @(#) $Id: tclAppInit.c,v 1.16 2005/07/20 23:16:00 dkf Exp $ */ #include "tcl.h" @@ -40,8 +40,8 @@ extern int Tclxttest_Init _ANSI_ARGS_((Tcl_Interp *interp)); * This is the main program for the application. * * Results: - * None: Tcl_Main never returns here, so this procedure never - * returns either. + * None: Tcl_Main never returns here, so this function never returns + * either. * * Side effects: * Whatever the application does. @@ -55,14 +55,14 @@ main(argc, argv) char **argv; /* Values of command-line arguments. */ { /* - * 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. + * 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 does + * not exist. */ #ifndef TCL_LOCAL_APPINIT -#define TCL_LOCAL_APPINIT Tcl_AppInit +#define TCL_LOCAL_APPINIT Tcl_AppInit #endif extern int TCL_LOCAL_APPINIT _ANSI_ARGS_((Tcl_Interp *interp)); @@ -94,13 +94,13 @@ main(argc, argv) * * Tcl_AppInit -- * - * This procedure performs application-specific initialization. - * Most applications, especially those that incorporate additional - * packages, will have their own version of this procedure. + * This function performs application-specific initialization. Most + * applications, especially those that incorporate additional packages, + * will have their own version of this function. * * Results: - * Returns a standard Tcl completion code, and leaves an error - * message in the interp's result if an error occurs. + * Returns a standard Tcl completion code, and leaves an error message in + * the interp's result if an error occurs. * * Side effects: * Depends on the startup script. @@ -118,15 +118,15 @@ Tcl_AppInit(interp) #ifdef TCL_TEST #ifdef TCL_XT_TEST - if (Tclxttest_Init(interp) == TCL_ERROR) { - return TCL_ERROR; - } + if (Tclxttest_Init(interp) == TCL_ERROR) { + return TCL_ERROR; + } #endif if (Tcltest_Init(interp) == TCL_ERROR) { return TCL_ERROR; } Tcl_StaticPackage(interp, "Tcltest", Tcltest_Init, - (Tcl_PackageInitProc *) NULL); + (Tcl_PackageInitProc *) NULL); if (TclObjTest_Init(interp) == TCL_ERROR) { return TCL_ERROR; } @@ -134,30 +134,31 @@ Tcl_AppInit(interp) return TCL_ERROR; } Tcl_StaticPackage(interp, "procbodytest", Procbodytest_Init, - Procbodytest_SafeInit); + Procbodytest_SafeInit); #endif /* TCL_TEST */ /* - * Call the init procedures for included packages. Each call should - * look like this: + * Call the init functions for included packages. Each call should look + * like this: * * if (Mod_Init(interp) == TCL_ERROR) { * return TCL_ERROR; * } * - * where "Mod" is the name of the module. + * where "Mod" is the name of the module. (Dynamically-loadable packages + * should have the same entry-point name.) */ /* - * Call Tcl_CreateCommand for application-specific commands, if - * they weren't already created by the init procedures called above. + * Call Tcl_CreateCommand for application-specific commands, if they + * weren't already created by the init functions called above. */ /* - * 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. + * 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. */ #ifdef DJGPP @@ -165,5 +166,14 @@ Tcl_AppInit(interp) #else Tcl_SetVar(interp, "tcl_rcFileName", "~/.tclshrc", TCL_GLOBAL_ONLY); #endif + return TCL_OK; } + +/* + * Local Variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 78 + * End: + */ |