• 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
arch-bare-i386 Loading commit data...
arch-bare-x86-64 Loading commit data...
arch-unix Loading commit data...
arch-wrpc Loading commit data...
arch-wrs Loading commit data...
configs Loading commit data...
doc Loading commit data...
etc Loading commit data...
include/ppsi Loading commit data...
lib Loading commit data...
lib-bare Loading commit data...
pp_printf Loading commit data...
proto-ext-whiterabbit Loading commit data...
proto-standard Loading commit data...
scripts Loading commit data...
time-bare Loading commit data...
time-unix Loading commit data...
time-wrpc Loading commit data...
time-wrs Loading commit data...
tools Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
COPYING.LIB Loading commit data...
Kconfig Loading commit data...
MAKEALL Loading commit data...
Makefile Loading commit data...
Makefile.kconfig Loading commit data...
diag.c Loading commit data...
fsm.c Loading commit data...