/[pcre]/code/trunk/pcretest.c
ViewVC logotype

Diff of /code/trunk/pcretest.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 345 by ph10, Mon Apr 28 15:10:02 2008 UTC revision 355 by ph10, Mon Jul 7 17:45:23 2008 UTC
# Line 94  appropriately for an application, not fo Line 94  appropriately for an application, not fo
94  #include "pcre.h"  #include "pcre.h"
95  #include "pcre_internal.h"  #include "pcre_internal.h"
96    
97  /* We need access to the data tables that PCRE uses. So as not to have to keep  /* We need access to some of the data tables that PCRE uses. So as not to have
98  two copies, we include the source file here, changing the names of the external  to keep two copies, we include the source file here, changing the names of the
99  symbols to prevent clashes. */  external symbols to prevent clashes. */
100    
101    #define _pcre_ucp_gentype      ucp_gentype
102  #define _pcre_utf8_table1      utf8_table1  #define _pcre_utf8_table1      utf8_table1
103  #define _pcre_utf8_table1_size utf8_table1_size  #define _pcre_utf8_table1_size utf8_table1_size
104  #define _pcre_utf8_table2      utf8_table2  #define _pcre_utf8_table2      utf8_table2
# Line 1805  while (!done) Line 1806  while (!done)
1806              {              {
1807              unsigned char buff8[8];              unsigned char buff8[8];
1808              int ii, utn;              int ii, utn;
1809              utn = ord2utf8(c, buff8);              if (use_utf8)
1810              for (ii = 0; ii < utn - 1; ii++) *q++ = buff8[ii];                {
1811              c = buff8[ii];   /* Last byte */                utn = ord2utf8(c, buff8);
1812                  for (ii = 0; ii < utn - 1; ii++) *q++ = buff8[ii];
1813                  c = buff8[ii];   /* Last byte */
1814                  }
1815                else
1816                 {
1817                 if (c > 255)
1818                   fprintf(outfile, "** Character \\x{%x} is greater than 255 and "
1819                     "UTF-8 mode is not enabled.\n"
1820                     "** Truncation will probably give the wrong result.\n", c);
1821                 }
1822              p = pt + 1;              p = pt + 1;
1823              break;              break;
1824              }              }

Legend:
Removed from v.345  
changed lines
  Added in v.355

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12