[Dsctl-devel] SF.net SVN: dsctl: [118]
Status: Alpha
                
                Brought to you by:
                
                    roger-linux
                    
                
            | 
     
      
      
      From: <rog...@us...> - 2007-07-15 04:23:58
      
     
   | 
Revision: 118
          http://dsctl.svn.sourceforge.net/dsctl/?rev=118&view=rev
Author:   roger-linux
Date:     2007-07-14 21:23:57 -0700 (Sat, 14 Jul 2007)
Log Message:
-----------
commands.c: specify 6th field of STS command ("SCAN"), only redefine to a static SCAN displayed when daemon_mode <= 1.
human_commands.c: "dsctl -t status" (new feature --test) updates the display every .5 seconds.  Check it out, it's pretty cool as I've undefined scan to scroll again for this mode)
Modified Paths:
--------------
    autom4te.cache/requests
    src/commands.c
    src/human_commands.c
Modified: autom4te.cache/requests
===================================================================
--- autom4te.cache/requests	2007-07-15 04:00:34 UTC (rev 117)
+++ autom4te.cache/requests	2007-07-15 04:23:57 UTC (rev 118)
@@ -80,15 +80,15 @@
                         'configure.in'
                       ],
                       {
+                        'AM_PROG_F77_C_O' => 1,
                         '_LT_AC_TAGCONFIG' => 1,
-                        'AM_PROG_F77_C_O' => 1,
+                        'm4_pattern_forbid' => 1,
                         'AC_INIT' => 1,
-                        'm4_pattern_forbid' => 1,
                         'AC_CANONICAL_TARGET' => 1,
+                        'AC_CONFIG_LIBOBJ_DIR' => 1,
                         'AC_SUBST' => 1,
-                        'AC_CONFIG_LIBOBJ_DIR' => 1,
+                        'AC_CANONICAL_HOST' => 1,
                         'AC_FC_SRCEXT' => 1,
-                        'AC_CANONICAL_HOST' => 1,
                         'AC_PROG_LIBTOOL' => 1,
                         'AM_INIT_AUTOMAKE' => 1,
                         'AC_CONFIG_SUBDIRS' => 1,
@@ -96,8 +96,8 @@
                         'LT_CONFIG_LTDL_DIR' => 1,
                         'AC_REQUIRE_AUX_FILE' => 1,
                         'AC_CONFIG_LINKS' => 1,
+                        'LT_SUPPORTED_TAG' => 1,
                         'm4_sinclude' => 1,
-                        'LT_SUPPORTED_TAG' => 1,
                         'AM_MAINTAINER_MODE' => 1,
                         'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
                         '_m4_warn' => 1,
@@ -114,11 +114,11 @@
                         'AH_OUTPUT' => 1,
                         '_AM_SUBST_NOTMAKE' => 1,
                         'AC_CONFIG_AUX_DIR' => 1,
+                        'AM_PROG_CC_C_O' => 1,
+                        'm4_pattern_allow' => 1,
                         'sinclude' => 1,
-                        'm4_pattern_allow' => 1,
-                        'AM_PROG_CC_C_O' => 1,
+                        'AM_CONDITIONAL' => 1,
                         'AC_CANONICAL_SYSTEM' => 1,
-                        'AM_CONDITIONAL' => 1,
                         'AC_CONFIG_HEADERS' => 1,
                         'AC_DEFINE_TRACE_LITERAL' => 1,
                         'm4_include' => 1,
Modified: src/commands.c
===================================================================
--- src/commands.c	2007-07-15 04:00:34 UTC (rev 117)
+++ src/commands.c	2007-07-15 04:23:57 UTC (rev 118)
@@ -119,15 +119,18 @@
 	//replace_chars(field[10], field[10]); /* replace_chars is omitting Sytems Scan status line, so comment out for now */
 	/*printf("Test replace_chars: %s, %i\n\n\n", field[8], strlen(field[8]); */
 
-	/* The following is used for stopping the effect of the 6th field SCAN */
-	char first_half[20];
-	char second_half[20];
+	/* Stop the effect of the 6th field SCAN */
+	if (daemon_mode <= 1)
+	{
+		char first_half[20];
+		char second_half[20];
 
-	sscanf(field[6], "%s %s", first_half, second_half);
-	strcat(second_half, first_half);
-	if (strncmp(first_half, "SCAN", 4) == 0 ||
-		strncmp(second_half, "SCAN", 4) == 0)
-		strncpy(field[6], "SCANNING\0", 17);
+		sscanf(field[6], "%s %s", first_half, second_half);
+		strcat(second_half, first_half);
+		if (strncmp(first_half, "SCAN", 4) == 0 ||
+			strncmp(second_half, "SCAN", 4) == 0)
+			strncpy(field[6], "SCANNING\0", 17);
+	}
 
 	if (daemon_mode == 0)
 	{
Modified: src/human_commands.c
===================================================================
--- src/human_commands.c	2007-07-15 04:00:34 UTC (rev 117)
+++ src/human_commands.c	2007-07-15 04:23:57 UTC (rev 118)
@@ -174,7 +174,7 @@
 }
 
 /***********************************************************************
- * status command
+ * Status command
  ***********************************************************************/
 void human_do_status(int fd, int argc, char **args)
 {
@@ -223,7 +223,7 @@
 			fputs(osd_up, stdout);
 			fputs(osd_cr, stdout);
 
-			sleep(1);
+			sleep(.5);
 		}
 	}
 }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 |