chiark
/
gitweb
/
~ian
/
chiark-tcl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0ec7eaa
)
all entrypoints done now; loads
author
ian
<ian>
Sat, 11 Feb 2006 20:09:58 +0000
(20:09 +0000)
committer
ian
<ian>
Sat, 11 Feb 2006 20:09:58 +0000
(20:09 +0000)
cdb/Makefile
patch
|
blob
|
history
cdb/lookup.c
patch
|
blob
|
history
diff --git
a/cdb/Makefile
b/cdb/Makefile
index 07082e959c886963db08155d4bd91222cd4bb78c..96ac4aebcf56739dde2bd155352937a0f9adefb0 100644
(file)
--- a/
cdb/Makefile
+++ b/
cdb/Makefile
@@
-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>
diff --git
a/cdb/lookup.c
b/cdb/lookup.c
index 4902295ed557aaab27c85dd289873a08498bd631..5c32d865b07e15dcadb7c9d391b9d4393cddf321 100644
(file)
--- a/
cdb/lookup.c
+++ b/
cdb/lookup.c
@@
-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);
+}