chiark / gitweb /
all entrypoints done now; loads
authorian <ian>
Sat, 11 Feb 2006 20:09:58 +0000 (20:09 +0000)
committerian <ian>
Sat, 11 Feb 2006 20:09:58 +0000 (20:09 +0000)
cdb/Makefile
cdb/lookup.c

index 07082e9..96ac4ae 100644 (file)
@@ -7,3 +7,12 @@ LDLIBS +=      ../hbytes/chiark_tcl_hbytes.so -lcdb
 
 include ../base/extension.make
 
+# eg, for testing:
+# liberator:cdb> LD_LIBRARY_PATH=../base:../hbytes:. tclsh8.3
+# % load chiark_tcl_cdb.so
+# % cdb
+# wrong # args: should be "cdb subcmd ..."
+# % cdb open
+# wrong # args: should be "cdb open path"
+# % 
+# liberator:cdb> 
index 4902295..5c32d86 100644 (file)
@@ -43,3 +43,9 @@ int cht_cdb_lookup_cdb(Tcl_Interp *ip, struct cdb *cdb,
   if (!*data_r) return cht_posixerr(ip, errno, "cdb_getdata failed");
   return TCL_OK;
 }
+
+
+extern int Chiark_tcl_cdb_Init(Tcl_Interp *ip); /* called by Tcl's "load" */
+int Chiark_tcl_cdb_Init(Tcl_Interp *ip) {
+  return cht_initextension(ip, cht_cdbtoplevel_entries, 0);
+}