summaryrefslogtreecommitdiffstats
path: root/generic/tclLoad.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2024-05-10 15:40:16 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2024-05-10 15:40:16 (GMT)
commit539d5f44840714a8f558d4c2999b8b60271661e0 (patch)
tree82f1385b486b9ed371ed19b443eaa9ec42fc06db /generic/tclLoad.c
parent3812f72f5b8f27ca52892b3daf871f15db0bc844 (diff)
downloadtcl-539d5f44840714a8f558d4c2999b8b60271661e0.zip
tcl-539d5f44840714a8f558d4c2999b8b60271661e0.tar.gz
tcl-539d5f44840714a8f558d4c2999b8b60271661e0.tar.bz2
More whitespace cleanup
Diffstat (limited to 'generic/tclLoad.c')
-rw-r--r--generic/tclLoad.c31
1 files changed, 11 insertions, 20 deletions
diff --git a/generic/tclLoad.c b/generic/tclLoad.c
index d7c13d1..c5a181d 100644
--- a/generic/tclLoad.c
+++ b/generic/tclLoad.c
@@ -12,7 +12,6 @@
#include "tclInt.h"
-
/*
* The following structure describes a library that has been loaded either
* dynamically (with the "load" command) or statically (as indicated by a call
@@ -96,7 +95,6 @@ static int IsStatic(LoadedLibrary *libraryPtr);
static int UnloadLibrary(Tcl_Interp *interp, Tcl_Interp *target,
LoadedLibrary *library, int keepLibrary,
const char *fullFileName, int interpExiting);
-
static int
IsStatic(
@@ -144,7 +142,7 @@ Tcl_LoadObjCmd(
int flags = 0;
Tcl_Obj *const *savedobjv = objv;
static const char *const options[] = {
- "-global", "-lazy", "--", NULL
+ "-global", "-lazy", "--", NULL
};
enum loadOptionsEnum {
LOAD_GLOBAL, LOAD_LAZY, LOAD_LAST
@@ -168,7 +166,8 @@ Tcl_LoadObjCmd(
}
}
if ((objc < 2) || (objc > 4)) {
- Tcl_WrongNumArgs(interp, 1, savedobjv, "?-global? ?-lazy? ?--? fileName ?prefix? ?interp?");
+ Tcl_WrongNumArgs(interp, 1, savedobjv,
+ "?-global? ?-lazy? ?--? fileName ?prefix? ?interp?");
return TCL_ERROR;
}
if (Tcl_FSConvertToPathType(interp, objv[1]) != TCL_OK) {
@@ -753,7 +752,6 @@ Tcl_UnloadObjCmd(
}
return code;
}
-
/*
*----------------------------------------------------------------------
@@ -773,13 +771,12 @@ Tcl_UnloadObjCmd(
*/
static int
UnloadLibrary(
- Tcl_Interp *interp,
- Tcl_Interp *target,
- LoadedLibrary *libraryPtr,
- int keepLibrary,
- const char *fullFileName,
- int interpExiting
-)
+ Tcl_Interp *interp,
+ Tcl_Interp *target,
+ LoadedLibrary *libraryPtr,
+ int keepLibrary,
+ const char *fullFileName,
+ int interpExiting)
{
int code;
InterpLibrary *ipFirstPtr, *ipPtr;
@@ -821,8 +818,6 @@ UnloadLibrary(
unloadProc = libraryPtr->unloadProc;
}
-
-
/*
* We are ready to unload the library. First, evaluate the unload
* function. If this fails, we cannot proceed with unload. Also, we must
@@ -856,13 +851,11 @@ UnloadLibrary(
code = unloadProc(target, code);
}
-
if (code != TCL_OK) {
Tcl_TransferResult(target, code, interp);
goto done;
}
-
/*
* Remove this library from the interpreter's library cache.
*/
@@ -885,7 +878,6 @@ UnloadLibrary(
Tcl_Free(ipPtr);
Tcl_SetAssocData(target, "tclLoad", LoadCleanupProc, ipFirstPtr);
-
if (IsStatic(libraryPtr)) {
goto done;
}
@@ -1107,9 +1099,8 @@ TclGetLoadedLibraries(
* NULL, return info about all interps;
* otherwise, just return info about this
* interpreter. */
- const char *prefix) /* Prefix or NULL. If NULL, return info
- * for all prefixes.
- */
+ const char *prefix) /* Prefix or NULL. If NULL, return info
+ * for all prefixes. */
{
Tcl_Interp *target;
LoadedLibrary *libraryPtr;