Changeset 6684 for trunk/Ohana/src/opihi
- Timestamp:
- Mar 26, 2006, 1:14:47 PM (20 years ago)
- Location:
- trunk/Ohana/src/opihi
- Files:
-
- 11 edited
-
Makefile.Common (modified) (1 diff)
-
cmd.data/Makefile (modified) (1 diff)
-
cmd.data/box.c (modified) (2 diffs)
-
cmd.data/init.c (modified) (2 diffs)
-
dvo/LoadImages.c (modified) (1 diff)
-
dvo/catdir.c (modified) (2 diffs)
-
dvo/region_list.c (modified) (4 diffs)
-
include/display.h (modified) (2 diffs)
-
include/dvo1.h (modified) (1 diff)
-
lib.data/open_graph.c (modified) (2 diffs)
-
lib.data/open_image.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/Makefile.Common
r6683 r6684 26 26 $(DESTLIB)/%.a: $(LIB)/%.$(ARCH).a 27 27 @if [ ! -d $(DESTLIB) ]; then mkdir -p $(DESTLIB); fi 28 @echo ""29 @echo "current: $^"30 @echo "current: $*"31 @echo "current: $@"32 28 rm -f $@ 33 cp $ ^$@29 cp $< $@ 34 30 35 31 lib%.clean: -
trunk/Ohana/src/opihi/cmd.data/Makefile
r6642 r6684 26 26 $(SDIR)/clear.$(ARCH).o \ 27 27 $(SDIR)/clip.$(ARCH).o \ 28 $(SDIR)/close.$(ARCH).o \ 28 29 $(SDIR)/concat.$(ARCH).o \ 29 30 $(SDIR)/contour.$(ARCH).o \ -
trunk/Ohana/src/opihi/cmd.data/box.c
r5919 r6684 6 6 Graphdata graphmode; 7 7 8 Ngraph = -1; 9 if ((N = get_argument (argc, argv, "-n"))) { 10 remove_argument (N, &argc, argv); 11 Ngraph = atof (argv[N]); 12 remove_argument (N, &argc, argv); 13 } 14 if (!GetGraph (&graphmode, &Xgraph, &Ngraph)) return (FALSE); 15 8 16 strcpy (graphmode.ticks, "2222"); 9 17 if ((N = get_argument (argc, argv, "-ticks"))) { … … 38 46 } 39 47 } 40 41 Ngraph = -1;42 if ((N = get_argument (argc, argv, "-n"))) {43 remove_argument (N, &argc, argv);44 Ngraph = atof (argv[N]);45 remove_argument (N, &argc, argv);46 }47 if (!GetGraph (&graphmode, &Xgraph, &Ngraph)) return (FALSE);48 48 49 49 if (argc != 1) goto usage; -
trunk/Ohana/src/opihi/cmd.data/init.c
r6642 r6684 9 9 int clear PROTO((int, char **)); 10 10 int clip PROTO((int, char **)); 11 int close_device PROTO((int, char **)); 11 12 int concat PROTO((int, char **)); 12 13 int contour PROTO((int, char **)); … … 115 116 {"clear", clear, "erase plot"}, 116 117 {"clip", clip, "clip values in a buffer to be within a range"}, 118 {"close", close_device, "close the current display device"}, 117 119 {"concat", concat, "reduce vector dimension"}, 118 120 {"contour", contour, "create contour from image"}, -
trunk/Ohana/src/opihi/dvo/LoadImages.c
r4864 r6684 3 3 Image *LoadImages (int *nimage) { 4 4 5 char filename[256];5 char *catdir, filename[256]; 6 6 Image *image; 7 7 FITS_DB db; 8 8 9 VarConfig ("IMAGE_CATALOG", "%s", filename); 9 /* VarConfig ("IMAGE_CATALOG", "%s", filename); */ 10 11 catdir = GetCATDIR (); 12 sprintf (filename, "%s/Images.dat", catdir); 10 13 11 14 fits_db_init (&db); -
trunk/Ohana/src/opihi/dvo/catdir.c
r5900 r6684 3 3 int catdir_define (int argc, char **argv) { 4 4 5 char *current; 5 6 int status, N, VERBOSE; 6 7 … … 14 15 fprintf (stderr, "USAGE: catdir (name)\n"); 15 16 fprintf (stderr, " (name) may be a path or 'default'\n"); 17 current = GetCATDIR (); 18 if (current == NULL) { 19 fprintf (stderr, "catdir not defined\n"); 20 } else { 21 fprintf (stderr, "current: %s\n", current); 22 } 16 23 return (FALSE); 17 24 } -
trunk/Ohana/src/opihi/dvo/region_list.c
r5996 r6684 11 11 12 12 char *newpath; 13 char catdir [256];13 char catdir_config[256]; 14 14 char gscfile[256]; 15 15 char skyfile[256]; … … 18 18 /* find CATDIR in config system */ 19 19 if (path == NULL) { 20 if (VarConfig ("CATDIR", "%s", catdir ) == NULL) return (FALSE);21 newpath = catdir ;20 if (VarConfig ("CATDIR", "%s", catdir_config) == NULL) return (FALSE); 21 newpath = catdir_config; 22 22 } else { 23 23 newpath = path; … … 32 32 33 33 if (verbose) { 34 fprintf (stderr, "CATDIR %s\n", catdir);34 fprintf (stderr, "CATDIR %s\n", CATDIR); 35 35 fprintf (stderr, "GSCFILE %s\n", gscfile); 36 36 fprintf (stderr, "SKYFILE %s\n", skyfile); … … 42 42 43 43 if (sky != NULL) SkyTableFree (sky); 44 sky = SkyTableLoadOptimal ( catdir, skyfile, gscfile, skydepth, verbose);44 sky = SkyTableLoadOptimal (CATDIR, skyfile, gscfile, skydepth, verbose); 45 45 if (sky == NULL) return FALSE; 46 46 47 SkyTableSetFilenames (sky, catdir, "cpt");47 SkyTableSetFilenames (sky, CATDIR, "cpt"); 48 48 49 49 return (TRUE); 50 } 51 52 char *GetCATDIR () { 53 if (CATDIR == NULL) { 54 SetCATDIR (NULL, FALSE); 55 } 56 return (CATDIR); 50 57 } 51 58 -
trunk/Ohana/src/opihi/include/display.h
r5850 r6684 24 24 void InitGraph PROTO((void)); 25 25 int open_graph PROTO((int N)); 26 int close_graph PROTO((int N)); 26 27 void QuitGraph PROTO((void)); 27 28 void SetGraph PROTO((Graphdata data)); … … 35 36 void InitImage PROTO((void)); 36 37 int open_image PROTO((int N)); 38 int close_image PROTO((int N)); 37 39 void QuitImage PROTO((void)); 38 40 void SetImageDevice PROTO((int state)); -
trunk/Ohana/src/opihi/include/dvo1.h
r6683 r6684 73 73 SkyList *SkyListLoadFile PROTO((char *filename)); 74 74 int SetCATDIR PROTO((char *path, int verbose)); 75 char * GetCATDIR PROTO(()); 75 76 SkyTable *GetSkyTable PROTO(()); 76 77 SkyList *SkyListFromFile PROTO((char *filename)); -
trunk/Ohana/src/opihi/lib.data/open_graph.c
r5919 r6684 8 8 static int Xgraph[NXGRAPH]; 9 9 static Graphdata graphdata[NXGRAPH]; 10 11 12 10 13 11 void QuitGraph () { … … 80 78 81 79 Xgraph[N] = fd; 80 return (TRUE); 81 } 82 83 int close_graph (int N) { 84 85 if (N < 0) return (FALSE); 86 if (N >= NXGRAPH) return (FALSE); 87 88 KiiClose (Xgraph[N]); 89 Xgraph[N] = -1; 82 90 return (TRUE); 83 91 } -
trunk/Ohana/src/opihi/lib.data/open_image.c
r5919 r6684 33 33 } 34 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 35 /* set SIGPIPE to this function to close cleanly */ 54 36 void XImageDead (int input) { … … 80 62 81 63 Ximage[N] = fd; 64 return (TRUE); 65 } 66 67 int close_image (int N) { 68 69 if (N < 0) return (FALSE); 70 if (N >= NXIMAGE) return (FALSE); 71 72 KiiClose (Ximage[N]); 73 Ximage[N] = -1; 82 74 return (TRUE); 83 75 }
Note:
See TracChangeset
for help on using the changeset viewer.
