X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fdata%2Fsys-file-private.c;h=dd50ea8babefb434edece1080504bcc0f1e22e13;hb=5c3291dc396b795696e94f47780308fd7ace6fc4;hp=2a2979f92a8db7c10c477f150de952b57be9deff;hpb=c6fe58a22249f4f486b42f35fd8bd537c91e8e6e;p=pspp-builds.git diff --git a/src/data/sys-file-private.c b/src/data/sys-file-private.c index 2a2979f9..dd50ea8b 100644 --- a/src/data/sys-file-private.c +++ b/src/data/sys-file-private.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,6 +22,7 @@ #include #include #include +#include #include "minmax.h" #include "xalloc.h" @@ -228,7 +229,8 @@ sfm_dictionary_to_sfm_vars (const struct dictionary *dict, if (used_bytes != 0) { sv = &(*sfm_vars)[(*sfm_var_cnt)++]; - sv->width = width == 0 ? 0 : used_bytes; + sv->var_width = width; + sv->segment_width = width == 0 ? 0 : used_bytes; sv->case_index = var_get_case_index (dv); sv->offset = sfm_segment_offset (width, j); sv->padding = padding; @@ -236,13 +238,11 @@ sfm_dictionary_to_sfm_vars (const struct dictionary *dict, else { /* Segment is all padding. Just add it to the - previous segment. (Otherwise we'd have an - ambiguity whether ->width of 0 indicates a - numeric variable or an all-padding segment.) */ + previous segment. */ sv = &(*sfm_vars)[*sfm_var_cnt - 1]; sv->padding += padding; } - assert ((sv->width + sv->padding) % 8 == 0); + assert ((sv->segment_width + sv->padding) % 8 == 0); } }