root/tools/stubs_load.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 
   2 // Functions for loading stubs and other source files, storing and searching for values contained within.
   3 
   4 #define TYPE_NHSTUB 1
   5 #define TYPE_DEF    2
   6 #define TYPE_IGNORE 3
   7 #define TYPE_CONST  4
   8 
   9 // Structure for storing a value from a stubs (or other) file
  10 typedef struct _osig
  11 {
  12     char        nm[100];    // Name
  13     uint32_t    val;        // Value
  14         char            sval[100];  // String version of value
  15     int         type;       // Type of reference (NHSTUB, DEF)
  16     int         is_comment; // Used if loading values in comments as well as normal
  17     int         pct;        // Used for processing modemap entries
  18     struct _osig *nxt;      // next list entry
  19 } osig;
  20 
  21 // struct for storing an instance of the loaded values for a specific firmware
  22 typedef struct _stubs
  23 {
  24     osig    *stubs;
  25     osig    *stubs_min;
  26     osig    *modemap;
  27     osig    *makevals;
  28     osig    *propcases;
  29 
  30     int     min_focus_len;
  31     int     max_focus_len;
  32     int     propset;
  33 } stub_values;
  34 
  35 stub_values* new_stub_values();
  36 
  37 // Functions for accessing saved values
  38 osig* find_sig(osig* p, const char *nm);
  39 osig* find_sig_val(osig* p, uint32_t val);
  40 osig* find_match(osig *p, const char *nm, uint32_t val);
  41 osig* find_sig_val_by_type(osig* p, uint32_t val, int typ);
  42 
  43 // Functions for loading files
  44 void load_funcs(stub_values *sv, char *name);
  45 void load_stubs(stub_values *sv, char *name, int exclude_comments);
  46 void load_stubs_min(stub_values *sv);
  47 void load_modemap(stub_values *sv);
  48 void load_platform(stub_values *sv);
  49 void load_propcases(stub_values *sv, char *name);
  50 void load_makefile(stub_values *sv);

/* [<][>][^][v][top][bottom][index][help] */