IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 21, 2005, 11:03:53 AM (21 years ago)
Author:
eugene
Message:

various cleanups and fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psastro/src/psastroArguments.c

    r5505 r5560  
    1 # include "psphot.h"
     1# include "psastro.h"
    22
    3 static void usage (void) ;
     3static void usage (void);
     4static void usage_test (void);
    45
    5 psMetadata *psphotArguments (int *argc, char **argv) {
     6psMetadata *psastroArguments (int *argc, char **argv) {
    67
    7   int N, Nfail;
    8   int mode = PS_DATA_STRING | PS_META_REPLACE;
     8    unsigned int Nfail;
    99
    10   // basic pslib options
    11   fprintf (stderr, "starting... %s\n", psLibVersion());
    12   psLogSetFormat ("M");
    13   psLogArguments (argc, argv);
    14   psTraceArguments (argc, argv);
     10    // basic pslib options
     11    fprintf (stderr, "starting... %s\n", psLibVersion());
     12    psLogSetFormat ("M");
     13    psLogArguments (argc, argv);
     14    psTraceArguments (argc, argv);
    1515
    16   if (*argc != 2) usage ();
     16    if (*argc != 4) usage ();
    1717
    18   // load config information
    19   psMetadata *config = psMetadataAlloc ();
    20   config = psMetadataConfigParse (config, &Nfail, argv[3], FALSE);
    21   return (config);
     18    // load config information
     19    psMetadata *config = psMetadataAlloc ();
     20    config = psMetadataConfigParse (config, &Nfail, argv[1], FALSE);
     21    return (config);
    2222}
    2323
    2424static void usage (void) {
    25 
    26     fprintf (stderr, "USAGE: psastro (cmpfile)\n");
     25    fprintf (stderr, "USAGE: psastro (config) (input) (output)\n");
    2726    exit (2);
    2827}
     28
     29psMetadata *testArguments (int *argc, char **argv) {
     30
     31    unsigned int Nfail;
     32
     33    // basic pslib options
     34    fprintf (stderr, "starting... %s\n", psLibVersion());
     35    psLogSetFormat ("M");
     36    psLogArguments (argc, argv);
     37    psTraceArguments (argc, argv);
     38
     39    if (*argc != 6) usage_test ();
     40
     41    // load config information
     42    psMetadata *config = psMetadataAlloc ();
     43    config = psMetadataConfigParse (config, &Nfail, argv[1], FALSE);
     44    return (config);
     45}
     46
     47static void usage_test (void) {
     48    fprintf (stderr, "USAGE: psastro-mktest (config) (cmpfile) (reflist) (rawfile) (rawfile)\n");
     49    exit (2);
     50}
Note: See TracChangeset for help on using the changeset viewer.