cleanup: remove unnecessary (=invisible) leading spaces
This commit is contained in:
+38
-38
@@ -69,37 +69,37 @@ for driver in $selectdrivers ; do
|
|||||||
;;
|
;;
|
||||||
curses)
|
curses)
|
||||||
AC_CHECK_HEADERS(ncurses.h curses.h)
|
AC_CHECK_HEADERS(ncurses.h curses.h)
|
||||||
AC_CHECK_LIB(ncurses, main, [
|
AC_CHECK_LIB(ncurses, main, [
|
||||||
AC_CHECK_HEADER(ncurses.h, [
|
AC_CHECK_HEADER(ncurses.h, [
|
||||||
dnl We have ncurses.h and libncurses, add driver.
|
dnl We have ncurses.h and libncurses, add driver.
|
||||||
LIBCURSES="-lncurses"
|
LIBCURSES="-lncurses"
|
||||||
DRIVERS="$DRIVERS curses${SO}"
|
DRIVERS="$DRIVERS curses${SO}"
|
||||||
actdrivers=["$actdrivers curses"]
|
actdrivers=["$actdrivers curses"]
|
||||||
],[
|
],[
|
||||||
dnl else
|
dnl else
|
||||||
AC_MSG_WARN([Could not find ncurses.h])],
|
AC_MSG_WARN([Could not find ncurses.h])],
|
||||||
[])
|
[])
|
||||||
],[
|
],[
|
||||||
dnl else
|
dnl else
|
||||||
AC_CHECK_LIB(curses, main, [
|
AC_CHECK_LIB(curses, main, [
|
||||||
AC_CHECK_HEADER(curses.h, [
|
AC_CHECK_HEADER(curses.h, [
|
||||||
dnl We have curses.h and libcurses, add driver.
|
dnl We have curses.h and libcurses, add driver.
|
||||||
LIBCURSES="-lcurses"
|
LIBCURSES="-lcurses"
|
||||||
DRIVERS="$DRIVERS curses${SO}"
|
DRIVERS="$DRIVERS curses${SO}"
|
||||||
actdrivers=["$actdrivers curses"]
|
actdrivers=["$actdrivers curses"]
|
||||||
],[
|
],[
|
||||||
dnl else
|
dnl else
|
||||||
AC_MSG_WARN([Could not find curses.h])],
|
AC_MSG_WARN([Could not find curses.h])],
|
||||||
[])
|
[])
|
||||||
],[
|
],[
|
||||||
dnl else
|
dnl else
|
||||||
AC_MSG_WARN([The curses driver needs the curses (or ncurses) library.])],
|
AC_MSG_WARN([The curses driver needs the curses (or ncurses) library.])],
|
||||||
[])
|
[])
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_CURSES_ACS_ARRAY
|
AC_CURSES_ACS_ARRAY
|
||||||
|
|
||||||
AC_CACHE_CHECK([for redrawwin() in curses], ac_cv_curses_redrawwin,
|
AC_CACHE_CHECK([for redrawwin() in curses], ac_cv_curses_redrawwin,
|
||||||
[oldlibs="$LIBS"
|
[oldlibs="$LIBS"
|
||||||
LIBS="$LIBS $LIBCURSES"
|
LIBS="$LIBS $LIBCURSES"
|
||||||
AC_TRY_LINK_FUNC(redrawwin, ac_cv_curses_redrawwin=yes, ac_cv_curses_redrawwin=no)
|
AC_TRY_LINK_FUNC(redrawwin, ac_cv_curses_redrawwin=yes, ac_cv_curses_redrawwin=no)
|
||||||
@@ -152,10 +152,10 @@ dnl else
|
|||||||
if test "$enable_libusb" = yes ; then
|
if test "$enable_libusb" = yes ; then
|
||||||
HD44780_DRIVERS="$HD44780_DRIVERS hd44780-hd44780-bwct-usb.o"
|
HD44780_DRIVERS="$HD44780_DRIVERS hd44780-hd44780-bwct-usb.o"
|
||||||
fi
|
fi
|
||||||
AC_CHECK_HEADER(linux/i2c-dev.h,
|
AC_CHECK_HEADER(linux/i2c-dev.h,
|
||||||
HD44780_DRIVERS="$HD44780_DRIVERS hd44780-i2c.o"
|
HD44780_DRIVERS="$HD44780_DRIVERS hd44780-i2c.o"
|
||||||
AC_DEFINE(HAVE_I2C,[1],[Define to 1 if you have the i2c headers])
|
AC_DEFINE(HAVE_I2C,[1],[Define to 1 if you have the i2c headers])
|
||||||
)
|
)
|
||||||
DRIVERS="$DRIVERS hd44780${SO}"
|
DRIVERS="$DRIVERS hd44780${SO}"
|
||||||
actdrivers=["$actdrivers hd44780"]
|
actdrivers=["$actdrivers hd44780"]
|
||||||
;;
|
;;
|
||||||
@@ -168,22 +168,22 @@ dnl else
|
|||||||
actdrivers=["$actdrivers imon"]
|
actdrivers=["$actdrivers imon"]
|
||||||
;;
|
;;
|
||||||
IOWarrior)
|
IOWarrior)
|
||||||
if test "$enable_libusb" = yes ; then
|
if test "$enable_libusb" = yes ; then
|
||||||
DRIVERS="$DRIVERS IOWarrior${SO}"
|
DRIVERS="$DRIVERS IOWarrior${SO}"
|
||||||
actdrivers=["$actdrivers IOWarrior"]
|
actdrivers=["$actdrivers IOWarrior"]
|
||||||
else
|
else
|
||||||
AC_MSG_WARN([The IOWarrior driver needs the libusb library.])
|
AC_MSG_WARN([The IOWarrior driver needs the libusb library.])
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
irman)
|
irman)
|
||||||
AC_CHECK_LIB(irman, main,[
|
AC_CHECK_LIB(irman, main,[
|
||||||
LIBIRMAN="-lirman"
|
LIBIRMAN="-lirman"
|
||||||
DRIVERS="$DRIVERS irman${SO}"
|
DRIVERS="$DRIVERS irman${SO}"
|
||||||
actdrivers=["$actdrivers irman"]
|
actdrivers=["$actdrivers irman"]
|
||||||
],[
|
],[
|
||||||
dnl else
|
dnl else
|
||||||
AC_MSG_WARN([The irman driver needs the irman library.])
|
AC_MSG_WARN([The irman driver needs the irman library.])
|
||||||
])
|
])
|
||||||
;;
|
;;
|
||||||
joy)
|
joy)
|
||||||
AC_CHECK_HEADER(linux/joystick.h, [
|
AC_CHECK_HEADER(linux/joystick.h, [
|
||||||
@@ -191,8 +191,8 @@ dnl else
|
|||||||
actdrivers=["$actdrivers joy"]
|
actdrivers=["$actdrivers joy"]
|
||||||
],[
|
],[
|
||||||
dnl else
|
dnl else
|
||||||
AC_MSG_WARN([The joy driver needs header file linux/joystick.h.])
|
AC_MSG_WARN([The joy driver needs header file linux/joystick.h.])
|
||||||
])
|
])
|
||||||
;;
|
;;
|
||||||
lb216)
|
lb216)
|
||||||
DRIVERS="$DRIVERS lb216${SO}"
|
DRIVERS="$DRIVERS lb216${SO}"
|
||||||
@@ -277,7 +277,7 @@ dnl else
|
|||||||
LIBSVGA="-lvga -lvgagl"
|
LIBSVGA="-lvga -lvgagl"
|
||||||
DRIVERS="$DRIVERS svga${SO}"
|
DRIVERS="$DRIVERS svga${SO}"
|
||||||
actdrivers=["$actdrivers svga"]
|
actdrivers=["$actdrivers svga"]
|
||||||
],[
|
],[
|
||||||
dnl else
|
dnl else
|
||||||
AC_MSG_WARN([The svga driver needs the vga library])
|
AC_MSG_WARN([The svga driver needs the vga library])
|
||||||
])
|
])
|
||||||
@@ -309,7 +309,7 @@ dnl else
|
|||||||
LIBFTDI="-lusb -lftdi"
|
LIBFTDI="-lusb -lftdi"
|
||||||
DRIVERS="$DRIVERS ula200${SO}"
|
DRIVERS="$DRIVERS ula200${SO}"
|
||||||
actdrivers=["$actdrivers ula200"]
|
actdrivers=["$actdrivers ula200"]
|
||||||
],[
|
],[
|
||||||
dnl else
|
dnl else
|
||||||
AC_MSG_WARN([The ula200 driver needs the ftdi library])
|
AC_MSG_WARN([The ula200 driver needs the ftdi library])
|
||||||
])
|
])
|
||||||
@@ -324,7 +324,7 @@ dnl else
|
|||||||
LIBXOSD=`xosd-config --libs`
|
LIBXOSD=`xosd-config --libs`
|
||||||
DRIVERS="$DRIVERS xosd${SO}"
|
DRIVERS="$DRIVERS xosd${SO}"
|
||||||
actdrivers=["$actdrivers xosd"]
|
actdrivers=["$actdrivers xosd"]
|
||||||
],[
|
],[
|
||||||
dnl else
|
dnl else
|
||||||
AC_MSG_WARN([The xosd driver needs the xosd library])
|
AC_MSG_WARN([The xosd driver needs the xosd library])
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -105,14 +105,14 @@ cpu_screen(int rep, int display, int *flags_ptr)
|
|||||||
// Read new data
|
// Read new data
|
||||||
if (load.total > 0L) {
|
if (load.total > 0L) {
|
||||||
cpu[CPU_BUF_SIZE - 1][0] = 100.0 * ((double) load.user / (double) load.total);
|
cpu[CPU_BUF_SIZE - 1][0] = 100.0 * ((double) load.user / (double) load.total);
|
||||||
cpu[CPU_BUF_SIZE - 1][1] = 100.0 * ((double) load.system / (double) load.total);
|
cpu[CPU_BUF_SIZE - 1][1] = 100.0 * ((double) load.system / (double) load.total);
|
||||||
cpu[CPU_BUF_SIZE - 1][2] = 100.0 * ((double) load.nice / (double) load.total);
|
cpu[CPU_BUF_SIZE - 1][2] = 100.0 * ((double) load.nice / (double) load.total);
|
||||||
cpu[CPU_BUF_SIZE - 1][3] = 100.0 * ((double) load.idle / (double) load.total);
|
cpu[CPU_BUF_SIZE - 1][3] = 100.0 * ((double) load.idle / (double) load.total);
|
||||||
cpu[CPU_BUF_SIZE - 1][4] = 100.0 * (((double) load.user + (double) load.system + (double) load.nice) / (double) load.total);
|
cpu[CPU_BUF_SIZE - 1][4] = 100.0 * (((double) load.user + (double) load.system + (double) load.nice) / (double) load.total);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
cpu[CPU_BUF_SIZE - 1][0] = 0.0;
|
cpu[CPU_BUF_SIZE - 1][0] = 0.0;
|
||||||
cpu[CPU_BUF_SIZE - 1][1] = 0.0;
|
cpu[CPU_BUF_SIZE - 1][1] = 0.0;
|
||||||
cpu[CPU_BUF_SIZE - 1][2] = 0.0;
|
cpu[CPU_BUF_SIZE - 1][2] = 0.0;
|
||||||
cpu[CPU_BUF_SIZE - 1][3] = 0.0;
|
cpu[CPU_BUF_SIZE - 1][3] = 0.0;
|
||||||
cpu[CPU_BUF_SIZE - 1][4] = 0.0;
|
cpu[CPU_BUF_SIZE - 1][4] = 0.0;
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ char *get_name(char *name, char *p)
|
|||||||
break;
|
break;
|
||||||
if (*p == ':') { /* could be an alias */
|
if (*p == ':') { /* could be an alias */
|
||||||
char *dot = p++;
|
char *dot = p++;
|
||||||
while (*p && isdigit(*p)) p++;
|
while (*p && isdigit(*p)) p++;
|
||||||
if (*p == ':') {
|
if (*p == ':') {
|
||||||
/* Yes it is, backup and copy it. */
|
/* Yes it is, backup and copy it. */
|
||||||
p = dot;
|
p = dot;
|
||||||
|
|||||||
@@ -189,8 +189,8 @@ menu_add_item_func (Client * c, int argc, char **argv)
|
|||||||
item = menuitem_create_ip (item_id, menu_commands_handler, text, c,
|
item = menuitem_create_ip (item_id, menu_commands_handler, text, c,
|
||||||
0, "192.168.1.245");
|
0, "192.168.1.245");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
assert(!"unexpected menuitem type");
|
assert(!"unexpected menuitem type");
|
||||||
}
|
}
|
||||||
menu_add_item (menu, item);
|
menu_add_item (menu, item);
|
||||||
menuscreen_inform_item_modified (menu);
|
menuscreen_inform_item_modified (menu);
|
||||||
@@ -931,11 +931,11 @@ MenuEventFunc (menu_commands_handler)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (event == MENUEVENT_ENTER
|
else if (event == MENUEVENT_ENTER
|
||||||
|| event == MENUEVENT_LEAVE)
|
|| event == MENUEVENT_LEAVE)
|
||||||
{
|
{
|
||||||
snprintf (buf, sizeof(buf)-1, "menuevent %s %.40s\n",
|
snprintf (buf, sizeof(buf)-1, "menuevent %s %.40s\n",
|
||||||
menuitem_eventtype_to_eventtypename(event),
|
menuitem_eventtype_to_eventtypename(event),
|
||||||
item->id);
|
item->id);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
snprintf (buf, sizeof(buf)-1, "menuevent %s %.40s\n",
|
snprintf (buf, sizeof(buf)-1, "menuevent %s %.40s\n",
|
||||||
@@ -949,7 +949,7 @@ MenuEventFunc (menu_commands_handler)
|
|||||||
c = menuitem_get_client(item);
|
c = menuitem_get_client(item);
|
||||||
if( !c ) {
|
if( !c ) {
|
||||||
report( RPT_ERR, "%s: Could not find client of item \"%s\"",
|
report( RPT_ERR, "%s: Could not find client of item \"%s\"",
|
||||||
__FUNCTION__, item->id );
|
__FUNCTION__, item->id );
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
/*
|
/*
|
||||||
Different implementations of (n)curses available on:
|
Different implementations of (n)curses available on:
|
||||||
OpenBSD:
|
OpenBSD:
|
||||||
http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libcurses/
|
http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libcurses/
|
||||||
ncurses
|
ncurses
|
||||||
NetBSD:
|
NetBSD:
|
||||||
http://cvsweb.netbsd.org/bsdweb.cgi/basesrc/lib/libcurses/
|
http://cvsweb.netbsd.org/bsdweb.cgi/basesrc/lib/libcurses/
|
||||||
|
|||||||
+2
-2
@@ -219,7 +219,7 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
/* Set reporting settings (will also flush delayed reports) */
|
/* Set reporting settings (will also flush delayed reports) */
|
||||||
set_reporting("LCDd", report_level, report_dest);
|
set_reporting("LCDd", report_level, report_dest);
|
||||||
report(RPT_INFO, "Set report level to %d, output to %s", report_level,
|
report(RPT_INFO, "Set report level to %d, output to %s", report_level,
|
||||||
((report_dest == RPT_DEST_SYSLOG) ? "syslog" : "stderr"));
|
((report_dest == RPT_DEST_SYSLOG) ? "syslog" : "stderr"));
|
||||||
CHAIN_END( e, "Critical error while processing settings, abort." );
|
CHAIN_END( e, "Critical error while processing settings, abort." );
|
||||||
|
|
||||||
@@ -781,7 +781,7 @@ do_reload(void)
|
|||||||
|
|
||||||
/* Set reporting values */
|
/* Set reporting values */
|
||||||
CHAIN( e, set_reporting("LCDd", report_level, report_dest) );
|
CHAIN( e, set_reporting("LCDd", report_level, report_dest) );
|
||||||
CHAIN( e, ( report(RPT_INFO, "Set report level to %d, output to %s", report_level,
|
CHAIN( e, ( report(RPT_INFO, "Set report level to %d, output to %s", report_level,
|
||||||
((report_dest == RPT_DEST_SYSLOG) ? "syslog" : "stderr")), 0 ) );
|
((report_dest == RPT_DEST_SYSLOG) ? "syslog" : "stderr")), 0 ) );
|
||||||
|
|
||||||
/* And restart the drivers */
|
/* And restart the drivers */
|
||||||
|
|||||||
+1
-1
@@ -339,7 +339,7 @@ void menu_build_screen (MenuItem *menu, Screen *s)
|
|||||||
(w->text)[display_props->width-1] = '\0';
|
(w->text)[display_props->width-1] = '\0';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
assert(!"unexpected menuitem type");
|
assert(!"unexpected menuitem type");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -202,8 +202,8 @@ void menuscreen_switch_item (MenuItem * new_menuitem)
|
|||||||
MenuItem * old_menuitem = active_menuitem;
|
MenuItem * old_menuitem = active_menuitem;
|
||||||
|
|
||||||
debug (RPT_DEBUG, "%s( item=[%s] ) from active_menuitem=[%s]", __FUNCTION__,
|
debug (RPT_DEBUG, "%s( item=[%s] ) from active_menuitem=[%s]", __FUNCTION__,
|
||||||
((new_menuitem != NULL) ? new_menuitem->id : "(null)"),
|
((new_menuitem != NULL) ? new_menuitem->id : "(null)"),
|
||||||
((old_menuitem != NULL) ? old_menuitem->id : "(null)"));
|
((old_menuitem != NULL) ? old_menuitem->id : "(null)"));
|
||||||
|
|
||||||
/* First we do the switch */
|
/* First we do the switch */
|
||||||
active_menuitem = new_menuitem;
|
active_menuitem = new_menuitem;
|
||||||
@@ -229,9 +229,9 @@ void menuscreen_switch_item (MenuItem * new_menuitem)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (old_menuitem && old_menuitem->event_func)
|
if (old_menuitem && old_menuitem->event_func)
|
||||||
old_menuitem->event_func(old_menuitem, MENUEVENT_LEAVE);
|
old_menuitem->event_func(old_menuitem, MENUEVENT_LEAVE);
|
||||||
if (new_menuitem && new_menuitem->event_func)
|
if (new_menuitem && new_menuitem->event_func)
|
||||||
new_menuitem->event_func(new_menuitem, MENUEVENT_ENTER);
|
new_menuitem->event_func(new_menuitem, MENUEVENT_ENTER);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -661,8 +661,8 @@ int
|
|||||||
menuscreen_goto (Menu * menu)
|
menuscreen_goto (Menu * menu)
|
||||||
{
|
{
|
||||||
debug (RPT_DEBUG, "%s( m=[%s] ): active_menuitem=[%s]",
|
debug (RPT_DEBUG, "%s( m=[%s] ): active_menuitem=[%s]",
|
||||||
__FUNCTION__, (menu != NULL) ? menu->id : "(NULL)",
|
__FUNCTION__, (menu != NULL) ? menu->id : "(NULL)",
|
||||||
(active_menuitem != NULL) ? active_menuitem->id : "(NULL)");
|
(active_menuitem != NULL) ? active_menuitem->id : "(NULL)");
|
||||||
menuscreen_switch_item (menu);
|
menuscreen_switch_item (menu);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -673,7 +673,7 @@ int
|
|||||||
menuscreen_set_main (Menu * menu)
|
menuscreen_set_main (Menu * menu)
|
||||||
{
|
{
|
||||||
debug (RPT_DEBUG, "%s( m=[%s] )",
|
debug (RPT_DEBUG, "%s( m=[%s] )",
|
||||||
__FUNCTION__, (menu != NULL) ? menu->id : "(NULL)");
|
__FUNCTION__, (menu != NULL) ? menu->id : "(NULL)");
|
||||||
custom_main_menu = menu;
|
custom_main_menu = menu;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user