From: Giovanni C. <val...@li...> - 2001-02-09 14:10:45
Attachments:
filist.h
|
I'm quite not satisfied by the way the info about the archive content is manipulated (a GList holding a fileinfo struct). I was thinking to replace it with a custom list (a FiList) derived from the standard GList. I have written some code for you to review. Please note that I haven't even tried to compile it. What do you think? -- Max, could you please feed my cat? Heisenberg says he can't. Bye, Schroedinger |
From: Hongli L. <ho...@te...> - 2001-02-09 14:41:49
|
On Fri, 09 Feb 2001 15:11:53 Giovanni Corriga wrote: > I'm quite not satisfied by the way the info about the archive content is > manipulated (a GList holding a fileinfo struct). I was thinking to > replace it with a custom list (a FiList) derived from the standard > GList. > I have written some code for you to review. Please note that I haven't > even tried to compile it. > > What do you think? I don't see why it is neccesary. |
From: Giovanni C. <val...@li...> - 2001-02-09 18:23:31
|
On 09 Feb 2001 15:42:05 +0100, Hongli Lai wrote: > On Fri, 09 Feb 2001 15:11:53 Giovanni Corriga wrote: > > I'm quite not satisfied by the way the info about the archive content is > > manipulated (a GList holding a fileinfo struct). I was thinking to > > replace it with a custom list (a FiList) derived from the standard > > GList. > > I have written some code for you to review. Please note that I haven't > > even tried to compile it. > > > > What do you think? > > I don't see why it is neccesary. > Just good OOP. It is not really necessary - just an itch that needs to be scratched. ;-) -- Max, could you please feed my cat? Heisenberg says he can't. Bye, Schroedinger |
From: Simo S. <sim...@ti...> - 2001-02-10 01:24:20
|
Giovanni Corriga wrote: > > On 09 Feb 2001 15:42:05 +0100, Hongli Lai wrote: > > On Fri, 09 Feb 2001 15:11:53 Giovanni Corriga wrote: > > > I'm quite not satisfied by the way the info about the archive content is > > > manipulated (a GList holding a fileinfo struct). I was thinking to > > > replace it with a custom list (a FiList) derived from the standard > > > GList. > > > I have written some code for you to review. Please note that I haven't > > > even tried to compile it. > > > > > > What do you think? > > > > I don't see why it is neccesary. > > > > Just good OOP. It is not really necessary - just an itch that needs to > be scratched. ;-) > I've not seen any difference or advancement against a standard GList, what's the point? You may add a function to misc if you want other manipulation function above the standard provided one. Can you explain exactly where your implementation has it's strenght and why it so better than standard Glist (Isn't Filist a simple typedef? I've not seen a different structure) -- sim...@ti... http://www.geocities.com/SiliconValley/9757 |
From: Giovanni C. <val...@li...> - 2001-02-10 09:52:08
|
On 10 Feb 2001 02:23:14 +0100, Simo Sorce wrote: > Giovanni Corriga wrote: > > > > On 09 Feb 2001 15:42:05 +0100, Hongli Lai wrote: > > > On Fri, 09 Feb 2001 15:11:53 Giovanni Corriga wrote: > > > > I'm quite not satisfied by the way the info about the archive content is > > > > manipulated (a GList holding a fileinfo struct). I was thinking to > > > > replace it with a custom list (a FiList) derived from the standard > > > > GList. > > > > I have written some code for you to review. Please note that I haven't > > > > even tried to compile it. > > > > > > > > What do you think? > > > > > > I don't see why it is neccesary. > > > > > > > Just good OOP. It is not really necessary - just an itch that needs to > > be scratched. ;-) > > > > I've not seen any difference or advancement against a standard GList, > what's the point? > You may add a function to misc if you want other manipulation function > above the standard provided one. > Can you explain exactly where your implementation has it's strenght and > why it so better than standard Glist (Isn't Filist a simple typedef? > I've not seen a different structure) > As I said, it is not necessary. We can go on using the fileinfo struct. I simply thought that filist_get_size(fi); was easier to understand than (((fileinfo *)(list->data))->size); It was just a proposal, but since it seems you don't like it, I will drop it. -- Max, could you please feed my cat? Heisenberg says he can't. Bye, Schroedinger |
From: Simo S. <sim...@ti...> - 2001-02-10 11:10:37
|
Giovanni Corriga wrote: > > On 10 Feb 2001 02:23:14 +0100, Simo Sorce wrote: > > Giovanni Corriga wrote: > > > > > > On 09 Feb 2001 15:42:05 +0100, Hongli Lai wrote: > > > > On Fri, 09 Feb 2001 15:11:53 Giovanni Corriga wrote: > > > > > I'm quite not satisfied by the way the info about the archive content is > > > > > manipulated (a GList holding a fileinfo struct). I was thinking to > > > > > replace it with a custom list (a FiList) derived from the standard > > > > > GList. > > > > > I have written some code for you to review. Please note that I haven't > > > > > even tried to compile it. > > > > > > > > > > What do you think? > > > > > > > > I don't see why it is neccesary. > > > > > > > > > > Just good OOP. It is not really necessary - just an itch that needs to > > > be scratched. ;-) > > > > > > > I've not seen any difference or advancement against a standard GList, > > what's the point? > > You may add a function to misc if you want other manipulation function > > above the standard provided one. > > Can you explain exactly where your implementation has it's strenght and > > why it so better than standard Glist (Isn't Filist a simple typedef? > > I've not seen a different structure) > > > > As I said, it is not necessary. We can go on using the fileinfo struct. > I simply thought that > > filist_get_size(fi); > > was easier to understand than > > (((fileinfo *)(list->data))->size); > > It was just a proposal, but since it seems you don't like it, I will > drop it. > It's not that we do not like it, is that it is not necessary to change the name of a structure to add functions. Simply do this: #define g_list_get_data_size(list) (((fileinfo *)(list->data))->size); the GList is preserved and a more clear way to get the size is addressed the same way. ;) Feel free to add this kind of #define if they result in cleaner and more readable code. Bye, Simo. -- sim...@ti... http://www.geocities.com/SiliconValley/9757 |