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 07082e959c886963db08155d4bd91222cd4bb78c..96ac4aebcf56739dde2bd155352937a0f9adefb0 100644 (file)
@@ -7,3 +7,12 @@ LDLIBS +=      ../hbytes/chiark_tcl_hbytes.so -lcdb
 
 include ../base/extension.make
 
 
 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 4902295ed557aaab27c85dd289873a08498bd631..5c32d865b07e15dcadb7c9d391b9d4393cddf321 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;
 }
   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);
+}