X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ffile-type.c;h=44aa9bd95c29bbec3aac6f3f8262f7ba673ff25b;hb=0dd2d22c89cc94f92de0323c60ff16b993a46b18;hp=3400c8a0fc109a59bf9999d5af7676cb68a3d352;hpb=4944c86a9318bc5b5578ab145a95c116ffd2c9fd;p=pspp diff --git a/src/file-type.c b/src/file-type.c index 3400c8a0fc..44aa9bd95c 100644 --- a/src/file-type.c +++ b/src/file-type.c @@ -284,15 +284,13 @@ cmd_file_type (void) static void create_col_var (struct col_spec *c) { - int type; int width; - type = (formats[c->fmt].cat & FCAT_STRING) ? ALPHA : NUMERIC; - if (type == ALPHA) + if (formats[c->fmt].cat & FCAT_STRING) width = c->nc; else width = 0; - c->v = force_create_variable (&default_dict, c->name, type, width); + c->v = dict_create_var (default_dict, c->name, width); } /* Parses variable, column, type specifications for a variable. */ @@ -405,11 +403,6 @@ internal_cmd_record_type (void) rct.ft = n_trns; if (fty.case_sbc.name[0]) rct.case_sbc = fty.case_sbc; -#if __CHECKER__ - else - memset (&rct.case_sbc, 0, sizeof rct.case_sbc); - rct.lt = -1; -#endif /* Make sure we're inside a FILE TYPE structure. */ if (pgm_state != STATE_INPUT || vfm_source != &file_type_source) @@ -617,7 +610,8 @@ cmd_end_file_type (void) /* Reads any number of cases into temp_case and calls write_case() for each one. Compare data-list.c:read_from_data_list. */ static void -file_type_source_read (void) +file_type_source_read (write_case_func *write_case UNUSED, + write_case_data wc_data UNUSED) { char *line; int len;