@@ -170,7 +170,7 @@ void fillkex(void)
170170 if (debug)
171171 {
172172 for (i=0 ;i<27 ;i++)
173- print (" %c:%d\n " ,' a' +i,kex[i]);
173+ printf (" %c:%d\n " ,' a' +i,kex[i]);
174174 }
175175}
176176
@@ -191,7 +191,7 @@ char fgets_buf[GETSBUFSIZE];
191191
192192
193193
194- char *our_fgets (char * buffer, int n_char, File* stream)
194+ char *our_fgets (char * buffer, int n_char, FILE* stream)
195195{
196196 /* Read one line or n_char */
197197 static int characters_left = 0 ;
@@ -217,10 +217,10 @@ char *our_fgets(char* buffer, int n_char, File* stream)
217217 return (buffer);
218218 }
219219 } else { /* Read new block */
220- sys_read (stream, fgets_buf,GETSBUFSIZE,&characters_left );
220+ characters_left = fread ( fgets_buf, 1 , GETSBUFSIZE, stream );
221221 internal_bufp = fgets_buf;
222222 /* Move pointer back to the beginning */
223- if ( characters_left = = 0 ) { /* Nothing read */
223+ if ( characters_left < = 0 ) { /* Nothing read */
224224 if ( external_bufp == buffer ) {
225225 *external_bufp = ' \0 ' ;
226226 return (0 ); /* EOF */
@@ -244,7 +244,7 @@ int getinputline(void)
244244 error (" source line too long" );
245245 inputline[MAXLINELENGTH-1 ]=0 ;
246246 if ( listing)
247- fprint (STDERR , inputline);
247+ fprintf (stderr , inputline);
248248 cptr= inputline;
249249 return (TRUE );
250250}
@@ -296,7 +296,7 @@ int lookup(void)
296296 /* keywords door delimiters gescheiden */
297297 cptr += k->length ;
298298 yylval.integer = k->classvalue ;
299- if (debug) print (" lookup:%d %d\n " ,
299+ if (debug) printf (" lookup:%d %d\n " ,
300300 k->classvalue ,k->token );
301301 if ( k->token == FUNCTION)
302302 {
@@ -329,7 +329,7 @@ int lookup(void)
329329 }
330330 if ( typech)
331331 Sym->symtype =typech;
332- if (debug) print (" lookup:%d Identifier\n " ,Sym);
332+ if (debug) printf (" lookup:%d Identifier\n " ,Sym);
333333 if ( (name[0 ]==' f' || name[0 ]==' F' ) &&
334334 (name[1 ]==' n' || name[1 ]==' N' ) )
335335 return (FUNCTID);
@@ -422,7 +422,7 @@ int number(void)
422422 }
423423 /*NOSTRICT*/ ival= i1;
424424#ifdef YYDEBUG
425- if (yydebug) print (" number:INTVALUE %d" ,i1);
425+ if (yydebug) printf (" number:INTVALUE %d" ,i1);
426426#endif
427427 return (INTVALUE);
428428 }
@@ -452,7 +452,7 @@ int number(void)
452452 *d = 0 ;
453453 cptr=c;
454454#ifdef YYDEBUG
455- if (yydebug) print (" number:FLTVALUE %s" ,dval);
455+ if (yydebug) printf (" number:FLTVALUE %s" ,dval);
456456#endif
457457 return (FLTVALUE);
458458}
@@ -481,7 +481,7 @@ int scanstring(void)
481481 case 0 :
482482 case ' \n ' :
483483#ifdef YYDEBUG
484- if (yydebug) print (" STRVALUE\n " );
484+ if (yydebug) printf (" STRVALUE\n " );
485485#endif
486486 if ( firstchar == ' "' )
487487 error (" non-terminated string" );
@@ -521,7 +521,7 @@ int scanstring(void)
521521 C_rom_icon (myitoa (length),(arith)BEMINTSIZE);
522522 }
523523#ifdef YYDEBUG
524- if (yydebug) print (" STRVALUE found\n " );
524+ if (yydebug) printf (" STRVALUE found\n " );
525525#endif
526526 return (STRVALUE);
527527}
@@ -561,7 +561,7 @@ int yylex(void)
561561 return (EOLN);
562562 case 0 :
563563#ifdef YYDEBUG
564- if ( yydebug) print (" end of buffer" );
564+ if ( yydebug) printf (" end of buffer" );
565565#endif
566566 return (0 );
567567 case ' "' :
0 commit comments