X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-tcl.git;a=blobdiff_plain;f=base%2Fchiark-tcl.h;h=484f10d79fde40856ff548bafa2db4b16caf724f;hp=f8f59fdd6ed89ab4dea8454f72e73d31a8f10c98;hb=ed7354bcb695fcf3ee3f5cea14be209fbb99f161;hpb=eddc638bb3b8e716879edf149b2a6e37c8bc9e8d diff --git a/base/chiark-tcl.h b/base/chiark-tcl.h index f8f59fd..484f10d 100644 --- a/base/chiark-tcl.h +++ b/base/chiark-tcl.h @@ -175,10 +175,40 @@ int sockaddr_len(const SockAddr_Value*); const struct sockaddr *sockaddr_addr(const SockAddr_Value*); void sockaddr_free(const SockAddr_Value*); +/* from scriptinv.c */ + +typedef struct { /* semi-opaque - read only, and then only where commented */ + Tcl_Interp *ip; /* valid, non-0 and useable if set */ + Tcl_Obj *obj; /* non-0 iff set (but only test for 0/non-0) */ + int llength; +} ScriptToInvoke; + +void scriptinv_init(ScriptToInvoke *si); +int scriptinv_set(ScriptToInvoke *si, Tcl_Interp *ip, Tcl_Obj *newscript); +void scriptinv_cancel(ScriptToInvoke *si); /* then don't invoke */ + /* no separate free function - just cancel */ + +void scriptinv_invoke(ScriptToInvoke *si, int argc, Tcl_Obj **argv); + +/* from idtable.c */ + +typedef struct { + const char *const prefix; + int n; + void **a; +} IdDataTable; + +extern Tcl_ObjType tabledataid_nearlytype; +int tabledataid_parse(Tcl_Interp *ip, Tcl_Obj *o, IdDataTable *tab); + /* from dgram.c */ -extern Tcl_ObjType dgramsockid_type; -typedef struct DgramSocket *DgramSockID; +extern IdDataTable dgram_socks; +int newfdposixerr(Tcl_Interp *ip, int fd, const char *m); + +/* from tuntap.c */ + +extern IdDataTable tuntap_socks; /* from hook.c */