[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch #6117] Implement clipboard for data sheet
From: |
Ben Pfaff |
Subject: |
[patch #6117] Implement clipboard for data sheet |
Date: |
Fri, 03 Aug 2007 21:54:26 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.1) Gecko/20061205 Iceweasel/2.0.0.1 (Debian-2.0.0.1+dfsg-1) |
Follow-up Comment #1, patch #6117 (project pspp):
>I wanted to use the case_map from get.c, so I've moved it from
>get.c into its own file into src/data
Great, I've been planning to split up get.c anyhow.
case-map.c has a stray #include <stdio.h> at the very top--please move it
below #include <config.h>.
I like to maintain the convention that a module's exported symbols all start
with the module's name. So, if you don't mind, could you rename the functions
that are prototyped in case-map.h to case_map_...?
Do you think that it is useful to export dump_case_map?
I think that case_map_insert should write -1 into the newly allocated map
elements.
>However I found it was more convenient to directly set the map
>entries than use the {start,finish}_case_map functions. So I added
>a function to allow that.
I wonder whether this is really a flaw in dict_clone. Perhaps it should also
clone variable case indexes. If it did, then you could just use
start_case_map...finish_case_map.
Actually I think there's a flaw in dict_clone even if we accept the current
definition: if we are potentially rearranging case_indexes, then there's no
need to copy next_value_idx from the old dictionary to the new one and by
doing so we potentially waste space.
>2. I had to remove an assertion from casereader.c, which I'm
>pretty sure is wrong, because it overlooks the possibility of a
>translator chaning the size of the case.
I don't think I agree--shouldn't the case translator return a case of the
size that the reader expects to get? Certainly bad things will happen if it
returns a case that is smaller than expected.
Maybe you can give an example.
>3. Whenever I've been working on pspp recently I seem to need a
>debugging function to dump a dictionary's variables and indices
>so I suggest we leave it in dictionary.c permanently.
OK.
Can you remove the #include <config.h> from clipboard.h? <config.h> should
get included by every .c file as its first non-comment line, so there should
be no need for it in .h files.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?6117>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [patch #6117] Implement clipboard for data sheet,
Ben Pfaff <=