Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fileName -> filename

  • Loading branch information...
commit 7d7ea904de96ebc92b11e7bd6e557ed20ef49436 1 parent e5d164c
@tj authored
Showing with 20 additions and 20 deletions.
  1. +10 −10 src/parser.c
  2. +10 −10 src/parser.leg
View
20 src/parser.c
@@ -27,7 +27,7 @@ FILE *input= 0;
int verboseFlag= 0;
static int lineNumber= 0;
-static char *fileName= 0;
+static char *filename= 0;
static char *trailer= 0;
static Header *headers= 0;
@@ -978,7 +978,7 @@ YY_PARSE(void) YY_NAME(parse_free)(CDESCENT *G)
void yyerror(struct _CDESCENT *G, char *message)
{
- fprintf(stderr, "%s:%d: %s", fileName, lineNumber, message);
+ fprintf(stderr, "%s:%d: %s", filename, lineNumber, message);
if (G->text[0]) fprintf(stderr, " near token '%s'", G->text);
if (G->pos < G->limit || !feof(input))
{
@@ -1040,16 +1040,16 @@ usage(char *name) {
exit(1);
}
-int main(int argc, char **argv)
-{
+int
+main(int argc, char **argv) {
CDESCENT *G;
Node *n;
int c;
- output= stdout;
- input= stdin;
- lineNumber= 1;
- fileName= "<stdin>";
+ output = stdout;
+ input = stdin;
+ lineNumber = 1;
+ filename = "<stdin>";
while (-1 != (c= getopt(argc, argv, "Vho:v")))
{
@@ -1091,7 +1091,7 @@ int main(int argc, char **argv)
if (!strcmp(*argv, "-"))
{
input= stdin;
- fileName= "<stdin>";
+ filename= "<stdin>";
}
else
{
@@ -1100,7 +1100,7 @@ int main(int argc, char **argv)
perror(*argv);
exit(1);
}
- fileName= *argv;
+ filename= *argv;
}
lineNumber= 1;
if (!yyparse(G))
View
20 src/parser.leg
@@ -40,7 +40,7 @@ FILE *input= 0;
int verboseFlag= 0;
static int lineNumber= 0;
-static char *fileName= 0;
+static char *filename= 0;
static char *trailer= 0;
static Header *headers= 0;
@@ -147,7 +147,7 @@ end-of-file= !.
void yyerror(struct _CDESCENT *G, char *message)
{
- fprintf(stderr, "%s:%d: %s", fileName, lineNumber, message);
+ fprintf(stderr, "%s:%d: %s", filename, lineNumber, message);
if (G->text[0]) fprintf(stderr, " near token '%s'", G->text);
if (G->pos < G->limit || !feof(input))
{
@@ -209,16 +209,16 @@ usage(char *name) {
exit(1);
}
-int main(int argc, char **argv)
-{
+int
+main(int argc, char **argv) {
CDESCENT *G;
Node *n;
int c;
- output= stdout;
- input= stdin;
- lineNumber= 1;
- fileName= "<stdin>";
+ output = stdout;
+ input = stdin;
+ lineNumber = 1;
+ filename = "<stdin>";
while (-1 != (c= getopt(argc, argv, "Vho:v")))
{
@@ -260,7 +260,7 @@ int main(int argc, char **argv)
if (!strcmp(*argv, "-"))
{
input= stdin;
- fileName= "<stdin>";
+ filename= "<stdin>";
}
else
{
@@ -269,7 +269,7 @@ int main(int argc, char **argv)
perror(*argv);
exit(1);
}
- fileName= *argv;
+ filename= *argv;
}
lineNumber= 1;
if (!yyparse(G))
Please sign in to comment.
Something went wrong with that request. Please try again.