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


Ignore:
Timestamp:
Jul 15, 2002, 12:59:07 PM (23 years ago)
Author:
cmv
Message:

gets()->getchar() + gestion wranings cmv 15/7/02

File:
1 edited

Legend:

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

    r1972 r2093  
    133133              (double)PI_VERSIONNUMBER, (double)skyinit.Version());
    134134
    135 char *vcmds;
     135char *vcmds=NULL;
    136136if (fgtmp) {
    137137  if (tmpdir[tmpdir.length()-1] != '/') tmpdir += '/';  // Necessaire pour SetSwapPath
     
    182182int rc = 0;
    183183bool cont = true;
    184 char ans[32],rep;
     184char rep; // ans[32]
    185185int excnt = 0;
    186186while(cont) {
     
    189189  if (fgred) app->RedirectStdOutErr(true);
    190190  try {
    191   app->Run();
    192   } 
     191    app->Run();
     192  }
    193193  catch(PThrowable exc) {  // Catching SOPHYA exceptions
    194194    app->Stop();
     
    199199    cout << ++excnt << "- continue <CR>, Close Windows, "
    200200         << " continue C<CR> Stop program S<CR> ? " << endl;
    201     gets(ans);
    202     rep = toupper(ans[0]); 
     201    rep = getchar();  // was: gets(ans);
     202    rep = toupper(rep); 
    203203    if (rep == 'S')  {
    204204      cout << " !!!! Stopping piapp !!!! " << endl;
     
    222222    cout << ++excnt << "- continue <CR>, Close Windows, "
    223223         << " continue C<CR> Stop program S<CR> ? " << endl;
    224     gets(ans);
    225     rep = toupper(ans[0]); 
     224    rep = getchar(); // gets(ans);
     225    rep = toupper(rep); 
    226226    if (rep == 'S')  {
    227227      cout << " !!!! Stopping piapp !!!! " << endl;
Note: See TracChangeset for help on using the changeset viewer.