[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cleaned up VLS support
From: |
Ben Pfaff |
Subject: |
Re: cleaned up VLS support |
Date: |
Sat, 06 May 2006 19:38:11 -0700 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) |
John Darrington <address@hidden> writes:
> On Sat, May 06, 2006 at 07:30:50PM -0700, Ben Pfaff wrote:
> I happened to be looking at my pspp-cvs folder just when your
> commit happened. Thanks for reworking that. It looks much
> better. I do have a couple of additional comments:
>
> * Now width_to_bytes() is only used in the
> sys-file-reader/writer, could it be moved into one of
> those files (or create a new one for common code)?
>
> Yes. I did consider that. Perhaps declare the in sfm-private.h ?
Sure.
> * compare_var_shortnames() and hash_var_shortname() are
> complex, but I don't understand why they can't just
> call, respectively, strcmp() and hsh_hash_string(). Is
> something tricky going on?
>
> That's how they were originally, and valgrind showed up some read
> errors. The problem is, that shortnames are not necessarily null
> terminated, which complicates things.
Well, I'd think that we should just make sure that they get null
terminated then. There's room for a null terminator in the
short_name[] array, so we should just make sure that it gets
stored in there. That'll probably be a lot less tricky looking.
--
Ben Pfaff
email: address@hidden
web: http://benpfaff.org