• Pietro Fezzardi's avatar
    config: removed global variables current_ppg and current_ppi · 899ab83e
    Pietro Fezzardi authored
    New prototype for cfg_handler to remove the global variable *current_ppg.
    The current ppg is now passed as argument to the cfg handler as follows:
    
    typedef int (*cfg_handler)(int lineno, struct pp_globals *ppg,
    				union pp_cfg_arg *arg);
    
    New variable added in include/ppsi/pp-instance.h:
    
    struct pp_globals_cfg {
    	int cfg_items;
    	int cur_ppi_n;
    };
    
    Now struct pp_globals has a new field:
    
    struct pp_globals {
    	[...]
    	struct pp_globals_cfg cfg;
    	[...]
    };
    
    The field cfg_items has been moved from pp_globals
    to pp_globals_cfg. The configuration routine uses the field
    cur_ppi_n inside pp_globals_cfg to store the current ppi being
    configured. So neither the global variable *current_ppi is needed
    anymore.
    
    The helper inline function CUR_PPI has been defined to make
    accesses to current ppi more readable.
    899ab83e
Name
Last commit
Last update
..
cmdline.c Loading commit data...
conf.c Loading commit data...
div64.c Loading commit data...
dump-funcs.c Loading commit data...
libc-functions.c Loading commit data...
network_types.h Loading commit data...