[Top][All Lists]

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

PSPP-BUG: [patch #5209] Proposed casefile changes

From: Ben Pfaff
Subject: PSPP-BUG: [patch #5209] Proposed casefile changes
Date: Tue, 11 Jul 2006 18:55:36 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20060406 Firefox/ (Debian-1.5.dfsg+

Follow-up Comment #4, patch #5209 (project pspp):

I haven't read the code yet, but here are my thoughts on the questions you
bring up.

> 1. I'm wondering if flexifile.[ch] shouldn't be moved to src/ui

Sounds reasonable.

> 2. I'm trying to think of a better way of mutating a value in a casefile.
> Currently, I'm using case_data(&cc, fv) and casting away the const in the
> return value.

Presumably you'll need functions for deleting and inserting cases.  So you
could implement this as read case, modify (copy of) case, delete case, insert
modified copy.  Or delete case, insert case could be written as a single
replace case function.

> 3. In psppire-case-file.c, I'm making a pass through the fastfile returned
> from sort_execute, in order to get a flexifile. This pass would be
> unnecessary if there was some way of telling sort_execute what sort of
> casefile to return the result.

I'm willing to modify the sorting code to do that.  It looks like there are
at least two reasonable ways to do it: sort_execute could take a function
that creates a casefile as an argument (a "factory function"), or it could
take a pre-created casefile of the desired type as an argument.  The former
is probably more general.

> This patch also fixes a lot of gui code to use the flexifile. The
> gui is quite stable and functional; still a few bugs but I think it's a
> step forward.

Sounds good.

I'll read through the code a little later and get back some comments.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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