2 * $Id: confscroll.h 812 2007-11-10 01:00:15Z hubert@u.washington.edu $
4 * ========================================================================
5 * Copyright 2006-2007 University of Washington
6 * Copyright 2013-2015 Eduardo Chappa
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * ========================================================================
17 #ifndef PINE_CONFSCROLL_INCLUDED
18 #define PINE_CONFSCROLL_INCLUDED
22 #include "../pith/conf.h"
23 #include "../pith/state.h"
26 #define BODY_LINES(X) ((X)->ttyo->screen_rows -HEADER_ROWS(X)-FOOTER_ROWS(X))
30 #define EXIT_PMT "Commit changes (\"Yes\" replaces settings, \"No\" abandons changes)"
33 /* another in a long line of hacks in this stuff */
34 #define DSTRING "default ("
35 #define VSTRING "value from fcc-name-rule"
38 #define next_confline(p) ((p) ? (p)->next : NULL)
39 #define prev_confline(p) ((p) ? (p)->prev : NULL)
42 extern char *empty_val
;
43 extern char *empty_val2
;
46 extern struct variable
*score_act_global_ptr
,
47 *scorei_pat_global_ptr
,
74 extern OPT_SCREEN_S
*opt_screen
;
80 /* exported protoypes */
81 int conf_scroll_screen(struct pine
*, OPT_SCREEN_S
*, CONF_S
*, char *, char *, int);
82 void standard_radio_setup(struct pine
*, CONF_S
**, struct variable
*, CONF_S
**);
83 int standard_radio_var(struct pine
*, struct variable
*);
84 int delete_user_vals(struct variable
*);
85 CONF_S
*new_confline(CONF_S
**);
86 void free_conflines(CONF_S
**);
87 CONF_S
*first_confline(CONF_S
*);
88 CONF_S
*first_sel_confline(CONF_S
*);
89 void snip_confline(CONF_S
**);
90 char *pretty_value(struct pine
*, CONF_S
*);
91 int feature_indent(void);
92 SAVED_CONFIG_S
*save_config_vars(struct pine
*, int);
93 int text_tool(struct pine
*, int, CONF_S
**, unsigned);
94 int checkbox_tool(struct pine
*, int, CONF_S
**, unsigned);
95 int radiobutton_tool(struct pine
*, int, CONF_S
**, unsigned);
96 int yesno_tool(struct pine
*, int, CONF_S
**, unsigned);
97 int text_toolit(struct pine
*, int, CONF_S
**, unsigned, int);
98 char *generalized_sort_pretty_value(struct pine
*, CONF_S
*, int);
99 int exclude_config_var(struct pine
*, struct variable
*, int);
100 int config_exit_cmd(unsigned);
101 int simple_exit_cmd(unsigned);
102 int screen_exit_cmd(unsigned, char *);
103 void config_add_list(struct pine
*, CONF_S
**, char **, char ***, int);
104 void config_del_list_item(CONF_S
**, char ***);
105 void toggle_feature_bit(struct pine
*, int, struct variable
*, CONF_S
*, int);
106 int fixed_var(struct variable
*, char *, char *);
107 void exception_override_warning(struct variable
*);
108 void offer_to_fix_pinerc(struct pine
*);
109 void fix_side_effects(struct pine
*, struct variable
*, int);
110 void revert_to_saved_config(struct pine
*, SAVED_CONFIG_S
*, int);
111 void free_saved_config(struct pine
*, SAVED_CONFIG_S
**, int);
114 #endif /* PINE_CONFSCROLL_INCLUDED */