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/table/F_read_T.c

    r27435 r28241  
    6464    perror (string);
    6565    if (Nread < gfits_data_min_size (table[0].header)) {
    66       fprintf (stderr, "error: fits read error in %s, read %lld, need %lld\n", __func__, (long long) Nread, (long long) gfits_data_min_size (table[0].header));
     66      fprintf (stderr, "error: fits read error in %s, read "OFF_T_FMT", need "OFF_T_FMT"\n", __func__,  Nread, gfits_data_min_size (table[0].header));
    6767      gfits_free_table  (table);
    6868      return (FALSE);
     
    109109  /* modify structure and header to match actual read rows Ny */
    110110  table[0].header[0].Naxis[1] = Nrows;
    111   gfits_modify (table[0].header, "NAXIS2",  "%lld", 1, (long long) Nrows);
     111  gfits_modify (table[0].header, "NAXIS2",  OFF_T_FMT, 1, Nrows);
    112112  table[0].datasize = gfits_data_size (table[0].header);
    113113
     
    185185    /* file pointer is at beginning of desired table data */
    186186    start = ftello (f);
    187     gfits_scan (header, "NAXIS1", "%lld", 1, (long long *) &Nx);
    188     gfits_scan (header, "NAXIS2", "%lld", 1, (long long *) &Ny);
     187
     188    gfits_scan (header, "NAXIS1", OFF_T_FMT, 1, &Nx);
     189    gfits_scan (header, "NAXIS2", OFF_T_FMT, 1, &Ny);
     190
    189191    for (i = 0; i < Nrow; i++) {
    190192      if (row[i] > Ny) { return (FALSE); }
Note: See TracChangeset for help on using the changeset viewer.