Changeset 3609 for trunk/Ohana/src/libautocode
- Timestamp:
- Mar 31, 2005, 4:57:00 PM (21 years ago)
- Location:
- trunk/Ohana/src/libautocode
- Files:
-
- 1 added
- 4 edited
-
Makefile (modified) (3 diffs)
-
def/common.h (modified) (2 diffs)
-
def/photreg.d (modified) (1 diff)
-
def/regimage.d (added)
-
generate (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libautocode/Makefile
r3593 r3609 29 29 # remember to add entries here to libohana/Makefile:AOBJ as well 30 30 LIBOBJ = \ 31 $(SRC)/regimage.$(ARCH).o \ 31 32 $(SRC)/detreg.$(ARCH).o \ 32 33 $(SRC)/photreg.$(ARCH).o \ … … 37 38 38 39 LIBINC = \ 40 $(INC)/regimage.h \ 39 41 $(INC)/detreg.h \ 40 42 $(INC)/photreg.h \ … … 44 46 $(INC)/spectrum-ascii.h 45 47 46 COMINC = \47 $(DEF)/common.h48 49 48 $(LIBOBJ): $(INC)/autocode.h 50 49 51 50 $(INC)/autocode.h: $(LIBINC) 52 cat $(COMINC) $(LIBINC) > $(INC)/autocode.h 51 cat $(DEF)/common.h > $(INC)/autocode.h 52 cat $(LIBINC) >> $(INC)/autocode.h 53 @echo "# endif" >> $(INC)/autocode.h 53 54 @echo done with libautocode.a: 54 55 -
trunk/Ohana/src/libautocode/def/common.h
r3536 r3609 1 # include <stdio.h> 2 # include <stdarg.h> 3 # include <fitsio.h> 1 # include <ohana.h> 2 3 # ifndef AUTOCODE_H 4 # define AUTOCODE_H 5 /* matched endif is added by Makefile */ 4 6 5 7 # ifndef TRUE … … 32 34 33 35 # define e_time unsigned int 36 # define rawshort short 37 38 /*** rawshort is used to handle the broken pre-autocode photreg tables 39 fix the tables and remove this 40 ***/ 34 41 35 42 /*** this file uses data types which must have fixed sizes regardless -
trunk/Ohana/src/libautocode/def/photreg.d
r3536 r3609 17 17 FIELD photcode, PHOTCODE, short, photcode, photcode 18 18 FIELD label, LABEL, char[64], data label 19 FIELD refcode, REFCODE, short,photcode, photcode19 FIELD refcode, REFCODE, rawshort, photcode, photcode 20 20 FIELD Ntime, N_TIME, int, number of times 21 21 FIELD Nmeas, N_MEAS, int, number of measurements -
trunk/Ohana/src/libautocode/generate
r3536 r3609 41 41 # not a simple key/value entry 42 42 if ($key eq "FIELD") { 43 ($element, $field, $format, $comment, $unit) = split (/,\s+/, $value); 43 ($element, $field, $format, $comment, $unit) = split (/,\s+/, $value, 5); 44 # print "$element : $field : $format : $comment : $unit\n"; 44 45 push @element, $element; 45 46 push @field, $field; … … 106 107 if ($type eq "float") { $pt1 = "E"; } 107 108 if ($type eq "double") { $pt1 = "D"; } 109 110 if ($type eq "rawshort") { $pt1 = "I"; } 108 111 109 112 printf FILE " fits_define_bintable_column (header, "; … … 130 133 if ($type eq "double") { $pt1 = sprintf "F%s", $length; } 131 134 135 if ($type eq "rawshort") { $pt1 = sprintf "I%s", $length; } 136 132 137 printf FILE " fits_define_table_column (header, "; 133 138 printf FILE "\"%s\", ", $pt1; … … 179 184 next; 180 185 } 186 # this is a patch for old photreg tables: provide a fix for the tables 187 if ($type eq "rawshort") { 188 $N +=2; 189 next; 190 } 181 191 if ($type eq "short") { 182 192 $T = "BYTE"; … … 229 239 if ($type eq "float") { $Nbytes += 4; } 230 240 if ($type eq "double") { $Nbytes += 8; } 241 242 if ($type eq "rawshort") { $Nbytes += 2; } 231 243 } 232 244 return ($Nbytes);
Note:
See TracChangeset
for help on using the changeset viewer.
