summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2020-03-24 16:43:29 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2020-03-24 16:43:29 (GMT)
commit2ea4d2a8efed4d8786d657041bcf0296b03d9313 (patch)
treeb6181695d6f84d9fc8f199b90a33f38b361b99a3 /util
parentf89d602d57a67e43885e80e087cf996d4cffc474 (diff)
downloadblt-2ea4d2a8efed4d8786d657041bcf0296b03d9313.zip
blt-2ea4d2a8efed4d8786d657041bcf0296b03d9313.tar.gz
blt-2ea4d2a8efed4d8786d657041bcf0296b03d9313.tar.bz2
libutil
Diffstat (limited to 'util')
-rw-r--r--util/util.C11
-rw-r--r--util/util.h2
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);