Changeset 3536 for trunk/Ohana/src/libautocode
- Timestamp:
- Mar 28, 2005, 4:48:19 PM (21 years ago)
- Location:
- trunk/Ohana/src/libautocode
- Files:
-
- 2 added
- 4 edited
-
Makefile (modified) (2 diffs)
-
def/common.h (modified) (1 diff)
-
def/photreg-old.d (added)
-
def/photreg.d (added)
-
def/spectrum.d (modified) (1 diff)
-
generate (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libautocode/Makefile
r3519 r3536 27 27 @echo done autocode 28 28 29 # remember to add entries here to libohana/Makefile:AOBJ as well 29 30 LIBOBJ = \ 31 $(SRC)/photreg.$(ARCH).o \ 32 $(SRC)/photreg-old.$(ARCH).o \ 30 33 $(SRC)/smpdata.$(ARCH).o \ 31 34 $(SRC)/spectrum.$(ARCH).o \ … … 33 36 34 37 LIBINC = \ 38 $(INC)/photreg.h \ 39 $(INC)/photreg-old.h \ 35 40 $(INC)/smpdata.h \ 36 41 $(INC)/spectrum.h \ -
trunk/Ohana/src/libautocode/def/common.h
r3517 r3536 31 31 # endif 32 32 33 # define e_time unsigned int 34 35 /*** this file uses data types which must have fixed sizes regardless 36 of the platform. It originally used the basic C primitives: 37 float, double, int, short int, unsigned long int, etc. 38 this breaks under 64 bit (and probably on other systems). 39 I should define internal data types which should be set by the 40 use of # define statements if needed. I will cheat for now and use 41 the time_t to replace unsigned long int in this file 42 ***/ 43 -
trunk/Ohana/src/libautocode/def/spectrum.d
r3515 r3536 1 # name of structure type2 1 STRUCT Spectrum 3 2 EXTNAME SPECTRUM_DATABASE -
trunk/Ohana/src/libautocode/generate
r3515 r3536 103 103 if ($type eq "short") { $pt1 = "I"; } 104 104 if ($type eq "int") { $pt1 = "J"; } 105 if ($type eq "e_time") { $pt1 = "J"; } 105 106 if ($type eq "float") { $pt1 = "E"; } 106 107 if ($type eq "double") { $pt1 = "D"; } … … 125 126 if ($type eq "short") { $pt1 = sprintf "I%s", $length; } 126 127 if ($type eq "int") { $pt1 = sprintf "I%s", $length; } 128 if ($type eq "e_time") { $pt1 = sprintf "I%s", $length; } 127 129 if ($type eq "float") { $pt1 = sprintf "F%s", $length; } 128 130 if ($type eq "double") { $pt1 = sprintf "F%s", $length; } … … 181 183 $n = 2; 182 184 } 183 if ($type eq " float"){185 if ($type eq "int") { 184 186 $T = "WORD"; 185 187 $n = 4; 186 188 } 187 if ($type eq "int") { 189 if ($type eq "e_time") { 190 $T = "WORD"; 191 $n = 4; 192 } 193 if ($type eq "float") { 188 194 $T = "WORD"; 189 195 $n = 4; … … 217 223 } 218 224 } 225 if ($type eq "byte") { $Nbytes += 1; } 226 if ($type eq "short") { $Nbytes += 2; } 227 if ($type eq "int") { $Nbytes += 4; } 228 if ($type eq "e_time") { $Nbytes += 4; } 229 if ($type eq "float") { $Nbytes += 4; } 219 230 if ($type eq "double") { $Nbytes += 8; } 220 if ($type eq "int") { $Nbytes += 4; }221 if ($type eq "short") { $Nbytes += 2; }222 if ($type eq "float") { $Nbytes += 4; }223 231 } 224 232 return ($Nbytes);
Note:
See TracChangeset
for help on using the changeset viewer.
