/[pcre]/code/tags/pcre-3.9/dftables.c
ViewVC logotype

Diff of /code/tags/pcre-3.9/dftables.c

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

code/trunk/dftables.c revision 27 by nigel, Sat Feb 24 21:38:49 2007 UTC code/tags/pcre-3.9/dftables.c revision 62 by nigel, Sat Feb 24 21:40:00 2007 UTC
# Line 8  and semantics are as close as possible t Line 8  and semantics are as close as possible t
8    
9  Written by: Philip Hazel <ph10@cam.ac.uk>  Written by: Philip Hazel <ph10@cam.ac.uk>
10    
11             Copyright (c) 1997-1999 University of Cambridge             Copyright (c) 1997-2001 University of Cambridge
12    
13  -----------------------------------------------------------------------------  -----------------------------------------------------------------------------
14  Permission is granted to anyone to use this software for any purpose on any  Permission is granted to anyone to use this software for any purpose on any
# Line 24  restrictions: Line 24  restrictions:
24    
25  3. Altered versions must be plainly marked as such, and must not be  3. Altered versions must be plainly marked as such, and must not be
26     misrepresented as being the original software.     misrepresented as being the original software.
27    
28    4. If PCRE is embedded in any software that is released under the GNU
29       General Purpose Licence (GPL), then the terms of that licence shall
30       supersede any condition above with which it is incompatible.
31  -----------------------------------------------------------------------------  -----------------------------------------------------------------------------
32    
33  See the file Tech.Notes for some information on the internals.  See the file Tech.Notes for some information on the internals.
# Line 49  order to be consistent. */ Line 53  order to be consistent. */
53  int main(void)  int main(void)
54  {  {
55  int i;  int i;
56  unsigned const char *tables = pcre_maketables();  const unsigned char *tables = pcre_maketables();
57    
58  printf(  printf(
59    "/*************************************************\n"    "/*************************************************\n"
60    "*      Perl-Compatible Regular Expressions       *\n"    "*      Perl-Compatible Regular Expressions       *\n"
61    "*************************************************/\n\n"    "*************************************************/\n\n"
62    "/* This file is automatically written by the makechartables auxiliary \n"    "/* This file is automatically written by the dftables auxiliary \n"
63    "program. If you edit it by hand, you might like to edit the Makefile to \n"    "program. If you edit it by hand, you might like to edit the Makefile to \n"
64    "prevent its ever being regenerated.\n\n"    "prevent its ever being regenerated.\n\n"
65    "This file is #included in the compilation of pcre.c to build the default\n"    "This file is #included in the compilation of pcre.c to build the default\n"
# Line 85  for (i = 0; i < 256; i++) Line 89  for (i = 0; i < 256; i++)
89  printf(",\n\n");  printf(",\n\n");
90    
91  printf(  printf(
92    "/* This table contains bit maps for digits, 'word' chars, and white\n"    "/* This table contains bit maps for various character classes.\n"
93    "space. Each map is 32 bytes long and the bits run from the least\n"    "Each map is 32 bytes long and the bits run from the least\n"
94    "significant end of each byte. */\n\n");    "significant end of each byte. The classes that have their own\n"
95      "maps are: space, xdigit, digit, upper, lower, word, graph\n"
96      "print, punct, and cntrl. Other classes are built from combinations. */\n\n");
97    
98  printf("  ");  printf("  ");
99  for (i = 0; i < cbit_length; i++)  for (i = 0; i < cbit_length; i++)
# Line 100  for (i = 0; i < cbit_length; i++) Line 106  for (i = 0; i < cbit_length; i++)
106    printf("0x%02x", *tables++);    printf("0x%02x", *tables++);
107    if (i != cbit_length - 1) printf(",");    if (i != cbit_length - 1) printf(",");
108    }    }
109  printf(" ,\n\n");  printf(",\n\n");
110    
111  printf(  printf(
112    "/* This table identifies various classes of character by individual bits:\n"    "/* This table identifies various classes of character by individual bits:\n"

Legend:
Removed from v.27  
changed lines
  Added in v.62

  ViewVC Help
Powered by ViewVC 1.1.5