From a81a87da6616bf36a019a501c468cd61422a12b1 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 25 Jul 2007 04:09:44 +0000 Subject: [PATCH] Fix bug #20427. * por-file-writer.c (write_variables): Write weight variable. Reviewed by John Darrington. --- src/data/ChangeLog | 14 ++++++++++++++ src/data/por-file-writer.c | 6 ++++++ 2 files changed, 20 insertions(+) diff --git a/src/data/ChangeLog b/src/data/ChangeLog index 0da0c80e94..cb0116e823 100644 --- a/src/data/ChangeLog +++ b/src/data/ChangeLog @@ -1,3 +1,9 @@ +2007-07-24 Ben Pfaff + + Fix bug #20427. + * por-file-writer.c (write_variables): Write weight variable. + Reviewed by John Darrington. + 2007-07-23 Ben Pfaff Improvements to system file reader and writer. @@ -129,6 +135,8 @@ (write_zeros): New function. (write_spaces): New function. + Reviewed by John Darrington. + 2007-07-22 Ben Pfaff Don't try to write very long strings to portable files. The @@ -140,11 +148,13 @@ (write_value): Limit width of value written to MAX_POR_WIDTH. (write_variables): Limit width of variable and its output formats to MAX_POR_WIDTH. + Reviewed by John Darrington. 2007-07-22 Ben Pfaff * sys-file-reader.c (read_variable_to_value_map): Use max_warnings local variable instead of literal 5. + Reviewed by John Darrington. 2007-07-22 Ben Pfaff @@ -189,6 +199,8 @@ (var_clear_short_name): Renamed var_clear_short_names, changed to clear all short names. + Reviewed by John Darrington. + 2007-07-22 Ben Pfaff * variable.c (var_set_width): Use new var_set_width function. @@ -199,6 +211,8 @@ * format.c (fmt_default_for_width): New function. (fmt_resize): New function. + Reviewed by John Darrington. + 2007-07-18 John Darrington * datasheet.c (datasheet_delete_columns): Added assertion to check diff --git a/src/data/por-file-writer.c b/src/data/por-file-writer.c index be8aba96dc..0bb1df6025 100644 --- a/src/data/por-file-writer.c +++ b/src/data/por-file-writer.c @@ -322,6 +322,12 @@ write_variables (struct pfm_writer *w, struct dictionary *dict) short_names_assign (dict); + if (dict_get_weight (dict) != NULL) + { + buf_write (w, "6", 1); + write_string (w, var_get_short_name (dict_get_weight (dict), 0)); + } + buf_write (w, "4", 1); write_int (w, dict_get_var_cnt (dict)); write_int (w, 161); -- 2.30.2