本文整理汇总了C++中show_helptext函数的典型用法代码示例。如果您正苦于以下问题:C++ show_helptext函数的具体用法?C++ show_helptext怎么用?C++ show_helptext使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了show_helptext函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: conf_save
static void conf_save(void)
{
int stat;
while (1) {
cprint_init();
cprint("--inputbox");
cprint(save_config_text);
cprint("11");
cprint("55");
cprint("%s", filename);
stat = exec_conf();
switch(stat) {
case 0:
if (!input_buf[0])
return;
if (!conf_write(input_buf))
return;
show_textbox(NULL, _("Can't create file! Probably a nonexistent directory."), 5, 60);
break;
case 1:
show_helptext(_("Save Alternate Configuration"), save_config_help);
break;
case 255:
return;
}
}
}
开发者ID:EyeSee360,项目名称:swupdate,代码行数:28,代码来源:mconf.c
示例2: conf_load
static void conf_load(void)
{
while (1) {
int res;
dialog_clear();
res = dialog_inputbox(NULL, load_config_text,
11, 55, filename);
switch(res) {
case 0:
if (!dialog_input_result[0])
return;
if (!conf_read(dialog_input_result)) {
set_config_filename(dialog_input_result);
return;
}
show_textbox(NULL, _("File does not exist!"), 5, 38);
break;
case 1:
show_helptext(_("Load Alternate Configuration"), load_config_help);
break;
case KEY_ESC:
return;
}
}
}
开发者ID:BackupTheBerlios,项目名称:openslx-svn,代码行数:26,代码来源:mconf.c
示例3: conf_save
static void conf_save(void)
{
while (1) {
int res;
dialog_clear();
res = dialog_inputbox(NULL, save_config_text,
11, 55, filename);
switch(res) {
case 0:
if (!dialog_input_result[0])
return;
if (!conf_write(dialog_input_result)) {
set_config_filename(dialog_input_result);
return;
}
show_textbox(NULL, _("Can't create file! Probably a nonexistent directory."), 5, 60);
break;
case 1:
show_helptext(_("Save Alternate Configuration"), save_config_help);
break;
case KEY_ESC:
return;
}
}
}
开发者ID:BackupTheBerlios,项目名称:openslx-svn,代码行数:25,代码来源:mconf.c
示例4: search_conf
static void search_conf(void)
{
struct symbol **sym_arr;
struct gstr res;
char *dialog_input;
int dres;
again:
dialog_clear();
dres = dialog_inputbox(_("Search Configuration Parameter"),
_("Enter " CONFIG_ " (sub)string to search for "
"(with or without \"" CONFIG_ "\")"),
10, 75, "");
switch (dres) {
case 0:
break;
case 1:
show_helptext(_("Search Configuration"), search_help);
goto again;
default:
return;
}
/* strip the prefix if necessary */
dialog_input = dialog_input_result;
if (strncasecmp(dialog_input_result, CONFIG_, strlen(CONFIG_)) == 0)
dialog_input += strlen(CONFIG_);
sym_arr = sym_re_search(dialog_input);
res = get_relations_str(sym_arr);
free(sym_arr);
show_textbox(_("Search Results"), str_get(&res), 0, 0);
str_free(&res);
}
开发者ID:AIdrifter,项目名称:f9-kernel,代码行数:33,代码来源:mconf.c
示例5: search_conf
static void search_conf(void)
{
struct symbol **sym_arr;
struct gstr res;
int dres;
again:
dialog_clear();
dres = dialog_inputbox(_("Search Configuration Parameter"),
_("Enter CONFIG_ (sub)string to search for (omit CONFIG_)"),
10, 75, "");
switch (dres) {
case 0:
break;
case 1:
show_helptext(_("Search Configuration"), search_help);
goto again;
default:
return;
}
sym_arr = sym_re_search(dialog_input_result);
res = get_relations_str(sym_arr);
free(sym_arr);
show_textbox(_("Search Results"), str_get(&res), 0, 0);
str_free(&res);
}
开发者ID:BackupTheBerlios,项目名称:openslx-svn,代码行数:26,代码来源:mconf.c
示例6: conf_load
static void conf_load(void)
{
int stat;
while (1) {
cprint_init();
cprint("--inputbox");
cprint(load_config_text);
cprint("11");
cprint("55");
cprint("%s", filename);
stat = exec_conf();
switch(stat) {
case 0:
if (!input_buf[0])
return;
if (!conf_read(input_buf))
return;
show_textbox(NULL, _("File does not exist!"), 5, 38);
break;
case 1:
show_helptext(_("Load Alternate Configuration"), load_config_help);
break;
case 255:
return;
}
}
}
开发者ID:EyeSee360,项目名称:swupdate,代码行数:28,代码来源:mconf.c
示例7: search_conf
static void search_conf(void)
{
struct symbol **sym_arr;
int stat;
struct gstr res;
again:
cprint_init();
cprint("--title");
cprint(_("Search Configuration Parameter"));
cprint("--inputbox");
cprint(_("Enter CONFIG_ (sub)string to search for (omit CONFIG_)"));
cprint("10");
cprint("75");
cprint("");
stat = exec_conf();
if (stat < 0)
goto again;
switch (stat) {
case 0:
break;
case 1:
show_helptext(_("Search Configuration"), search_help);
goto again;
default:
return;
}
sym_arr = sym_re_search(input_buf);
res = get_relations_str(sym_arr);
free(sym_arr);
show_textbox(_("Search Results"), str_get(&res), 0, 0);
str_free(&res);
}
开发者ID:EyeSee360,项目名称:swupdate,代码行数:34,代码来源:mconf.c
示例8: show_help
static void show_help(struct menu *menu)
{
const char *help;
char *helptext;
struct symbol *sym = menu->sym;
help = sym->help;
if (!help)
help = nohelp_text;
if (sym->name) {
helptext = malloc(strlen(sym->name) + strlen(help) + 16);
sprintf(helptext, "CONFIG_%s:\n\n%s", sym->name, help);
show_helptext(menu_get_prompt(menu), helptext);
free(helptext);
} else
show_helptext(menu_get_prompt(menu), help);
}
开发者ID:FelipeFernandes1988,项目名称:Alice-1121-Modem,代码行数:17,代码来源:mconf.c
示例9: show_help
static void show_help(struct menu *menu)
{
struct gstr help = str_new();
menu_get_ext_help(menu, &help);
show_helptext(_(menu_get_prompt(menu)), str_get(&help));
str_free(&help);
}
开发者ID:bradomyn,项目名称:wrpc-sw-p2p,代码行数:9,代码来源:mconf.c
示例10: show_help
static void show_help(struct menu *menu)
{
struct gstr help = str_new();
help.max_width = getmaxx(stdscr) - 10;
menu_get_ext_help(menu, &help);
show_helptext(_(menu_get_prompt(menu)), str_get(&help));
str_free(&help);
}
开发者ID:Christopher83,项目名称:linaro_crosstool-ng,代码行数:10,代码来源:mconf.c
示例11: show_help
static void show_help(struct menu *menu)
{
struct gstr help = str_new();
struct symbol *sym = menu->sym;
if (sym->help)
{
if (sym->name) {
str_printf(&help, "%s:\n\n", sym->name);
str_append(&help, sym->help);
str_append(&help, "\n");
}
} else {
str_append(&help, nohelp_text);
}
get_symbol_str(&help, sym);
show_helptext(menu_get_prompt(menu), str_get(&help));
str_free(&help);
}
开发者ID:0919061,项目名称:PX4NuttX,代码行数:19,代码来源:mconf.c
示例12: conf_save
static void conf_save(void)
{
while (1) {
switch (dialog_inputbox(NULL, save_config_text, 11, 55,
filename)) {
case 0:
if (!dialog_input_result[0])
return;
if (!conf_write(dialog_input_result))
return;
show_textbox(NULL, "Can't create file! Probably a nonexistent directory.", 5, 60);
break;
case 1:
show_helptext("Save Alternate Configuration", save_config_help);
break;
case 255:
return;
}
}
}
开发者ID:0919061,项目名称:PX4NuttX,代码行数:20,代码来源:mconf.c
示例13: conf_load
static void conf_load(void)
{
while (1) {
switch (dialog_inputbox(NULL, load_config_text, 11, 55,
filename)) {
case 0:
if (!dialog_input_result[0])
return;
if (!conf_read(dialog_input_result))
return;
show_textbox(NULL, "File does not exist!", 5, 38);
break;
case 1:
show_helptext("Load Alternate Configuration", load_config_help);
break;
case 255:
return;
}
}
}
开发者ID:0919061,项目名称:PX4NuttX,代码行数:20,代码来源:mconf.c
示例14: search_conf
static void search_conf(void)
{
struct symbol **sym_arr;
struct gstr res;
again:
switch (dialog_inputbox("Search Configuration Parameter",
"Enter Keyword", 10, 75,
NULL)) {
case 0:
break;
case 1:
show_helptext("Search Configuration", search_help);
goto again;
default:
return;
}
sym_arr = sym_re_search(dialog_input_result);
res = get_relations_str(sym_arr);
free(sym_arr);
show_textbox("Search Results", str_get(&res), 0, 0);
str_free(&res);
}
开发者ID:0919061,项目名称:PX4NuttX,代码行数:24,代码来源:mconf.c
示例15: conf
static void conf(struct menu *menu)
{
struct dialog_list_item *active_item = NULL;
struct menu *submenu;
const char *prompt = menu_get_prompt(menu);
struct symbol *sym;
char active_entry[40];
int stat, type;
unlink("lxdialog.scrltmp");
active_entry[0] = 0;
while (1) {
indent = 0;
child_count = 0;
current_menu = menu;
cdone(); cinit();
build_conf(menu);
if (!child_count)
break;
if (menu == &rootmenu) {
cmake(); cprint_tag(":"); cprint_name("--- ");
cmake(); cprint_tag("L"); cprint_name("Load an Alternate Configuration File");
cmake(); cprint_tag("S"); cprint_name("Save Configuration to an Alternate File");
}
dialog_clear();
stat = dialog_menu(prompt ? prompt : "Main Menu",
menu_instructions, rows, cols, rows - 10,
active_entry, item_no, items);
if (stat < 0)
return;
if (stat == 1 || stat == 255)
break;
active_item = first_sel_item(item_no, items);
if (!active_item)
continue;
active_item->selected = 0;
strncpy(active_entry, active_item->tag, sizeof(active_entry));
active_entry[sizeof(active_entry)-1] = 0;
type = active_entry[0];
if (!type)
continue;
sym = NULL;
submenu = NULL;
if (sscanf(active_entry + 1, "%p", &submenu) == 1)
sym = submenu->sym;
switch (stat) {
case 0:
switch (type) {
case 'm':
if (single_menu_mode)
submenu->data = (void *) (long) !submenu->data;
else
conf(submenu);
break;
case 't':
if (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)
conf_choice(submenu);
else if (submenu->prompt->type == P_MENU)
conf(submenu);
break;
case 's':
conf_string(submenu);
break;
case 'L':
conf_load();
break;
case 'S':
conf_save();
break;
}
break;
case 2:
if (sym)
show_help(submenu);
else
show_helptext("README", mconf_readme);
break;
case 3:
if (type == 't') {
if (sym_set_tristate_value(sym, yes))
break;
if (sym_set_tristate_value(sym, mod))
show_textbox(NULL, setmod_text, 6, 74);
}
break;
case 4:
if (type == 't')
sym_set_tristate_value(sym, no);
break;
case 5:
if (type == 't')
sym_set_tristate_value(sym, mod);
break;
case 6:
if (type == 't')
sym_toggle_tristate_value(sym);
//.........这里部分代码省略.........
开发者ID:0919061,项目名称:PX4NuttX,代码行数:101,代码来源:mconf.c
示例16: conf
static void conf(struct menu *menu)
{
struct menu *submenu;
const char *prompt = menu_get_prompt(menu);
struct symbol *sym;
char active_entry[40];
int stat, type, i;
unlink("lxdialog.scrltmp");
active_entry[0] = 0;
while (1) {
cprint_init();
cprint("--title");
cprint("%s", prompt ? prompt : _("Main Menu"));
cprint("--menu");
cprint(_(menu_instructions));
cprint("%d", rows);
cprint("%d", cols);
cprint("%d", rows - 10);
cprint("%s", active_entry);
current_menu = menu;
build_conf(menu);
if (!child_count)
break;
if (menu == &rootmenu) {
cprint(":");
cprint("--- ");
cprint("L");
cprint(_(" Load an Alternate Configuration File"));
cprint("S");
cprint(_(" Save Configuration to an Alternate File"));
}
stat = exec_conf();
if (stat < 0)
continue;
if (stat == 1 || stat == 255)
break;
type = input_buf[0];
if (!type)
continue;
for (i = 0; input_buf[i] && !isspace(input_buf[i]); i++)
;
if (i >= sizeof(active_entry))
i = sizeof(active_entry) - 1;
input_buf[i] = 0;
strcpy(active_entry, input_buf);
sym = NULL;
submenu = NULL;
if (sscanf(input_buf + 1, "%p", &submenu) == 1)
sym = submenu->sym;
switch (stat) {
case 0:
switch (type) {
case 'm':
if (single_menu_mode)
submenu->data = (void *) (long) !submenu->data;
else
conf(submenu);
break;
case 't':
if (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)
conf_choice(submenu);
else if (submenu->prompt->type == P_MENU)
conf(submenu);
break;
case 's':
conf_string(submenu);
break;
case 'L':
conf_load();
break;
case 'S':
conf_save();
break;
}
break;
case 2:
if (sym)
show_help(submenu);
else
show_helptext("README", _(mconf_readme));
break;
case 3:
if (type == 't') {
if (sym_set_tristate_value(sym, yes))
break;
if (sym_set_tristate_value(sym, mod))
show_textbox(NULL, setmod_text, 6, 74);
}
break;
case 4:
if (type == 't')
sym_set_tristate_value(sym, no);
break;
case 5:
//.........这里部分代码省略.........
开发者ID:EyeSee360,项目名称:swupdate,代码行数:101,代码来源:mconf.c
示例17: conf
static void conf(struct menu *menu)
{
struct menu *submenu;
const char *prompt = menu_get_prompt(menu);
struct symbol *sym;
struct menu *active_menu = NULL;
int res;
int s_scroll = 0;
while (1) {
item_reset();
current_menu = menu;
build_conf(menu);
if (!child_count)
break;
if (menu == &rootmenu) {
item_make("--- ");
item_set_tag(':');
item_make(_(" Load an Alternate Configuration File"));
item_set_tag('L');
item_make(_(" Save an Alternate Configuration File"));
item_set_tag('S');
}
dialog_clear();
res = dialog_menu(prompt ? _(prompt) : _("Main Menu"),
_(menu_instructions),
active_menu, &s_scroll);
if (res == 1 || res == KEY_ESC || res == -ERRDISPLAYTOOSMALL)
break;
if (!item_activate_selected())
continue;
if (!item_tag())
continue;
submenu = item_data();
active_menu = item_data();
if (submenu)
sym = submenu->sym;
else
sym = NULL;
switch (res) {
case 0:
switch (item_tag()) {
case 'm':
if (single_menu_mode)
submenu->data = (void *) (long) !submenu->data;
else
conf(submenu);
break;
case 't':
if (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)
conf_choice(submenu);
else if (submenu->prompt->type == P_MENU)
conf(submenu);
break;
case 's':
conf_string(submenu);
break;
case 'L':
conf_load();
break;
case 'S':
conf_save();
break;
}
break;
case 2:
if (sym)
show_help(submenu);
else
show_helptext(_("README"), _(mconf_readme));
break;
case 3:
if (item_is_tag('t')) {
if (sym_set_tristate_value(sym, yes))
break;
if (sym_set_tristate_value(sym, mod))
show_textbox(NULL, setmod_text, 6, 74);
}
break;
case 4:
if (item_is_tag('t'))
sym_set_tristate_value(sym, no);
break;
case 5:
if (item_is_tag('t'))
sym_set_tristate_value(sym, mod);
break;
case 6:
if (item_is_tag('t'))
sym_toggle_tristate_value(sym);
else if (item_is_tag('m'))
conf(submenu);
break;
case 7:
search_conf();
break;
}
}
//.........这里部分代码省略.........
开发者ID:16rd,项目名称:rt-n56u,代码行数:101,代码来源:mconf.c
示例18: show_readme
static void show_readme(void)
{
show_helptext("Help", top_menu_help);
}
开发者ID:ChenBoTang,项目名称:ARM,代码行数:4,代码来源:mconf.c
注:本文中的show_helptext函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论