EXT char const_FS INIT(0);
EXT char *namelist INIT(Nullch);
EXT char fswitch INIT(0);
+EXT bool old_awk INIT(0);
EXT int saw_FS INIT(0);
EXT int maxfld INIT(0);
causes a2p to assume that input will always have that many fields.
+=item B<-o>
+
+tells a2p to use old awk behavior. For now, the only difference is
+that old awk always has a line loop, even if there are no line
+actions, whereas new awk does not.
+
=back
=head2 "Considerations"
case 'n':
namelist = savestr(argv[0]+2);
break;
+ case 'o':
+ old_awk = TRUE;
+ break;
case '-':
argc--,argv++;
goto switch_end;
if (saw_FNR)
str_cat(str,"continue {\n $FNRbase = $. if eof;\n}\n");
}
- else
+ else if (old_awk)
str_cat(str,"while (<>) { } # (no line actions)\n");
if (ops[node+4].ival) {
realexit = TRUE;