pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[VAR_NAME_LEN 00/17] Eliminate uses of VAR_NAME_LEN


From: Ben Pfaff
Subject: [VAR_NAME_LEN 00/17] Eliminate uses of VAR_NAME_LEN
Date: Sat, 5 Feb 2011 13:25:42 -0800

This series eliminates most uses of VAR_NAME_LEN in PSPP.  Most uses of
VAR_NAME_LEN within PSPP are wrong due to encoding issues: the limit
applies to variable names in the encoding used by the data set, but most
uses of VAR_NAME_LEN actually limit the length of a name in UTF-8.  The
UTF-8 representation of a name can be longer or shorter than its
representation in the data set encoding, so it seems best to eliminate
references to VAR_NAME_LEN entirely.

Ben Pfaff (17):
  dict: Make dict_make_unique_var_name() return an allocated string.
  variable: Remove VAR_NAME_LEN limit for internal representation of
    name.
  vector: Remove VAR_NAME_LEN limit for internal representation of
    name.
  combine-files: Eliminate VAR_NAME_LEN restriction from
    combine_files().
  FILE HANDLE: Get rid of VAR_NAME_LEN limit on handle name.
  GET DATA /TYPE=TXT: Get rid of VAR_NAME_LEN limit on variable names.
  DATAFILE ATTRIBUTE, VARIABLE ATTRIBUTE: Eliminate VAR_NAME_LEN limit.
  MODIFY VARIABLES: Eliminate VAR_NAME_LEN limit on variable names.
  VECTOR: Eliminate VAR_NAME_LEN limit for variable names.
  DEBUG EVALUATE: Eliminate VAR_NAME_LEN limit.
  variable-parser: Rewrite parse_DATA_LIST_vars().
  variable-parser: Drop VAR_NAME_LEN restriction from
    var_set_lookup_var_idx().
  DESCRIPTIVES: Eliminate main restriction on Z-score variable name
    length.
  FLIP: Eliminate false dependency on VAR_NAME_LEN.
  REGRESSION: Eliminate restriction to VAR_NAME_LEN in reg_get_name().
  text-data-import-dialog: Eliminate VAR_NAME_LEN restriction.
  por-file-reader: Remove dependency on VAR_NAME_LEN.

 src/data/dictionary.c                      |   52 ++++----
 src/data/dictionary.h                      |    7 +-
 src/data/gnumeric-reader.c                 |   13 +--
 src/data/por-file-reader.c                 |   17 +--
 src/data/psql-reader.c                     |   13 +-
 src/data/variable.c                        |    9 +-
 src/data/vector.c                          |   21 ++--
 src/language/data-io/combine-files.c       |   37 +++--
 src/language/data-io/file-handle.q         |   25 ++--
 src/language/data-io/get-data.c            |   12 +-
 src/language/dictionary/attributes.c       |   48 +++++--
 src/language/dictionary/modify-variables.c |    8 +-
 src/language/dictionary/vector.c           |   12 +-
 src/language/expressions/evaluate.c        |   11 +-
 src/language/lexer/variable-parser.c       |  208 +++++++++++++++-------------
 src/language/stats/descriptives.c          |   77 ++++++-----
 src/language/stats/flip.c                  |    4 +-
 src/language/stats/regression.q            |   45 +++----
 src/ui/gui/text-data-import-dialog.c       |   49 ++++---
 19 files changed, 365 insertions(+), 303 deletions(-)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]