Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

expr.h File Reference

#include <stdio.h>
#include <stdbool.h>

Include dependency graph for expr.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define FILE_BUSY   0x0001
#define FILE_SCANNED   0x0002
#define FILE_PRINTED   0x0004
#define E_OR(dep1, dep2)   (((dep1)>(dep2))?(dep1):(dep2))
#define E_AND(dep1, dep2)   (((dep1)<(dep2))?(dep1):(dep2))
#define E_NOT(dep)   (2-(dep))
#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)
#define SYMBOL_YES   0x0001
#define SYMBOL_MOD   0x0002
#define SYMBOL_NO   0x0004
#define SYMBOL_CONST   0x0007
#define SYMBOL_CHECK   0x0008
#define SYMBOL_CHOICE   0x0010
#define SYMBOL_CHOICEVAL   0x0020
#define SYMBOL_PRINTED   0x0040
#define SYMBOL_VALID   0x0080
#define SYMBOL_OPTIONAL   0x0100
#define SYMBOL_WRITE   0x0200
#define SYMBOL_CHANGED   0x0400
#define SYMBOL_NEW   0x0800
#define SYMBOL_AUTO   0x1000
#define SYMBOL_CHECKED   0x2000
#define SYMBOL_CHECK_DONE   0x4000
#define SYMBOL_WARNED   0x8000
#define SYMBOL_MAXLENGTH   256
#define SYMBOL_HASHSIZE   257
#define SYMBOL_HASHMASK   0xff
#define for_all_properties(sym, st, tok)
#define for_all_defaults(sym, st)   for_all_properties(sym, st, P_DEFAULT)
#define for_all_choices(sym, st)   for_all_properties(sym, st, P_CHOICE)
#define for_all_prompts(sym, st)
#define MENU_CHANGED   0x0001
#define MENU_ROOT   0x0002

Typedefs

typedef enum tristate tristate

Enumerations

enum  tristate { no, mod, yes }
enum  expr_type {
  E_NONE, E_OR, E_AND, E_NOT,
  E_EQUAL, E_UNEQUAL, E_CHOICE, E_SYMBOL,
  E_RANGE
}
enum  symbol_type {
  S_UNKNOWN, S_BOOLEAN, S_TRISTATE, S_INT,
  S_HEX, S_STRING, S_OTHER
}
enum  prop_type {
  P_UNKNOWN, P_PROMPT, P_COMMENT, P_MENU,
  P_DEFAULT, P_CHOICE, P_SELECT, P_RANGE
}

Functions

filelookup_file (const char *name)
exprexpr_alloc_symbol (struct symbol *sym)
exprexpr_alloc_one (enum expr_type type, struct expr *ce)
exprexpr_alloc_two (enum expr_type type, struct expr *e1, struct expr *e2)
exprexpr_alloc_comp (enum expr_type type, struct symbol *s1, struct symbol *s2)
exprexpr_alloc_and (struct expr *e1, struct expr *e2)
exprexpr_alloc_or (struct expr *e1, struct expr *e2)
exprexpr_copy (struct expr *org)
void expr_free (struct expr *e)
int expr_eq (struct expr *e1, struct expr *e2)
void expr_eliminate_eq (struct expr **ep1, struct expr **ep2)
tristate expr_calc_value (struct expr *e)
exprexpr_eliminate_yn (struct expr *e)
exprexpr_trans_bool (struct expr *e)
exprexpr_eliminate_dups (struct expr *e)
exprexpr_transform (struct expr *e)
int expr_contains_symbol (struct expr *dep, struct symbol *sym)
bool expr_depends_symbol (struct expr *dep, struct symbol *sym)
exprexpr_extract_eq_and (struct expr **ep1, struct expr **ep2)
exprexpr_extract_eq_or (struct expr **ep1, struct expr **ep2)
void expr_extract_eq (enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2)
exprexpr_trans_compare (struct expr *e, enum expr_type type, struct symbol *sym)
void expr_fprint (struct expr *e, FILE *out)
void print_expr (int mask, struct expr *e, int prevtoken)
static int expr_is_yes (struct expr *e)
static int expr_is_no (struct expr *e)

Variables

filefile_list
filecurrent_file
symbol symbol_yes symbol_no symbol_mod
symbolmodules_sym
int cdebug


Define Documentation

#define E_AND dep1,
dep2   )     (((dep1)<(dep2))?(dep1):(dep2))
 

Definition at line 49 of file expr.h.

#define E_NOT dep   )     (2-(dep))
 

Definition at line 50 of file expr.h.

#define E_OR dep1,
dep2   )     (((dep1)>(dep2))?(dep1):(dep2))
 

Definition at line 48 of file expr.h.

#define FILE_BUSY   0x0001
 

Definition at line 26 of file expr.h.

#define FILE_PRINTED   0x0004
 

Definition at line 28 of file expr.h.

#define FILE_SCANNED   0x0002
 

Definition at line 27 of file expr.h.

#define for_all_choices sym,
st   )     for_all_properties(sym, st, P_CHOICE)
 

Definition at line 123 of file expr.h.

#define for_all_defaults sym,
st   )     for_all_properties(sym, st, P_DEFAULT)
 

Definition at line 122 of file expr.h.

#define for_all_prompts sym,
st   ) 
 

Value:

for (st = sym->prop; st; st = st->next) \
                if (st->text)

Definition at line 124 of file expr.h.

#define for_all_properties sym,
st,
tok   ) 
 

Value:

for (st = sym->prop; st; st = st->next) \
                if (st->type == (tok))

Definition at line 119 of file expr.h.

#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)
 

Definition at line 79 of file expr.h.

#define MENU_CHANGED   0x0001
 

Definition at line 142 of file expr.h.

Referenced by ConfigItem::testUpdateMenu().

#define MENU_ROOT   0x0002
 

Definition at line 143 of file expr.h.

Referenced by fixup_rootmenu(), and ConfigList::updateMenuList().

#define SYMBOL_AUTO   0x1000
 

Definition at line 94 of file expr.h.

#define SYMBOL_CHANGED   0x0400
 

Definition at line 92 of file expr.h.

#define SYMBOL_CHECK   0x0008
 

Definition at line 85 of file expr.h.

#define SYMBOL_CHECK_DONE   0x4000
 

Definition at line 96 of file expr.h.

#define SYMBOL_CHECKED   0x2000
 

Definition at line 95 of file expr.h.

#define SYMBOL_CHOICE   0x0010
 

Definition at line 86 of file expr.h.

Referenced by sym_is_choice().

#define SYMBOL_CHOICEVAL   0x0020
 

Definition at line 87 of file expr.h.

Referenced by sym_is_choice_value().

#define SYMBOL_CONST   0x0007
 

Definition at line 84 of file expr.h.

#define SYMBOL_HASHMASK   0xff
 

Definition at line 101 of file expr.h.

#define SYMBOL_HASHSIZE   257
 

Definition at line 100 of file expr.h.

#define SYMBOL_MAXLENGTH   256
 

Definition at line 99 of file expr.h.

#define SYMBOL_MOD   0x0002
 

Definition at line 82 of file expr.h.

#define SYMBOL_NEW   0x0800
 

Definition at line 93 of file expr.h.

Referenced by sym_has_value().

#define SYMBOL_NO   0x0004
 

Definition at line 83 of file expr.h.

#define SYMBOL_OPTIONAL   0x0100
 

Definition at line 90 of file expr.h.

Referenced by sym_is_optional().

#define SYMBOL_PRINTED   0x0040
 

Definition at line 88 of file expr.h.

#define SYMBOL_VALID   0x0080
 

Definition at line 89 of file expr.h.

#define SYMBOL_WARNED   0x8000
 

Definition at line 97 of file expr.h.

#define SYMBOL_WRITE   0x0200
 

Definition at line 91 of file expr.h.

#define SYMBOL_YES   0x0001
 

Definition at line 81 of file expr.h.


Typedef Documentation

typedef enum tristate tristate
 


Enumeration Type Documentation

enum expr_type
 

Enumeration values:
E_NONE 
E_OR 
E_AND 
E_NOT 
E_EQUAL 
E_UNEQUAL 
E_CHOICE 
E_SYMBOL 
E_RANGE 

Definition at line 34 of file expr.h.

enum prop_type
 

Enumeration values:
P_UNKNOWN 
P_PROMPT 
P_COMMENT 
P_MENU 
P_DEFAULT 
P_CHOICE 
P_SELECT 
P_RANGE 

Definition at line 103 of file expr.h.

enum symbol_type
 

Enumeration values:
S_UNKNOWN 
S_BOOLEAN 
S_TRISTATE 
S_INT 
S_HEX 
S_STRING 
S_OTHER 

Definition at line 62 of file expr.h.

enum tristate
 

Enumeration values:
no 
mod 
yes 

Definition at line 30 of file expr.h.


Function Documentation

struct expr* expr_alloc_and struct expr e1,
struct expr e2
 

struct expr* expr_alloc_comp enum expr_type  type,
struct symbol s1,
struct symbol s2
 

struct expr* expr_alloc_one enum expr_type  type,
struct expr ce
 

struct expr* expr_alloc_or struct expr e1,
struct expr e2
 

struct expr* expr_alloc_symbol struct symbol sym  ) 
 

struct expr* expr_alloc_two enum expr_type  type,
struct expr e1,
struct expr e2
 

tristate expr_calc_value struct expr e  ) 
 

int expr_contains_symbol struct expr dep,
struct symbol sym
 

struct expr* expr_copy struct expr org  ) 
 

bool expr_depends_symbol struct expr dep,
struct symbol sym
 

struct expr* expr_eliminate_dups struct expr e  ) 
 

void expr_eliminate_eq struct expr **  ep1,
struct expr **  ep2
 

struct expr* expr_eliminate_yn struct expr e  ) 
 

int expr_eq struct expr e1,
struct expr e2
 

void expr_extract_eq enum expr_type  type,
struct expr **  ep,
struct expr **  ep1,
struct expr **  ep2
 

struct expr* expr_extract_eq_and struct expr **  ep1,
struct expr **  ep2
 

struct expr* expr_extract_eq_or struct expr **  ep1,
struct expr **  ep2
 

void expr_fprint struct expr e,
FILE *  out
 

void expr_free struct expr e  ) 
 

static int expr_is_no struct expr e  )  [inline, static]
 

Definition at line 184 of file expr.h.

References E_SYMBOL, and expr::type.

static int expr_is_yes struct expr e  )  [inline, static]
 

Definition at line 179 of file expr.h.

References E_SYMBOL, and expr::type.

struct expr* expr_trans_bool struct expr e  ) 
 

struct expr* expr_trans_compare struct expr e,
enum expr_type  type,
struct symbol sym
 

struct expr* expr_transform struct expr e  ) 
 

struct file* lookup_file const char *  name  ) 
 

void print_expr int  mask,
struct expr e,
int  prevtoken
 


Variable Documentation

int cdebug
 

struct file* current_file
 

struct file* file_list
 

struct symbol* modules_sym
 

struct symbol symbol_yes symbol_no symbol_mod
 


Generated on Sat Nov 5 17:25:04 2005 for OPIE by  doxygen 1.4.2