Changeset 8f769bb in git for Singular/feread.cc
- Timestamp:
- Sep 22, 1999, 12:19:05 PM (24 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- fcc8828a7bb095ce2cfa6cabeb554095b3e4aefe
- Parents:
- 2907f59317cf17c238dd583d6ac1c10ba279ba40
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/feread.cc
r2907f5 r8f769bb 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: feread.cc,v 1.2 3 1999-09-20 18:03:48 obachmanExp $ */4 /* $Id: feread.cc,v 1.24 1999-09-22 10:19:04 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: input from ttys, simulating fgets … … 61 61 return ((char *)NULL); 62 62 } 63 64 65 #endif 63 #endif 64 66 65 /* ===================================================================*/ 67 66 /* = static readline = */ … … 126 125 } 127 126 128 void fe_reset_input_mode (void)129 {130 char *p = getenv("SINGULARHIST");131 if (p != NULL)132 {133 if(history_total_bytes()!=0)134 write_history (p);135 }136 }137 138 127 char * fe_fgets_stdin_rl(char *pr,char *s, int size) 139 128 { … … 188 177 } 189 178 #endif 190 191 179 192 180 /* ===================================================================*/ … … 263 251 } 264 252 265 266 253 /* Attempt to complete on the contents of TEXT. START and END show the 267 254 * region of TEXT that contains the word to complete. We can use the … … 287 274 } 288 275 289 void fe_reset_input_mode (void)290 {291 char *p = getenv("SINGULARHIST");292 if (p != NULL)293 {294 if((*fe_history_total_bytes)()!=0)295 (*fe_write_history) (p);296 }297 }298 299 276 char * fe_fgets_stdin_drl(char *pr,char *s, int size) 300 277 { … … 429 406 return fgets(s,size,stdin); 430 407 } 408 431 409 #endif 432 410 … … 439 417 return NULL; 440 418 } 419 420 /* ===================================================================*/ 421 /* = fe_reset_input_mode (all possibilities) = */ 422 /* ===================================================================*/ 423 void fe_reset_input_mode () 424 { 425 #if defined(HAVE_DYN_RL) 426 char *p = getenv("SINGULARHIST"); 427 if (p != NULL) 428 { 429 if((*fe_history_total_bytes)()!=0) 430 (*fe_write_history) (p); 431 } 432 #endif 433 #if defined(HAVE_READLINE) && !defined(HAVE_FEREAD) && !defined(HAVE_DYN_RL) 434 char *p = getenv("SINGULARHIST"); 435 if (p != NULL) 436 { 437 if(history_total_bytes()!=0) 438 write_history (p); 439 } 440 #endif 441 } 442
Note: See TracChangeset
for help on using the changeset viewer.