X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=x2p%2Fa2py.c;h=454e2dc86015b3802d994558ec998fb20a2de081;hb=06b43eb76ef057fab08c35057263548c3f57cf74;hp=59c22414a5da095c6bf5229aeee368e878f799dd;hpb=a0d0e21ea6ea90a22318550944fe6cb09ae10cda;p=p5sagit%2Fp5-mst-13.2.git diff --git a/x2p/a2py.c b/x2p/a2py.c index 59c2241..454e2dc 100644 --- a/x2p/a2py.c +++ b/x2p/a2py.c @@ -12,12 +12,18 @@ #include "../patchlevel.h" #endif #include "util.h" -char *strchr(); char *filename; char *myname; int checkers = 0; + +int oper0(); +int oper1(); +int oper2(); +int oper3(); +int oper4(); +int oper5(); STR *walk(); #ifdef OS2 @@ -41,7 +47,6 @@ register char **argv; register char **env; { register STR *str; - register char *s; int i; STR *tmpstr; @@ -148,11 +153,8 @@ register char **env; /* 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_cat(str, BIN); - str_cat(str, "/perl -S $0 $*\"\n\ + str = str_make(STARTPERL); + str_cat(str, "\neval 'exec perl -S $0 \"$@\"'\n\ if $running_under_some_shell;\n\ # this emulates #! processing on NIH machines.\n\ # (remove #! line above if indigestible)\n\n"); @@ -189,6 +191,7 @@ register char **env; int idtype; +int yylex() { register char *s = bufptr; @@ -828,6 +831,7 @@ register char *s; return s; } +void yyerror(s) char *s; { @@ -872,8 +876,10 @@ register char *s; return s; } +int string(ptr,len) char *ptr; +int len; { int retval = mop; @@ -888,6 +894,7 @@ char *ptr; return retval; } +int oper0(type) int type; { @@ -901,6 +908,7 @@ int type; return retval; } +int oper1(type,arg1) int type; int arg1; @@ -916,6 +924,7 @@ int arg1; return retval; } +int oper2(type,arg1,arg2) int type; int arg1; @@ -933,6 +942,7 @@ int arg2; return retval; } +int oper3(type,arg1,arg2,arg3) int type; int arg1; @@ -952,6 +962,7 @@ int arg3; return retval; } +int oper4(type,arg1,arg2,arg3,arg4) int type; int arg1; @@ -973,6 +984,7 @@ int arg4; return retval; } +int oper5(type,arg1,arg2,arg3,arg4,arg5) int type; int arg1; @@ -998,6 +1010,7 @@ int arg5; int depth = 0; +void dump(branch) int branch; { @@ -1025,6 +1038,7 @@ int branch; } } +int bl(arg,maybe) int arg; int maybe; @@ -1039,6 +1053,7 @@ int maybe; return arg; } +void fixup(str) STR *str; { @@ -1064,6 +1079,7 @@ STR *str; } } +void putlines(str) STR *str; { @@ -1140,6 +1156,7 @@ STR *str; } } +void putone() { register char *t; @@ -1162,6 +1179,7 @@ putone() fputs(tokenbuf,stdout); } +int numary(arg) int arg; { @@ -1176,6 +1194,7 @@ int arg; return arg; } +int rememberargs(arg) int arg; { @@ -1198,6 +1217,7 @@ int arg; return arg; } +int aryrefarg(arg) int arg; { @@ -1212,6 +1232,7 @@ int arg; return arg; } +int fixfargs(name,arg,prevargs) int name; int arg; @@ -1250,6 +1271,7 @@ int prevargs; return numargs; } +int fixrargs(name,arg,prevargs) char *name; int arg;