Changeset e8a30d in git
- Timestamp:
- Jun 9, 1997, 2:18:15 PM (26 years ago)
- Branches:
- (u'spielwiese', '91e5db82acc17434e4062bcfa44e6efa7d41fd30')
- Children:
- c3c41315340ade2e74c099735037a3ee115555be
- Parents:
- 5756804ac5037bf827b8e5d382c302898cafb2f0
- Location:
- Singular
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/cntrlc.cc
r575680 re8a30d 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: cntrlc.cc,v 1.1 1 1997-05-02 15:07:25Singular Exp $ */4 /* $Id: cntrlc.cc,v 1.12 1997-06-09 12:17:48 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT - interupt handling … … 56 56 57 57 /* data */ 58 staticBOOLEAN siCntrlc = FALSE;58 BOOLEAN siCntrlc = FALSE; 59 59 int siRandomStart; 60 60 … … 307 307 loop 308 308 { 309 int cnt=0; 309 310 fputs("\nabort(a), continue(c) or quit(q) ?",stderr);fflush(stderr); 310 311 switch(fgetc(stdin)) … … 312 313 case 'q': 313 314 m2_end(2); 315 case 'a': 316 siCntrlc++; 314 317 case 'c': 315 318 fgetc(stdin); 316 319 signal(SIGINT ,(s_hdl_typ)sigint_handler); 317 320 return; 318 case 'a':319 m2_end(2);320 321 //siCntrlc ++; 321 322 //if (siCntrlc>2) signal(SIGINT,(s_hdl_typ) sigsegv_handler); 322 323 //else signal(SIGINT,(s_hdl_typ) sigint_handler); 323 324 } 325 cnt++; 326 if(cnt>5) m2_end(2); 324 327 } 325 328 } … … 386 389 387 390 #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 // } 398 405 //#endif 399 iiDebug(); 400 si_echo = saveecho; 401 } 402 #endif 403 } 406 //} 404 407 #endif 405 408 -
Singular/cntrlc.h
r575680 re8a30d 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: cntrlc.h,v 1. 4 1997-04-25 15:03:55 obachmanExp $ */6 /* $Id: cntrlc.h,v 1.5 1997-06-09 12:17:49 Singular Exp $ */ 7 7 /* 8 8 * ABSTRACT - interupt and signal handling … … 11 11 12 12 extern int siRandomStart; 13 extern BOOLEAN siCntrlc; 13 14 void init_signals(); 14 #ifndef MSDOS15 #define test_int_std(A) test_int()16 void test_int();17 #else18 #define test_int()19 #define test_int_std(A)20 #endif21 15 22 16 #endif
Note: See TracChangeset
for help on using the changeset viewer.