chiark
/
gitweb
/
~ian
/
chiark-tcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new socket id arrangements, working on tun
[chiark-tcl.git]
/
hbytes
/
hook.c
diff --git
a/hbytes/hook.c
b/hbytes/hook.c
index a9d0316f0c90089cce1f1383caa5030b30dfc8f0..b84306a1e12c8a516b21aedf9ca27ae200ca3751 100644
(file)
--- a/
hbytes/hook.c
+++ b/
hbytes/hook.c
@@
-22,6
+22,13
@@
int posixerr(Tcl_Interp *ip, int errnoval, const char *m) {
return TCL_ERROR;
}
return TCL_ERROR;
}
+int newfdposixerr(Tcl_Interp *ip, int fd, const char *m) {
+ int e;
+ e= errno;
+ close(fd);
+ return posixerr(ip,e,m);
+}
+
void objfreeir(Tcl_Obj *o) {
if (o->typePtr && o->typePtr->freeIntRepProc)
o->typePtr->freeIntRepProc(o);
void objfreeir(Tcl_Obj *o) {
if (o->typePtr && o->typePtr->freeIntRepProc)
o->typePtr->freeIntRepProc(o);
@@
-361,6
+368,12
@@
int do_toplevel_dgram_socket(ClientData cd, Tcl_Interp *ip,
return subcmd->func(0,ip,objc,objv);
}
return subcmd->func(0,ip,objc,objv);
}
+int do_toplevel_tuntap_socket(ClientData cd, Tcl_Interp *ip,
+ const TunSocket_SubCommand *subcmd,
+ int objc, Tcl_Obj *const *objv) {
+ return subcmd->func(0,ip,objc,objv);
+}
+
int do_toplevel_ulong(ClientData cd, Tcl_Interp *ip,
const ULong_SubCommand *subcmd,
int objc, Tcl_Obj *const *objv) {
int do_toplevel_ulong(ClientData cd, Tcl_Interp *ip,
const ULong_SubCommand *subcmd,
int objc, Tcl_Obj *const *objv) {
@@
-400,7
+413,7
@@
int Hbytes_Init(Tcl_Interp *ip) {
Tcl_RegisterObjType(&enum_nearlytype);
Tcl_RegisterObjType(&enum1_nearlytype);
Tcl_RegisterObjType(&sockaddr_type);
Tcl_RegisterObjType(&enum_nearlytype);
Tcl_RegisterObjType(&enum1_nearlytype);
Tcl_RegisterObjType(&sockaddr_type);
- Tcl_RegisterObjType(&
dgramsockid_
type);
+ Tcl_RegisterObjType(&
tabledataid_nearly
type);
Tcl_RegisterObjType(&ulong_type);
for (cmd=toplevel_commands;
Tcl_RegisterObjType(&ulong_type);
for (cmd=toplevel_commands;