diff options
author | Larry Wall <lwall@netlabs.com> | 1994-10-17 23:00:00 +0000 |
---|---|---|
committer | Larry Wall <lwall@netlabs.com> | 1994-10-17 23:00:00 +0000 |
commit | a0d0e21ea6ea90a22318550944fe6cb09ae10cda (patch) | |
tree | faca1018149b736b1142f487e44d1ff2de5cc1fa /x2p/a2py.c | |
parent | 85e6fe838fb25b257a1b363debf8691c0992ef71 (diff) | |
download | perl-a0d0e21ea6ea90a22318550944fe6cb09ae10cda.tar.gz |
perl 5.000perl-5.000
[editor's note: this commit combines approximate 4 months of furious
releases of Andy Dougherty and Larry Wall - see pod/perlhist.pod for
details. Andy notes that;
Alas neither my "Irwin AccuTrack" nor my DC 600A quarter-inch cartridge
backup tapes from that era seem to be readable anymore. I guess 13 years
exceeds the shelf life for that backup technology :-(.
]
Diffstat (limited to 'x2p/a2py.c')
-rw-r--r-- | x2p/a2py.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/x2p/a2py.c b/x2p/a2py.c index a092c8ab63..59c22414a5 100644 --- a/x2p/a2py.c +++ b/x2p/a2py.c @@ -6,26 +6,13 @@ * License or the Artistic License, as specified in the README file. * * $Log: a2py.c,v $ - * Revision 4.1 92/08/07 18:29:14 lwall - * - * Revision 4.0.1.2 92/06/08 16:15:16 lwall - * patch20: in a2p, now warns about spurious backslashes - * patch20: in a2p, now allows [ to be backslashed in pattern - * patch20: in a2p, now allows numbers of the form 2. - * - * Revision 4.0.1.1 91/06/07 12:12:59 lwall - * patch4: new copyright notice - * - * Revision 4.0 91/03/20 01:57:26 lwall - * 4.0 baseline. - * */ #ifdef OS2 #include "../patchlevel.h" #endif #include "util.h" -char *index(); +char *strchr(); char *filename; char *myname; @@ -36,7 +23,7 @@ STR *walk(); #ifdef OS2 usage() { - printf("\nThis is the AWK to PERL translator, version 4.0, patchlevel %d\n", PATCHLEVEL); + printf("\nThis is the AWK to PERL translator, version 5.0, patchlevel %d\n", PATCHLEVEL); printf("\nUsage: %s [-D<number>] [-F<char>] [-n<fieldlist>] [-<number>] filename\n", myname); printf("\n -D<number> sets debugging flags." "\n -F<character> the awk script to translate is always invoked with" @@ -170,7 +157,7 @@ register char **env; # this emulates #! processing on NIH machines.\n\ # (remove #! line above if indigestible)\n\n"); str_cat(str, - "eval '$'.$1.'$2;' while $ARGV[0] =~ /^([A-Za-z_]+=)(.*)/ && shift;\n"); + "eval '$'.$1.'$2;' while $ARGV[0] =~ /^([A-Za-z_0-9]+=)(.*)/ && shift;\n"); str_cat(str, " # process any FOO=bar switches\n\n"); if (do_opens && opens) { @@ -211,7 +198,7 @@ yylex() retry: #ifdef YYDEBUG if (yydebug) - if (index(s,'\n')) + if (strchr(s,'\n')) fprintf(stderr,"Tokener at %s",s); else fprintf(stderr,"Tokener at %s\n",s); @@ -871,7 +858,7 @@ register char *s; else s++; } - if (index("eE",*s) && index("+-0123456789",s[1])) { + if (strchr("eE",*s) && strchr("+-0123456789",s[1])) { *d++ = *s++; if (*s == '+' || *s == '-') *d++ = *s++; |