Changeset e8a30d in git


Ignore:
Timestamp:
Jun 9, 1997, 2:18:15 PM (26 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '91e5db82acc17434e4062bcfa44e6efa7d41fd30')
Children:
c3c41315340ade2e74c099735037a3ee115555be
Parents:
5756804ac5037bf827b8e5d382c302898cafb2f0
Message:
* hannes: removed test_int, changed "abort" in ^c handling
          (cntrlc.*)


git-svn-id: file:///usr/local/Singular/svn/trunk@373 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/cntrlc.cc

    r575680 re8a30d  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: cntrlc.cc,v 1.11 1997-05-02 15:07:25 Singular Exp $ */
     4/* $Id: cntrlc.cc,v 1.12 1997-06-09 12:17:48 Singular Exp $ */
    55/*
    66* ABSTRACT - interupt handling
     
    5656
    5757/* data */
    58 static BOOLEAN siCntrlc = FALSE;
     58BOOLEAN siCntrlc = FALSE;
    5959int siRandomStart;
    6060
     
    307307  loop
    308308  {
     309    int cnt=0;
    309310    fputs("\nabort(a), continue(c) or quit(q) ?",stderr);fflush(stderr);
    310311    switch(fgetc(stdin))
     
    312313      case 'q':
    313314                m2_end(2);
     315      case 'a':
     316                siCntrlc++;
    314317      case 'c':
    315318                fgetc(stdin);
    316319                signal(SIGINT ,(s_hdl_typ)sigint_handler);
    317320                return;         
    318       case 'a':
    319                 m2_end(2);
    320321                //siCntrlc ++;
    321322                //if (siCntrlc>2) signal(SIGINT,(s_hdl_typ) sigsegv_handler);
    322323                //else            signal(SIGINT,(s_hdl_typ) sigint_handler);
    323324    }
     325    cnt++;
     326    if(cnt>5) m2_end(2);
    324327  }
    325328}
     
    386389
    387390#ifndef MSDOS
    388 void test_int()
    389 {
    390 #ifndef macintosh
    391   if (siCntrlc!=0)
    392   {
    393     int saveecho = si_echo;
    394     siCntrlc = FALSE;
    395     signal(SIGINT ,sigint_handler);
    396 //#ifdef macintosh
    397 //    flush_intr();
     391//void test_int()
     392//{
     393//#ifndef macintosh
     394//  if (siCntrlc!=0)
     395//  {
     396//    int saveecho = si_echo;
     397//    siCntrlc = FALSE;
     398//    signal(SIGINT ,sigint_handler);
     399////#ifdef macintosh
     400////    flush_intr();
     401////#endif
     402//    iiDebug();
     403//    si_echo = saveecho;
     404//  }
    398405//#endif
    399     iiDebug();
    400     si_echo = saveecho;
    401   }
    402 #endif
    403 }
     406//}
    404407#endif
    405408
  • Singular/cntrlc.h

    r575680 re8a30d  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: cntrlc.h,v 1.4 1997-04-25 15:03:55 obachman Exp $ */
     6/* $Id: cntrlc.h,v 1.5 1997-06-09 12:17:49 Singular Exp $ */
    77/*
    88* ABSTRACT - interupt and signal handling
     
    1111
    1212extern int siRandomStart;
     13extern BOOLEAN siCntrlc;
    1314void init_signals();
    14 #ifndef MSDOS
    15 #define test_int_std(A) test_int()
    16 void test_int();
    17 #else
    18 #define test_int()
    19 #define test_int_std(A)
    20 #endif
    2115
    2216#endif
Note: See TracChangeset for help on using the changeset viewer.