IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 1, 2016, 11:34:48 AM (10 years ago)
Author:
eugene
Message:

list unused parameters; replace old signal code with SetInterrupt, ClearInterrupt; fix unsigned / signed int inconsistencies

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/flux.c

    r27611 r39419  
    11# include "astro.h"
     2# include <signal.h>
    23
    34int flux (int argc, char **argv) {
    45 
    56  int i, j, k, xmin, ymin, xmax, ymax;
    6   void *oldsignal;
    77  double ax, ay, s, S, flux;
    88  double bx[5], by[5], x[5], y[5], bb[5];
     
    5555   we have to add up the angles for concave contours */
    5656  flux = 0;
    57   oldsignal = signal (SIGINT, handle_interrupt);
    58   interrupt = FALSE;
     57
     58  struct sigaction *old_sigaction = SetInterrupt();
    5959  for (j = ymin; (j < ymax) && !interrupt; j++) {
    6060    V = (float *)(buf[0].matrix.buffer) + j*buf[0].matrix.Naxis[0] + xmin;
     
    7272    }
    7373  }
    74   signal (SIGINT, oldsignal);
     74  ClearInterrupt (old_sigaction);
    7575
    7676  gprint (GP_LOG, "flux: %f\n", flux);
Note: See TracChangeset for help on using the changeset viewer.