This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Typo fix, by Robin Barker
[perl5.git] / x2p / a2py.c
index cd396a2..df0a55c 100644 (file)
@@ -1,11 +1,10 @@
-/* $RCSfile: a2py.c,v $$Revision: 4.1 $$Date: 92/08/07 18:29:14 $
+/*    a2py.c
  *
- *    Copyright (c) 1991-1997, Larry Wall
+ *    Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ *    2000, 2001, 2002, by Larry Wall and others
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
- *
- * $Log:       a2py.c,v $
  */
 
 #if defined(OS2) || defined(WIN32) || defined(NETWARE)
@@ -31,6 +30,10 @@ int oper3(int type, int arg1, int arg2, int arg3);
 int oper4(int type, int arg1, int arg2, int arg3, int arg4);
 int oper5(int type, int arg1, int arg2, int arg3, int arg4, int arg5);
 STR *walk(int useval, int level, register int node, int *numericptr, int minprec);
+#ifdef NETWARE
+char *savestr(char *str);
+char *cpy2(register char *to, register char *from, register int delim);
+#endif
 
 #if defined(OS2) || defined(WIN32) || defined(NETWARE)
 static void usage(void);
@@ -51,15 +54,20 @@ usage()
 }
 #endif
 
+#ifdef __osf__
+#pragma message disable (mainparm) /* We have the envp in main(). */
+#endif
+
 int
 main(register int argc, register char **argv, register char **env)
 {
     register STR *str;
     int i;
     STR *tmpstr;
+    /* char *namelist;    */
 
        #ifdef NETWARE
-               fnInitGpfGlobals();     // For importing the CLIB calls in place of Watcom calls
+               fnInitGpfGlobals();     /* For importing the CLIB calls in place of Watcom calls */
        #endif  /* NETWARE */
 
     myname = argv[0];
@@ -419,7 +427,14 @@ yylex(void)
                maxfld = tmp;
            XOP(FIELD);
        }
+       for (d = s; isALPHA(*s) || isDIGIT(*s) || *s == '_'; )
+           s++;
        split_to_array = set_array_base = TRUE;
+       if (d != s)
+       {
+           yylval = string(d,s-d);
+           XTERM(SVFIELD);
+       }
        XOP(VFIELD);
 
     case '/':                  /* may either be division or pattern */