IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23524


Ignore:
Timestamp:
Mar 25, 2009, 11:35:13 AM (17 years ago)
Author:
eugene
Message:

attempting to define alternate output target

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/extsrc/gpcsw/gpcsrc/fits/burntool/burntool.c

    r23493 r23524  
    2525{
    2626   int i, j, k, nx, ny, err;
    27    HeaderUnit ohu = fh_create();
    2827   HeaderUnit ihu = fh_create();
    2928   HeaderUnit ehu;
     
    4140   CELL OTA[MAXCELL];   /* Cell structure for entire OTA */
    4241
     42   if (argc == 1)  {
     43     syntax(argv[0]);
     44     exit(EXIT_SUCCESS);
     45   }
     46
    4347   if(argc > 1 && strncmp(argv[1], "help", 4) == 0) {
     48      syntax(argv[0]);
     49      exit(EXIT_SUCCESS);
     50   }
     51
     52   if(argc > 1 && strncmp(argv[1], "--help", 6) == 0) {
     53      syntax(argv[0]);
     54      exit(EXIT_SUCCESS);
     55   }
     56
     57   if(argc > 1 && strncmp(argv[1], "-h", 6) == 0) {
    4458      syntax(argv[0]);
    4559      exit(EXIT_SUCCESS);
     
    323337      }
    324338
    325      if (!fh_write(ihu, outfd)) {
     339     if (fh_write(ihu, outfd)) {
    326340         fprintf(stderr, "\rerror: Trouble writing PHU to %s\n", ofilename);
    327341         exit(EXIT_FAILURE);
     
    498512         if(update) {
    499513           if (ofilename) {
    500              if (!fh_write(ehu, outfd)) {
     514             fh_ehu(ehu, 0);    /* Seek back to the start of data */
     515
     516             if (fh_write(ehu, outfd)) {
    501517               fprintf(stderr, "\rerror: Trouble writing EXT %d to %s\n", ext, ofilename);
    502518               exit(EXIT_FAILURE);
Note: See TracChangeset for help on using the changeset viewer.