IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 16, 2006, 10:58:49 PM (20 years ago)
Author:
eugene
Message:

major updates to use gprint for buffered / threaded printing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/dvo/simage.c

    r7680 r7917  
    3131
    3232  if (argc != 2) {
    33     fprintf (stderr, "USAGE: image (filename)\n");
     33    gprint (GP_ERR, "USAGE: image (filename)\n");
    3434    return (FALSE);
    3535  }
    3636
    37   fprintf (stderr, "not working at the moment (cmp format)\n");
     37  gprint (GP_ERR, "not working at the moment (cmp format)\n");
    3838  return (FALSE);
    3939 
    4040  /* read header */
    4141  if (!gfits_read_header (argv[1], &header)) {
    42     fprintf (stderr, "ERROR: can't find image file %s\n", argv[1]);
     42    gprint (GP_ERR, "ERROR: can't find image file %s\n", argv[1]);
    4343    return (FALSE);
    4444  }
     
    4747  gfits_scan (&header, "CTYPE1",   "%s",  1, coords.ctype);
    4848  if (strcmp (coords.ctype, "RA---PLY")) {
    49     fprintf (stderr, "ERROR: wrong astrometric info in header\n");
     49    gprint (GP_ERR, "ERROR: wrong astrometric info in header\n");
    5050    return (FALSE);
    5151  }
     
    8181  gfits_scan (&header, "NSTARS", "%d", 1, &Nstars);
    8282  if (Nstars == 0) {
    83     fprintf (stderr, "no stars in file\n");
     83    gprint (GP_ERR, "no stars in file\n");
    8484    return (FALSE);
    8585  }
     
    8888  f = fopen (argv[1], "r");
    8989  if (f == NULL) {
    90     fprintf (stderr, "can't find data in file %s\n", argv[1]);
     90    gprint (GP_ERR, "can't find data in file %s\n", argv[1]);
    9191    return (FALSE);
    9292  }
     
    108108    nbytes = fread (buffer, 1, (BLOCK*BYTES_STAR), f);
    109109    if (nbytes != BLOCK*BYTES_STAR) {
    110       fprintf (stderr, "failed to read in stars (1)\n");
     110      gprint (GP_ERR, "failed to read in stars (1)\n");
    111111      free (Xvec.elements);
    112112      free (Yvec.elements);
     
    127127  nbytes = fread (buffer, 1, (Nbytes % (BLOCK*BYTES_STAR)), f);
    128128  if (nbytes != (Nbytes % (BLOCK*BYTES_STAR))) {
    129     fprintf (stderr, "ERROR: failed to read in stars (2)\n");
     129    gprint (GP_ERR, "ERROR: failed to read in stars (2)\n");
    130130    free (Xvec.elements);
    131131    free (Yvec.elements);
     
    144144 
    145145  if (nstars != Nstars) {
    146     fprintf (stderr, "ERROR: failed to read in all stars (%d of %d)\n", nstars, Nstars);
     146    gprint (GP_ERR, "ERROR: failed to read in all stars (%d of %d)\n", nstars, Nstars);
    147147    free (Xvec.elements);
    148148    free (Yvec.elements);
Note: See TracChangeset for help on using the changeset viewer.