X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Frecode-dialog.c;h=314367462e6f403d691f2c9896972086b610075f;hb=57e1bd2b5e86c0f47ed8fcc23c4945034afb2053;hp=041566cf290bdc2ea30a401e81ba00e224373388;hpb=db2b1501c7ef5912183d51340740dd4bd2ee45ac;p=pspp-builds.git diff --git a/src/ui/gui/recode-dialog.c b/src/ui/gui/recode-dialog.c index 041566cf..31436746 100644 --- a/src/ui/gui/recode-dialog.c +++ b/src/ui/gui/recode-dialog.c @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include "psppire-acr.h" @@ -1338,9 +1338,8 @@ new_value_append_syntax (GString *str, const struct new_value *nv) break; case NV_STRING: { - struct string ds; - ds_init_cstr (&ds, nv->v.s); - gen_quoted_string (&ds); + struct string ds = DS_EMPTY_INITIALIZER; + syntax_gen_string (&ds, ss_cstr (nv->v.s)); g_string_append (str, ds_cstr (&ds)); ds_destroy (&ds); } @@ -1371,9 +1370,8 @@ old_value_append_syntax (GString *str, const struct old_value *ov) break; case OV_STRING: { - struct string ds; - ds_init_cstr (&ds, ov->v.s); - gen_quoted_string (&ds); + struct string ds = DS_EMPTY_INITIALIZER; + syntax_gen_string (&ds, ss_cstr (ov->v.s)); g_string_append (str, ds_cstr (&ds)); ds_destroy (&ds); } @@ -1537,9 +1535,9 @@ generate_syntax (const struct recode_dialog *rd) continue; } - ds_init_cstr (&ls, label); + ds_init_empty (&ls); + syntax_gen_string (&ls, ss_cstr (label)); g_free (label); - gen_quoted_string (&ls); g_string_append_printf (str, "\nVARIABLE LABELS %s %s.", name, ds_cstr (&ls));