diff --git a/tests/rigctl.c b/tests/rigctl.c index 1f5582a68..c79b4628d 100644 --- a/tests/rigctl.c +++ b/tests/rigctl.c @@ -121,8 +121,6 @@ static struct option long_options[] = /* variable for readline support */ #ifdef HAVE_LIBREADLINE static const int have_rl = 1; -#else /* no readline */ -static const int have_rl = 0; #endif @@ -143,6 +141,7 @@ int main(int argc, char *argv[]) int verbose = 0; int show_conf = 0; int dump_caps_opt = 0; + #ifdef HAVE_READLINE_HISTORY int rd_hist = 0; int sv_hist = 0; @@ -150,7 +149,8 @@ int main(int argc, char *argv[]) const char hist_file[] = "/.rigctl_history"; char *hist_path = NULL; struct stat hist_dir_stat; -#endif +#endif /* HAVE_READLINE_HISTORY */ + const char *rig_file = NULL, *ptt_file = NULL, *dcd_file = NULL; ptt_type_t ptt_type = RIG_PTT_NONE; dcd_type_t dcd_type = RIG_DCD_NONE; @@ -389,7 +389,7 @@ int main(int argc, char *argv[]) case 'I': sv_hist++; break; -#endif +#endif /* HAVE_READLINE_HISTORY */ case 'v': verbose++; @@ -570,7 +570,7 @@ int main(int argc, char *argv[]) } } -#endif +#endif /* HAVE_READLINE_HISTORY */ } #endif /* HAVE_LIBREADLINE */ @@ -608,11 +608,11 @@ int main(int argc, char *argv[]) hist_path = (char *)NULL; } -#endif +#endif /* HAVE_READLINE_HISTORY */ } -#endif - rig_close(my_rig); /* close port */ +#endif /* HAVE_LIBREADLINE */ + rig_close(my_rig); /* close port */ rig_cleanup(my_rig); /* if you care about memory */ return exitcode; diff --git a/tests/rotctl.c b/tests/rotctl.c index 0474d0cb0..0d79f562a 100644 --- a/tests/rotctl.c +++ b/tests/rotctl.c @@ -109,8 +109,6 @@ static struct option long_options[] = /* variable for readline support */ #ifdef HAVE_LIBREADLINE static const int have_rl = 1; -#else /* no readline */ -static const int have_rl = 0; #endif @@ -131,6 +129,7 @@ int main(int argc, char *argv[]) int verbose = 0; int show_conf = 0; int dump_caps_opt = 0; + #ifdef HAVE_READLINE_HISTORY int rd_hist = 0; int sv_hist = 0; @@ -138,7 +137,8 @@ int main(int argc, char *argv[]) const char hist_file[] = "/.rotctl_history"; char *hist_path = NULL; struct stat hist_dir_stat; -#endif +#endif /* HAVE_READLINE_HISTORY */ + const char *rot_file = NULL; int serial_rate = 0; char conf_parms[MAXCONFLEN] = ""; @@ -240,7 +240,7 @@ int main(int argc, char *argv[]) case 'I': sv_hist++; break; -#endif +#endif /* HAVE_READLINE_HISTORY */ case 'v': verbose++; @@ -395,7 +395,7 @@ int main(int argc, char *argv[]) } } -#endif +#endif /* HAVE_READLINE_HISTORY */ } #endif /* HAVE_LIBREADLINE */ @@ -433,11 +433,11 @@ int main(int argc, char *argv[]) hist_path = (char *)NULL; } -#endif +#endif /* HAVE_READLINE_HISTORY */ } -#endif - rot_close(my_rot); /* close port */ +#endif /* HAVE_LIBREADLINE */ + rot_close(my_rot); /* close port */ rot_cleanup(my_rot); /* if you care about memory */ return exitcode;