Sha256: c9f87b4f0431a8f5bf9888f0b4b8fa936137d98ad0cfe3fad3aa66540bb555d0

Contents?: true

Size: 1.57 KB

Versions: 6

Compression:

Stored size: 1.57 KB

Contents

/*
 * ttkStubLib.c,v 1.4 2006/11/11 22:16:41 jenglish Exp
 * SOURCE: tk/generic/tkStubLib.c, version 1.9 2004/03/17
 */

#include "tk.h"

#define USE_TTK_STUBS 1
#include "tkTheme.h"

const TtkStubs *ttkStubsPtr;

/*
 *----------------------------------------------------------------------
 *
 * TtkInitializeStubs --
 *	Load the tile package, initialize stub table pointer.
 *	Do not call this function directly, use Ttk_InitStubs() macro instead.
 *
 * Results:
 *	The actual version of the package that satisfies the request, or
 *	NULL to indicate that an error occurred.
 *
 * Side effects:
 *	Sets the stub table pointer.
 *
 */
const char *
TtkInitializeStubs(
    Tcl_Interp *interp, const char *version, int epoch, int revision)
{
    int exact = 0;
    const char *packageName = "tile";
    const char *errMsg = NULL;
    ClientData pkgClientData = NULL;
    const char *actualVersion= Tcl_PkgRequireEx(
	interp, packageName, version, exact, &pkgClientData);
    TtkStubs *stubsPtr = pkgClientData;

    if (!actualVersion) {
	return NULL;
    }

    if (!stubsPtr) {
	errMsg = "missing stub table pointer";
	goto error;
    }
    if (stubsPtr->epoch != epoch) {
	errMsg = "epoch number mismatch";
	goto error;
    }
    if (stubsPtr->revision < revision) {
	errMsg = "require later revision";
	goto error;
    }

    ttkStubsPtr = stubsPtr;
    return actualVersion;

error:
    Tcl_ResetResult(interp);
    Tcl_AppendResult(interp,
	"Error loading ", packageName, " package",
	" (requested version '", version,
	"', loaded version '", actualVersion, "'): ",
	errMsg, 
	NULL);
    return NULL;
}

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
Pratt-1.6.8 pkgs/tile-0.8.2/generic/ttkStubLib.c
Pratt-1.6.5 pkgs/tile-0.8.2/generic/ttkStubLib.c
Pratt-1.6.4 pkgs/tile-0.8.2/generic/ttkStubLib.c
Pratt-1.6.2 pkgs/tile-0.8.2/generic/ttkStubLib.c
Pratt-1.5.8 pkgs/tile-0.8.2/generic/ttkStubLib.c
Pratt-1.5.6 pkgs/tile-0.8.2/generic/ttkStubLib.c