CVS: libraries/commandline commandline_usage.c, 1.1, 1.2 makefile, 1.3, 1.4

Chris Liechti <[email protected]> Thu, 15 Nov 2007 09:13:16 -0800
Newsgroups gmane.comp.hardware.texas-instruments.msp430.gcc.cvs
Message-ID <[email protected]>
Update of /cvsroot/mspgcc/libraries/commandline
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv27176/libraries/commandline

Modified Files:
	commandline_usage.c makefile 
Log Message:
fix commandline_usage and include it in the library

Index: commandline_usage.c
===================================================================
RCS file: /cvsroot/mspgcc/libraries/commandline/commandline_usage.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -d -r1.1 -r1.2
--- commandline_usage.c	11 Oct 2006 18:47:28 -0000	1.1
+++ commandline_usage.c	15 Nov 2007 17:13:13 -0000	1.2
@@ -1,9 +1,14 @@
+#include <stdio.h>
 #include <stdlib.h>
 #include <stdbool.h>
+#include <string.h>
 
 #include "commandline.h"
 
-bool commandline_usage(const char *s) {
+//the help commands expect that there is a global command table
+extern const COMMANDLINE_TABLE commandline_table[];
+
+bool commandline_usage(const char *command) {
     const COMMANDLINE_TABLE *table_entry = commandline_table;
     // find command with name
     while (table_entry->name) {

Index: makefile
===================================================================
RCS file: /cvsroot/mspgcc/libraries/commandline/makefile,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -d -r1.3 -r1.4
--- makefile	4 Apr 2006 22:25:05 -0000	1.3
+++ makefile	15 Nov 2007 17:13:13 -0000	1.4
@@ -1,6 +1,6 @@
 # makfile configuration
 LIBRARYNAME     = commandline
-CSOURCES        = commandline.c commandline_number.c \
+CSOURCES        = commandline.c commandline_number.c commandline_usage.c \
                   help.c reset.c checksum.c \
                   memory_write.c memory_erase.c hexdump.c \
                   tabcomplete.c


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/