aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorGerd Moellmann2001-01-02 14:32:37 +0000
committerGerd Moellmann2001-01-02 14:32:37 +0000
commite6a0814f1803e0441cbaf56710cd30174a7c3d6b (patch)
treef08ce8db1ab75b60921fd1a4bea3f0f919b10582 /lib-src
parent315f5865d494fdc6c74f92a88eae944b253675d3 (diff)
downloademacs-e6a0814f1803e0441cbaf56710cd30174a7c3d6b.tar.gz
emacs-e6a0814f1803e0441cbaf56710cd30174a7c3d6b.zip
(yyerror): Changed to take two arguments. Prototype
added. Callers changed.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/ebrowse.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c
index 8ff4c3e7b49..629c8a91045 100644
--- a/lib-src/ebrowse.c
+++ b/lib-src/ebrowse.c
@@ -1,6 +1,7 @@
1/* ebrowse.c --- parsing files for the ebrowse C++ browser 1/* ebrowse.c --- parsing files for the ebrowse C++ browser
2 2
3 Copyright (C) 1992,92,94,95,96,97,98,99,2000 Free Software Foundation Inc. 3 Copyright (C) 1992,92,94,95,96,97,98,99,2000,2001
4 Free Software Foundation Inc.
4 5
5 Author: Gerd Moellmann <gerd@gnu.org> 6 Author: Gerd Moellmann <gerd@gnu.org>
6 Maintainer: FSF 7 Maintainer: FSF
@@ -515,6 +516,7 @@ struct sym *parse_classname P_ ((void));
515struct sym *parse_qualified_ident_or_type P_ ((char **)); 516struct sym *parse_qualified_ident_or_type P_ ((char **));
516void parse_qualified_param_ident_or_type P_ ((char **)); 517void parse_qualified_param_ident_or_type P_ ((char **));
517int globals P_ ((int)); 518int globals P_ ((int));
519void yyerror P_ ((char *, char *));
518 520
519 521
520 522
@@ -526,12 +528,11 @@ int globals P_ ((int));
526 name and line number. */ 528 name and line number. */
527 529
528void 530void
529yyerror (format, a1, a2, a3, a4, a5) 531yyerror (format, s)
530 char *format; 532 char *format, *s;
531 long a1, a2, a3, a4, a5;
532{ 533{
533 fprintf (stderr, "%s:%d: ", filename, yyline); 534 fprintf (stderr, "%s:%d: ", filename, yyline);
534 fprintf (stderr, format, a1, a2, a3, a4, a5); 535 fprintf (stderr, format, s);
535 putc ('\n', stderr); 536 putc ('\n', stderr);
536} 537}
537 538
@@ -546,7 +547,7 @@ xmalloc (nbytes)
546 void *p = malloc (nbytes); 547 void *p = malloc (nbytes);
547 if (p == NULL) 548 if (p == NULL)
548 { 549 {
549 yyerror ("out of memory"); 550 yyerror ("out of memory", NULL);
550 exit (1); 551 exit (1);
551 } 552 }
552 return p; 553 return p;
@@ -563,7 +564,7 @@ xrealloc (p, sz)
563 p = realloc (p, sz); 564 p = realloc (p, sz);
564 if (p == NULL) 565 if (p == NULL)
565 { 566 {
566 yyerror ("out of memory"); 567 yyerror ("out of memory", NULL);
567 exit (1); 568 exit (1);
568 } 569 }
569 return p; 570 return p;
@@ -1572,9 +1573,9 @@ yylex ()
1572 if (!GET (c)) 1573 if (!GET (c))
1573 { 1574 {
1574 if (end_char == '\'') 1575 if (end_char == '\'')
1575 yyerror ("EOF in character constant"); 1576 yyerror ("EOF in character constant", NULL);
1576 else 1577 else
1577 yyerror ("EOF in string constant"); 1578 yyerror ("EOF in string constant", NULL);
1578 goto end_string; 1579 goto end_string;
1579 } 1580 }
1580 else switch (c) 1581 else switch (c)
@@ -1639,9 +1640,9 @@ yylex ()
1639 1640
1640 case '\n': 1641 case '\n':
1641 if (end_char == '\'') 1642 if (end_char == '\'')
1642 yyerror ("newline in character constant"); 1643 yyerror ("newline in character constant", NULL);
1643 else 1644 else
1644 yyerror ("newline in string constant"); 1645 yyerror ("newline in string constant", NULL);
1645 INCREMENT_LINENO; 1646 INCREMENT_LINENO;
1646 break; 1647 break;
1647 1648
@@ -1795,7 +1796,7 @@ yylex ()
1795 else if (c == '.') 1796 else if (c == '.')
1796 { 1797 {
1797 if (GET (c) != '.') 1798 if (GET (c) != '.')
1798 yyerror ("invalid token '..' ('...' assumed)"); 1799 yyerror ("invalid token '..' ('...' assumed)", NULL);
1799 UNGET (); 1800 UNGET ();
1800 return ELLIPSIS; 1801 return ELLIPSIS;
1801 } 1802 }
@@ -3347,7 +3348,7 @@ globals (start_flags)
3347 } 3348 }
3348 3349
3349 if (prev_in == in) 3350 if (prev_in == in)
3350 yyerror ("parse error"); 3351 yyerror ("parse error", NULL);
3351 } 3352 }
3352} 3353}
3353 3354
@@ -3439,7 +3440,7 @@ open_file (file)
3439 fp = fopen (file, "r"); 3440 fp = fopen (file, "r");
3440 3441
3441 if (fp == NULL) 3442 if (fp == NULL)
3442 yyerror ("cannot open"); 3443 yyerror ("cannot open", NULL);
3443 3444
3444 return fp; 3445 return fp;
3445} 3446}
@@ -3696,7 +3697,7 @@ main (argc, argv)
3696 yyout = fopen (out_filename, f_append ? "a" : "w"); 3697 yyout = fopen (out_filename, f_append ? "a" : "w");
3697 if (yyout == NULL) 3698 if (yyout == NULL)
3698 { 3699 {
3699 yyerror ("cannot open output file `%s'", (long)out_filename); 3700 yyerror ("cannot open output file `%s'", out_filename);
3700 exit (1); 3701 exit (1);
3701 } 3702 }
3702 } 3703 }
@@ -3724,7 +3725,7 @@ main (argc, argv)
3724 FILE *fp = fopen (input_filenames[i], "r"); 3725 FILE *fp = fopen (input_filenames[i], "r");
3725 3726
3726 if (fp == NULL) 3727 if (fp == NULL)
3727 yyerror ("cannot open input file `%s'", (long)input_filenames[i]); 3728 yyerror ("cannot open input file `%s'", input_filenames[i]);
3728 else 3729 else
3729 { 3730 {
3730 char *file; 3731 char *file;