X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fmessage.c;fp=src%2Flibpspp%2Fmessage.c;h=38726d9f5b4827661940d8500e9294a85b785d79;hb=4e8bfea364b7a1d2d496e14dfefc9dfeefff8d11;hp=83c7320168eef5a8ca4cf68baaa6c129bd98dd0d;hpb=b81922824d04dfc85e777827c3f978450dc62594;p=pspp diff --git a/src/libpspp/message.c b/src/libpspp/message.c index 83c7320168..38726d9f5b 100644 --- a/src/libpspp/message.c +++ b/src/libpspp/message.c @@ -174,6 +174,16 @@ msg_location_merge (struct msg_location **dstp, const struct msg_location *src) dst->end = src->end; } +struct msg_location * +msg_location_merged (const struct msg_location *a, + const struct msg_location *b) +{ + struct msg_location *new = msg_location_dup (a); + if (b) + msg_location_merge (&new, b); + return new; +} + struct msg_location * msg_location_dup (const struct msg_location *src) {