[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [VAR_NAME_LEN 00/17] Eliminate uses of VAR_NAME_LEN
From: |
Ben Pfaff |
Subject: |
Re: [VAR_NAME_LEN 00/17] Eliminate uses of VAR_NAME_LEN |
Date: |
Fri, 11 Feb 2011 21:34:58 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
I spotted one new use of sprintf() in these patches, but this
uses INT_BUFSIZE_BOUND to calculate the required buffer size. I
asked about this on bug-gettext and bug-gnulib and got some
replies saying that it was OK even with locales:
http://permalink.gmane.org/gmane.comp.gnu.utils.bugs/17357
http://permalink.gmane.org/gmane.comp.gnu.utils.bugs/17359
So I'm going to leave that one as-is.
Thank you for taking a look.
John Darrington <address@hidden> writes:
> There are a number of places where sprintf is used. Using snprintf instead
> might be safer. Otherwise I don't see any problem with these patches.
> J'
> On Sat, Feb 05, 2011 at 01:25:42PM -0800, Ben Pfaff wrote:
> 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(-)
>
>
> _______________________________________________
> pspp-dev mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/pspp-dev
--
Ben Pfaff
http://benpfaff.org
- [VAR_NAME_LEN 17/17] por-file-reader: Remove dependency on VAR_NAME_LEN., (continued)
- [VAR_NAME_LEN 17/17] por-file-reader: Remove dependency on VAR_NAME_LEN., Ben Pfaff, 2011/02/05
- [VAR_NAME_LEN 02/17] variable: Remove VAR_NAME_LEN limit for internal representation of name., Ben Pfaff, 2011/02/05
- [VAR_NAME_LEN 10/17] DEBUG EVALUATE: Eliminate VAR_NAME_LEN limit., Ben Pfaff, 2011/02/05
- [VAR_NAME_LEN 04/17] combine-files: Eliminate VAR_NAME_LEN restriction from combine_files()., Ben Pfaff, 2011/02/05
- [VAR_NAME_LEN 15/17] REGRESSION: Eliminate restriction to VAR_NAME_LEN in reg_get_name()., Ben Pfaff, 2011/02/05
- [VAR_NAME_LEN 13/17] DESCRIPTIVES: Eliminate main restriction on Z-score variable name length., Ben Pfaff, 2011/02/05
- [VAR_NAME_LEN 16/17] text-data-import-dialog: Eliminate VAR_NAME_LEN restriction., Ben Pfaff, 2011/02/05
- [VAR_NAME_LEN 11/17] variable-parser: Rewrite parse_DATA_LIST_vars()., Ben Pfaff, 2011/02/05
- [VAR_NAME_LEN 12/17] variable-parser: Drop VAR_NAME_LEN restriction from var_set_lookup_var_idx()., Ben Pfaff, 2011/02/05
- Re: [VAR_NAME_LEN 00/17] Eliminate uses of VAR_NAME_LEN, John Darrington, 2011/02/08
- Re: [VAR_NAME_LEN 00/17] Eliminate uses of VAR_NAME_LEN,
Ben Pfaff <=