diff options
author | Dmitry Mikhirev | 2014-12-03 19:38:51 +0300 |
---|---|---|
committer | Dmitry Mikhirev | 2014-12-03 19:38:51 +0300 |
commit | 4f007f4273d624de1474537ef3ec265b6a621858 (patch) | |
tree | 5c0407330e22da125d76f3700675c13d8402d876 | |
parent | 25ad52a67f6f705294db76741b89c5f4fc12af2e (diff) | |
download | make_pcre-4f007f4273d624de1474537ef3ec265b6a621858.tar.gz make_pcre-4f007f4273d624de1474537ef3ec265b6a621858.tar.bz2 make_pcre-4f007f4273d624de1474537ef3ec265b6a621858.tar.xz make_pcre-4f007f4273d624de1474537ef3ec265b6a621858.zip |
fixed error that occured when error message contained uncoupled parentheses
-rw-r--r-- | pcre.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -74,12 +74,12 @@ int mk_error(const char *fmt, ...) if (emsg == NULL) { /* should never happen */ return -1; } - mk = gmk_alloc(strlen(emsg) + 10); + mk = gmk_alloc(strlen(emsg) + 35); if (mk == NULL) { /* should never happen */ gmk_free(emsg); return -1; } - sprintf(mk, "$(error %s)", emsg); + sprintf(mk, "__pcre_msg=%s\n$(error $(__pcre_msg))", emsg); gmk_free(emsg); gmk_eval(mk, NULL); gmk_free(mk); @@ -105,11 +105,11 @@ int mk_warning(const char *fmt, ...) gmk_free(emsg); return -1; } - mk = gmk_alloc(strlen(emsg) + 12); + mk = gmk_alloc(strlen(emsg) + 37); if (mk == NULL) { /* should never happen */ return -1; } - sprintf(mk, "$(warning %s)", emsg); + sprintf(mk, "__pcre_msg=%s\n$(warning $(__pcre_msg))", emsg); gmk_free(emsg); gmk_eval(mk, NULL); gmk_free(mk); @@ -134,12 +134,12 @@ int mk_info(const char *fmt, ...) if (emsg == NULL) { /* should never happen */ return -1; } - mk = gmk_alloc(strlen(emsg) + 9); + mk = gmk_alloc(strlen(emsg) + 34); if (mk == NULL) { /* should never happen */ gmk_free(emsg); return -1; } - sprintf(mk, "$(info %s)", emsg); + sprintf(mk, "__pcre_msg=%s\n$(info $(__pcre_msg))", emsg); gmk_free(emsg); gmk_eval(mk, NULL); gmk_free(mk); |