aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--parse-events.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/parse-events.c b/parse-events.c
index 4389c4e..b22cd71 100644
--- a/parse-events.c
+++ b/parse-events.c
@@ -1679,6 +1679,7 @@ int event_read_print(struct event *event)
1679 if (read_expect_type(EVENT_DQUOTE, &token) < 0) 1679 if (read_expect_type(EVENT_DQUOTE, &token) < 0)
1680 goto fail; 1680 goto fail;
1681 1681
1682 concat:
1682 event->print_fmt.format = token; 1683 event->print_fmt.format = token;
1683 event->print_fmt.args = NULL; 1684 event->print_fmt.args = NULL;
1684 1685
@@ -1688,6 +1689,21 @@ int event_read_print(struct event *event)
1688 if (type == EVENT_NONE) 1689 if (type == EVENT_NONE)
1689 return 0; 1690 return 0;
1690 1691
1692 /* Handle concatination of print lines */
1693 if (type == EVENT_DQUOTE) {
1694 char *cat;
1695
1696 cat = malloc_or_die(strlen(event->print_fmt.format) +
1697 strlen(token) + 1);
1698 strcpy(cat, event->print_fmt.format);
1699 strcat(cat, token);
1700 free_token(token);
1701 free_token(event->print_fmt.format);
1702 event->print_fmt.format = NULL;
1703 token = cat;
1704 goto concat;
1705 }
1706
1691 if (test_type_token(type, token, EVENT_DELIM, ",")) 1707 if (test_type_token(type, token, EVENT_DELIM, ","))
1692 goto fail; 1708 goto fail;
1693 1709