X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ffile-type.c;h=b90ae1840dbc1b7a462086ea85fcdb4ee76c5326;hb=0f27235bdf621a87df0c9c2d9b01e9198eb7c42d;hp=adf81a995c8730bb6ac0d60b479ae592f3937e09;hpb=05e356b2a3087e819ef3b5388e29c822f41502e1;p=pspp diff --git a/src/file-type.c b/src/file-type.c index adf81a995c..b90ae1840d 100644 --- a/src/file-type.c +++ b/src/file-type.c @@ -14,8 +14,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ #include #include @@ -44,7 +44,7 @@ enum /* Limited variable column specifications. */ struct col_spec { - char name[SHORT_NAME_LEN + 1]; /* Variable name. */ + char name[LONG_NAME_LEN + 1]; /* Variable name. */ int fc, nc; /* First column (1-based), # of columns. */ int fmt; /* Format type. */ struct variable *v; /* Variable. */ @@ -94,6 +94,8 @@ struct file_type_pgm static int parse_col_spec (struct col_spec *, const char *); static void create_col_var (struct col_spec *c); +int cmd_file_type (void); + /* Parses FILE TYPE command. */ int cmd_file_type (void) @@ -264,7 +266,7 @@ cmd_file_type (void) goto error; } - if (!strcmp (fty->case_sbc.name, fty->record.name)) + if (!strcasecmp (fty->case_sbc.name, fty->record.name)) { msg (SE, _("CASE and RECORD must specify different variable " "names.")); @@ -448,8 +450,8 @@ cmd_record_type (void) if (!lex_force_string ()) goto error; rct->v[rct->nv].c = xmalloc (fty->record.nc + 1); - st_bare_pad_copy (rct->v[rct->nv].c, ds_c_str (&tokstr), - fty->record.nc + 1); + buf_copy_str_rpad (rct->v[rct->nv].c, fty->record.nc + 1, + ds_c_str (&tokstr)); } else { @@ -569,6 +571,7 @@ cmd_record_type (void) /* END FILE TYPE. */ +int cmd_end_file_type (void); int cmd_end_file_type (void) {