base/config/kconfig/lkc.h

Go to the documentation of this file.
00001 /* 00002 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> 00003 * Released under the terms of the GNU GPL v2.0. 00004 */ 00005 00006 #ifndef LKC_H 00007 #define LKC_H 00008 00009 #include "expr.h" 00010 00011 #ifdef __cplusplus 00012 extern "C" { 00013 #endif 00014 00015 #ifdef LKC_DIRECT_LINK 00016 #define P(name,type,arg) extern type name arg 00017 #else 00018 #include "lkc_defs.h" 00019 #define P(name,type,arg) extern type (*name ## _p) arg 00020 #endif 00021 #include "lkc_proto.h" 00022 #undef P 00023 00024 #define SRCTREE "srctree" 00025 00026 int zconfparse(void); 00027 void zconfdump(FILE *out); 00028 00029 extern int zconfdebug; 00030 void zconf_starthelp(void); 00031 FILE *zconf_fopen(const char *name); 00032 void zconf_initscan(const char *name); 00033 void zconf_nextfile(const char *name); 00034 int zconf_lineno(void); 00035 char *zconf_curname(void); 00036 00037 /* confdata.c */ 00038 extern const char conf_def_filename[]; 00039 extern char conf_filename[]; 00040 00041 char *conf_get_default_confname(void); 00042 00043 /* kconfig_load.c */ 00044 void kconfig_load(void); 00045 00046 /* menu.c */ 00047 void menu_init(void); 00048 void menu_add_menu(void); 00049 void menu_end_menu(void); 00050 void menu_add_entry(struct symbol *sym); 00051 void menu_end_entry(void); 00052 void menu_add_dep(struct expr *dep); 00053 struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep); 00054 void menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep); 00055 void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep); 00056 void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep); 00057 void menu_finalize(struct menu *parent); 00058 void menu_set_type(int type); 00059 struct file *file_lookup(const char *name); 00060 int file_write_dep(const char *name); 00061 00062 extern struct menu *current_entry; 00063 extern struct menu *current_menu; 00064 00065 /* symbol.c */ 00066 void sym_init(void); 00067 void sym_clear_all_valid(void); 00068 void sym_set_changed(struct symbol *sym); 00069 struct symbol *sym_check_deps(struct symbol *sym); 00070 struct property *prop_alloc(enum prop_type type, struct symbol *sym); 00071 struct symbol *prop_get_symbol(struct property *prop); 00072 00073 static inline tristate sym_get_tristate_value(struct symbol *sym) 00074 { 00075 return sym->curr.tri; 00076 } 00077 00078 00079 static inline struct symbol *sym_get_choice_value(struct symbol *sym) 00080 { 00081 return (struct symbol *)sym->curr.val; 00082 } 00083 00084 static inline bool sym_set_choice_value(struct symbol *ch, struct symbol *chval) 00085 { 00086 return sym_set_tristate_value(chval, yes); 00087 } 00088 00089 static inline bool sym_is_choice(struct symbol *sym) 00090 { 00091 return sym->flags & SYMBOL_CHOICE ? true : false; 00092 } 00093 00094 static inline bool sym_is_choice_value(struct symbol *sym) 00095 { 00096 return sym->flags & SYMBOL_CHOICEVAL ? true : false; 00097 } 00098 00099 static inline bool sym_is_optional(struct symbol *sym) 00100 { 00101 return sym->flags & SYMBOL_OPTIONAL ? true : false; 00102 } 00103 00104 static inline bool sym_has_value(struct symbol *sym) 00105 { 00106 return sym->flags & SYMBOL_NEW ? false : true; 00107 } 00108 00109 #ifdef __cplusplus 00110 } 00111 #endif 00112 00113 #endif /* LKC_H */

Generated on Thu Nov 20 11:49:48 2008 for RTAI API by doxygen 1.3.8