[Pcre-svn] [841] code/trunk: use unsigned short for 16 bit s…

Top Page
Delete this message
Author: Subversion repository
Date:  
To: pcre-svn
Subject: [Pcre-svn] [841] code/trunk: use unsigned short for 16 bit strings and a minor fix
Revision: 841
          http://vcs.pcre.org/viewvc?view=rev&revision=841
Author:   zherczeg
Date:     2011-12-31 07:04:43 +0000 (Sat, 31 Dec 2011)


Log Message:
-----------
use unsigned short for 16 bit strings and a minor fix

Modified Paths:
--------------
    code/trunk/pcre.h.in
    code/trunk/pcretest.c


Modified: code/trunk/pcre.h.in
===================================================================
--- code/trunk/pcre.h.in    2011-12-30 19:32:50 UTC (rev 840)
+++ code/trunk/pcre.h.in    2011-12-31 07:04:43 UTC (rev 841)
@@ -278,7 +278,7 @@
 a 16 bit wide signed data type. Otherwise it can be a dummy data type since
 pcre16 functions are not implemented. There is a check for this in pcre_internal.h. */
 #ifndef PCRE_SCHAR16
-#define PCRE_SCHAR16 short
+#define PCRE_SCHAR16 unsigned short
 #endif


#ifndef PCRE_SPTR16

Modified: code/trunk/pcretest.c
===================================================================
--- code/trunk/pcretest.c    2011-12-30 19:32:50 UTC (rev 840)
+++ code/trunk/pcretest.c    2011-12-31 07:04:43 UTC (rev 841)
@@ -2492,6 +2492,7 @@
   pcre_uint8 *p, *pp, *ppp;
   pcre_uint8 *to_file = NULL;
   const pcre_uint8 *tables = NULL;
+  pcre_uint32 get_options;
   unsigned long int true_size, true_study_size = 0;
   size_t size, regex_gotten_store;
   int do_allcaps = 0;
@@ -2522,7 +2523,7 @@


   if (*p == '<' && strchr((char *)(p+1), '<') == NULL)
     {
-    unsigned long int magic, get_options;
+    pcre_uint32 magic;
     pcre_uint8 sbuf[8];
     FILE *f;


@@ -2852,8 +2853,6 @@
#endif /* !defined NOPOSIX */

     {
-    unsigned long int get_options;
-
     /* In 16-bit mode, convert the input. */


#ifdef SUPPORT_PCRE16