IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 4, 2008, 4:29:47 PM (18 years ago)
Author:
eugene
Message:

add interrupts to (potentially) long loops

File:
1 edited

Legend:

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

    r16810 r20535  
    77  int Npts, NPTS, mode[3];
    88  int Nsecfilt, KeepNulls;
     9  void *Signal;
    910
    1011  PhotCode *code[3];
     
    5354  if ((yvec = SelectVector ("yv", ANYVECTOR, TRUE)) == NULL) goto escape;
    5455
     56  // grab data from all selected sky regions
     57  Signal = signal (SIGINT, handle_interrupt);
     58  interrupt = FALSE;
     59
    5560  /* loop over regions, extract data for each region */
    56   for (j = 0; j < skylist[0].Nregions; j++) {
     61  for (j = 0; (j < skylist[0].Nregions) && !interrupt; j++) {
    5762    /* lock, load, unlock catalog */
    5863    catalog.filename = skylist[0].filename[j];
     
    6873   
    6974    /* get correct mags, convert to X,Y */
    70     for (i = 0; i < catalog.Naverage; i++) {
     75    for (i = 0; (i < catalog.Naverage) && !interrupt; i++) {
    7176      M1 = M3 = NULL;
    7277      m = catalog.average[i].measureOffset;
Note: See TracChangeset for help on using the changeset viewer.