Index: /trunk/Ohana/src/opihi/cmd.astro/Makefile
===================================================================
--- /trunk/Ohana/src/opihi/cmd.astro/Makefile	(revision 4832)
+++ /trunk/Ohana/src/opihi/cmd.astro/Makefile	(revision 4833)
@@ -15,5 +15,5 @@
 INCS    =       -I$(INC) -I$(LINC) -I$(XINC)
 LFLAGS  =       -L$(LLIB) -L$(LIB)
-LIBS    =       -lFITS -lsocket -lnsl -lreadline -ltermcap -lohana -lm
+LIBS    =       -lsocket -lnsl -lreadline -ltermcap -lohana -lFITS -lm
 CFLAGS  =       $(INCS)
 CCFLAGS =       $(LIBS) 
Index: /trunk/Ohana/src/opihi/cmd.basic/Makefile
===================================================================
--- /trunk/Ohana/src/opihi/cmd.basic/Makefile	(revision 4832)
+++ /trunk/Ohana/src/opihi/cmd.basic/Makefile	(revision 4833)
@@ -15,5 +15,5 @@
 INCS    =       -I$(INC) -I$(LINC) -I$(XINC)
 LFLAGS  =       -L$(LLIB) -L$(LIB)
-LIBS    =       -lFITS -lsocket -lnsl -lreadline -ltermcap -lohana -lm
+LIBS    =       -lsocket -lnsl -lreadline -ltermcap -lohana -lFITS -lm
 CFLAGS  =       $(INCS)
 CCFLAGS =       $(LIBS) 
Index: /trunk/Ohana/src/opihi/cmd.data/Makefile
===================================================================
--- /trunk/Ohana/src/opihi/cmd.data/Makefile	(revision 4832)
+++ /trunk/Ohana/src/opihi/cmd.data/Makefile	(revision 4833)
@@ -15,5 +15,5 @@
 INCS    =       -I$(INC) -I$(LINC) -I$(XINC)
 LFLAGS  =       -L$(LLIB) -L$(LIB)
-LIBS    =       -lFITS -lsocket -lnsl -lreadline -ltermcap -lohana -lm
+LIBS    =       -lsocket -lnsl -lreadline -ltermcap -lohana -lFITS -lm
 CFLAGS  =       $(INCS)
 CCFLAGS =       $(LIBS) 
Index: /trunk/Ohana/src/opihi/dimm/Makefile
===================================================================
--- /trunk/Ohana/src/opihi/dimm/Makefile	(revision 4832)
+++ /trunk/Ohana/src/opihi/dimm/Makefile	(revision 4833)
@@ -15,5 +15,5 @@
 INCS    =       -I$(INC) -I$(LINC) -I$(XINC)
 LFLAGS  =       -L$(LLIB) -L$(LIB)
-LIBS1   =       -lFITS -lsocket -lnsl -lreadline -ltermcap -lohana -lm
+LIBS1   =       -lsocket -lnsl -lreadline -ltermcap -lohana -lFITS -lm
 LIBS2   =       -lbasiccmd -ldatacmd -lastrocmd -lshell -ldata -lsbig
 LIBS    =       $(LIBS2) $(LIBS1) 
Index: /trunk/Ohana/src/opihi/dvo/Makefile
===================================================================
--- /trunk/Ohana/src/opihi/dvo/Makefile	(revision 4832)
+++ /trunk/Ohana/src/opihi/dvo/Makefile	(revision 4833)
@@ -15,5 +15,5 @@
 INCS    =       -I$(INC) -I$(LINC) -I$(XINC)
 LFLAGS  =       -L$(LLIB) -L$(LIB)
-LIBS1   =       -lFITS -lsocket -lnsl -lreadline -ltermcap -lohana -lm
+LIBS1   =       -lsocket -lnsl -lreadline -ltermcap -lohana -lFITS -lm
 LIBS2   =       -lbasiccmd -ldatacmd -lastrocmd -lshell -ldata 
 LIBS    =       $(LIBS2) $(LIBS1) 
Index: /trunk/Ohana/src/opihi/dvo/gstar.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/gstar.c	(revision 4832)
+++ /trunk/Ohana/src/opihi/dvo/gstar.c	(revision 4833)
@@ -17,5 +17,8 @@
   PhotCode *code;
 
-  VarConfig ("CATDIR", "%s", catdir);
+  if (VarConfig ("CATDIR", "%s", catdir) == NULL) return (FALSE);
+  if (VarConfig ("CATMODE", "%s", catalog.catmode) == NULL) 
+    strcpy (catalog.catmode, "RAW");
+
   if (!InitPhotcodes ()) return (FALSE);
   Nsec = GetPhotcodeNsecfilt ();
Index: /trunk/Ohana/src/opihi/dvo/mextract.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/mextract.c	(revision 4832)
+++ /trunk/Ohana/src/opihi/dvo/mextract.c	(revision 4833)
@@ -29,4 +29,6 @@
   /* find CATDIR in config system */
   if (VarConfig ("CATDIR", "%s", catdir) == NULL) goto escape;
+  if (VarConfig ("CATMODE", "%s", catalog.catmode) == NULL) 
+    strcpy (catalog.catmode, "RAW");
 
   /* interpret command-line options */
Index: /trunk/Ohana/src/opihi/dvo/pmeasure.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/pmeasure.c	(revision 4832)
+++ /trunk/Ohana/src/opihi/dvo/pmeasure.c	(revision 4833)
@@ -19,7 +19,9 @@
 
   Ngraph = -1;
+  if (!InitPhotcodes ()) return (FALSE);
   if (!GetGraph (&graphmode, NULL, &Ngraph)) return (FALSE);
   if (VarConfig ("CATDIR", "%s", catdir) == NULL) return (FALSE);
-  if (!InitPhotcodes ()) return (FALSE);
+  if (VarConfig ("CATMODE", "%s", catalog.catmode) == NULL) 
+    strcpy (catalog.catmode, "RAW");
 
   regions = (RegionFile *) NULL;
Index: /trunk/Ohana/src/opihi/dvo2/Makefile
===================================================================
--- /trunk/Ohana/src/opihi/dvo2/Makefile	(revision 4832)
+++ /trunk/Ohana/src/opihi/dvo2/Makefile	(revision 4833)
@@ -17,5 +17,5 @@
 INCS    =       -I$(INC) -I$(LINC) -I$(XINC)
 LFLAGS  =       -L$(LLIB) -L$(LIB)
-LIBS1   =       -lFITS -lsocket -lnsl -lreadline -ltermcap -lohana -lm
+LIBS1   =       -lsocket -lnsl -lreadline -ltermcap -lohana -lFITS -lm
 LIBS2   =       -lbasiccmd -ldatacmd -lastrocmd -lshell -ldata 
 LIBS    =       $(LIBS2) $(LIBS1) 
Index: /trunk/Ohana/src/opihi/lib.data/Makefile
===================================================================
--- /trunk/Ohana/src/opihi/lib.data/Makefile	(revision 4832)
+++ /trunk/Ohana/src/opihi/lib.data/Makefile	(revision 4833)
@@ -15,5 +15,5 @@
 INCS    =       -I$(INC) -I$(LINC) -I$(XINC)
 LFLAGS  =       -L$(LLIB) -L$(LIB)
-LIBS    =       -lFITS -lsocket -lnsl -lreadline -ltermcap -lohana -lm
+LIBS    =       -lsocket -lnsl -lreadline -ltermcap -lohana -lFITS -lm
 CFLAGS  =       $(INCS)
 CCFLAGS =       $(LIBS) 
Index: /trunk/Ohana/src/opihi/lib.shell/ConfigInit.c
===================================================================
--- /trunk/Ohana/src/opihi/lib.shell/ConfigInit.c	(revision 4832)
+++ /trunk/Ohana/src/opihi/lib.shell/ConfigInit.c	(revision 4833)
@@ -26,23 +26,18 @@
 
   answer = get_variable (keyword);
-  if (answer != (char *) NULL) {
-
-    if (!strcmp (mode, "%s")) {
-      strcpy ((char *) ptr, answer);
-    } else {
-      if (!strcmp (mode, "%d"))  *(int *) ptr       = atoi (answer);
-      if (!strcmp (mode, "%u"))  *(unsigned *) ptr  = atoi (answer);
-      if (!strcmp (mode, "%ld")) *(long *) ptr      = atoi (answer);
-      if (!strcmp (mode, "%hd")) *(short *) ptr     = atoi (answer);
-      if (!strcmp (mode, "%f"))  *(float *) ptr     = atof (answer);
-      if (!strcmp (mode, "%lf")) *(double *) ptr    = atof (answer);
-    }
-    free (answer);
-    return (ptr);
+  if (answer == (char *) NULL) {
+    answer = ScanConfig (GlobalConfig, keyword, mode, 0, ptr);
+    return (answer);
   }
 
-  answer = ScanConfig (GlobalConfig, keyword, mode, 0, ptr);
-  return (answer);
+  if (!strcmp (mode, "%s"))  strcpy ((char *) ptr, answer);
+  if (!strcmp (mode, "%d"))  *(int *) ptr       = atoi (answer);
+  if (!strcmp (mode, "%u"))  *(unsigned *) ptr  = atoi (answer);
+  if (!strcmp (mode, "%ld")) *(long *) ptr      = atoi (answer);
+  if (!strcmp (mode, "%hd")) *(short *) ptr     = atoi (answer);
+  if (!strcmp (mode, "%f"))  *(float *) ptr     = atof (answer);
+  if (!strcmp (mode, "%lf")) *(double *) ptr    = atof (answer);
+
+  free (answer);
+  return (ptr);
 }
-
-  
Index: /trunk/Ohana/src/opihi/lib.shell/Makefile
===================================================================
--- /trunk/Ohana/src/opihi/lib.shell/Makefile	(revision 4832)
+++ /trunk/Ohana/src/opihi/lib.shell/Makefile	(revision 4833)
@@ -15,5 +15,5 @@
 INCS    =       -I$(INC) -I$(LINC) -I$(XINC)
 LFLAGS  =       -L$(LLIB) -L$(LIB)
-LIBS    =       -lFITS -lsocket -lnsl -lreadline -ltermcap -lohana -lm
+LIBS    =       -lsocket -lnsl -lreadline -ltermcap -lohana -lFITS -lm
 CFLAGS  =       $(INCS)
 CCFLAGS =       $(LIBS) 
Index: /trunk/Ohana/src/opihi/mana/Makefile
===================================================================
--- /trunk/Ohana/src/opihi/mana/Makefile	(revision 4832)
+++ /trunk/Ohana/src/opihi/mana/Makefile	(revision 4833)
@@ -15,5 +15,5 @@
 INCS    =       -I$(INC) -I$(LINC) -I$(XINC)
 LFLAGS  =       -L$(LLIB) -L$(LIB)
-LIBS1   =       -lFITS -lsocket -lnsl -lreadline -ltermcap -lohana -lm
+LIBS1   =       -lsocket -lnsl -lreadline -ltermcap -lohana -lFITS -lm
 LIBS2   =       -lbasiccmd -ldatacmd -lastrocmd -lshell -ldata 
 LIBS    =       $(LIBS2) $(LIBS1) 
Index: /trunk/Ohana/src/opihi/pantasks/Makefile
===================================================================
--- /trunk/Ohana/src/opihi/pantasks/Makefile	(revision 4832)
+++ /trunk/Ohana/src/opihi/pantasks/Makefile	(revision 4833)
@@ -15,5 +15,5 @@
 INCS    =       -I$(INC) -I$(LINC) -I$(XINC)
 LFLAGS  =       -L$(LLIB) -L$(LIB)
-LIBS1   =       -lFITS -lsocket -lnsl -lreadline -ltermcap -lohana -lm
+LIBS1   =       -lsocket -lnsl -lreadline -ltermcap -lohana -lFITS -lm
 LIBS2   =       -lbasiccmd -ldatacmd -lastrocmd -lshell -ldata 
 LIBS    =       $(LIBS2) $(LIBS1) 
Index: /trunk/Ohana/src/opihi/pclient/Makefile
===================================================================
--- /trunk/Ohana/src/opihi/pclient/Makefile	(revision 4832)
+++ /trunk/Ohana/src/opihi/pclient/Makefile	(revision 4833)
@@ -15,5 +15,5 @@
 INCS    =       -I$(INC) -I$(LINC) -I$(XINC)
 LFLAGS  =       -L$(LLIB) -L$(LIB)
-LIBS1   =       -lFITS -lsocket -lnsl -lreadline -ltermcap -lohana -lm
+LIBS1   =       -lsocket -lnsl -lreadline -ltermcap -lohana -lFITS -lm
 LIBS2   =       -lbasiccmd -lshell -ldata
 LIBS    =       $(LIBS2) $(LIBS1) 
Index: /trunk/Ohana/src/opihi/pcontrol/Makefile
===================================================================
--- /trunk/Ohana/src/opihi/pcontrol/Makefile	(revision 4832)
+++ /trunk/Ohana/src/opihi/pcontrol/Makefile	(revision 4833)
@@ -15,5 +15,5 @@
 INCS    =       -I$(INC) -I$(LINC) -I$(XINC)
 LFLAGS  =       -L$(LLIB) -L$(LIB)
-LIBS1   =       -lFITS -lsocket -lnsl -lreadline -ltermcap -lohana -lm
+LIBS1   =       -lsocket -lnsl -lreadline -ltermcap -lohana -lFITS -lm
 LIBS2   =       -lbasiccmd -lshell -ldata
 LIBS    =       $(LIBS2) $(LIBS1) 
