Revision: 1254
http://vcs.pcre.org/viewvc?view=rev&revision=1254
Author: ph10
Date: 2013-02-22 12:46:26 +0000 (Fri, 22 Feb 2013)
Log Message:
-----------
Added some #ifdef __VMS code to pcretest.c.
Modified Paths:
--------------
code/trunk/ChangeLog
code/trunk/pcretest.c
Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog 2013-02-22 11:38:35 UTC (rev 1253)
+++ code/trunk/ChangeLog 2013-02-22 12:46:26 UTC (rev 1254)
@@ -70,6 +70,8 @@
segment is retained when a new segment is processed. Otherwise, if there
are no lookbehinds in the pattern, \A might match incorrectly at the start
of a new segment.
+
+18. Added some #ifdef __VMS code into pcretest.c to help VMS implementations.
Version 8.32 30-November-2012
Modified: code/trunk/pcretest.c
===================================================================
--- code/trunk/pcretest.c 2013-02-22 11:38:35 UTC (rev 1253)
+++ code/trunk/pcretest.c 2013-02-22 12:46:26 UTC (rev 1254)
@@ -121,6 +121,12 @@
#endif
#endif
+#ifdef __VMS
+#include <ssdef.h>
+void vms_setsymbol( char *, char *, int );
+#endif
+
+
#define PRIV(name) name
/* We have to include pcre_internal.h because we need the internal info for
@@ -3099,7 +3105,7 @@
((stack_size = get_value((pcre_uint8 *)argv[op+1], &endptr)),
*endptr == 0))
{
-#if defined(_WIN32) || defined(WIN32) || defined(__minix) || defined(NATIVE_ZOS)
+#if defined(_WIN32) || defined(WIN32) || defined(__minix) || defined(NATIVE_ZOS) || defined(__VMS)
printf("PCRE: -S not supported on this OS\n");
exit(1);
#else
@@ -3132,6 +3138,10 @@
(void)PCRE_CONFIG(PCRE_CONFIG_LINK_SIZE, &rc);
printf("%d\n", rc);
yield = rc;
+
+#ifdef __VMS
+ vms_setsymbol("LINKSIZE",0,yield );
+#endif
}
else if (strcmp(argv[op + 1], "pcre8") == 0)
{
@@ -3142,7 +3152,9 @@
printf("0\n");
yield = 0;
#endif
- goto EXIT;
+#ifdef __VMS
+ vms_setsymbol("PCRE8",0,yield );
+#endif
}
else if (strcmp(argv[op + 1], "pcre16") == 0)
{
@@ -3153,7 +3165,9 @@
printf("0\n");
yield = 0;
#endif
- goto EXIT;
+#ifdef __VMS
+ vms_setsymbol("PCRE16",0,yield );
+#endif
}
else if (strcmp(argv[op + 1], "pcre32") == 0)
{
@@ -3164,9 +3178,11 @@
printf("0\n");
yield = 0;
#endif
- goto EXIT;
+#ifdef __VMS
+ vms_setsymbol("PCRE32",0,yield );
+#endif
}
- if (strcmp(argv[op + 1], "utf") == 0)
+ else if (strcmp(argv[op + 1], "utf") == 0)
{
#ifdef SUPPORT_PCRE8
if (pcre_mode == PCRE8_MODE)
@@ -3182,7 +3198,9 @@
#endif
printf("%d\n", rc);
yield = rc;
- goto EXIT;
+#ifdef __VMS
+ vms_setsymbol("UTF",0,yield );
+#endif
}
else if (strcmp(argv[op + 1], "ucp") == 0)
{
@@ -5487,6 +5505,10 @@
free(dfa_workspace);
#endif
+#if defined(__VMS)
+ yield = SS$_NORMAL; /* Return values via DCL symbols */
+#endif
+
return yield;
}