* dataline - number of contiguous lines of data in current data
* statement. Used to generate readable -f output
* linenum - current input line number
- * out_linenum - current output line number
* skelfile - the skeleton file
* skel - compiled-in skeleton array
* skel_ind - index into "skel" array, if skelfile is nil
* to "action_array"
*/
-extern int datapos, dataline, linenum, out_linenum;
+extern int datapos, dataline, linenum;
extern FILE *skelfile, *yyin, *backing_up_file;
extern const char *skel[];
extern int skel_ind;
extern void out_dec PROTO ((const char *, int));
extern void out_dec2 PROTO ((const char *, int, int));
extern void out_hex PROTO ((const char *, unsigned int));
-extern void out_line_count PROTO ((const char *));
extern void out_str PROTO ((const char *, const char *));
extern void out_str3
PROTO ((const char *, const char *, const char *, const char *));
int reentrant, bison_bridge_lval, bison_bridge_lloc;
int yymore_used, reject, real_reject, continued_action, in_rule;
int yymore_really_used, reject_really_used;
-int datapos, dataline, linenum, out_linenum;
+int datapos, dataline, linenum;
FILE *skelfile = NULL;
int skel_ind = 0;
char *action_array;
num_backing_up = onesp = numprots = 0;
variable_trailing_context_rules = bol_needed = false;
- out_linenum = linenum = sectnum = 1;
+ linenum = sectnum = 1;
firstprot = NIL;
/* Used in mkprot() so that the first proto goes in slot 1
if (do_infile)
snprintf (directive, sizeof(directive), line_fmt, linenum, filename);
else {
- if (output_file == stdout)
- /* Account for the line directive itself. */
- ++out_linenum;
-
- snprintf (directive, sizeof(directive), line_fmt, out_linenum, filename);
+ snprintf (directive, sizeof(directive), line_fmt, 0, filename);
}
/* If output_file is nil then we should put the directive in
const char *str;
{
fputs (str, stdout);
- out_line_count (str);
}
void out_dec (fmt, n)
int n;
{
fprintf (stdout, fmt, n);
- out_line_count (fmt);
}
void out_dec2 (fmt, n1, n2)
int n1, n2;
{
fprintf (stdout, fmt, n1, n2);
- out_line_count (fmt);
}
void out_hex (fmt, x)
unsigned int x;
{
fprintf (stdout, fmt, x);
- out_line_count (fmt);
-}
-
-void out_line_count (str)
- const char *str;
-{
- register int i;
-
- for (i = 0; str[i]; ++i)
- if (str[i] == '\n')
- ++out_linenum;
}
void out_str (fmt, str)
const char *fmt, str[];
{
fprintf (stdout,fmt, str);
- out_line_count (fmt);
- out_line_count (str);
}
void out_str3 (fmt, s1, s2, s3)
const char *fmt, s1[], s2[], s3[];
{
fprintf (stdout,fmt, s1, s2, s3);
- out_line_count (fmt);
- out_line_count (s1);
- out_line_count (s2);
- out_line_count (s3);
}
void out_str_dec (fmt, str, n)
int n;
{
fprintf (stdout,fmt, str, n);
- out_line_count (fmt);
- out_line_count (str);
}
void outc (c)
int c;
{
fputc (c, stdout);
-
- if (c == '\n')
- ++out_linenum;
}
void outn (str)
{
fputs (str,stdout);
fputc('\n',stdout);
- out_line_count (str);
- ++out_linenum;
}
/** Print "m4_define( [[def]], [[val]])m4_dnl\n".