help-gengetopt
[Top][All Lists]
Advanced

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

[help-gengetopt] reducing generated code size


From: Dave Swegen
Subject: [help-gengetopt] reducing generated code size
Date: Tue, 28 Mar 2006 17:21:02 +0100

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?

By doing it this way it would remove ~1500 lines of generated code :)

Dave


-- 
David Swegen
Consultant                      GPS, Red Hat Europe
m: +44 7734 909630              w: people.redhat.com/dswegen
-----------------------------------------------------------





reply via email to

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