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:
f1a4dc5
)
Many bugfixes.
author
ian
<ian>
Mon, 23 Sep 2002 02:27:16 +0000
(
02:27
+0000)
committer
ian
<ian>
Mon, 23 Sep 2002 02:27:16 +0000
(
02:27
+0000)
base/tables-examples.tct
patch
|
blob
|
history
hbytes/ulongs.c
patch
|
blob
|
history
diff --git
a/base/tables-examples.tct
b/base/tables-examples.tct
index 3fd080147af3662f163d7ec7a0889773c7834d67..5a1859dfdaa602975ffcac79853c547fc5ab8856 100644
(file)
--- a/
base/tables-examples.tct
+++ b/
base/tables-examples.tct
@@
-40,6
+40,10
@@
Table ulong ULong_SubCommand
a ulong
b ulong
=> ulong
+ multiply
+ a ulong
+ b ulong
+ => ulong
subtract
a ulong
b ulong
diff --git
a/hbytes/ulongs.c
b/hbytes/ulongs.c
index e8ea9a839001731d0df5e1a4dda6ff0f873757f7..ce5d8a910a1dbb0af5bf4d2ac0355f05c4646249 100644
(file)
--- a/
hbytes/ulongs.c
+++ b/
hbytes/ulongs.c
@@
-20,6
+20,12
@@
int do_ulong_add(ClientData cd, Tcl_Interp *ip,
return TCL_OK;
}
+int do_ulong_multiply(ClientData cd, Tcl_Interp *ip,
+ uint32_t a, uint32_t b, uint32_t *result) {
+ *result= a * b;
+ return TCL_OK;
+}
+
int do_ulong_subtract(ClientData cd, Tcl_Interp *ip,
uint32_t a, uint32_t b, uint32_t *result) {
*result= a - b;