IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 23, 2012, 9:46:37 AM (14 years ago)
Author:
eugene
Message:

add getcoords function; avoid truncation problems with large 32bit ints

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120805/Ohana/src/opihi/cmd.astro/csystem.c

    r20936 r34339  
    1111  CoordTransform *transform;
    1212
    13   if (argc != 5) {
    14     gprint (GP_ERR, "USAGE: csystems [C/G/E/H] [C/G/E/H] X Y\n");
    15     return (FALSE);
    16   }
     13  if (argc != 5) goto syntax;
    1714
    1815  switch (argv[1][0]) {
     
    2017    case 'G': input = COORD_GALACTIC; break;
    2118    case 'E': input = COORD_ECLIPTIC; break;
    22     default: abort();
     19    default: goto syntax;
    2320  }
    2421
     
    2724    case 'G': output = COORD_GALACTIC; break;
    2825    case 'E': output = COORD_ECLIPTIC; break;
    29     default: abort();
     26    default: goto syntax;
    3027  }
    3128
     
    6663  return (TRUE);
    6764
     65syntax:
     66  gprint (GP_ERR, "USAGE: csystems [C/G/E/H] [C/G/E/H] X Y\n");
     67  return (FALSE);
    6868}
Note: See TracChangeset for help on using the changeset viewer.