IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 6, 2010, 4:06:31 PM (16 years ago)
Author:
eugene
Message:

merging changes from branches/eam_branches/Ohana.20100606: re-work the off_t print/scan format; fix and test NAN implementation in gnu89 context; fix and test BYTE_SWAP for libohana

Location:
trunk/Ohana
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana

  • trunk/Ohana/src/libfits/header/F_scan.c

    r27435 r28241  
    7676  if (!strcmp (mode, "%d"))   { *va_arg (argp, int *)                = value; return (TRUE); }
    7777  if (!strcmp (mode, "%ld"))  { *va_arg (argp, long *)               = value; return (TRUE); }
    78   if (!strcmp (mode, "%lld")) { *va_arg (argp, long long *)          = value; return (TRUE); }
     78  if (!strcmp (mode, OFF_T_FMT)) { *va_arg (argp, long long *)       = value; return (TRUE); }
    7979  if (!strcmp (mode, "%Ld"))  { *va_arg (argp, long long *)          = value; return (TRUE); }
    8080  if (!strcmp (mode, "%u"))   { *va_arg (argp, unsigned *)           = value; return (TRUE); }
     
    8484  if (!strcmp (mode, "%hd"))  { *va_arg (argp, short *)              = value; return (TRUE); }
    8585
     86  // XXX is this safe for 64bit off_t and 32bit off_t?
     87  if (!strcmp (mode, "%jd"))  { *va_arg (argp, intmax_t *)           = value; return (TRUE); }
     88
    8689  /* no valid mode found */
    8790  return (FALSE);
     
    219222  if (!strcmp (mode, "%d"))   { *va_arg (argp, int *)                = value; return (TRUE); }
    220223  if (!strcmp (mode, "%ld"))  { *va_arg (argp, long *)               = value; return (TRUE); }
    221   if (!strcmp (mode, "%lld")) { *va_arg (argp, long long *)          = value; return (TRUE); }
     224  if (!strcmp (mode, OFF_T_FMT)) { *va_arg (argp, long long *)       = value; return (TRUE); }
    222225  if (!strcmp (mode, "%Ld"))  { *va_arg (argp, long long *)          = value; return (TRUE); }
    223226  if (!strcmp (mode, "%u"))   { *va_arg (argp, unsigned *)           = value; return (TRUE); }
Note: See TracChangeset for help on using the changeset viewer.