IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 19, 2005, 5:14:08 PM (21 years ago)
Author:
eugene
Message:

re-ordered -lFITS and -lohana to support fits_db calls

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/lib.shell/ConfigInit.c

    r2598 r4833  
    2626
    2727  answer = get_variable (keyword);
    28   if (answer != (char *) NULL) {
    29 
    30     if (!strcmp (mode, "%s")) {
    31       strcpy ((char *) ptr, answer);
    32     } else {
    33       if (!strcmp (mode, "%d"))  *(int *) ptr       = atoi (answer);
    34       if (!strcmp (mode, "%u"))  *(unsigned *) ptr  = atoi (answer);
    35       if (!strcmp (mode, "%ld")) *(long *) ptr      = atoi (answer);
    36       if (!strcmp (mode, "%hd")) *(short *) ptr     = atoi (answer);
    37       if (!strcmp (mode, "%f"))  *(float *) ptr     = atof (answer);
    38       if (!strcmp (mode, "%lf")) *(double *) ptr    = atof (answer);
    39     }
    40     free (answer);
    41     return (ptr);
     28  if (answer == (char *) NULL) {
     29    answer = ScanConfig (GlobalConfig, keyword, mode, 0, ptr);
     30    return (answer);
    4231  }
    4332
    44   answer = ScanConfig (GlobalConfig, keyword, mode, 0, ptr);
    45   return (answer);
     33  if (!strcmp (mode, "%s"))  strcpy ((char *) ptr, answer);
     34  if (!strcmp (mode, "%d"))  *(int *) ptr       = atoi (answer);
     35  if (!strcmp (mode, "%u"))  *(unsigned *) ptr  = atoi (answer);
     36  if (!strcmp (mode, "%ld")) *(long *) ptr      = atoi (answer);
     37  if (!strcmp (mode, "%hd")) *(short *) ptr     = atoi (answer);
     38  if (!strcmp (mode, "%f"))  *(float *) ptr     = atof (answer);
     39  if (!strcmp (mode, "%lf")) *(double *) ptr    = atof (answer);
     40
     41  free (answer);
     42  return (ptr);
    4643}
    47 
    48  
Note: See TracChangeset for help on using the changeset viewer.