PkgRequire.3
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:3k
- '"
- '" Copyright (c) 1996 Sun Microsystems, Inc.
- '"
- '" 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.6.2.1 2006/09/22 01:26:22 andreas_kupries Exp $
- '"
- .so man.macros
- .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
- .SH SYNOPSIS
- .nf
- fB#include <tcl.h>fR
- .sp
- CONST char *
- fBTcl_PkgRequirefR(fIinterp, name, version, exactfR)
- .sp
- CONST char *
- fBTcl_PkgRequireExfR(fIinterp, name, version, exact, clientDataPtrfR)
- .sp
- CONST char *
- fBTcl_PkgPresentfR(fIinterp, name, version, exactfR)
- .sp
- CONST char *
- fBTcl_PkgPresentExfR(fIinterp, name, version, exact, clientDataPtrfR)
- .sp
- int
- fBTcl_PkgProvidefR(fIinterp, name, versionfR)
- .sp
- int
- fBTcl_PkgProvideExfR(fIinterp, name, version, clientDatafR)
- .SH ARGUMENTS
- .AS ClientData clientDataPtr
- .AP Tcl_Interp *interp in
- Interpreter where package is needed or available.
- .AP "CONST char" *name in
- Name of package.
- .AP "CONST char" *version in
- A version string consisting of one or more decimal numbers
- separated by dots.
- .AP int exact in
- Non-zero means that only the particular version specified by
- fIversionfR is acceptable.
- Zero means that newer versions than fIversionfR are also
- acceptable as long as they have the same major version number
- as fIversionfR.
- .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_PkgRequirefR is equivalent to the fBpackage requirefR
- command, fBTcl_PkgPresentfR is equivalent to the fBpackage presentfR
- command, and fBTcl_PkgProvidefR is equivalent to the
- fBpackage providefR command.
- .PP
- See the documentation for the Tcl commands for details on what these
- procedures do.
- .PP
- If fBTcl_PkgPresentfR or fBTcl_PkgRequirefR 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
- fIversionfR); if an error occurs they return NULL and leave an error
- message in the interpreter's result.
- .PP
- fBTcl_PkgProvidefR returns TCL_OK if it completes successfully;
- if an error occurs it returns TCL_ERROR and leaves an error message
- in the interpreter's result.
- .PP
- fBTcl_PkgProvideExfR, fBTcl_PkgPresentExfR and fBTcl_PkgRequireExfR
- 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, present, provide, require, version