/* $RCSfile: a2py.c,v $$Revision: 4.1 $$Date: 92/08/07 18:29:14 $
*
- * Copyright (c) 1991, Larry Wall
+ * Copyright (c) 1991-1997, Larry Wall
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
STR *walk();
#ifdef OS2
+static void
usage()
{
printf("\nThis is the AWK to PERL translator, version 5.0, patchlevel %d\n", PATCHLEVEL);
exit(1);
}
#endif
+
+int
main(argc,argv,env)
register int argc;
register char **argv;
/* second pass to produce new program */
tmpstr = walk(0,0,root,&i,P_MIN);
- str = str_make("#!");
- str_cat(str, BIN);
- str_cat(str, "/perl\neval \"exec ");
+ str = str_make(STARTPERL);
+ str_cat(str, "\neval 'exec ");
str_cat(str, BIN);
- str_cat(str, "/perl -S $0 $*\"\n\
+ str_cat(str, "/perl -S $0 ${1+\"$@\"}'\n\
if $running_under_some_shell;\n\
# this emulates #! processing on NIH machines.\n\
# (remove #! line above if indigestible)\n\n");