From 3fcdcb78b8886afa6230579b2d3f3cc7a0cf95ec Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 23 Aug 2024 12:12:52 +0000 Subject: Documentation/comment fixes [dcc8645349] --- doc/info.n | 8 ++++---- generic/tclCmdIL.c | 10 +++++----- generic/tclInt.h | 2 +- tests/info.test | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/info.n b/doc/info.n index a53f265..5b6a74e 100644 --- a/doc/info.n +++ b/doc/info.n @@ -282,11 +282,11 @@ Returns the value of \fBtcl_library\fR, which is the name of the library directory in which the scripts distributed with Tcl scripts are stored. .\" METHOD: loaded .TP -\fBinfo loaded \fR?\fIinterp\fR? ?\fIpackage\fR? +\fBinfo loaded \fR?\fIinterp\fR? ?\fIprefix\fR? . -Returns the name of each file loaded in \fIinterp\fR va \fBload\fR as part of -\fIpackage\fR . If \fIpackage\fR is not given, returns a list where each item -is the name of the loaded file and the name of the package for which the file +Returns the name of each file loaded in \fIinterp\fR by the \fBload\fR +with prefix \fIprefix\fR . If \fIprefix\fR is not given, returns a list where each item +is the name of the loaded file and the prefix for which the file was loaded. For a statically-loaded package the name of the file is the empty string. For \fIinterp\fR, the empty string is the current interpreter. .\" METHOD: locals diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 3742ba9..8c1c162 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -1706,10 +1706,10 @@ InfoLoadedCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - const char *interpName, *packageName; + const char *interpName, *prefix; if (objc > 3) { - Tcl_WrongNumArgs(interp, 1, objv, "?interp? ?packageName?"); + Tcl_WrongNumArgs(interp, 1, objv, "?interp? ?prefix?"); return TCL_ERROR; } @@ -1719,11 +1719,11 @@ InfoLoadedCmd( interpName = TclGetString(objv[1]); } if (objc < 3) { /* Get loaded files in all packages. */ - packageName = NULL; + prefix = NULL; } else { /* Get pkgs just in specified interp. */ - packageName = TclGetString(objv[2]); + prefix = TclGetString(objv[2]); } - return TclGetLoadedLibraries(interp, interpName, packageName); + return TclGetLoadedLibraries(interp, interpName, prefix); } /* diff --git a/generic/tclInt.h b/generic/tclInt.h index 7cbb3f1..4966481 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -3439,7 +3439,7 @@ MODULE_SCOPE char * TclGetStringStorage(Tcl_Obj *objPtr, Tcl_Size *sizePtr); MODULE_SCOPE int TclGetLoadedLibraries(Tcl_Interp *interp, const char *targetName, - const char *packageName); + const char *prefix); MODULE_SCOPE int TclGetWideBitsFromObj(Tcl_Interp *, Tcl_Obj *, Tcl_WideInt *); MODULE_SCOPE int TclCompareStringKeys(void *keyPtr, Tcl_HashEntry *hPtr); diff --git a/tests/info.test b/tests/info.test index fe7b35b..b3232da 100644 --- a/tests/info.test +++ b/tests/info.test @@ -398,7 +398,7 @@ set tcl_library $savedLibrary; unset savedLibrary test info-11.1 {info loaded option} -body { info loaded a b c -} -returnCodes error -result {wrong # args: should be "info loaded ?interp? ?packageName?"} +} -returnCodes error -result {wrong # args: should be "info loaded ?interp? ?prefix?"} test info-11.2 {info loaded option} -body { info loaded {}; info loaded gorp } -returnCodes error -result {could not find interpreter "gorp"} -- cgit v0.12 From 5773f376ba34ea3679f1f7aef82761777e4c943c Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 23 Aug 2024 12:15:51 +0000 Subject: formatting. Missing "command" --- doc/info.n | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/info.n b/doc/info.n index 5b6a74e..f4190e4 100644 --- a/doc/info.n +++ b/doc/info.n @@ -284,9 +284,9 @@ directory in which the scripts distributed with Tcl scripts are stored. .TP \fBinfo loaded \fR?\fIinterp\fR? ?\fIprefix\fR? . -Returns the name of each file loaded in \fIinterp\fR by the \fBload\fR -with prefix \fIprefix\fR . If \fIprefix\fR is not given, returns a list where each item -is the name of the loaded file and the prefix for which the file +Returns the name of each file loaded in \fIinterp\fR by the \fBload\fR command +with prefix \fIprefix\fR . If \fIprefix\fR is not given, returns a list where +each item is the name of the loaded file and the prefix for which the file was loaded. For a statically-loaded package the name of the file is the empty string. For \fIinterp\fR, the empty string is the current interpreter. .\" METHOD: locals -- cgit v0.12