diff options
Diffstat (limited to 'doc/PkgRequire.3')
-rw-r--r-- | doc/PkgRequire.3 | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/doc/PkgRequire.3 b/doc/PkgRequire.3 index fcccd58..810947d 100644 --- a/doc/PkgRequire.3 +++ b/doc/PkgRequire.3 @@ -8,21 +8,24 @@ .TH Tcl_PkgRequire 3 7.5 Tcl "Tcl Library Procedures" .BS .SH NAME -Tcl_PkgRequire, Tcl_PkgRequireEx, Tcl_PkgPresent, Tcl_PkgPresentEx, Tcl_PkgProvide, Tcl_PkgProvideEx \- package version control +Tcl_PkgRequire, Tcl_PkgRequireEx, Tcl_PkgRequireProc, Tcl_PkgPresent, Tcl_PkgPresentEx, Tcl_PkgProvide, Tcl_PkgProvideEx \- package version control .SH SYNOPSIS .nf \fB#include <tcl.h>\fR .sp -CONST char * +const char * \fBTcl_PkgRequire\fR(\fIinterp, name, version, exact\fR) .sp -CONST char * +const char * \fBTcl_PkgRequireEx\fR(\fIinterp, name, version, exact, clientDataPtr\fR) .sp -CONST char * +int +\fBTcl_PkgRequireProc\fR(\fIinterp, name, objc, objv, clientDataPtr\fR) +.sp +const char * \fBTcl_PkgPresent\fR(\fIinterp, name, version, exact\fR) .sp -CONST char * +const char * \fBTcl_PkgPresentEx\fR(\fIinterp, name, version, exact, clientDataPtr\fR) .sp int @@ -31,12 +34,12 @@ int int \fBTcl_PkgProvideEx\fR(\fIinterp, name, version, clientData\fR) .SH ARGUMENTS -.AS ClientData clientDataPtr +.AS ClientData clientDataPtr out .AP Tcl_Interp *interp in Interpreter where package is needed or available. -.AP "CONST char" *name in +.AP "const char" *name in Name of package. -.AP "CONST char" *version in +.AP "const char" *version in A version string consisting of one or more decimal numbers separated by dots. .AP int exact in @@ -51,7 +54,12 @@ Arbitrary value to be associated with the package. Pointer to place to store the value associated with the matching package. It is only changed if the pointer is not NULL and the function completed successfully. +.AP int objc in +Number of requirements. +.AP Tcl_Obj* objv[] in +Array of requirements. .BE + .SH DESCRIPTION .PP These procedures provide C-level interfaces to Tcl's package and @@ -71,13 +79,18 @@ that is provided in the interpreter (which may be different than \fIversion\fR); if an error occurs they return NULL and leave an error message in the interpreter's result. .PP -\fBTcl_PkgProvide\fR returns TCL_OK if it completes successfully; -if an error occurs it returns TCL_ERROR and leaves an error message +\fBTcl_PkgProvide\fR returns \fBTCL_OK\fR if it completes successfully; +if an error occurs it returns \fBTCL_ERROR\fR and leaves an error message in the interpreter's result. .PP \fBTcl_PkgProvideEx\fR, \fBTcl_PkgPresentEx\fR and \fBTcl_PkgRequireEx\fR allow the setting and retrieving of the client data associated with the package. In all other respects they are equivalent to the matching functions. +.PP +\fBTcl_PkgRequireProc\fR is the form of \fBpackage require\fR handling +multiple requirements. The other forms are present for backward +compatibility and translate their invocations to this form. + .SH KEYWORDS package, present, provide, require, version |