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=e2f3d4e76b1a314284bc60003ab097ecd2330275;hp=a8f399db9e9752781128edc1b60575843d88574f;hb=ca8b96bf81245f21fe3906c71dc2994bfc5e516f;hpb=dea4e335a78d52ed5f4b71908aa8fcbf392e96be diff --git a/base/chiark-tcl.h b/base/chiark-tcl.h index a8f399d..e2f3d4e 100644 --- a/base/chiark-tcl.h +++ b/base/chiark-tcl.h @@ -1,6 +1,6 @@ /* * base code for various Tcl extensions - * Copyright 2006 Ian Jackson + * Copyright 2006-2012 Ian Jackson * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -26,12 +26,15 @@ #include #include #include +#include #include #include #include #include -#include +#ifndef _TCL /* if someone already included some tcl.h, use that */ +#include +#endif /*_TCL*/ #include @@ -103,12 +106,8 @@ int cht_newfdposixerr(Tcl_Interp *ip, int fd, const char *m); void cht_objfreeir(Tcl_Obj *o); int cht_get_urandom(Tcl_Interp *ip, Byte *buffer, int l); -void cht_obj_updatestr_array(Tcl_Obj *o, const Byte *array, int l); -void cht_obj_updatestr_array_prefix(Tcl_Obj *o, const Byte *byte, - int l, const char *prefix); - void cht_obj_updatestr_vstringls(Tcl_Obj *o, ...); - /* const char*, int, const char*, int, ..., (const char*)0 */ + /* const char*, size_t, const char*, size_t, ..., (const char*)0 */ void cht_obj_updatestr_string_len(Tcl_Obj *o, const char *str, int l); void cht_obj_updatestr_string(Tcl_Obj *o, const char *str); @@ -221,11 +220,12 @@ int cht_enum1_lookup_cached_func(Tcl_Interp *ip, Tcl_Obj *o, initd= 1; \ return TCL_OK; \ } - + #define CHTI_OTHER(e) \ { extern void cht_prepare_##e(Tcl_Interp *ip); cht_prepare_##e(ip); } #define CHTI_TYPE(ot) { Tcl_RegisterObjType(&(ot)); } + #define CHTI_COMMANDS(cl) { cht_setup__commands(ip,cl); } #endif /*CHIARK_TCL_H*/