Changeset 7fd611 in git
- Timestamp:
- May 18, 1998, 11:32:07 AM (25 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- 2f786f772c07a297f5aeb1e84266fbeb9c80861d
- Parents:
- edb75871a6a2c6003867916fbd03788e11c667bd
- Location:
- Singular
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/iplib.cc
redb758 r7fd611 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: iplib.cc,v 1.2 5 1998-05-13 14:53:45 Singular Exp $ */4 /* $Id: iplib.cc,v 1.26 1998-05-18 09:32:07 krueger Exp $ */ 5 5 /* 6 6 * ABSTRACT: interpreter: LIB and help … … 130 130 char buf[256], *s = NULL, *p; 131 131 long procbuflen; 132 132 133 133 FILE * fp = feFopen( pi->libname, "rb", NULL, TRUE ); 134 134 if (fp==NULL) … … 140 140 if(part==0) 141 141 { // load help string 142 int i, offset=0; 142 143 long head = pi->data.s.def_end - pi->data.s.proc_start; 143 144 procbuflen = pi->data.s.help_end - pi->data.s.help_start; … … 151 152 s[procbuflen+head+1] = '\n'; 152 153 s[procbuflen+head+2] = '\0'; 154 offset=0; 155 for(i=0;i<=procbuflen+head+2; i++) { 156 if(s[i]=='\\' && 157 (s[i+1]=='"' || s[i+1]=='{' || s[i+1]=='}' || s[i+1]=='\\')) { 158 i++; 159 offset++; 160 } 161 if(offset>0) s[i-offset] = s[i]; 162 } 153 163 return(s); 154 164 } -
Singular/libparse.l
redb758 r7fd611 3 3 * Computer Algebra System SINGULAR * 4 4 ****************************************/ 5 /* $Id: libparse.l,v 1.2 1 1998-05-09 14:34:31krueger Exp $ */5 /* $Id: libparse.l,v 1.22 1998-05-18 09:32:07 krueger Exp $ */ 6 6 #include <stdio.h> 7 7 #include <string.h> … … 451 451 } 452 452 } 453 <pdef>({comment}[^\n]*) { } 454 <pdef>\/\/* { old_state = YYSTATE; BEGIN(comment); } 453 455 <pdef>. { 454 456 if(brace2<=0) { … … 738 740 if((last_cmd == LP_INFO)&&(mode == GET_INFO)) 739 741 { 742 int i, offset=0; 740 743 long current_location = ftell(yylpin); 741 744 int len = (int)(current_pos(0) - string_start); … … 745 748 fseek(yylpin, current_location, SEEK_SET); 746 749 text_buffer[len]='\0'; 750 offset=0; 751 for(i=0;i<=len; i++) { 752 if(text_buffer[i]=='\\' && 753 (text_buffer[i+1]=='"' || text_buffer[i+1]=='{' || 754 text_buffer[i+1]=='}' || text_buffer[i+1]=='\\')) { 755 i++; 756 offset++; 757 } 758 if(offset>0) text_buffer[i-offset] = text_buffer[i]; 759 } 747 760 } 748 761 # endif /* STANDALONE_PARSER */
Note: See TracChangeset
for help on using the changeset viewer.