diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2019-01-18 18:23:06 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2019-01-18 18:23:06 (GMT) |
commit | bf0cc9887939cac3d9b488fdfd8180d5bef851ab (patch) | |
tree | b92b47d5935345436363ef0b661199545bec40b1 /tksao | |
parent | a51d63de1a6b963f9671367831e51aaa5bc9474a (diff) | |
download | blt-bf0cc9887939cac3d9b488fdfd8180d5bef851ab.zip blt-bf0cc9887939cac3d9b488fdfd8180d5bef851ab.tar.gz blt-bf0cc9887939cac3d9b488fdfd8180d5bef851ab.tar.bz2 |
clean up internal_error
Diffstat (limited to 'tksao')
-rw-r--r-- | tksao/util/util.C | 10 | ||||
-rw-r--r-- | tksao/util/util.h | 1 |
2 files changed, 9 insertions, 2 deletions
diff --git a/tksao/util/util.C b/tksao/util/util.C index faade52..1e66305 100644 --- a/tksao/util/util.C +++ b/tksao/util/util.C @@ -2,7 +2,8 @@ // Smithsonian Astrophysical Observatory, Cambridge, MA, USA // For conditions of distribution and use, see copyright notice in "copyright" -#include <tkInt.h> +#include <tcl.h> +//#include <tkInt.h> #include "util.h" @@ -10,6 +11,7 @@ int maperr= 0; static char tobuf[1024]; +Tcl_Interp *global_interp; int sexSign; // used by parser and lex to indicate sign of dms or hms @@ -41,6 +43,12 @@ int lsb() return (*(short *)"\001\000" & 0x0001); } +void internalError(const char* msg) +{ + Tcl_SetVar2(global_interp, "ds9", "msg", msg, TCL_GLOBAL_ONLY); + Tcl_SetVar2(global_interp, "ds9", "msg,level", "error", TCL_GLOBAL_ONLY); +} + char* dupstr(const char* str) { char* copy; diff --git a/tksao/util/util.h b/tksao/util/util.h index 3609ae6..04321b8 100644 --- a/tksao/util/util.h +++ b/tksao/util/util.h @@ -77,7 +77,6 @@ extern void swap2(char* src, char* dest); extern void swap4(char* src, char* dest); extern void swap8(char* src, char* dest); -// defined in ds9.C extern void internalError(const char*); extern char* dupstr(const char*); |