kconfig/expr.h
changeset 3056 df33992f9614
parent 1236 aba08231fe27
     1.1 --- a/kconfig/expr.h	Fri Mar 06 12:35:58 2009 +0000
     1.2 +++ b/kconfig/expr.h	Fri Sep 21 16:26:10 2012 +0200
     1.3 @@ -18,14 +18,10 @@
     1.4  struct file {
     1.5  	struct file *next;
     1.6  	struct file *parent;
     1.7 -	char *name;
     1.8 +	const char *name;
     1.9  	int lineno;
    1.10 -	int flags;
    1.11  };
    1.12  
    1.13 -#define FILE_BUSY		0x0001
    1.14 -#define FILE_SCANNED		0x0002
    1.15 -
    1.16  typedef enum tristate {
    1.17  	no, mod, yes
    1.18  } tristate;
    1.19 @@ -83,10 +79,11 @@
    1.20  	tristate visible;
    1.21  	int flags;
    1.22  	struct property *prop;
    1.23 +	struct expr_value dir_dep;
    1.24  	struct expr_value rev_dep;
    1.25  };
    1.26  
    1.27 -#define for_all_symbols(i, sym) for (i = 0; i < 257; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER)
    1.28 +#define for_all_symbols(i, sym) for (i = 0; i < SYMBOL_HASHSIZE; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER)
    1.29  
    1.30  #define SYMBOL_CONST      0x0001  /* symbol is const */
    1.31  #define SYMBOL_CHECK      0x0008  /* used during dependency checking */
    1.32 @@ -108,8 +105,7 @@
    1.33  #define SYMBOL_DEF4       0x80000  /* symbol.def[S_DEF_4] is valid */
    1.34  
    1.35  #define SYMBOL_MAXLENGTH	256
    1.36 -#define SYMBOL_HASHSIZE		257
    1.37 -#define SYMBOL_HASHMASK		0xff
    1.38 +#define SYMBOL_HASHSIZE		9973
    1.39  
    1.40  /* A property represent the config options that can be associated
    1.41   * with a config "symbol".
    1.42 @@ -132,6 +128,7 @@
    1.43  	P_SELECT,   /* select BAR */
    1.44  	P_RANGE,    /* range 7..100 (for a symbol) */
    1.45  	P_ENV,      /* value from environment variable */
    1.46 +	P_SYMBOL,   /* where a symbol is defined */
    1.47  };
    1.48  
    1.49  struct property {
    1.50 @@ -163,6 +160,7 @@
    1.51  	struct menu *list;
    1.52  	struct symbol *sym;
    1.53  	struct property *prompt;
    1.54 +	struct expr *visibility;
    1.55  	struct expr *dep;
    1.56  	unsigned int flags;
    1.57  	char *help;
    1.58 @@ -190,7 +188,7 @@
    1.59  struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2);
    1.60  struct expr *expr_alloc_and(struct expr *e1, struct expr *e2);
    1.61  struct expr *expr_alloc_or(struct expr *e1, struct expr *e2);
    1.62 -struct expr *expr_copy(struct expr *org);
    1.63 +struct expr *expr_copy(const struct expr *org);
    1.64  void expr_free(struct expr *e);
    1.65  int expr_eq(struct expr *e1, struct expr *e2);
    1.66  void expr_eliminate_eq(struct expr **ep1, struct expr **ep2);
    1.67 @@ -205,6 +203,7 @@
    1.68  struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2);
    1.69  void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2);
    1.70  struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym);
    1.71 +struct expr *expr_simplify_unmet_dep(struct expr *e1, struct expr *e2);
    1.72  
    1.73  void expr_fprint(struct expr *e, FILE *out);
    1.74  struct gstr; /* forward */