[Pcre-svn] [1079] code/trunk/pcretest.c: pcre32: pcretest: M…

Kezdőlap
Üzenet törlése
Szerző: Subversion repository
Dátum:  
Címzett: pcre-svn
Tárgy: [Pcre-svn] [1079] code/trunk/pcretest.c: pcre32: pcretest: Make pchar 32-bit clean
Revision: 1079
          http://vcs.pcre.org/viewvc?view=rev&revision=1079
Author:   chpe
Date:     2012-10-16 16:55:04 +0100 (Tue, 16 Oct 2012)


Log Message:
-----------
pcre32: pcretest: Make pchar 32-bit clean

Use pcre_uint32 for characters.

Modified Paths:
--------------
    code/trunk/pcretest.c


Modified: code/trunk/pcretest.c
===================================================================
--- code/trunk/pcretest.c    2012-10-16 15:55:00 UTC (rev 1078)
+++ code/trunk/pcretest.c    2012-10-16 15:55:04 UTC (rev 1079)
@@ -1729,7 +1729,7 @@


/* Print a single character either literally, or as a hex escape. */

-static int pchar(int c, FILE *f)
+static int pchar(pcre_uint32 c, FILE *f)
{
if (PRINTOK(c))
{
@@ -1848,7 +1848,7 @@

 while (length-- > 0)
   {
-  int c = *p++ & 0xffff;
+  pcre_uint32 c = *p++ & 0xffff;
 #if !defined NOUTF
   if (use_utf && c >= 0xD800 && c < 0xDC00 && length > 0)
     {
@@ -1887,7 +1887,7 @@


while (length-- > 0)
{
- int c = *p++;
+ pcre_uint32 c = *p++;
yield += pchar(c, f);
}