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 |
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 |
|
/* There are two printf() calls here, because gcc in pedantic mode complains |
59 |
|
about the very long string otherwise. */ |
60 |
|
|
61 |
printf( |
printf( |
62 |
"/*************************************************\n" |
"/*************************************************\n" |
64 |
"*************************************************/\n\n" |
"*************************************************/\n\n" |
65 |
"/* This file is automatically written by the dftables auxiliary \n" |
"/* This file is automatically written by the dftables auxiliary \n" |
66 |
"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" |
67 |
"prevent its ever being regenerated.\n\n" |
"prevent its ever being regenerated.\n\n"); |
68 |
|
printf( |
69 |
"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" |
70 |
"character tables which are used when no tables are passed to the compile\n" |
"character tables which are used when no tables are passed to the compile\n" |
71 |
"function. */\n\n" |
"function. */\n\n" |
93 |
printf(",\n\n"); |
printf(",\n\n"); |
94 |
|
|
95 |
printf( |
printf( |
96 |
"/* This table contains bit maps for digits, 'word' chars, and white\n" |
"/* This table contains bit maps for various character classes.\n" |
97 |
"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" |
98 |
"significant end of each byte. */\n\n"); |
"significant end of each byte. The classes that have their own\n" |
99 |
|
"maps are: space, xdigit, digit, upper, lower, word, graph\n" |
100 |
|
"print, punct, and cntrl. Other classes are built from combinations. */\n\n"); |
101 |
|
|
102 |
printf(" "); |
printf(" "); |
103 |
for (i = 0; i < cbit_length; i++) |
for (i = 0; i < cbit_length; i++) |
110 |
printf("0x%02x", *tables++); |
printf("0x%02x", *tables++); |
111 |
if (i != cbit_length - 1) printf(","); |
if (i != cbit_length - 1) printf(","); |
112 |
} |
} |
113 |
printf(" ,\n\n"); |
printf(",\n\n"); |
114 |
|
|
115 |
printf( |
printf( |
116 |
"/* This table identifies various classes of character by individual bits:\n" |
"/* This table identifies various classes of character by individual bits:\n" |