#include "newalloc.h"
#include "dbuf.h"
-char *stringLiteral();
+static char *stringLiteral(void);
char *currFname;
extern int lineno, column;
-extern char *filename ;
-int mylineno = 1 ;
-void count() ;
-int process_pragma(char *);
+extern char *filename;
+int mylineno = 1;
+static void count(void);
+static int process_pragma(char *);
#undef yywrap
#ifndef YYPROTO
}
#define TKEYWORD(token) return (isTargetKeyword(yytext) ? token :\
- check_type(yytext))
+ check_type())
char *asmbuff=NULL;
int asmbuffSize=0;
char *asmp ;
-extern int check_type ();
- extern int isTargetKeyword ();
-extern int checkCurrFile (char *);
-extern int processPragma (char *);
-extern int printListing (int );
-struct optimize save_optimize ;
-struct options save_options ;
+static int check_type(void);
+static int isTargetKeyword(char *s);
+static int checkCurrFile (char *s);
+struct optimize save_optimize;
+struct options save_options;
%}
%x asm
}
<asm>. {
if (asmp-asmbuff >= asmbuffSize-2) {
- // increase the buffersize with 50%
+ /* increase the buffersize with 50% */
int size=asmp-asmbuff;
asmbuffSize=asmbuffSize*3/2;
asmbuff = realloc (asmbuff, asmbuffSize);
<asm>\n {
count();
if (asmp-asmbuff >= asmbuffSize-3) {
- // increase the buffersize with 50%
+ /* increase the buffersize with 50% */
int size=asmp-asmbuff;
asmbuffSize=asmbuffSize*3/2;
asmbuff = realloc (asmbuff, asmbuffSize);
\\ {
char ch=input();
if (ch!='\n') {
- // that could have been removed by the preprocessor anyway
+ /* that could have been removed by the preprocessor anyway */
werror (W_STRAY_BACKSLASH, column);
my_unput(ch);
}
case '\\':
if ((ch = input()) != '\n') {
werror(W_STRAY_BACKSLASH, column);
- my_unput(ch);
+ my_unput((char)ch);
}
else {
lineno = ++mylineno;
goto out;
if (ch != '\"') {
- my_unput(ch) ;
+ my_unput((char)ch) ;
goto out;
}
break;
if (mylineno && filename) {
if(options.vc_err_style)
- fprintf(stdout,"\n%s(%d) : %s: token -> '%s' ; column %d\n",
+ fprintf(stderr,"\n%s(%d) : %s: token -> '%s' ; column %d\n",
filename,mylineno,
s,yytext,column);
else
- fprintf(stdout,"\n%s:%d: %s: token -> '%s' ; column %d\n",
+ fprintf(stderr,"\n%s:%d: %s: token -> '%s' ; column %d\n",
filename,mylineno,
s,yytext,column);
fatalError++;