IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 41395 for trunk


Ignore:
Timestamp:
Aug 7, 2020, 2:06:23 PM (6 years ago)
Author:
eugene
Message:

libfits I/O operations where using signed char instead of unsigned char for byte-values table columns (B) -- this only affects the definition of SkyRegion.d

Location:
trunk/Ohana/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libautocode/def/SkyRegion.d

    r33647 r41395  
    1212FIELD   parent,    PARENT,         int,            sequence number in full table of parent
    1313FIELD   index,     INDEX,          int,            sequence number in full table of this entry
    14 FIELD   depth,     DEPTH,          char,           depth of this entry
    15 FIELD   child,     CHILD,          char,           does this entry have children?
    16 FIELD   table,     TABLE,          char,           does this entry have a table?
     14FIELD   depth,     DEPTH,          byte,           depth of this entry
     15FIELD   child,     CHILD,          byte,           does this entry have children?
     16FIELD   table,     TABLE,          byte,           does this entry have a table?
    1717FIELD   name,      NAME,           char[18],       name / filename
    18 FIELD   hostFlags, HOST_FLAGS,     char,           flags to define host / backup usage
    19 FIELD   hostID,    HOST_ID,        unsigned char,  host ID where data is stored
    20 FIELD   backupID,  BACKUP_ID,      unsigned char,  host ID where backup is stored
     18FIELD   hostFlags, HOST_FLAGS,     byte,           flags to define host / backup usage
     19FIELD   hostID,    HOST_ID,        byte,           host ID where data is stored
     20FIELD   backupID,  BACKUP_ID,      byte,           host ID where backup is stored
    2121
    2222# note : 2012.02.05 : stole 3 bytes from 'name' to use for host ID and
  • trunk/Ohana/src/libautocode/generate

    r37807 r41395  
    118118        $pt1 = 0;
    119119        if ($type eq "char")          { $pt1 = "A"; }
    120         if ($type eq "byte")          { $pt1 = "B"; }
     120        if ($type eq "byte")          { $pt1 = "B"; }
    121121        if ($type eq "unsigned char") { $pt1 = "B"; }
    122122        if ($type eq "rawshort")      { $pt1 = "I"; }
     
    225225        $pt1 = 0;
    226226        if ($type eq "char")          { $pt1 = sprintf "A%s", $length; }
    227         if ($type eq "byte")          { $pt1 = sprintf "I%s", $length; }
     227        if ($type eq "byte")          { $pt1 = sprintf "I%s", $length; }
    228228        if ($type eq "unsigned char") { $pt1 = sprintf "I%s", $length; }
    229229        if ($type eq "rawshort")      { $pt1 = sprintf "I%s", $length; }
     
    355355        $valid = 0;
    356356        if ($type eq "char")           { $Nbytes += 1*$Np; $valid = 1; }
    357         if ($type eq "byte")           { $Nbytes += 1*$Np; $valid = 1; }
     357        if ($type eq "byte")           { $Nbytes += 1*$Np; $valid = 1; }
    358358        if ($type eq "unsigned char")  { $Nbytes += 1*$Np; $valid = 1; }
    359359        if ($type eq "rawshort")       { $Nbytes += 2*$Np; $valid = 1; }
  • trunk/Ohana/src/libfits/include/gfitsio.h

    r41375 r41395  
    1919
    2020/* gfits_bintable_format returns 'byte' as the type associated with one-byte logical (non-char) values */
    21 typedef char byte;
     21typedef unsigned char byte;
    2222
    2323/********** FITS Constants *********/
  • trunk/Ohana/src/libfits/table/F_get_column.c

    r39460 r41395  
    11# include <ohana.h>
    22# include <gfitsio.h>
    3 #include <inttypes.h>
     3# include <inttypes.h>
    44# define SWAP_BYTE { \
    55  char tmp; \
  • trunk/Ohana/src/libfits/table/F_set_column.c

    r41341 r41395  
    338338
    339339  SET_VALUES("char",       char, "char", char, SWAP_NONE, 1);
    340   SET_VALUES("byte",       char, "char", char, SWAP_NONE, 1);
     340  SET_VALUES("byte",       byte, "char", char, SWAP_NONE, 1);
    341341  SET_VALUES("short",     short, "char", char, SWAP_BYTE, 1);
    342342  SET_VALUES("int",         int, "char", char, SWAP_WORD, 1);
     
    345345  SET_VALUES("double",   double, "char", char, SWAP_DBLE, 1);
    346346
    347   SET_VALUES("char",       char, "byte", char, SWAP_NONE, 1);
    348   SET_VALUES("byte",       char, "byte", char, SWAP_NONE, 1);
    349   SET_VALUES("short",     short, "byte", char, SWAP_BYTE, 1);
    350   SET_VALUES("int",         int, "byte", char, SWAP_WORD, 1);
    351   SET_VALUES("int64_t", int64_t, "byte", char, SWAP_DBLE, 1);
    352   SET_VALUES("float",     float, "byte", char, SWAP_WORD, 1);
    353   SET_VALUES("double",   double, "byte", char, SWAP_DBLE, 1);
     347  SET_VALUES("char",       char, "byte", byte, SWAP_NONE, 1);
     348  SET_VALUES("byte",       byte, "byte", byte, SWAP_NONE, 1);
     349  SET_VALUES("short",     short, "byte", byte, SWAP_BYTE, 1);
     350  SET_VALUES("int",         int, "byte", byte, SWAP_WORD, 1);
     351  SET_VALUES("int64_t", int64_t, "byte", byte, SWAP_DBLE, 1);
     352  SET_VALUES("float",     float, "byte", byte, SWAP_WORD, 1);
     353  SET_VALUES("double",   double, "byte", byte, SWAP_DBLE, 1);
    354354
    355355  SET_VALUES("char",       char, "short", short, SWAP_NONE, 2);
    356   SET_VALUES("byte",       char, "short", short, SWAP_NONE, 2);
     356  SET_VALUES("byte",       byte, "short", short, SWAP_NONE, 2);
    357357  SET_VALUES("short",     short, "short", short, SWAP_BYTE, 2);
    358358  SET_VALUES("int",         int, "short", short, SWAP_WORD, 2);
     
    362362
    363363  SET_VALUES("char",       char, "int", int, SWAP_NONE, 4);
    364   SET_VALUES("byte",       char, "int", int, SWAP_NONE, 4);
     364  SET_VALUES("byte",       byte, "int", int, SWAP_NONE, 4);
    365365  SET_VALUES("short",     short, "int", int, SWAP_BYTE, 4);
    366366  SET_VALUES("int",         int, "int", int, SWAP_WORD, 4);
     
    370370
    371371  SET_VALUES("char",       char, "int64_t", int64_t, SWAP_NONE, 8);
    372   SET_VALUES("byte",       char, "int64_t", int64_t, SWAP_NONE, 8);
     372  SET_VALUES("byte",       byte, "int64_t", int64_t, SWAP_NONE, 8);
    373373  SET_VALUES("short",     short, "int64_t", int64_t, SWAP_BYTE, 8);
    374374  SET_VALUES("int",         int, "int64_t", int64_t, SWAP_WORD, 8);
     
    378378
    379379  SET_VALUES("char",       char, "float", float, SWAP_NONE, 4);
    380   SET_VALUES("byte",       char, "float", float, SWAP_NONE, 4);
     380  SET_VALUES("byte",       byte, "float", float, SWAP_NONE, 4);
    381381  SET_VALUES("short",     short, "float", float, SWAP_BYTE, 4);
    382382  SET_VALUES("int",         int, "float", float, SWAP_WORD, 4);
     
    386386
    387387  SET_VALUES("char",       char, "double", double, SWAP_NONE, 8);
    388   SET_VALUES("byte",       char, "double", double, SWAP_NONE, 8);
     388  SET_VALUES("byte",       byte, "double", double, SWAP_NONE, 8);
    389389  SET_VALUES("short",     short, "double", double, SWAP_BYTE, 8);
    390390  SET_VALUES("int",         int, "double", double, SWAP_WORD, 8);
  • trunk/Ohana/src/opihi/lib.shell/VectorIO.c

    r41341 r41395  
    511511
    512512  // assign the data to the actual vector
    513   ASSIGN_DATA(byte,    char,    Int);
     513  ASSIGN_DATA(byte,    byte,  Int);
    514514  ASSIGN_DATA(char,    char,    Int);
    515515  ASSIGN_DATA(short,   short,   Int);
     
    537537
    538538  // assign the data to the actual vector
    539   ASSIGN_DATA_TRANSPOSE(byte,    char,    Int);
     539  ASSIGN_DATA_TRANSPOSE(byte,    byte,  Int);
    540540  ASSIGN_DATA_TRANSPOSE(char,    char,    Int);
    541541  ASSIGN_DATA_TRANSPOSE(short,   short,   Int);
Note: See TracChangeset for help on using the changeset viewer.