Module::Build's contrib directory should be marked as EXCLUDED from the core.
[p5sagit/p5-mst-13.2.git] / x2p / a2p.h
index db09edd..6b6004c 100644 (file)
--- a/x2p/a2p.h
+++ b/x2p/a2p.h
@@ -151,15 +151,18 @@ char *strcpy(), *strcat();
 #endif
 #endif /* ! STANDARD_C */
 
+#ifdef __cplusplus
+#  define PERL_EXPORT_C extern "C"
+#else
+#  define PERL_EXPORT_C extern
+#endif
+
 #ifdef VMS
 #  include "handy.h"
 #else 
 #  include "../handy.h"
 #endif
 
-#undef Nullfp
-#define Nullfp Null(FILE*)
-
 #define Nullop 0
 
 #define OPROG          1
@@ -252,7 +255,7 @@ char *strcpy(), *strcat();
 #define OSTAR          88
 
 #ifdef DOINIT
-char *opname[] = {
+const char *opname[] = {
     "0",
     "PROG",
     "JUNK",
@@ -345,7 +348,7 @@ char *opname[] = {
     "89"
 };
 #else
-extern char *opname[];
+extern const char *opname[];
 #endif
 
 EXT int mop INIT(1);
@@ -370,8 +373,8 @@ typedef struct htbl HASH;
 
 /* A string is TRUE if not "" or "0". */
 #define True(val) (tmps = (val), (*tmps && !(*tmps == '0' && !tmps[1])))
-EXT char *Yes INIT("1");
-EXT char *No INIT("");
+EXT const char *Yes INIT("1");
+EXT const char *No INIT("");
 
 #define str_get(str) (Str = (str), (Str->str_pok ? Str->str_ptr : str_2ptr(Str)))
 EXT STR *Str;
@@ -397,8 +400,8 @@ void putone ( void );
 int rememberargs ( int arg );
 char * scannum ( char *s );
 char * scanpat ( char *s );
-int string ( char *ptr, int len );
-void yyerror ( char *s );
+int string ( const char *ptr, int len );
+void yyerror ( const char *s );
 int yylex ( void );
 
 EXT int line INIT(0);
@@ -407,7 +410,7 @@ EXT FILE *rsfp;
 EXT char buf[2048];
 EXT char *bufptr INIT(buf);
 
-EXT STR *linestr INIT(Nullstr);
+EXT STR *linestr INIT(NULL);
 
 EXT char tokenbuf[2048];
 EXT int expectterm INIT(TRUE);
@@ -423,7 +426,7 @@ extern int yydebug;
 # endif
 #endif
 
-EXT STR *freestrroot INIT(Nullstr);
+EXT STR *freestrroot INIT(NULL);
 
 EXT STR str_no;
 EXT STR str_yes;
@@ -447,7 +450,7 @@ EXT bool saw_altinput INIT(FALSE);
 EXT bool nomemok INIT(FALSE);
 
 EXT char const_FS INIT(0);
-EXT char *namelist INIT(Nullch);
+EXT char *namelist INIT(NULL);
 EXT char fswitch INIT(0);
 EXT bool old_awk INIT(0);