IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 9, 2005, 6:28:24 AM (21 years ago)
Author:
eugene
Message:

exploring the defect strategy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psUtils.c

    r4129 r4188  
    11# include "psphot.h"
    2 
    3 static psHash *timers = NULL;
    42
    53// set actual region based on image parameters
     
    2119}
    2220
     21static psHash *timers = NULL;
    2322
    2423// start/restart a named timer
     
    110109    }
    111110    return (TRUE);
     111}
     112
     113// find the location of the specified argument
     114int psArgumentGet (int argc, char **argv, char *arg) {
     115
     116    int i;
     117
     118    for (i = 0; i < argc; i++) {
     119        if (!strcmp(argv[i], arg))
     120            return (i);
     121    }
     122 
     123    return ((int)NULL);
     124}
     125
     126// remove the specified argument (by location)
     127int psArgumentRemove (int N, int *argc, char **argv) {
     128
     129    int i;
     130
     131    if ((N != (int)NULL) && (N != 0)) {
     132        (*argc)--;
     133        for (i = N; i < *argc; i++) {
     134            argv[i] = argv[i+1];
     135        }
     136    }
     137
     138    return (N);
    112139}
    113140
Note: See TracChangeset for help on using the changeset viewer.