diff options
author | stanton <stanton> | 1999-03-10 05:52:45 (GMT) |
---|---|---|
committer | stanton <stanton> | 1999-03-10 05:52:45 (GMT) |
commit | 0b4be24161f5971f3181adec27a32becf7cb8870 (patch) | |
tree | 92131df26a09a5f7b28f854fb7c0a62ba26cb8ac /doc/PkgRequire.3 | |
parent | a5bface5b6607af37870fc5f5ee5019f6d5fb3f1 (diff) | |
download | tcl-0b4be24161f5971f3181adec27a32becf7cb8870.zip tcl-0b4be24161f5971f3181adec27a32becf7cb8870.tar.gz tcl-0b4be24161f5971f3181adec27a32becf7cb8870.tar.bz2 |
Merged stubs changes into mainline for 8.0
Diffstat (limited to 'doc/PkgRequire.3')
-rw-r--r-- | doc/PkgRequire.3 | 46 |
1 files changed, 37 insertions, 9 deletions
diff --git a/doc/PkgRequire.3 b/doc/PkgRequire.3 index daec40b..796ee6f 100644 --- a/doc/PkgRequire.3 +++ b/doc/PkgRequire.3 @@ -4,13 +4,13 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: PkgRequire.3,v 1.2 1998/09/14 18:39:49 stanton Exp $ +'\" RCS: @(#) $Id: PkgRequire.3,v 1.3 1999/03/10 05:52:45 stanton Exp $ '\" .so man.macros .TH Tcl_PkgRequire 3 7.5 Tcl "Tcl Library Procedures" .BS .SH NAME -Tcl_PkgRequire, Tcl_PkgProvide \- package version control +Tcl_PkgRequire, Tcl_PkgRequireEx, Tcl_PkgPresent, Tcl_PkgPresentEx, Tcl_PkgProvide, Tcl_PkgProvideEx \- package version control .SH SYNOPSIS .nf \fB#include <tcl.h>\fR @@ -18,10 +18,22 @@ Tcl_PkgRequire, Tcl_PkgProvide \- package version control char * \fBTcl_PkgRequire\fR(\fIinterp, name, version, exact\fR) .sp +char * +\fBTcl_PkgRequireEx\fR(\fIinterp, name, version, exact, clientDataPtr\fR) +.sp +char * +\fBTcl_PkgPresent\fR(\fIinterp, name, version, exact\fR) +.sp +char * +\fBTcl_PkgPresentEx\fR(\fIinterp, name, version, exact, clientDataPtr\fR) +.sp int \fBTcl_PkgProvide\fR(\fIinterp, name, version\fR) +.sp +int +\fBTcl_PkgProvideEx\fR(\fIinterp, name, version, clientData\fR) .SH ARGUMENTS -.AS Tcl_FreeProc clientData +.AS Tcl_FreeProc clientDataPtr .AP Tcl_Interp *interp in Interpreter where package is needed or available. .AP char *name in @@ -35,25 +47,41 @@ Non-zero means that only the particular version specified by Zero means that newer versions than \fIversion\fR are also acceptable as long as they have the same major version number as \fIversion\fR. +.AP ClientData clientData in +Arbitrary value to be associated with the package. +.AP ClientData *clientDataPtr out +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. .BE .SH DESCRIPTION .PP These procedures provide C-level interfaces to Tcl's package and version management facilities. +.PP \fBTcl_PkgRequire\fR is equivalent to the \fBpackage require\fR +command, \fBTcl_PkgPresent\fR is equivalent to the \fBpackage present\fR command, and \fBTcl_PkgProvide\fR is equivalent to the \fBpackage provide\fR command. +.PP See the documentation for the Tcl commands for details on what these procedures do. -If \fBTcl_PkgRequire\fR completes successfully it returns a pointer -to the version string for the version of the package that is provided -in the interpreter (which may be different than \fIversion\fR); if -an error occurs it returns NULL and leaves an error message in -\fIinterp->result\fR. +.PP +If \fBTcl_PkgPresent\fR or \fBTcl_PkgRequire\fR complete successfully +they return a pointer to the version string for the version of the package +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 \fIinterp->result\fR. +.PP \fBTcl_PkgProvide\fR returns TCL_OK if it completes successfully; if an error occurs it returns TCL_ERROR and leaves an error message in \fIinterp->result\fR. +.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. .SH KEYWORDS -package, provide, require, version +package, present, provide, require, version |