8 |
|
|
9 |
Written by: Philip Hazel <ph10@cam.ac.uk> |
Written by: Philip Hazel <ph10@cam.ac.uk> |
10 |
|
|
11 |
Copyright (c) 1998 University of Cambridge |
Copyright (c) 1997-1999 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 |
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. |
35 |
|
|
36 |
|
|
37 |
/* This file is compiled on its own as part of the PCRE library. However, |
/* This file is compiled on its own as part of the PCRE library. However, |
38 |
it is also included in the compilation of deftables.c, in which case the macro |
it is also included in the compilation of dftables.c, in which case the macro |
39 |
DEFTABLES is defined. */ |
DFTABLES is defined. */ |
40 |
|
|
41 |
#ifndef DEFTABLES |
#ifndef DFTABLES |
42 |
#include "internal.h" |
#include "internal.h" |
43 |
#endif |
#endif |
44 |
|
|
52 |
a pointer to them. They are build using the ctype functions, and consequently |
a pointer to them. They are build using the ctype functions, and consequently |
53 |
their contents will depend upon the current locale setting. When compiled as |
their contents will depend upon the current locale setting. When compiled as |
54 |
part of the library, the store is obtained via pcre_malloc(), but when compiled |
part of the library, the store is obtained via pcre_malloc(), but when compiled |
55 |
inside deftables, use malloc(). |
inside dftables, use malloc(). |
56 |
|
|
57 |
Arguments: none |
Arguments: none |
58 |
Returns: pointer to the contiguous block of data |
Returns: pointer to the contiguous block of data |
64 |
unsigned char *yield, *p; |
unsigned char *yield, *p; |
65 |
int i; |
int i; |
66 |
|
|
67 |
#ifndef DEFTABLES |
#ifndef DFTABLES |
68 |
yield = (pcre_malloc)(tables_length); |
yield = (unsigned char*)(pcre_malloc)(tables_length); |
69 |
#else |
#else |
70 |
yield = malloc(tables_length); |
yield = (unsigned char*)malloc(tables_length); |
71 |
#endif |
#endif |
72 |
|
|
73 |
if (yield == NULL) return NULL; |
if (yield == NULL) return NULL; |