IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 28, 2005, 4:48:19 PM (21 years ago)
Author:
eugene
Message:

adding PhotPars and PhotParsOld to autocode

Location:
trunk/Ohana/src/libautocode
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libautocode/Makefile

    r3519 r3536  
    2727        @echo done autocode
    2828
     29# remember to add entries here to libohana/Makefile:AOBJ as well
    2930LIBOBJ = \
     31$(SRC)/photreg.$(ARCH).o \
     32$(SRC)/photreg-old.$(ARCH).o \
    3033$(SRC)/smpdata.$(ARCH).o \
    3134$(SRC)/spectrum.$(ARCH).o \
     
    3336
    3437LIBINC = \
     38$(INC)/photreg.h \
     39$(INC)/photreg-old.h \
    3540$(INC)/smpdata.h \
    3641$(INC)/spectrum.h \
  • trunk/Ohana/src/libautocode/def/common.h

    r3517 r3536  
    3131# endif
    3232
     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 type
    21STRUCT  Spectrum
    32EXTNAME SPECTRUM_DATABASE
  • trunk/Ohana/src/libautocode/generate

    r3515 r3536  
    103103        if ($type eq "short")  { $pt1 = "I"; }
    104104        if ($type eq "int")    { $pt1 = "J"; }
     105        if ($type eq "e_time") { $pt1 = "J"; }
    105106        if ($type eq "float")  { $pt1 = "E"; }
    106107        if ($type eq "double") { $pt1 = "D"; }
     
    125126        if ($type eq "short")  { $pt1 = sprintf "I%s", $length; }
    126127        if ($type eq "int")    { $pt1 = sprintf "I%s", $length; }
     128        if ($type eq "e_time") { $pt1 = sprintf "I%s", $length; }
    127129        if ($type eq "float")  { $pt1 = sprintf "F%s", $length; }
    128130        if ($type eq "double") { $pt1 = sprintf "F%s", $length; }
     
    181183            $n = 2;
    182184        }
    183         if ($type eq "float")  {
     185        if ($type eq "int")    {
    184186            $T = "WORD";
    185187            $n = 4;
    186188        }
    187         if ($type eq "int")    {
     189        if ($type eq "e_time")    {
     190            $T = "WORD";
     191            $n = 4;
     192        }
     193        if ($type eq "float")  {
    188194            $T = "WORD";
    189195            $n = 4;
     
    217223            }
    218224        }
     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; }
    219230        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; }
    223231    }
    224232    return ($Nbytes);
Note: See TracChangeset for help on using the changeset viewer.