IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 24, 2010, 11:22:25 AM (16 years ago)
Author:
eugene
Message:

large update merging in changes for Ohana to support large files

Location:
trunk/Ohana
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana

  • trunk/Ohana/src/opihi/dvo/cmpread.c

    r20936 r27435  
    66int cmpread (int argc, char **argv) {
    77 
    8   int i, field, Naxis, Nbytes, Nstars;
     8  off_t i, Nbytes, Nstars;
     9  int field, Naxis;
    910  double tR, tD;
    1011  float value;
     
    6162    return (FALSE);
    6263  }
    63   fseek (f, header.size, SEEK_SET);
     64  fseeko (f, header.datasize, SEEK_SET);
    6465
    6566  /* find expected number of stars */
    66   if (!gfits_scan (&header, "NSTARS", "%d", 1, &Nstars)) {
     67  if (!gfits_scan (&header, "NSTARS", "%lld", 1, (long long *) &Nstars)) {
    6768    gprint (GP_ERR, "ERROR: can't get NSTARS from header\n");
    6869    gfits_free_header (&header);
     
    7677    /* allocate space for stars */
    7778    gprint (GP_ERR, "reading from TEXT cmp file %s\n", argv[2]);
    78     if (!gfits_scan (&header, "NSTARS", "%d", 1, &Nstars)) {
     79    if (!gfits_scan (&header, "NSTARS", "%lld", 1, (long long *) &Nstars)) {
    7980      gprint (GP_ERR, "ERROR: failed to find NSTARS\n");
    8081      exit (1);
     
    8485    gprint (GP_ERR, "reading from FITS cmp file %s\n", argv[2]);
    8586    Nbytes = gfits_data_size (&header);
    86     fseek (f, Nbytes, SEEK_CUR);
     87    fseeko (f, Nbytes, SEEK_CUR);
    8788    stars = cmpReadFits (f, &Nstars);
    8889  }
     
    138139  free (stars);
    139140  gfits_free_header (&header);
    140   gprint (GP_ERR, "loaded %d objects\n", Nstars);
     141  gprint (GP_ERR, "loaded %lld objects\n", (long long) Nstars);
    141142  return (TRUE);
    142143}
Note: See TracChangeset for help on using the changeset viewer.