help-gengetopt
[Top][All Lists]
Advanced

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

Re: [help-gengetopt] reducing generated code size


From: Lorenzo Bettini
Subject: Re: [help-gengetopt] reducing generated code size
Date: Wed, 29 Mar 2006 08:57:49 +0200
User-agent: Mail/News 1.5 (X11/20060321)

Dave Swegen wrote:
> Correct me if I'm wrong, but it looks like the code generated could be
> reduced quite substantially in size by using a generic linked list
> struct, rather than one for each option.
> 
> So instead of 
> 
> struct timer_list
> { 
>   int timer_arg;
>   char *timer_orig;
>   struct timer_list * next;
> };
> 
> you could simply do 
> 
> struct list
> {
>    int arg;
>    char *orig;
>    struct list *next;
> }
> 
> Or is there some subtle reason I have missed for doing it this way?

actually you're pretty right!  However I'd still need a different list
for each type (one for int, one for double, etc.).

I'll work on this issue

thanks
        Lorenzo

-- 
+-----------------------------------------------------+
|  Lorenzo Bettini          ICQ# lbetto, 16080134     |
|  PhD in Computer Science                            |
|  Dip. Sistemi e Informatica, Univ. di Firenze       |
|  Florence - Italy        (GNU/Linux User # 158233)  |
|  Home Page        : http://www.lorenzobettini.it    |
|  http://music.dsi.unifi.it         XKlaim language  |
|  http://www.purplesucker.com Deep Purple Cover Band |
|  http://www.gnu.org/software/src-highlite           |
|  http://www.gnu.org/software/gengetopt              |
|  http://www.lorenzobettini.it/software/gengen       |
|  http://www.lorenzobettini.it/software/doublecpp    |
+-----------------------------------------------------+





reply via email to

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