Lines Matching refs:version

4  *	This file implements package and version control for Tcl via
24 char *version; /* Version string; malloc'ed. */
25 char *script; /* Script to invoke to provide this version
36 * package name such as "Tk" (no version number).
40 char *version; /* Version that has been supplied in this
65 * This procedure is invoked to declare that a particular version
67 * must not be any other version of this package already
71 * Normally returns TCL_OK; if there is already another version
77 * so that no other version of the package may be provided for
84 Tcl_PkgProvide(interp, name, version)
88 char *version; /* Version string for package. */
93 if (pkgPtr->version == NULL) {
94 pkgPtr->version = ckalloc((unsigned) (strlen(version) + 1));
95 strcpy(pkgPtr->version, version);
98 if (ComparePkgVersions(pkgPtr->version, version, (int *) NULL) == 0) {
102 name, "\": ", pkgPtr->version, ", then ", version, (char *) NULL);
113 * version of a particular package. If the package is not already
117 * the version that is present.
120 * If successful, returns the version string for the currently
121 * provided version of the package, which may be different from
122 * the "version" argument. If the caller's requirements
123 * cannot be met (e.g. the version requested conflicts with
124 * a currently provided version, or the required version cannot
125 * be found, or the script to provide the required version
137 Tcl_PkgRequire(interp, name, version, exact)
141 char *version; /* Version string for desired version;
142 * NULL means use the latest version
145 * version given is acceptable. Zero means
146 * use the latest compatible version. */
157 * script for a specific version, and a final pass to lookup the
163 if (pkgPtr->version != NULL) {
169 * versions and invoke the script for the best available version.
175 if ((bestPtr != NULL) && (ComparePkgVersions(availPtr->version,
176 bestPtr->version, (int *) NULL) <= 0)) {
179 if (version != NULL) {
180 result = ComparePkgVersions(availPtr->version, version,
230 Tcl_DStringAppend(&command, (version != NULL) ? version : "{}",
248 if (pkgPtr->version == NULL) {
251 if (version != NULL) {
252 Tcl_AppendResult(interp, " ", version, (char *) NULL);
259 * provided version meets the current requirement.
262 if (version == NULL) {
263 return pkgPtr->version;
265 result = ComparePkgVersions(pkgPtr->version, version, &satisfies);
267 return pkgPtr->version;
269 Tcl_AppendResult(interp, "version conflict for package \"",
270 name, "\": have ", pkgPtr->version, ", need ", version,
309 char *version;
326 if (pkgPtr->version != NULL) {
327 ckfree(pkgPtr->version);
332 ckfree(availPtr->version);
341 " ifneeded package version ?script?\"", (char *) NULL);
358 if (ComparePkgVersions(availPtr->version, argv[3], (int *) NULL)
373 availPtr->version = ckalloc((unsigned) (strlen(argv[3]) + 1));
374 strcpy(availPtr->version, argv[3]);
395 if ((pkgPtr->version != NULL) || (pkgPtr->availPtr != NULL)) {
402 " provide package ?version?\"", (char *) NULL);
409 if (pkgPtr->version != NULL) {
410 interp->result = pkgPtr->version;
423 " require ?-exact? package ?version?\"", (char *) NULL);
431 version = NULL;
433 version = argv[3+exact];
434 if (CheckVersion(interp, version) != TCL_OK) {
440 version = Tcl_PkgRequire(interp, argv[2+exact], version, exact);
441 if (version == NULL) {
444 interp->result = version;
491 Tcl_AppendElement(interp, availPtr->version);
550 pkgPtr->version = NULL;
590 if (pkgPtr->version != NULL) {
591 ckfree(pkgPtr->version);
596 ckfree(availPtr->version);
614 * This procedure checks to see whether a version number has
618 * If string is a properly formed version number the TCL_OK
631 char *string; /* Supposedly a version number, which is
650 Tcl_AppendResult(interp, "expected version number but got \"",
661 * This procedure compares two version numbers.
665 * version numbers are the same, and 1 if v1 is greater than v2.
679 * number of version numbers). */
683 * or equal to v2 and both version numbers
712 * Compare and go on to the next version number if the