diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2011-01-24 22:15:41 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2011-01-24 22:15:41 +0200 |
commit | 9312bdde1d936a6970a135b269c52d04d895b1a5 (patch) | |
tree | 90776589c553f1625854d5639917a980a3e0d68c | |
parent | 1f840aff22395c9d7d241382559104aebd888a03 (diff) | |
download | egawk-9312bdde1d936a6970a135b269c52d04d895b1a5.tar.gz egawk-9312bdde1d936a6970a135b269c52d04d895b1a5.tar.bz2 egawk-9312bdde1d936a6970a135b269c52d04d895b1a5.zip |
Bracket unused vars/functions as needed.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | debug.c | 10 | ||||
-rw-r--r-- | dfa.c | 2 |
3 files changed, 14 insertions, 3 deletions
@@ -1,3 +1,8 @@ +Mon Jan 24 22:14:21 2011 Andreas Buening <andreas.buening@nexgo.de> + + * debug.c: Bracket variables used with readline in #ifdef. + * dfa.c (add_utf8_anychar): Move inside ifdef. + Mon Jan 24 22:05:26 2011 Arnold D. Robbins <arnold@skeeve.com> * re.c (make_regexp): Add separate variable for dfa syntax. @@ -105,8 +105,10 @@ typedef struct break_point { static BREAKPOINT breakpoints = { &breakpoints, &breakpoints, 0 }; +#ifdef HAVE_LIBREADLINE /* do_save -- save command */ static int sess_history_base = 0; +#endif /* 'list' command */ static int last_printed_line = 0; @@ -226,8 +228,10 @@ static void set_trace(const char *value); static void set_save_history(const char *value); static void set_save_options(const char *value); static void set_history_size(const char *value); -static const char *history_file = DEFAULT_HISTFILE; static const char *options_file = DEFAULT_OPTFILE; +#ifdef HAVE_LIBREADLINE +static const char *history_file = DEFAULT_HISTFILE; +#endif /* keep all option variables in one place */ @@ -4291,12 +4295,14 @@ serialize(int type) struct list_item *wd = NULL; HIST_ENTRY **hist_list = NULL; int hist_index = 0; - HIST_ENTRY *h = NULL; struct dbg_option *opt = NULL; struct commands_item *commands = NULL, *c; int cnum = 0; struct condition *cndn = NULL; void *ptr, *end_ptr; +#ifdef HAVE_LIBREADLINE + HIST_ENTRY *h = NULL; +#endif switch (type) { case BREAK: @@ -1509,7 +1509,6 @@ addtok_wc (wint_t wc) addtok(CAT); } } -#endif static void add_utf8_anychar (void) @@ -1559,6 +1558,7 @@ add_utf8_anychar (void) addtok (OR); } } +#endif /* The grammar understood by the parser is as follows. |