Re: [PATCH v3 3/5] config: make parsing stack struct independent from actual data source

2013-05-09 Thread Jeff King
On Thu, May 09, 2013 at 06:19:32PM +0200, Heiko Voigt wrote: > diff --git a/config.c b/config.c > index 046642b..2390458 100644 > --- a/config.c > +++ b/config.c > @@ -10,20 +10,41 @@ > #include "strbuf.h" > #include "quote.h" > > -typedef struct config_file { > - struct config_file *prev;

[PATCH v3 3/5] config: make parsing stack struct independent from actual data source

2013-05-09 Thread Heiko Voigt
To simplify adding other sources we extract all functions needed for parsing into a list of callbacks. We implement those callbacks for the current file parsing. A new source can implement its own set of callbacks. Instead of storing the concrete FILE pointer for parsing we store a void pointer. A