From 5f7abd61a52ac90b4e4b7d21e006dfd8d10bd36f Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Sun, 8 Dec 2002 06:26:00 +0000 Subject: [PATCH] Corrected order of arguments to gl_merge_eval_key(). Changed field text from "FIELD{*}" to "${*}". git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@203 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- glabels2/src/text-node.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/glabels2/src/text-node.c b/glabels2/src/text-node.c index 7c5ba20f..65d28c07 100644 --- a/glabels2/src/text-node.c +++ b/glabels2/src/text-node.c @@ -45,11 +45,11 @@ gl_text_node_expand (glTextNode * text_node, gchar *text; if (text_node->field_flag) { - text = gl_merge_eval_key (text_node->data, record); + text = gl_merge_eval_key (record, text_node->data); if (text != NULL) { return text; } else { - return g_strdup_printf ("FIELD{%s}", text_node->data); + return g_strdup_printf ("${%s}", text_node->data); } } else { return g_strdup (text_node->data); @@ -80,10 +80,10 @@ extract_text_node (gchar * text, text_node = g_new0 (glTextNode, 1); - if (strncmp (text, "FIELD{", strlen ("FIELD{")) == 0) { + if (strncmp (text, "${", strlen ("${")) == 0) { /* We are at the beginning of a "FIELD" node */ text_node->field_flag = TRUE; - *n = strlen ("FIELD{"); + *n = strlen ("${"); text += *n; for (p = text, m = 0; *p != 0; p++, m++, (*n)++) { if (*p == '}') { @@ -96,7 +96,7 @@ extract_text_node (gchar * text, /* We are at the beginning of a literal node */ text_node->field_flag = FALSE; for (p = text, *n = 0; *p != 0; p++, (*n)++) { - if (strncmp (p, "FIELD{", strlen ("FIELD{")) == 0) + if (strncmp (p, "${", strlen ("${")) == 0) break; if (*p == '\n') break; -- 2.39.5