diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2020-03-24 16:43:29 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2020-03-24 16:43:29 (GMT) |
commit | 2ea4d2a8efed4d8786d657041bcf0296b03d9313 (patch) | |
tree | b6181695d6f84d9fc8f199b90a33f38b361b99a3 /util | |
parent | f89d602d57a67e43885e80e087cf996d4cffc474 (diff) | |
download | blt-2ea4d2a8efed4d8786d657041bcf0296b03d9313.zip blt-2ea4d2a8efed4d8786d657041bcf0296b03d9313.tar.gz blt-2ea4d2a8efed4d8786d657041bcf0296b03d9313.tar.bz2 |
libutil
Diffstat (limited to 'util')
-rw-r--r-- | util/util.C | 11 | ||||
-rw-r--r-- | util/util.h | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/util/util.C b/util/util.C index 1abc0e1..f84a309 100644 --- a/util/util.C +++ b/util/util.C @@ -7,9 +7,16 @@ #include <iomanip> using namespace std; +#include <tcl.h> + #include "util.h" -static char tobuf[1024]; +void internalError(const char* msg) +{ + extern Tcl_Interp *global_interp; + Tcl_SetVar2(global_interp, "ds9", "msg", msg, TCL_GLOBAL_ONLY); + Tcl_SetVar2(global_interp, "ds9", "msg,level", "error", TCL_GLOBAL_ONLY); +} void swap2(char* src, char* dest) { *(dest ) = *(src+1); @@ -89,6 +96,8 @@ char* toUpper(const char* str) return rr; } +static char tobuf[1024]; + char* toConstLower(const char* str) { strncpy(tobuf,str,1024); diff --git a/util/util.h b/util/util.h index fcbdb98..1e93fb2 100644 --- a/util/util.h +++ b/util/util.h @@ -7,6 +7,8 @@ extern int lsb(); +extern void internalError(const char*); + extern void swap2(char* src, char* dest); extern void swap4(char* src, char* dest); extern void swap8(char* src, char* dest); |