summaryrefslogtreecommitdiff
path: root/menuselect
diff options
context:
space:
mode:
authorSean Bright <sean.bright@gmail.com>2017-12-22 09:23:22 -0500
committerSean Bright <sean.bright@gmail.com>2017-12-22 09:23:22 -0500
commitfd0ca1c3f9b972a52d48a82b492fd6bac772dc78 (patch)
tree42d2a87726d196f4db1c68489007520a4c597062 /menuselect
parent9ef97b5a9191e51f1edc66bb17728fd9fe552c35 (diff)
Remove as much trailing whitespace as possible.
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
Diffstat (limited to 'menuselect')
-rw-r--r--menuselect/Makefile2
-rw-r--r--menuselect/README12
-rw-r--r--menuselect/autoconfig.h.in1
-rw-r--r--menuselect/contrib/Makefile-dummy1
-rwxr-xr-xmenuselect/contrib/menuselect-dummy58
-rw-r--r--menuselect/linkedlists.h2
-rwxr-xr-xmenuselect/make_version16
-rw-r--r--menuselect/makeopts.in1
-rw-r--r--menuselect/menuselect_curses.c22
-rw-r--r--menuselect/menuselect_gtk.c8
-rw-r--r--menuselect/menuselect_stub.c2
-rw-r--r--menuselect/strcompat.c4
12 files changed, 63 insertions, 66 deletions
diff --git a/menuselect/Makefile b/menuselect/Makefile
index c6a6facb6..cdd7ebedb 100644
--- a/menuselect/Makefile
+++ b/menuselect/Makefile
@@ -1,6 +1,6 @@
#
# Asterisk -- A telephony toolkit for Linux.
-#
+#
# Makefile for Menuselect
#
# Copyright (C) 2005-2008, Digium, Inc.
diff --git a/menuselect/README b/menuselect/README
index 022ee52e3..37b0e193b 100644
--- a/menuselect/README
+++ b/menuselect/README
@@ -35,7 +35,7 @@ MENUSELECT DEPENDENCIES
libncurses -- This is needed for the curses frontend.
libnewt -- This is needed for the newt frontend (optional).
libxml2 -- This library, the XML C parser and toolkit of Gnome, is used for
- XML parsing.
+ XML parsing.
(http://xmlsoft.org/)
ENVIRONMENT SETUP
@@ -116,7 +116,7 @@ Category Attributes:
name="MENUSELECT_APPS"
The name attribute is required. This is the name of the variable that will
be in the output from menuselect.
-
+
displayname="Applications"
If this is specfied, this is what will be shown in the menu to the user.
@@ -125,7 +125,7 @@ Category Attributes:
that are *not* selected. This is because it is often convenient to be able
to define a full list in the Makefile and then filter out the results from
menuselect. Using GNU make, an example of this would be:
- APPS:=$(filter-out $(MENUSELECT_APPS),$(APPS))
+ APPS:=$(filter-out $(MENUSELECT_APPS),$(APPS))
remove_on_change=".lastclean"
This attribute can contain a space delimited list of files to be deleted
@@ -139,10 +139,10 @@ Members:
Member Attributes:
name="app_meetme"
- The name attribute is required. This is the value that will be added to the
+ The name attribute is required. This is the value that will be added to the
variable specified by the category when selected (or not selected) depending
on the setting of the positive_output attribute of the category.
-
+
displayname="Call Conferencing Application"
If this is specified, this will be provided as a description of this member
when the cursor is on it in the menu.
@@ -159,7 +159,7 @@ Dependencies:
example of specifying a dependency for a member:
<member name="app_meetme">
<depend>zaptel</depend>
- </member>
+ </member>
Conflicts:
A conflict for a <member> is specified using a <conflict> tag. The name of
diff --git a/menuselect/autoconfig.h.in b/menuselect/autoconfig.h.in
index 590ce6161..3e1e18990 100644
--- a/menuselect/autoconfig.h.in
+++ b/menuselect/autoconfig.h.in
@@ -125,4 +125,3 @@
#undef size_t
#endif
-
diff --git a/menuselect/contrib/Makefile-dummy b/menuselect/contrib/Makefile-dummy
index 7b677fc6a..33dfb84f0 100644
--- a/menuselect/contrib/Makefile-dummy
+++ b/menuselect/contrib/Makefile-dummy
@@ -14,4 +14,3 @@ menuselect:
dummies:
touch linkedlists.h menuselect.c menuselect_curses.c \
menuselect.h menuselect_stub.c
-
diff --git a/menuselect/contrib/menuselect-dummy b/menuselect/contrib/menuselect-dummy
index 993ab273f..4c3952efb 100755
--- a/menuselect/contrib/menuselect-dummy
+++ b/menuselect/contrib/menuselect-dummy
@@ -30,7 +30,7 @@
# By default all modules will be built (except those marked not be
# used by default)
#
-# # exclude: Don't try to build the following modules.
+# # exclude: Don't try to build the following modules.
# #exclude app_test
#
# # You can have multiple items in each line, and multiple lines.
@@ -49,7 +49,7 @@
# # idea.
# #require chan_h323 app_directory
#
-# # random - the value for this keyword is a number between 1 and
+# # random - the value for this keyword is a number between 1 and
# # 100. The higher it is, more chances not to include each module.
# # Writes the list of modules that got hit to
# # build_tools/mods_removed_random .
@@ -72,7 +72,7 @@ my %ModInfo = ();
my $AutoconfDepsFile = "build_tools/menuselect-deps";
my $AutoconfOptsFile = "makeopts";
-my %ConfigureOpts = (); #
+my %ConfigureOpts = (); #
# configuration file to read for some directives:
my $ConfFile = "build_tools/conf";
@@ -143,9 +143,9 @@ sub get_subdir_module_info {
$src =~ m|.*/([^/]*)\.c|;
my $mod_name = $1;
my %data = (
- Type=>'module',
- Module=>$mod_name,
- Dir=> $dir,
+ Type=>'module',
+ Module=>$mod_name,
+ Dir=> $dir,
Avail=>1
);
@@ -153,7 +153,7 @@ sub get_subdir_module_info {
next unless (m|^/\*\*\* MODULEINFO| .. m|^ *[*]+/|);
next unless (m|^[A-Z]| || m|^\s*<|);
- # At this point we can assume we're in the module
+ # At this point we can assume we're in the module
# info section.
chomp;
my ($var, $val, %attr) = extract_xml_key($_);
@@ -162,7 +162,7 @@ sub get_subdir_module_info {
}
if ($var =~ /^(Depend|Use)$/i) {
# use uppercase for dependency names;
- $val = uc($val);
+ $val = uc($val);
}
if ( ! exists $data{$var} ) {
$data{$var} = [$val];
@@ -183,15 +183,15 @@ sub extract_subdirs {
}
}
-# parse a partial XML document that is included as an input
+# parse a partial XML document that is included as an input
# for menuselect in a few places. Naturally a full-fledged XML parsing
# will not be done here. A line-based parsing that happens to work will
# have to do.
sub parse_menuselect_xml_file($) {
my $file_name = shift;
- open XML,$file_name or
+ open XML,$file_name or
die "Failed opening XML file $file_name: $!.\n";
-
+
my $header = <XML>;
$header =~ /^\s*<category\s+name="MENUSELECT_([^"]+)"\s/;
my $category = $1;
@@ -214,7 +214,7 @@ sub parse_menuselect_xml_file($) {
Module => $1,
DisplayName => $2,
Defaultenabled => ['no'],
- Avail => 1,
+ Avail => 1,
};
} elsif ($tag eq '/member') {
@@ -234,13 +234,13 @@ sub parse_menuselect_xml_file($) {
if (! exists $member->{$key}) {
$member->{$key} = [];
}
-
+
# Make sure dependencies are upper-case.
# FIXME: this is not the proper place for such a fix
$val = uc($val) if ($key =~ /Depend|Use/);
# Using "unshift' rather than 'push'.
- # For a singleton value this makes the action an
+ # For a singleton value this makes the action an
# override, as only the first value counts.
# For a list value, however, it means a reversed
# order.
@@ -248,17 +248,17 @@ sub parse_menuselect_xml_file($) {
}
}
-
+
close XML;
}
# Dump our data structure to a file.
sub dump_deps($) {
my $file = shift;
- open OUTPUT,">$file" or
+ open OUTPUT,">$file" or
die "cannot open category file $file for writing: $!\n";
- foreach my $mod_name (sort keys %ModInfo) {
+ foreach my $mod_name (sort keys %ModInfo) {
print OUTPUT "Key: $mod_name\n";
my $data = $ModInfo{$mod_name};
foreach my $var (sort keys %{$data} ) {
@@ -285,7 +285,7 @@ sub get_autoconf_deps() {
my ($lib, $avail_val) = split(/=/);
my ($avail, $avail_old) = split(/:/, $avail_val);
my $disabled = 0;
- if ($avail == -1) {
+ if ($avail == -1) {
$disabled = 1;
$avail = 0;
}
@@ -295,7 +295,7 @@ sub get_autoconf_deps() {
if (defined $avail_old) {
$ModInfo{$lib}{AvailOld} = $avail_old;
}
- # FIXME:
+ # FIXME:
if (($avail ne "0") && ($avail ne "1")) {
warning "Library $lib has invalid availability ".
"value <$avail> (check $AutoconfDepsFile).\n";
@@ -367,13 +367,13 @@ sub gen_makedeps() {
my $mod = $ModInfo{$mod_name};
my @deps = ();
- # if we have Depend or Use, put their values into
+ # if we have Depend or Use, put their values into
# @deps . If we have none, move on.
push @deps, @{$mod->{Depend}} if (exists $mod->{Depend});
push @deps, @{$mod->{Use}} if (exists $mod->{Use});
- next unless @deps;
+ next unless @deps;
- # TODO: don't print dependencies that are not external libs.
+ # TODO: don't print dependencies that are not external libs.
# Not done yet until I figure out if this is safe.
my $dep = join(' ', @deps);
print MAKEDEPSS "MENUSELECT_DEPENDS_".$mod->{Module}."=$dep\n";
@@ -420,7 +420,7 @@ sub apply_random_drop() {
}
close MODS_LIST;
-
+
}
@@ -442,7 +442,7 @@ sub check_required_patterns() {
die("Missing dependencies for the following modules: $failed_str\n");
}
-# Disable building for modules that were marked in the embedded module
+# Disable building for modules that were marked in the embedded module
# information as disabled for building by default.
sub apply_default_enabled() {
foreach my $mod (keys %ModInfo) {
@@ -529,7 +529,7 @@ sub resolve_deps() {
}
}
-# generate menuselect.makeopts.
+# generate menuselect.makeopts.
# The values in this file obey to different semantics:
# 1. For modules, a module will be built unles listed here
# 2. For XML values (sounds, CFLAGS) it will be enabled if listed here
@@ -570,7 +570,7 @@ sub check_dependencies() {
parse_menuselect_xml_file('build_tools/cflags.xml');
if ($ConfigureOpts{AST_DEVMODE} eq 'yes') {
parse_menuselect_xml_file('build_tools/cflags-devmode.xml');
- }
+ }
parse_menuselect_xml_file('sounds/sounds.xml');
apply_random_drop();
@@ -590,7 +590,7 @@ sub check_dependencies() {
gen_makeopts();
}
-#
+#
# The main program start here
#
@@ -606,7 +606,7 @@ sub read_dump() {
my ($var, $value) = split /: /, $_, 2;
$item{$var} = $value;
}
- # FIXME: dependencies are a list. This should not be a
+ # FIXME: dependencies are a list. This should not be a
# special case.
if (exists $item{Depend}) {
$item{Depend} = [split /\s*,\s*/,$item{Depend}];
@@ -631,7 +631,7 @@ sub fail_reason($) {
return "Missing dependencies";
}
} elsif ($item->{Type} eq 'module') {
- if (exists ($item->{Defaultenabled}) &&
+ if (exists ($item->{Defaultenabled}) &&
$item->{Defaultenabled} =~ /^n/) {
return "Disabled";
} else {
diff --git a/menuselect/linkedlists.h b/menuselect/linkedlists.h
index 02c23a028..4727ef0b5 100644
--- a/menuselect/linkedlists.h
+++ b/menuselect/linkedlists.h
@@ -98,7 +98,7 @@ struct name { \
struct { \
struct type *next; \
}
-
+
/*!
\brief Returns the first entry contained in a list.
\param head This is a pointer to the list head structure
diff --git a/menuselect/make_version b/menuselect/make_version
index c6bef89ff..43e177753 100755
--- a/menuselect/make_version
+++ b/menuselect/make_version
@@ -8,15 +8,15 @@ elif [ -d .svn ]; then
PARTS=`LANG=C svn info ${1} | grep URL | awk '{print $2;}' | sed -e 's:^.*/svn/menuselect/::' | sed -e 's:/: :g'`
BRANCH=0
TEAM=0
-
+
REV=`svnversion -c ${1} | cut -d: -f2`
-
+
if [ "${PARTS}" = "trunk" ]
then
echo SVN-'trunk'-r${REV}
exit 0
fi
-
+
for PART in $PARTS
do
if [ ${BRANCH} != 0 ]
@@ -24,33 +24,33 @@ elif [ -d .svn ]; then
RESULT="${RESULT}-${PART}"
break
fi
-
+
if [ ${TEAM} != 0 ]
then
RESULT="${RESULT}-${PART}"
continue
fi
-
+
if [ "${PART}" = "branches" ]
then
BRANCH=1
RESULT="branch"
continue
fi
-
+
if [ "${PART}" = "tags" ]
then
BRANCH=1
RESULT="tag"
continue
fi
-
+
if [ "${PART}" = "team" ]
then
TEAM=1
continue
fi
done
-
+
echo SVN-${RESULT##-}-r${REV}
fi
diff --git a/menuselect/makeopts.in b/menuselect/makeopts.in
index d1ddcfdcd..495555d6b 100644
--- a/menuselect/makeopts.in
+++ b/menuselect/makeopts.in
@@ -23,4 +23,3 @@ NEWT_LIB=@NEWT_LIB@
LIBXML2_INCLUDE=@LIBXML2_INCLUDE@
LIBXML2_LIB=@LIBXML2_LIB@
-
diff --git a/menuselect/menuselect_curses.c b/menuselect/menuselect_curses.c
index 260cf69a7..97f1f1714 100644
--- a/menuselect/menuselect_curses.c
+++ b/menuselect/menuselect_curses.c
@@ -20,7 +20,7 @@
* \file
*
* \author Russell Bryant <russell@digium.com>
- *
+ *
* \brief curses frontend for selection maintenance
*/
@@ -291,7 +291,7 @@ static void draw_category_menu(WINDOW *menu, struct category *cat, int start, in
char buf[64];
if (!changed) {
- /* If all we have to do is move the cursor,
+ /* If all we have to do is move the cursor,
* then don't clear the screen and start over */
AST_LIST_TRAVERSE(&cat->members, mem, list) {
i++;
@@ -327,7 +327,7 @@ static void draw_category_menu(WINDOW *menu, struct category *cat, int start, in
snprintf(buf, sizeof(buf), "[%s] %s", mem->enabled ? "*" : " ", mem->name);
}
waddstr(menu, buf);
-
+
if (curopt + 1 == i)
display_mem_info(menu, mem, start, end);
@@ -467,7 +467,7 @@ static int run_category_menu(WINDOW *menu, int cat_num)
set_all(cat, 1);
changed = 1;
default:
- break;
+ break;
}
if (c == 'x' || c == 'X' || c == 'Q' || c == 'q')
break;
@@ -533,13 +533,13 @@ int run_menu(void)
refresh();
maxopt = count_categories() - 1;
-
+
/* We have two windows - the title window at the top, and the menu window gets the rest */
title = newwin(TITLE_HEIGHT, max_x, 0, 0);
menu = newwin(max_y - TITLE_HEIGHT, max_x, TITLE_HEIGHT, 0);
- draw_title_window(title);
+ draw_title_window(title);
draw_main_menu(menu, curopt);
-
+
while ((c = getch())) {
switch (c) {
case KEY_UP:
@@ -571,7 +571,7 @@ int run_menu(void)
play_space();
draw_title_window(title);
default:
- break;
+ break;
}
if (c == 'q' || c == 'Q' || c == 27 || c == 3) {
if (changes_made) {
@@ -586,7 +586,7 @@ int run_menu(void)
}
}
if (c == 'x' || c == 'X' || c == 's' || c == 'S')
- break;
+ break;
draw_main_menu(menu, curopt);
}
@@ -729,7 +729,7 @@ static int repaint_screen(void)
wmove(stdscr, cur->oy, cur->ox);
waddch(stdscr, ' ');
wmove(stdscr, cur->y, cur->x);
- waddch(stdscr, type2chtype(cur->type));
+ waddch(stdscr, type2chtype(cur->type));
cur->ox = cur->x;
cur->oy = cur->y;
}
@@ -746,7 +746,7 @@ static int tank_move_left(void)
{
if (tank->x > 0)
tank->x--;
-
+
return 0;
}
diff --git a/menuselect/menuselect_gtk.c b/menuselect/menuselect_gtk.c
index fcf755e61..4f0360913 100644
--- a/menuselect/menuselect_gtk.c
+++ b/menuselect/menuselect_gtk.c
@@ -232,13 +232,13 @@ int run_menu(void)
GtkWidget *menubar;
gtk_init(&argc, &argv);
-
+
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_set_size_request(window, 640, 480);
gtk_window_set_title(GTK_WINDOW(window), "GMenuselect");
main_vbox = gtk_vbox_new(FALSE, 1);
- gtk_container_set_border_width(GTK_CONTAINER(main_vbox), 1);
+ gtk_container_set_border_width(GTK_CONTAINER(main_vbox), 1);
gtk_container_add(GTK_CONTAINER(window), main_vbox);
menubar = get_menubar_menu(window);
@@ -347,7 +347,7 @@ int run_menu(void)
column = gtk_tree_view_column_new_with_attributes("Conflicts With",
renderer, "text", COLUMN_CNFS, NULL);
gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column);
-
+
renderer = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes("Description",
renderer, "text", COLUMN_DESC, NULL);
@@ -360,7 +360,7 @@ int run_menu(void)
gtk_box_pack_end(GTK_BOX(main_vbox), s_window, TRUE, TRUE, 0);
gtk_widget_show_all(window);
-
+
gtk_main();
return main_res;
diff --git a/menuselect/menuselect_stub.c b/menuselect/menuselect_stub.c
index 8d91c44da..29f731eac 100644
--- a/menuselect/menuselect_stub.c
+++ b/menuselect/menuselect_stub.c
@@ -20,7 +20,7 @@
* \file
*
* \author Russell Bryant <russell@digium.com>
- *
+ *
* \brief Menu stub
*/
diff --git a/menuselect/strcompat.c b/menuselect/strcompat.c
index 81ce083de..c25609f4b 100644
--- a/menuselect/strcompat.c
+++ b/menuselect/strcompat.c
@@ -16,7 +16,7 @@
/*! \file
*
- * \brief Compatibility functions for strsep and strtoq missing on Solaris
+ * \brief Compatibility functions for strsep and strtoq missing on Solaris
*/
#include "autoconfig.h"
@@ -191,7 +191,7 @@ int vasprintf(char **strp, const char *fmt, va_list ap)
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#if !defined(HAVE_ASPRINTF) && !defined(__AST_DEBUG_MALLOC)
+#if !defined(HAVE_ASPRINTF) && !defined(__AST_DEBUG_MALLOC)
int asprintf(char **str, const char *fmt, ...)
{
va_list ap;