230 |
* of the structure of the compiled regexp. |
* of the structure of the compiled regexp. |
231 |
*/ |
*/ |
232 |
static regexp * |
static regexp * |
233 |
regcomp(char *exp) |
regcomp(char *exp,int *sz) |
234 |
{ |
{ |
235 |
register regexp *r; |
register regexp *r; |
236 |
register char *scan; |
register char *scan; |
255 |
FAIL("regexp too big"); |
FAIL("regexp too big"); |
256 |
|
|
257 |
/* Allocate space. */ |
/* Allocate space. */ |
258 |
r = (regexp *)malloc(sizeof(regexp) + (unsigned)regsize); |
*sz=sizeof(regexp) + (unsigned)regsize; |
259 |
|
r = (regexp *)alloc_relblock(*sz); |
260 |
if (r == NULL) |
if (r == NULL) |
261 |
FAIL("out of space"); |
FAIL("out of space"); |
262 |
|
|