<pre style='margin:0'>
Clemens Lang (neverpanic) pushed a commit to branch master
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/adda4f72349df6ab1d2a9eb3b7bcefec2ed5a4b7">https://github.com/macports/macports-base/commit/adda4f72349df6ab1d2a9eb3b7bcefec2ed5a4b7</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new adda4f7 registry2.0: Remove dead code
</span>adda4f7 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit adda4f72349df6ab1d2a9eb3b7bcefec2ed5a4b7
</span>Author: Rainer Müller <raimue@macports.org>
AuthorDate: Tue Apr 10 13:59:33 2018 +0200
<span style='display:block; white-space:pre;color:#404040;'> registry2.0: Remove dead code
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> This code was added to the repository with the initial import of
</span><span style='display:block; white-space:pre;color:#404040;'> registry2.0. However, none of this is in use and not even referenced by
</span><span style='display:block; white-space:pre;color:#404040;'> the build system.
</span>---
src/registry2.0/Makefile.in | 1 -
src/registry2.0/graph.c | 201 ------------------------------
src/registry2.0/graph.h | 39 ------
src/registry2.0/graphobj.c | 146 ----------------------
src/registry2.0/graphobj.h | 43 -------
src/registry2.0/item.c | 272 -----------------------------------------
src/registry2.0/item.h | 39 ------
src/registry2.0/itemobj.c | 183 ---------------------------
src/registry2.0/itemobj.h | 45 -------
src/registry2.0/registry.c | 4 -
src/registry2.0/tests/item.tcl | 51 --------
11 files changed, 1024 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/registry2.0/Makefile.in b/src/registry2.0/Makefile.in
</span><span style='display:block; white-space:pre;color:#808080;'>index b492755..6be802b 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/registry2.0/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/registry2.0/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -10,7 +10,6 @@ OBJS = registry.o util.o \
</span> entry.o entryobj.o \
file.o fileobj.o \
portgroup.o portgroupobj.o
<span style='display:block; white-space:pre;background:#ffe0e0;'>- #graph.o graphobj.o
</span>
SHLIB_NAME= registry${SHLIB_SUFFIX}
INSTALLDIR= ${DESTDIR}${TCL_PACKAGE_PATH}/registry2.0
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/registry2.0/graph.c b/src/registry2.0/graph.c
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 3cec5de..0000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/registry2.0/graph.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,201 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/*
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * graph.c
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * Copyright (c) 2007 Chris Pickel <sfiera@macports.org>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * All rights reserved.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * Redistribution and use in source and binary forms, with or without
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * modification, are permitted provided that the following conditions
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * are met:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * 1. Redistributions of source code must retain the above copyright
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * notice, this list of conditions and the following disclaimer.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * 2. Redistributions in binary form must reproduce the above copyright
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * notice, this list of conditions and the following disclaimer in the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * documentation and/or other materials provided with the distribution.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#if HAVE_CONFIG_H
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <config.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#endif
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <string.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <stdlib.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <unistd.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <tcl.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <sqlite3.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include "graph.h"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include "graphobj.h"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include "registry.h"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include "util.h"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-void DeleteGraph(graph* g) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_stmt* stmt;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if ((sqlite3_prepare_v2(g->db, "DETACH DATABASE registry", -1, &stmt, NULL)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- != SQLITE_OK)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- || (sqlite3_step(stmt) != SQLITE_DONE)) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- fprintf(stderr, "error: registry db not detached correctly (%s)\n",
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_errmsg(g->db));
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_finalize(stmt);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- free(g);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-graph* GetGraph(Tcl_Interp* interp, char* name) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return GetCtx(interp, name, "graph", GraphObjCmd);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-int SetGraph(Tcl_Interp* interp, char* name, graph* g) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return SetCtx(interp, name, g, "graph", GraphObjCmd,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- (Tcl_CmdDeleteProc*)DeleteGraph);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/* graph create dbfile ?name? */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-int GraphCreateCmd(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (objc > 4 || objc < 3) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_WrongNumArgs(interp, 2, objv, "dbfile ?name?");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3* db = RegistryDB(interp);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_stmt* stmt;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int needsInit = 0;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int len;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- char* file = Tcl_GetStringFromObj(objv[2], &len);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- char* query = sqlite3_mprintf("ATTACH DATABASE '%q' AS registry", file);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (Tcl_FSAccess(objv[2], F_OK) != 0) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- needsInit = 1;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- printf("initializing\n");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if ((sqlite3_prepare_v2(db, query, -1, &stmt, NULL) == SQLITE_OK)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- && (sqlite3_step(stmt) == SQLITE_DONE)) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_finalize(stmt);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (!needsInit
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- || ((sqlite3_prepare_v2(db, "CREATE TABLE registry.ports "
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "(name, portfile, url, location, epoch, "
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "version, revision, variants, state)", -1,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- &stmt, NULL)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- == SQLITE_OK)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- && (sqlite3_step(stmt) == SQLITE_DONE))) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- graph* g = malloc(sizeof(graph));
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_free(query);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (!g) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- g->db = db;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (objc == 4) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* graph create dbfile name */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (SetGraph(interp, Tcl_GetString(objv[3]), g) == TCL_OK) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_SetObjResult(interp, objv[3]);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_OK;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* graph create dbfile; generate a name */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- char* name = unique_name(interp, "::registry::graph");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (SetGraph(interp, name, g) == TCL_OK) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_Obj* res = Tcl_NewStringObj(name, -1);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_SetObjResult(interp, res);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- free(name);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_OK;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- free(name);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- free(g);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set_sqlite_result(interp, db, query);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_free(query);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_finalize(stmt);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/* graph delete ?name ...? */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-int GraphDeleteCmd(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int i;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- for (i=2; i<objc; i++) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- graph* g;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- char* proc = Tcl_GetString(objv[i]);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- g = GetGraph(interp, proc);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (g == NULL) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_DeleteCommand(interp, proc);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_OK;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/* graph exists name */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-int GraphExistsCmd(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (objc != 3) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_WrongNumArgs(interp, 2, objv, "name");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (GetGraph(interp, Tcl_GetString(objv[2])) == NULL) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_SetObjResult(interp, Tcl_NewBooleanObj(0));
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_SetObjResult(interp, Tcl_NewBooleanObj(1));
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_OK;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-typedef struct {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- char* name;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int (*function)(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-} GraphCmdType;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-static GraphCmdType graph_cmds[] = {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* commands usable only by `graph` itself */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { "create", GraphCreateCmd },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { "delete", GraphDeleteCmd },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { "exists", GraphExistsCmd },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* commands usable by `graph` or an instance thereof */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* { "install", GraphInstallCmd }, */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* { "uninstall", GraphUninstallCmd }, */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* { "activate", GraphActivateCmd }, */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* { "deactivate", GraphDeactivateCmd }, */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* { "upgrade", GraphUpgradeCmd }, */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* { "changed", GraphChangedCmd }, */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* { "warnings", GraphWarningsCmd }, */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* { "errors", GraphErrorsCmd }, */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* { "commit", GraphCommitCmd }, */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* { "rollback", GraphRollbackCmd }, */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* { "active", GraphActiveCmd }, */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* { "installed", GraphInstalledCmd }, */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* { "location", GraphLocationCmd }, */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* { "map", GraphMapCmd }, */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* { "unmap", GraphUnmapCmd }, */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* { "contents", GraphContentsCmd }, */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* { "provides", GraphProvidesCmd }, */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { NULL, NULL }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-};
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/* graph cmd ?arg ...? */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-int GraphCmd(ClientData clientData UNUSED, Tcl_Interp* interp, int objc,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_Obj* CONST objv[]) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int cmd_index;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (objc < 2) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_WrongNumArgs(interp, 1, objv, "cmd ?arg ...?");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (Tcl_GetIndexFromObjStruct(interp, objv[1], graph_cmds,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sizeof(GraphCmdType), "cmd", 0, &cmd_index) == TCL_OK) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- GraphCmdType* cmd = &graph_cmds[cmd_index];
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return cmd->function(interp, objc, objv);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/registry2.0/graph.h b/src/registry2.0/graph.h
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 97b2ffc..0000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/registry2.0/graph.h
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,39 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/*
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * graph.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * Copyright (c) 2007 Chris Pickel <sfiera@macports.org>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * All rights reserved.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * Redistribution and use in source and binary forms, with or without
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * modification, are permitted provided that the following conditions
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * are met:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * 1. Redistributions of source code must retain the above copyright
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * notice, this list of conditions and the following disclaimer.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * 2. Redistributions in binary form must reproduce the above copyright
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * notice, this list of conditions and the following disclaimer in the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * documentation and/or other materials provided with the distribution.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#ifndef _GRAPH_CMD_H
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#define _GRAPH_CMD_H
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#if HAVE_CONFIG_H
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <config.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#endif
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <tcl.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-int GraphCmd(ClientData clientData UNUSED, Tcl_Interp* interp, int objc,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_Obj* CONST objv[]);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#endif /* _GRAPH_CMD_H */
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/registry2.0/graphobj.c b/src/registry2.0/graphobj.c
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index c72fda0..0000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/registry2.0/graphobj.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,146 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/*
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * graphobj.c
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * Copyright (c) 2007 Chris Pickel <sfiera@macports.org>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * All rights reserved.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * Redistribution and use in source and binary forms, with or without
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * modification, are permitted provided that the following conditions
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * are met:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * 1. Redistributions of source code must retain the above copyright
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * notice, this list of conditions and the following disclaimer.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * 2. Redistributions in binary form must reproduce the above copyright
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * notice, this list of conditions and the following disclaimer in the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * documentation and/or other materials provided with the distribution.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#if HAVE_CONFIG_H
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <config.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#endif
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <string.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <stdlib.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <tcl.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <sqlite3.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include "graphobj.h"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include "util.h"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/* ${graph} install registry::item */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-int GraphObjInstallCmd(Tcl_Interp* interp, graph* g, int objc,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_Obj* CONST objv[]) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (objc != 3) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_WrongNumArgs(interp, 1, objv, "install registry::item");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- printf("installing %s to %p\n", Tcl_GetString(objv[2]), (void*)g);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_OK;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/* ${graph} uninstall registry::item */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-int GraphObjUninstallCmd(Tcl_Interp* interp, graph* g, int objc,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_Obj* CONST objv[]) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (objc != 3) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_WrongNumArgs(interp, 1, objv, "uninstall registry::item");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- printf("uninstalling %s to %p\n", Tcl_GetString(objv[2]), (void*)g);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_OK;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/* ${graph} activate registry::item */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-int GraphObjActivateCmd(Tcl_Interp* interp, graph* g, int objc,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_Obj* CONST objv[]) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (objc != 3) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_WrongNumArgs(interp, 1, objv, "activate registry::item");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- printf("activating %s to %p\n", Tcl_GetString(objv[2]), (void*)g);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_OK;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/* ${graph} deactivate registry::item */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-int GraphObjDeactivateCmd(Tcl_Interp* interp, graph* g, int objc,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_Obj* CONST objv[]) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (objc != 3) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_WrongNumArgs(interp, 1, objv, "deactivate registry::item");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- printf("deactivating %s to %p\n", Tcl_GetString(objv[2]), (void*)g);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_OK;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-enum {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- BUBBLE_UP = 1,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- BUBBLE_DOWN = 2
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-};
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/* ${graph} upgrade ?-bubble-up? ?-bubble-down? ?--? porturl */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-int GraphObjUpgradeCmd(Tcl_Interp* interp, graph* g, int objc,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_Obj* CONST objv[]) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- option_spec options[] = {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { "--", END_FLAGS },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { "-bubble-up", BUBBLE_UP },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { "-bubble-down", BUBBLE_DOWN },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { NULL, 0 }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- };
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int flags;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int start=2;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (ParseFlags(interp, objc, objv, &start, options, &flags) != TCL_OK) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (objc - start != 1) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_WrongNumArgs(interp, 1, objv, "upgrade ?-bubble-up? "
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "?--bubble-down? ?--? registry::item");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- printf("upgrading %s to %p (flags %x)\n", Tcl_GetString(objv[start]),
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- (void*)g, flags);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_OK;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-typedef struct {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- char* name;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int (*function)(Tcl_Interp*, graph*, int, Tcl_Obj* CONST objv[]);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-} GraphObjCmdType;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-static GraphObjCmdType graph_obj_cmds[] = {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { "install", GraphObjInstallCmd },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { "uninstall", GraphObjUninstallCmd },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { "activate", GraphObjActivateCmd },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { "deactivate", GraphObjDeactivateCmd },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { "upgrade", GraphObjUpgradeCmd },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { NULL, NULL }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-};
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/* ${graph} cmd ?arg ...? */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-int GraphObjCmd(ClientData clientData, Tcl_Interp* interp, int objc,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_Obj* CONST objv[]) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int cmd_index;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (objc < 2) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_WrongNumArgs(interp, 1, objv, "cmd ?arg ...?");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (Tcl_GetIndexFromObjStruct(interp, objv[1], graph_obj_cmds,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sizeof(GraphObjCmdType), "cmd", 0, &cmd_index) == TCL_OK) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- GraphObjCmdType* cmd = &graph_obj_cmds[cmd_index];
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return cmd->function(interp, clientData, objc, objv);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/registry2.0/graphobj.h b/src/registry2.0/graphobj.h
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index d99040a..0000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/registry2.0/graphobj.h
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,43 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/*
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * graphobj.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * Copyright (c) 2007 Chris Pickel <sfiera@macports.org>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * All rights reserved.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * Redistribution and use in source and binary forms, with or without
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * modification, are permitted provided that the following conditions
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * are met:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * 1. Redistributions of source code must retain the above copyright
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * notice, this list of conditions and the following disclaimer.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * 2. Redistributions in binary form must reproduce the above copyright
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * notice, this list of conditions and the following disclaimer in the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * documentation and/or other materials provided with the distribution.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#ifndef _GRAPH_OBJ_CMD_H
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#define _GRAPH_OBJ_CMD_H
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#if HAVE_CONFIG_H
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <config.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#endif
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <tcl.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-typedef struct {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3* db;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-} graph;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-int GraphObjCmd(ClientData clientData, Tcl_Interp* interp, int objc,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_Obj* CONST objv[]);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#endif /* _GRAPH_OBJ_CMD_H */
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/registry2.0/item.c b/src/registry2.0/item.c
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 1ee65fa..0000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/registry2.0/item.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,272 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/*
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * item.c
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * Copyright (c) 2007 Chris Pickel <sfiera@macports.org>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * All rights reserved.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * Redistribution and use in source and binary forms, with or without
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * modification, are permitted provided that the following conditions
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * are met:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * 1. Redistributions of source code must retain the above copyright
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * notice, this list of conditions and the following disclaimer.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * 2. Redistributions in binary form must reproduce the above copyright
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * notice, this list of conditions and the following disclaimer in the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * documentation and/or other materials provided with the distribution.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#if HAVE_CONFIG_H
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <config.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#endif
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <string.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <stdlib.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <tcl.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <sqlite3.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include "item.h"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include "itemobj.h"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include "util.h"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include "registry.h"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-static void delete_item(ClientData clientData) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite_int64 rowid = ((item_t*)clientData)->rowid;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3* db = ((item_t*)clientData)->db;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_stmt* stmt;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_prepare_v2(db, "DELETE FROM items WHERE rowid=?", -1, &stmt, NULL);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_bind_int(stmt, rowid, 1);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_step(stmt);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_finalize(stmt);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- free(clientData);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-static item_t* get_item(Tcl_Interp* interp, char* name) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return (item_t*)get_object(interp, name, "item", item_obj_cmd);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-static int set_item(Tcl_Interp* interp, char* name, sqlite_int64 rowid) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3* db = registry_db(interp, 0);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- item_t* new_item = malloc(sizeof(item_t));
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (!new_item) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- new_item->rowid = rowid;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- new_item->db = db;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (set_object(interp, name, new_item, "item", item_obj_cmd, delete_item)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- == TCL_OK) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_stmt* stmt;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* record the proc name in case we need to return it in a search */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if ((sqlite3_prepare_v2(db, "UPDATE items SET proc=? WHERE rowid=?", -1,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- &stmt, NULL) == SQLITE_OK)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- && (sqlite3_bind_text(stmt, 1, name, -1, SQLITE_STATIC)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- == SQLITE_OK)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- && (sqlite3_bind_int64(stmt, 2, rowid) == SQLITE_OK)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- && (sqlite3_step(stmt) == SQLITE_DONE)) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_finalize(stmt);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_OK;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_DeleteCommand(interp, name);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_finalize(stmt);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- free(new_item);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/* item create ?name? */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-static int item_create(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite_int64 item;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3* db = registry_db(interp, 0);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (objc > 3) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_WrongNumArgs(interp, 2, objv, "?name?");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else if (db == NULL) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_exec(db, "INSERT INTO items (refcount) VALUES (1)", NULL, NULL,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- NULL);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- item = sqlite3_last_insert_rowid(db);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (objc == 3) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* item create name */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- char* name = Tcl_GetString(objv[2]);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (set_item(interp, name, item) == TCL_OK) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_SetObjResult(interp, objv[2]);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_OK;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* item create */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- char* name = unique_name(interp, "::registry::item");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (set_item(interp, name, item) == TCL_OK) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_Obj* res = Tcl_NewStringObj(name, -1);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_SetObjResult(interp, res);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- free(name);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_OK;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- free(name);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/* item release ?name ...? */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-static int item_release(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int i;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- for (i=2; i<objc; i++) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- char* proc = Tcl_GetString(objv[i]);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- item_t* item = get_item(interp, proc);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (item == NULL) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* decref */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_OK;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-static const char* searchKeys[] = {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "name",
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "url",
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "path",
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "worker",
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "options",
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "variants",
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- NULL
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-};
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/**
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * item search ?{key value} ...?
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * TODO: rip this out and adapt `entry search`
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-static int item_search(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int i, r;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3* db = registry_db(interp, 0);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_stmt* stmt;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_Obj* result;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* 40 + 20 per clause is safe */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int query_size = (20*objc)*sizeof(char);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- char* query = (char*)malloc(query_size);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- char* query_start = "SELECT proc FROM items";
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- char* insert;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int insert_size = query_size - strlen(query_start);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (db == NULL || query == NULL) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- strncpy(query, query_start, query_size);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- insert = query + strlen(query_start);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- for (i=2; i<objc; i++) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int len;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int index;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- char* key;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_Obj* keyObj;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* ensure each search clause is a 2-element list */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (Tcl_ListObjLength(interp, objv[i], &len) != TCL_OK || len != 2) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- free(query);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_AppendResult(interp, "search clause \"", Tcl_GetString(objv[i]),
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "\" is not a list with 2 elements", NULL);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* this should't fail if Tcl_ListObjLength didn't */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_ListObjIndex(interp, objv[i], 0, &keyObj);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* ensure that a valid search key was used */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (Tcl_GetIndexFromObj(interp, keyObj, searchKeys, "search key", 0,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- &index) != TCL_OK) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- free(query);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- key = Tcl_GetString(keyObj);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (i == 2) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- snprintf(insert, insert_size, " WHERE %s=?", key);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- insert += 9 + strlen(key);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- insert_size -= 9 + strlen(key);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- snprintf(insert, insert_size, " AND %s=?", key);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- insert += 7 + strlen(key);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- insert_size -= 7 + strlen(key);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- r = sqlite3_prepare_v2(db, query, -1, &stmt, NULL);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- free(query);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- for (i=2; i<objc; i++) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- char* val;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_Obj* valObj;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_ListObjIndex(interp, objv[i], 1, &valObj);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- val = Tcl_GetString(valObj);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_bind_text(stmt, i-1, val, -1, SQLITE_STATIC);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- result = Tcl_NewListObj(0, NULL);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- r = sqlite3_step(stmt);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- while (r == SQLITE_ROW) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* avoid signedness warning */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- const char* proc = sqlite3_column_text(stmt, 0);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int len = sqlite3_column_bytes(stmt, 0);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_Obj* procObj = Tcl_NewStringObj(proc, len);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_ListObjAppendElement(interp, result, procObj);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- r = sqlite3_step(stmt);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_finalize(stmt);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_SetObjResult(interp, result);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_OK;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/* item exists name */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-static int item_exists(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (objc != 3) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_WrongNumArgs(interp, 2, objv, "name");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (get_item(interp, Tcl_GetString(objv[2])) == NULL) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_SetObjResult(interp, Tcl_NewBooleanObj(0));
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_SetObjResult(interp, Tcl_NewBooleanObj(1));
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_OK;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-typedef struct {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- char* name;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int (*function)(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-} item_cmd_type;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-static item_cmd_type item_cmds[] = {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* Global commands */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { "create", item_create },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { "search", item_search },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { "exists", item_exists },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* Instance commands */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /*
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { "retain", item_retain },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { "release", item_release },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { "name", item_name },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { "url", item_url },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { "path", item_path },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { "worker", item_worker },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { "options", item_options },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { "variants", item_variants },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { NULL, NULL }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-};
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/* item cmd ?arg ...? */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-int item_cmd(ClientData clientData UNUSED, Tcl_Interp* interp, int objc,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_Obj* CONST objv[]) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int cmd_index;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (objc < 2) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_WrongNumArgs(interp, 1, objv, "cmd ?arg ...?");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (Tcl_GetIndexFromObjStruct(interp, objv[1], item_cmds,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sizeof(item_cmd_type), "cmd", 0, &cmd_index) == TCL_OK) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- item_cmd_type* cmd = &item_cmds[cmd_index];
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return cmd->function(interp, objc, objv);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/registry2.0/item.h b/src/registry2.0/item.h
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index fda0002..0000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/registry2.0/item.h
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,39 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/*
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * item.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * Copyright (c) 2007 Chris Pickel <sfiera@macports.org>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * All rights reserved.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * Redistribution and use in source and binary forms, with or without
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * modification, are permitted provided that the following conditions
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * are met:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * 1. Redistributions of source code must retain the above copyright
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * notice, this list of conditions and the following disclaimer.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * 2. Redistributions in binary form must reproduce the above copyright
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * notice, this list of conditions and the following disclaimer in the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * documentation and/or other materials provided with the distribution.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#ifndef _ITEM_CMD_H
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#define _ITEM_CMD_H
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#if HAVE_CONFIG_H
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <config.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#endif
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <tcl.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-int item_cmd(ClientData clientData UNUSED, Tcl_Interp* interp, int objc,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_Obj* CONST objv[]);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#endif /* _ITEM_CMD_H */
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/registry2.0/itemobj.c b/src/registry2.0/itemobj.c
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 54850a2..0000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/registry2.0/itemobj.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,183 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/*
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * item.c
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * Copyright (c) 2007 Chris Pickel <sfiera@macports.org>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * All rights reserved.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * Redistribution and use in source and binary forms, with or without
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * modification, are permitted provided that the following conditions
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * are met:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * 1. Redistributions of source code must retain the above copyright
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * notice, this list of conditions and the following disclaimer.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * 2. Redistributions in binary form must reproduce the above copyright
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * notice, this list of conditions and the following disclaimer in the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * documentation and/or other materials provided with the distribution.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#if HAVE_CONFIG_H
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <config.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#endif
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <string.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <stdlib.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <tcl.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <sqlite3.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include "itemobj.h"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include "registry.h"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include "util.h"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/* ${item} retain */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/* Increments the refcount of the item. Calls to retain should be balanced by
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * calls to release. The refcount starts at 1 and needn't be retained by the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * creator.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-static int item_obj_retain(Tcl_Interp* interp, item_t* item, int objc,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_Obj* CONST objv[]) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_stmt* stmt;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (objc != 2) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_WrongNumArgs(interp, 2, objv, "");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_prepare_v2(item->db, "UPDATE items SET refcount = refcount+1 WHERE "
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "rowid=?", -1, &stmt, NULL);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_bind_int64(stmt, 1, item->rowid);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_step(stmt);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_finalize(stmt);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_SetObjResult(interp, objv[0]);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_OK;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/* ${item} release */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/* Decrements the refcount of the item. If this is called after all retains have
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * been balanced with releases, the object will be freed.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-static int item_obj_release(Tcl_Interp* interp, item_t* item, int objc,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_Obj* CONST objv[]) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_stmt* stmt;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int refcount;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (objc != 2) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_WrongNumArgs(interp, 2, objv, "");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_prepare_v2(item->db, "UPDATE items SET refcount = refcount-1 "
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "WHERE rowid=?", -1, &stmt, NULL);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_bind_int64(stmt, 1, item->rowid);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_step(stmt);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_finalize(stmt);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_prepare_v2(item->db, "SELECT refcount FROM items WHERE rowid=?", -1,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- &stmt, NULL);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_bind_int64(stmt, 1, item->rowid);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_step(stmt);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- refcount = sqlite3_column_int(stmt, 0);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_finalize(stmt);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (refcount <= 0) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_DeleteCommand(interp, Tcl_GetString(objv[0]));
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_OK;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/* ${item} key name ?value? */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-static int item_obj_key(Tcl_Interp* interp, item_t* item, int objc,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_Obj* CONST objv[]) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- static const char* keys[] = {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "name", "url", "path", "worker", "options", "variants",
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- NULL
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- };
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (objc == 3) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* ${item} key name; return the current value */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int index;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (Tcl_GetIndexFromObj(interp, objv[2], keys, "key", 0, &index)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- != TCL_OK) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* objv[2] is not a valid key */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_stmt* stmt;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- char query[64];
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- char* key = Tcl_GetString(objv[2]);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int len;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- const char* result;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_Obj* resultObj;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- snprintf(query, sizeof(query), "SELECT %s FROM items WHERE rowid=?", key);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_prepare_v2(item->db, query, -1, &stmt, NULL);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_bind_int64(stmt, 1, item->rowid);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_step(stmt);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* eliminate compiler warning about signedness */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- result = sqlite3_column_text(stmt, 0);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- len = sqlite3_column_bytes(stmt, 0);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- resultObj = Tcl_NewStringObj(result, len);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_SetObjResult(interp, resultObj);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_finalize(stmt);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else if (objc == 4) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* ${item} key name value; set a new value */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int index;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (Tcl_GetIndexFromObj(interp, objv[2], keys, "key", 0, &index)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- != TCL_OK) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* objv[2] is not a valid key */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_stmt* stmt;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- char query[64];
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- char* key = Tcl_GetString(objv[2]);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- char* value = Tcl_GetString(objv[3]);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- snprintf(query, sizeof(query), "UPDATE items SET %s=? WHERE rowid=?", key);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_prepare_v2(item->db, query, -1, &stmt, NULL);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_bind_text(stmt, 1, value, -1, SQLITE_STATIC);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_bind_int64(stmt, 2, item->rowid);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_step(stmt);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3_finalize(stmt);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_WrongNumArgs(interp, 1, objv, "key name ?value?");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_OK;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-typedef struct {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- char* name;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int (*function)(Tcl_Interp* interp, item_t* item, int objc,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_Obj* CONST objv[]);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-} item_obj_cmd_type;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-static item_obj_cmd_type item_cmds[] = {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { "retain", item_obj_retain },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { "release", item_obj_release },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { "key", item_obj_key },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- { NULL, NULL }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-};
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/* ${item} cmd ?arg ...? */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/* This function implements the command that will be called when an item created
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * by `registry::item` is used as a procedure. Since all data is kept in a
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * temporary sqlite3 database that is created for the current interpreter, none
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * of the sqlite3 functions used have any error checking. That should be a safe
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * assumption, since nothing outside of registry:: should ever have the chance
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * to touch it.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-int item_obj_cmd(ClientData clientData, Tcl_Interp* interp, int objc,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_Obj* CONST objv[]) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int cmd_index;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (objc < 2) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_WrongNumArgs(interp, 1, objv, "cmd ?arg ...?");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (Tcl_GetIndexFromObjStruct(interp, objv[1], item_cmds,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sizeof(item_obj_cmd_type), "cmd", 0, &cmd_index) == TCL_OK) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- item_obj_cmd_type* cmd = &item_cmds[cmd_index];
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return cmd->function(interp, (item_t*)clientData, objc, objv);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/registry2.0/itemobj.h b/src/registry2.0/itemobj.h
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 3057f16..0000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/registry2.0/itemobj.h
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,45 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-/*
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * itemobj.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * Copyright (c) 2007 Chris Pickel <sfiera@macports.org>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * All rights reserved.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * Redistribution and use in source and binary forms, with or without
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * modification, are permitted provided that the following conditions
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * are met:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * 1. Redistributions of source code must retain the above copyright
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * notice, this list of conditions and the following disclaimer.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * 2. Redistributions in binary form must reproduce the above copyright
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * notice, this list of conditions and the following disclaimer in the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * documentation and/or other materials provided with the distribution.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#ifndef _ITEM_OBJ_CMD_H
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#define _ITEM_OBJ_CMD_H
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#if HAVE_CONFIG_H
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <config.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#endif
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <tcl.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include <sqlite3.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-typedef struct {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite_int64 rowid;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sqlite3* db;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-} item_t;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-int item_obj_cmd(ClientData clientData, Tcl_Interp* interp, int objc,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_Obj* CONST objv[]);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#endif /* _ITEM_OBJ_CMD_H */
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/registry2.0/registry.c b/src/registry2.0/registry.c
</span><span style='display:block; white-space:pre;color:#808080;'>index 24140e9..40a860c 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/registry2.0/registry.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/registry2.0/registry.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -44,8 +44,6 @@
</span> #include "entry.h"
#include "entryobj.h"
#include "file.h"
<span style='display:block; white-space:pre;background:#ffe0e0;'>-#include "graph.h"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#include "item.h"
</span> #include "portgroup.h"
#include "registry.h"
#include "util.h"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -386,8 +384,6 @@ int Registry_Init(Tcl_Interp* interp) {
</span> Tcl_CreateObjCommand(interp, "registry::close", registry_close, NULL, NULL);
Tcl_CreateObjCommand(interp, "registry::read", registry_read, NULL, NULL);
Tcl_CreateObjCommand(interp, "registry::write", registry_write, NULL, NULL);
<span style='display:block; white-space:pre;background:#ffe0e0;'>- /* Tcl_CreateObjCommand(interp, "registry::graph", GraphCmd, NULL, NULL); */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* Tcl_CreateObjCommand(interp, "registry::item", item_cmd, NULL, NULL); */
</span> Tcl_CreateObjCommand(interp, "registry::entry", entry_cmd, NULL, NULL);
Tcl_CreateObjCommand(interp, "registry::file", file_cmd, NULL, NULL);
Tcl_CreateObjCommand(interp, "registry::portgroup", portgroup_cmd, NULL, NULL);
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/registry2.0/tests/item.tcl b/src/registry2.0/tests/item.tcl
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index e3f4b45..0000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/registry2.0/tests/item.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,51 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# Test file for registry::item
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# Syntax:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# tclsh item.tcl <Pextlib name>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-proc main {pextlibname} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- load $pextlibname
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set aesc [registry::item create]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set wynn [registry::item create]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set eth [registry::item create]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set thorn [registry::item create]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- test {[registry::item exists $aesc]}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- test {![registry::item exists kumquat]}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- test {![registry::item exists string]}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $aesc key name aesc
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $wynn key name wynn
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $eth key name eth
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $thorn key name thorn
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- test_equal {[$aesc key name]} "aesc"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- test_equal {[$thorn key name]} "thorn"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $aesc key variants {}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $wynn key variants {}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $eth key variants {{big +} {small -}}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $thorn key variants {{big +} {small -}}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- test_equal {[registry::item search {name aesc}]} "$aesc"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- test_equal {[registry::item search {variants {}}]} "$aesc $wynn"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- test_equal {[registry::item search {variants {{big +}}}]} ""
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- test_equal {[registry::item search {variants {{big +} {small -}}}]} "$eth $thorn"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- test_equal {[registry::item search {name wynn} {variants {}}]} "$wynn"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $aesc release
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $wynn retain
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $wynn release
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- test {![registry::item exists $aesc]}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- test {[registry::item exists $wynn]}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $wynn release
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- test {![registry::item exists $wynn]}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- file delete -force test.db
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-source tests/common.tcl
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-main $argv
</span></pre><pre style='margin:0'>
</pre>