comparison lib-src/ebrowse.c @ 34954:ff4771c51345

(enter_namespace, main): Cast variables to shut up compiler warnings. (yyerror): Change parameter declarations to be of type long, so that they can take pointers on 64-bit platforms.
author Eli Zaretskii <eliz@gnu.org>
date Tue, 02 Jan 2001 13:53:32 +0000
parents beea10bab07e
children 49cf406a0cab
comparison
equal deleted inserted replaced
34953:71ff4d0af84f 34954:ff4771c51345
526 name and line number. */ 526 name and line number. */
527 527
528 void 528 void
529 yyerror (format, a1, a2, a3, a4, a5) 529 yyerror (format, a1, a2, a3, a4, a5)
530 char *format; 530 char *format;
531 int a1, a2, a3, a4, a5; 531 long a1, a2, a3, a4, a5;
532 { 532 {
533 fprintf (stderr, "%s:%d: ", filename, yyline); 533 fprintf (stderr, "%s:%d: ", filename, yyline);
534 fprintf (stderr, format, a1, a2, a3, a4, a5); 534 fprintf (stderr, format, a1, a2, a3, a4, a5);
535 putc ('\n', stderr); 535 putc ('\n', stderr);
536 } 536 }
1140 struct sym *p = find_namespace (name); 1140 struct sym *p = find_namespace (name);
1141 1141
1142 if (namespace_sp == namespace_stack_size) 1142 if (namespace_sp == namespace_stack_size)
1143 { 1143 {
1144 int size = max (10, 2 * namespace_stack_size); 1144 int size = max (10, 2 * namespace_stack_size);
1145 namespace_stack = (struct sym **) xrealloc (namespace_stack, size); 1145 namespace_stack = (struct sym **) xrealloc ((void *)namespace_stack,
1146 size);
1146 namespace_stack_size = size; 1147 namespace_stack_size = size;
1147 } 1148 }
1148 1149
1149 namespace_stack[namespace_sp++] = current_namespace; 1150 namespace_stack[namespace_sp++] = current_namespace;
1150 current_namespace = p; 1151 current_namespace = p;
3621 /* Add the name of a file containing more input files. */ 3622 /* Add the name of a file containing more input files. */
3622 case 'f': 3623 case 'f':
3623 if (n_input_files == input_filenames_size) 3624 if (n_input_files == input_filenames_size)
3624 { 3625 {
3625 input_filenames_size = max (10, 2 * input_filenames_size); 3626 input_filenames_size = max (10, 2 * input_filenames_size);
3626 input_filenames = (char **) xrealloc (input_filenames, 3627 input_filenames = (char **) xrealloc ((void *)input_filenames,
3627 input_filenames_size); 3628 input_filenames_size);
3628 } 3629 }
3629 input_filenames[n_input_files++] = xstrdup (optarg); 3630 input_filenames[n_input_files++] = xstrdup (optarg);
3630 break; 3631 break;
3631 3632
3693 if (*out_filename) 3694 if (*out_filename)
3694 { 3695 {
3695 yyout = fopen (out_filename, f_append ? "a" : "w"); 3696 yyout = fopen (out_filename, f_append ? "a" : "w");
3696 if (yyout == NULL) 3697 if (yyout == NULL)
3697 { 3698 {
3698 yyerror ("cannot open output file `%s'", out_filename); 3699 yyerror ("cannot open output file `%s'", (long)out_filename);
3699 exit (1); 3700 exit (1);
3700 } 3701 }
3701 } 3702 }
3702 3703
3703 /* Process input files specified on the command line. */ 3704 /* Process input files specified on the command line. */
3721 for (i = 0; i < n_input_files; ++i) 3722 for (i = 0; i < n_input_files; ++i)
3722 { 3723 {
3723 FILE *fp = fopen (input_filenames[i], "r"); 3724 FILE *fp = fopen (input_filenames[i], "r");
3724 3725
3725 if (fp == NULL) 3726 if (fp == NULL)
3726 yyerror ("cannot open input file `%s'", input_filenames[i]); 3727 yyerror ("cannot open input file `%s'", (long)input_filenames[i]);
3727 else 3728 else
3728 { 3729 {
3729 char *file; 3730 char *file;
3730 while ((file = read_line (fp)) != NULL) 3731 while ((file = read_line (fp)) != NULL)
3731 process_file (file); 3732 process_file (file);