summaryrefslogtreecommitdiff
path: root/pcretest.c
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2013-02-22 12:46:26 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2013-02-22 12:46:26 +0000
commitda906da5ceb5dcf1f1a31fc85c759f3b07b1f9a6 (patch)
tree5ca7f953c2a2b00ca5b4ff2c3ace8a599d257b4e /pcretest.c
parent0bba7a1d42b9e5ec80f18fd676e7b4f8a8e419ab (diff)
downloadpcre-da906da5ceb5dcf1f1a31fc85c759f3b07b1f9a6.tar.gz
Added some #ifdef __VMS code to pcretest.c.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1254 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcretest.c')
-rw-r--r--pcretest.c34
1 files changed, 28 insertions, 6 deletions
diff --git a/pcretest.c b/pcretest.c
index c3d2896..65feba2 100644
--- a/pcretest.c
+++ b/pcretest.c
@@ -121,6 +121,12 @@ input mode under Windows. */
#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 @@ while (argc > 1 && argv[op][0] == '-')
((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 @@ while (argc > 1 && argv[op][0] == '-')
(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 @@ while (argc > 1 && argv[op][0] == '-')
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 @@ while (argc > 1 && argv[op][0] == '-')
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 @@ while (argc > 1 && argv[op][0] == '-')
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 @@ while (argc > 1 && argv[op][0] == '-')
#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 @@ if (dfa_workspace != NULL)
free(dfa_workspace);
#endif
+#if defined(__VMS)
+ yield = SS$_NORMAL; /* Return values via DCL symbols */
+#endif
+
return yield;
}