Changeset 2f7502 in git
- Timestamp:
- Feb 14, 2000, 6:00:11 PM (24 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 937e3a141924432fe13166e63c9681b5ef793ab2
- Parents:
- 86b2da8a9025c680f0918d9203d53aa65fe913a4
- Location:
- Singular
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/febase.inc
r86b2da8 r2f7502 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: febase.inc,v 1.2 8 1999-11-15 17:19:57 obachmanExp $ */4 /* $Id: febase.inc,v 1.29 2000-02-14 17:00:10 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: handling of 'voices' … … 369 369 static int fePrintEcho(char *anf, char *b) 370 370 { 371 char *ss=str chr(anf,'\n');371 char *ss=strrchr(anf,'\n'); 372 372 int len_s; 373 373 if (ss==NULL) -
Singular/fereadl.c
r86b2da8 r2f7502 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: fereadl.c,v 1.1 1 2000-02-14 14:10:54Singular Exp $ */4 /* $Id: fereadl.c,v 1.12 2000-02-14 17:00:11 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: input from ttys, simulating fgets … … 83 83 int fe_cursor_pos; /* 0..colmax-1*/ 84 84 int fe_cursor_line; /* 0..pagelength-1*/ 85 int mlinestart; 85 86 86 87 #ifndef MSDOS … … 335 336 { 336 337 fe_ctrl_k(s,*i); 337 while((*i)> 0)338 while((*i)>mlinestart) 338 339 { 339 340 (*i)--; … … 487 488 #endif 488 489 int i=0; 490 mlinestart=0; 489 491 490 492 if (fe_is_raw_tty==0) … … 506 508 case feCTRL('J'): 507 509 { 508 fe_add_hist(s);509 510 i=strlen(s); 510 if (i<size-1) s[i]='\n';511 511 fputc('\n',fe_echo); 512 if (!fe_getchar_stat()) 513 { 512 if ((!fe_getchar_stat()) || (i>=size-1)) 513 { 514 fe_add_hist(s); 515 if (i<size-1) s[i]='\n'; 514 516 fflush(fe_echo); 515 517 fe_temp_reset(); 516 518 return s; 517 519 } 520 /*if (i<size-1)*/ s[i]='\n'; 521 i++; 522 mlinestart=i; 523 fe_cursor_pos=0; 524 if(fe_cursor_line!=(pagelength-1)) 525 fe_cursor_line++; 526 change=1; 518 527 break; 519 528 } … … 524 533 case 127: /*delete the character left of the cursor*/ 525 534 { 526 if (i== 0) break;535 if (i==mlinestart) break; 527 536 i--; 528 537 fe_cursor_pos--; … … 531 540 fe_cursor_line--; 532 541 fe_cursor_pos=colmax-1; 533 fe_set_cursor(s,i );542 fe_set_cursor(s,i-mlinestart); 534 543 } 535 544 else … … 615 624 case feCTRL('B'): /* move the cursor backward one character */ 616 625 { 617 if (i> 0)626 if (i>mlinestart) 618 627 { 619 628 i--; … … 649 658 fe_cursor_pos=strlen(pr); 650 659 memset(s,0,size); 660 mlinestart=0; 651 661 change=1; 652 662 break;
Note: See TracChangeset
for help on using the changeset viewer.