The long-promised type cleanup. Eval always returns 0 or 1. String_value
[iwhd.git] / query.c.diff
blobe3e5297a41a901408bb595d719633f498580d0ee
1 --- query.c.~1~ 2010-09-08 19:19:39.406647454 +0200
2 +++ query.c 2010-09-08 19:36:46.881772849 +0200
3 @@ -453,7 +453,7 @@ YY_LOCAL(int) yyrefill(void)
4 while (yybuflen - yypos < 512)
6 yybuflen *= 2;
7 - yybuf= realloc(yybuf, yybuflen);
8 + yybuf= xrealloc(yybuf, yybuflen);
10 YY_INPUT((yybuf + yypos), yyn, (yybuflen - yypos));
11 if (!yyn) return 0;
12 @@ -518,7 +518,7 @@ YY_LOCAL(void) yyDo(yyaction action, int
13 while (yythunkpos >= yythunkslen)
15 yythunkslen *= 2;
16 - yythunks= realloc(yythunks, sizeof(yythunk) * yythunkslen);
17 + yythunks= xrealloc(yythunks, sizeof(yythunk) * yythunkslen);
19 yythunks[yythunkpos].begin= begin;
20 yythunks[yythunkpos].end= end;
21 @@ -536,7 +536,7 @@ YY_LOCAL(int) yyText(int begin, int end)
22 while (yytextlen < (yyleng - 1))
24 yytextlen *= 2;
25 - yytext= realloc(yytext, yytextlen);
26 + yytext= xrealloc(yytext, yytextlen);
28 memcpy(yytext, yybuf + begin, yyleng);
30 @@ -1049,13 +1049,13 @@ YY_PARSE(int) YYPARSEFROM(yyrule yystart
31 if (!yybuflen)
33 yybuflen= 1024;
34 - yybuf= malloc(yybuflen);
35 + yybuf= xmalloc(yybuflen);
36 yytextlen= 1024;
37 - yytext= malloc(yytextlen);
38 + yytext= xmalloc(yytextlen);
39 yythunkslen= 32;
40 - yythunks= malloc(sizeof(yythunk) * yythunkslen);
41 + yythunks= xmalloc(sizeof(yythunk) * yythunkslen);
42 yyvalslen= 32;
43 - yyvals= malloc(sizeof(YYSTYPE) * yyvalslen);
44 + yyvals= xmalloc(sizeof(YYSTYPE) * yyvalslen);
45 yybegin= yyend= yypos= yylimit= yythunkpos= 0;
47 yybegin= yyend= yypos;