[Dsctl-devel] SF.net SVN: dsctl: [127] src/human_commands.c
Status: Alpha
Brought to you by:
roger-linux
|
From: <rog...@us...> - 2007-07-20 10:11:07
|
Revision: 127
http://dsctl.svn.sourceforge.net/dsctl/?rev=127&view=rev
Author: roger-linux
Date: 2007-07-20 03:11:00 -0700 (Fri, 20 Jul 2007)
Log Message:
-----------
human_commands.c: Make Status comments more understandable. (Trivial)
Signed-off-by: Roger <ro...@es...>
Acked-by: Roger <ro...@es...>
Modified Paths:
--------------
src/human_commands.c
Modified: src/human_commands.c
===================================================================
--- src/human_commands.c 2007-07-18 10:58:14 UTC (rev 126)
+++ src/human_commands.c 2007-07-20 10:11:00 UTC (rev 127)
@@ -178,12 +178,14 @@
***********************************************************************/
void human_do_status(int fd, int argc, char **args)
{
+ /* We have three types of displays */
/* FIXME: Display gets corrupt if stuck in prg_mode! */
+
while (daemon_mode != 0)
{
if (osd == 0)
{
- /* User wants repeated no fancy status. */
+ /* Give the user a repeated scrolling display (daemon) */
get_current_status(fd);
get_reception_status(fd);
get_current_tgid_status(fd);
@@ -192,7 +194,7 @@
}
else if (osd == 1)
{
- /* User wants ncurses osd! */
+ /* User wants a live repeated ncurses display. (implies deamon mode) */
char buf[1024];
char buf2[30];
char *ap = buf2;
@@ -205,8 +207,9 @@
osd_clear_line = tgetstr("ce", &ap);
osd_up = tgetstr("up", &ap);
osd_cr = tgetstr("cr", &ap);
+ /* FIXME: Why segfault ??? Should also be defined along w/ "vi"! */
/*osd_invisible = tgetstr("vi", &ap);*/
- /*osd_visible = tgetstr("ve", &ap);*/ /* FIXME: Why segfault ??? Should also be defined along w/ "vi"! */
+ /*osd_visible = tgetstr("ve", &ap);*/
while (daemon_mode != 0) /* simple endless loop */
{
@@ -225,7 +228,8 @@
fputs(osd_clear_line, stdout);
get_current_tgid_status(fd);
- /*fputs(osd_invisible, stdout);*/ /* Want cursor to be invisible! Also see leaveok() */
+ /* FIXME: Want cursor to be invisible! Also see leaveok() */
+ /*fputs(osd_invisible, stdout);*/
for (i = 1; i <= 6 ; i ++)
fputs(osd_up, stdout);
@@ -237,7 +241,7 @@
}
- /* User just wants status once and no fancy stuff */
+ /* Just print once & exit */
if (daemon_mode == 0)
{
get_current_status(fd);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|