Mercurial > ~dholland > hg > tradcpp > index.cgi
comparison macro.c @ 40:291fefe664f2
Oops, fix previous.
author | David A. Holland |
---|---|
date | Sat, 30 Mar 2013 21:48:57 -0400 |
parents | 337110e7240a |
children | ad7763329eba |
comparison
equal
deleted
inserted
replaced
39:337110e7240a | 40:291fefe664f2 |
---|---|
1100 char *ret; | 1100 char *ret; |
1101 | 1101 |
1102 expstate_init(&es, true, honordefined); | 1102 expstate_init(&es, true, honordefined); |
1103 doexpand(&es, p, buf, len); | 1103 doexpand(&es, p, buf, len); |
1104 expand_got_eof(&es, p); | 1104 expand_got_eof(&es, p); |
1105 | |
1106 /* trim to fit, so the malloc debugging won't complain */ | |
1107 es.buf = dorealloc(es.buf, es.bufmax, strlen(es.buf) + 1); | |
1108 | |
1105 ret = es.buf; | 1109 ret = es.buf; |
1106 es.buf = NULL; | 1110 es.buf = NULL; |
1107 /* trim to fit, so the malloc debugging won't complain */ | |
1108 ret = dorealloc(es.buf, es.bufmax, strlen(es.buf) + 1); | |
1109 es.bufpos = es.bufmax = 0; | 1111 es.bufpos = es.bufmax = 0; |
1112 | |
1110 expstate_cleanup(&es); | 1113 expstate_cleanup(&es); |
1111 | 1114 |
1112 return ret; | 1115 return ret; |
1113 } | 1116 } |
1114 | 1117 |