summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
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);