Fix bug #20427.
authorBen Pfaff <blp@gnu.org>
Wed, 25 Jul 2007 04:09:44 +0000 (04:09 +0000)
committerBen Pfaff <blp@gnu.org>
Wed, 25 Jul 2007 04:09:44 +0000 (04:09 +0000)
* por-file-writer.c (write_variables): Write weight variable.
Reviewed by John Darrington.

src/data/ChangeLog
src/data/por-file-writer.c

index 0da0c80e94a20480fddd8b018a3b62053fd6393f..cb0116e8239d3a0577c4f48bbdb01df3b85b5b96 100644 (file)
@@ -1,3 +1,9 @@
+2007-07-24  Ben Pfaff  <blp@gnu.org>
+
+       Fix bug #20427.
+       * por-file-writer.c (write_variables): Write weight variable.
+       Reviewed by John Darrington.
+
 2007-07-23  Ben Pfaff  <blp@gnu.org>
 
        Improvements to system file reader and writer.
        (write_zeros): New function.
        (write_spaces): New function.
 
+       Reviewed by John Darrington.
+
 2007-07-22  Ben Pfaff  <blp@gnu.org>
 
        Don't try to write very long strings to portable files.  The
        (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  <blp@gnu.org>
 
        * 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  <blp@gnu.org>
 
        (var_clear_short_name): Renamed var_clear_short_names, changed to
        clear all short names.
        
+       Reviewed by John Darrington.
+
 2007-07-22  Ben Pfaff  <blp@gnu.org>
 
        * variable.c (var_set_width): Use new var_set_width function.
        * format.c (fmt_default_for_width): New function.
        (fmt_resize): New function.
 
+       Reviewed by John Darrington.
+
 2007-07-18 John Darrington <john@darrington.wattle.id.au>
 
        * datasheet.c (datasheet_delete_columns): Added assertion to check
index be8aba96dc873a7dc079de3539a1669746e167c2..0bb1df60251929d656d8c8241cfca336971abad6 100644 (file)
@@ -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);