OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [insight/] [tcl/] [doc/] [PkgRequire.3] - Blame information for rev 1765

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
'\"
2
'\" Copyright (c) 1996 Sun Microsystems, Inc.
3
'\"
4
'\" See the file "license.terms" for information on usage and redistribution
5
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
6
'\"
7
'\" RCS: @(#) $Id: PkgRequire.3,v 1.1.1.1 2002-01-16 10:25:24 markom Exp $
8
'\"
9
.so man.macros
10
.TH Tcl_PkgRequire 3 7.5 Tcl "Tcl Library Procedures"
11
.BS
12
.SH NAME
13
Tcl_PkgRequire, Tcl_PkgProvide \- package version control
14
.SH SYNOPSIS
15
.nf
16
\fB#include \fR
17
.sp
18
char *
19
\fBTcl_PkgRequire\fR(\fIinterp, name, version, exact\fR)
20
.sp
21
int
22
\fBTcl_PkgProvide\fR(\fIinterp, name, version\fR)
23
.SH ARGUMENTS
24
.AS Tcl_FreeProc clientData
25
.AP Tcl_Interp *interp in
26
Interpreter where package is needed or available.
27
.AP char *name in
28
Name of package.
29
.AP char *version in
30
A version string consisting of one or more decimal numbers
31
separated by dots.
32
.AP int exact in
33
Non-zero means that only the particular version specified by
34
\fIversion\fR is acceptable.
35
Zero means that newer versions than \fIversion\fR are also
36
acceptable as long as they have the same major version number
37
as \fIversion\fR.
38
.BE
39
 
40
.SH DESCRIPTION
41
.PP
42
These procedures provide C-level interfaces to Tcl's package and
43
version management facilities.
44
\fBTcl_PkgRequire\fR is equivalent to the \fBpackage require\fR
45
command, and \fBTcl_PkgProvide\fR is equivalent to the
46
\fBpackage provide\fR command.
47
See the documentation for the Tcl commands for details on what these
48
procedures do.
49
If \fBTcl_PkgRequire\fR completes successfully it returns a pointer
50
to the version string for the version of the package that is provided
51
in the interpreter (which may be different than \fIversion\fR); if
52
an error occurs it returns NULL and leaves an error message in
53
\fIinterp->result\fR.
54
\fBTcl_PkgProvide\fR returns TCL_OK if it completes successfully;
55
if an error occurs it returns TCL_ERROR and leaves an error message
56
in \fIinterp->result\fR.
57
 
58
.SH KEYWORDS
59
package, provide, require, version

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.