aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2011-01-24 22:15:41 +0200
committerArnold D. Robbins <arnold@skeeve.com>2011-01-24 22:15:41 +0200
commit9312bdde1d936a6970a135b269c52d04d895b1a5 (patch)
tree90776589c553f1625854d5639917a980a3e0d68c
parent1f840aff22395c9d7d241382559104aebd888a03 (diff)
downloadegawk-9312bdde1d936a6970a135b269c52d04d895b1a5.tar.gz
egawk-9312bdde1d936a6970a135b269c52d04d895b1a5.tar.bz2
egawk-9312bdde1d936a6970a135b269c52d04d895b1a5.zip
Bracket unused vars/functions as needed.
-rw-r--r--ChangeLog5
-rw-r--r--debug.c10
-rw-r--r--dfa.c2
3 files changed, 14 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 2a3fcdbb..3baf021b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/debug.c b/debug.c
index bbaf5ae5..3932d73b 100644
--- a/debug.c
+++ b/debug.c
@@ -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:
diff --git a/dfa.c b/dfa.c
index fdaaadbd..525d963b 100644
--- a/dfa.c
+++ b/dfa.c
@@ -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.