Changeset 2418 in Sophya for trunk/SophyaPI/ProgPI/piapp.cc


Ignore:
Timestamp:
Jul 21, 2003, 11:06:48 PM (22 years ago)
Author:
cmv
Message:

pour que spiapp -nored -h marche (-h n importe ou) rz+cmv 21/7/2003

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/ProgPI/piapp.cc

    r2322 r2418  
    6363*/
    6464
    65 void Usage(bool fgerr)
     65int Usage(bool fgerr)
    6666{
    6767  if (fgerr) {
    6868    cout << " piapp : Argument Error ! piapp -h for Usage" << endl;
    69     exit(1);
     69    return 1;
    7070  }
    7171  else {
     
    8181         << "  -exec file [args] : Execute command file \n"
    8282         << endl;
    83     exit(0);
     83    return 0;
    8484  }
    8585}
     
    9696InitTim();
    9797
    98 
    99 if ( (narg > 1) && (strcmp(arg[1],"-h") == 0) ) Usage(false);
     98if(narg>1)
     99  for(int jh=1;jh<narg;jh++) if(strcmp(arg[jh],"-h") == 0) return Usage(false);
    100100
    101101ofa = 1;
     
    117117  else if (strcmp(arg[ka],"-help2tex") == 0) { fgtexh=true; fgred=false; }
    118118  else if (strcmp(arg[ka],"-tmpdir") == 0) {
    119     if (ka == narg-1) Usage(true);
     119    if (ka == narg-1) return Usage(true);
    120120    fgtmp = true;  ka++;
    121121    tmpdir = arg[ka];   
Note: See TracChangeset for help on using the changeset viewer.