This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Unicode::Collate to 0.31 (Only the .pm version for now)
[perl5.git] / x2p / a2py.c
index 1b1d00e..55c1303 100644 (file)
@@ -1,6 +1,7 @@
 /* $RCSfile: a2py.c,v $$Revision: 4.1 $$Date: 92/08/07 18:29:14 $
  *
- *    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.
@@ -8,10 +9,13 @@
  * $Log:       a2py.c,v $
  */
 
-#if defined(OS2) || defined(WIN32)
+#if defined(OS2) || defined(WIN32) || defined(NETWARE)
 #if defined(WIN32)
 #include <io.h>
 #endif
+#if defined(NETWARE)
+#include "../netware/clibstuf.h"
+#endif
 #include "../patchlevel.h"
 #endif
 #include "util.h"
@@ -28,8 +32,12 @@ 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)
+#if defined(OS2) || defined(WIN32) || defined(NETWARE)
 static void usage(void);
 
 static void
@@ -54,6 +62,11 @@ 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 */
+       #endif  /* NETWARE */
 
     myname = argv[0];
     linestr = str_new(80);
@@ -90,7 +103,7 @@ main(register int argc, register char **argv, register char **env)
        case 0:
            break;
        default:
-#if defined(OS2) || defined(WIN32)
+#if defined(OS2) || defined(WIN32) || defined(NETWARE)
            fprintf(stderr, "Unrecognized switch: %s\n",argv[0]);
             usage();
 #else
@@ -103,7 +116,7 @@ main(register int argc, register char **argv, register char **env)
     /* open script */
 
     if (argv[0] == Nullch) {
-#if defined(OS2) || defined(WIN32)
+#if defined(OS2) || defined(WIN32) || defined(NETWARE)
        if ( isatty(fileno(stdin)) )
            usage();
 #endif
@@ -193,6 +206,8 @@ main(register int argc, register char **argv, register char **env)
          "The operation I've selected may be wrong for the operand types.\n");
     }
     exit(0);
+    /* by ANSI specs return is needed. This also shuts up VC++ and his warnings */
+    return(0);
 }
 
 #define RETURN(retval) return (bufptr = s,retval)