From: Leo C Date: Thu, 23 Oct 2014 11:07:27 +0000 (+0200) Subject: include cleanup X-Git-Tag: hexrel-4~32 X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/commitdiff_plain/889202c46ced1be4fc0db3faf63564722eba2865 include cleanup --- diff --git a/avr/Tupfile b/avr/Tupfile index 91562b4..acb4aa5 100644 --- a/avr/Tupfile +++ b/avr/Tupfile @@ -3,7 +3,7 @@ include_rules PROG = stamp-monitor SRC = main.c SRC += cli.c cli_readline.c command.c command_tbl.c -SRC += cmd_help.c cmd_echo.c cmd_date.c cmd_mem.c cmd_boot.c cmd_pin.c +SRC += cmd_help.c cmd_date.c cmd_mem.c cmd_boot.c cmd_pin.c cmd_misc.c SRC += env.c xmalloc.c date.c con-utils.c print-utils.c getopt-min.c SRC += timer.c serial.c i2c.c pcf8583.c SRC += background.c z180-serv.c z80-if.c pin.c diff --git a/avr/cli_readline.c b/avr/cli_readline.c index 6b5f47e..1dbc73b 100644 --- a/avr/cli_readline.c +++ b/avr/cli_readline.c @@ -11,7 +11,6 @@ #include "common.h" -#include #include #include diff --git a/avr/cmd_boot.c b/avr/cmd_boot.c index c2f0351..1f99f2d 100644 --- a/avr/cmd_boot.c +++ b/avr/cmd_boot.c @@ -4,7 +4,6 @@ */ #include "common.h" #include -#include #include #include "command.h" @@ -195,6 +194,7 @@ command_ret_t do_console(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv case 'q': case 'Q': + printf_P(PSTR("\n")); goto quit; break; diff --git a/avr/cmd_date.c b/avr/cmd_date.c index 2396783..ad0d3ac 100644 --- a/avr/cmd_date.c +++ b/avr/cmd_date.c @@ -10,7 +10,6 @@ */ #include #include -#include #include #include #include diff --git a/avr/cmd_mem.c b/avr/cmd_mem.c index 66dc88f..500b973 100644 --- a/avr/cmd_mem.c +++ b/avr/cmd_mem.c @@ -14,7 +14,6 @@ #include "common.h" #include #include -#include #include "command.h" #include "cli_readline.h" diff --git a/avr/cmd_echo.c b/avr/cmd_misc.c similarity index 100% rename from avr/cmd_echo.c rename to avr/cmd_misc.c diff --git a/avr/cmd_pin.c b/avr/cmd_pin.c index b46b853..83a55f7 100644 --- a/avr/cmd_pin.c +++ b/avr/cmd_pin.c @@ -2,7 +2,6 @@ #include #include #include -#include #include "command.h" #include "print-utils.h" diff --git a/avr/command.c b/avr/command.c index 2b53adf..bb88794 100644 --- a/avr/command.c +++ b/avr/command.c @@ -7,7 +7,6 @@ #include #include #include -#include #include "config.h" #include "print-utils.h" diff --git a/avr/getopt-min.c b/avr/getopt-min.c index 571c14f..8e5dd6c 100644 --- a/avr/getopt-min.c +++ b/avr/getopt-min.c @@ -1,5 +1,4 @@ #include "common.h" -#include /* diff --git a/avr/timer.c b/avr/timer.c index e15a55b..67b4a49 100644 --- a/avr/timer.c +++ b/avr/timer.c @@ -4,8 +4,6 @@ #include "common.h" -//#include -//#include #include #include diff --git a/avr/z180-serv.c b/avr/z180-serv.c index 2dbac65..56852cb 100644 --- a/avr/z180-serv.c +++ b/avr/z180-serv.c @@ -2,16 +2,12 @@ */ #include "common.h" -//#include -//#include #include -//#include -//#include #include "background.h" -#include "debug.h" #include "serial.h" #include "z80-if.h" +#include "debug.h" #include "z180-serv.h" diff --git a/include/command.h b/include/command.h index 2fd20a0..d0933a0 100644 --- a/include/command.h +++ b/include/command.h @@ -26,8 +26,8 @@ * cmd_usage() all over the place. */ typedef enum { - CMD_RET_SUCCESS, /* 0 = Success */ - CMD_RET_FAILURE, /* 1 = Failure */ + CMD_RET_SUCCESS = 0, /* Success */ + CMD_RET_FAILURE = 1, /* Failure */ CMD_RET_USAGE = -1, /* Failure, please report 'usage' error */ } command_ret_t; diff --git a/include/common.h b/include/common.h index ef5af12..74339df 100644 --- a/include/common.h +++ b/include/common.h @@ -3,6 +3,7 @@ #ifdef __AVR__ #include +#include //TODO: // Known to work: 4.8.4, 4.9.1 diff --git a/include/debug.h b/include/debug.h index 8fdc830..45a1d50 100644 --- a/include/debug.h +++ b/include/debug.h @@ -3,9 +3,6 @@ #define DEBUG_H_ #include "common.h" -#ifdef __AVR__ -#include -#endif #ifdef DEBUG #define _DEBUG 1