diff --git a/apps/shell/shell.c b/apps/shell/shell.c index 97432c5f1..c57afabf3 100644 --- a/apps/shell/shell.c +++ b/apps/shell/shell.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki desktop OS. * - * $Id: shell.c,v 1.2 2006/08/30 22:06:18 oliverschmidt Exp $ + * $Id: shell.c,v 1.3 2007/04/13 21:05:57 oliverschmidt Exp $ * */ @@ -133,6 +133,7 @@ nullterminate(char *str) return nt; } /*-----------------------------------------------------------------------------------*/ +#ifdef SHELL_CONF_WITH_PROGRAM_HANDLER static void runfile(char *str) { @@ -153,6 +154,7 @@ execfile(char *str) runfile(str); shell_quit(NULL); } +#endif /* SHELL_CONF_WITH_PROGRAM_HANDLER */ /*-----------------------------------------------------------------------------------*/ static void killproc(char *str) @@ -179,8 +181,10 @@ static void help(char *str) { shell_output("Available commands:", ""); +#ifdef SHELL_CONF_WITH_PROGRAM_HANDLER shell_output("run - start program", ""); - shell_output("exec - start program & exit shell", ""); + shell_output("exec - start program & exit shell", ""); +#endif shell_output("ps - show processes", ""); shell_output("kill - kill process", ""); shell_output("ls - display directory", ""); @@ -209,8 +213,11 @@ none(char *str) } /*-----------------------------------------------------------------------------------*/ static struct ptentry configparsetab[] = - {{'e', 'E', execfile}, + { +#ifdef SHELL_CONF_WITH_PROGRAM_HANDLER + {'e', 'E', execfile}, {'r', 'R', runfile}, +#endif {'k', 'K', killproc}, {'p', 'P', processes}, {'l', 'L', directory}, diff --git a/apps/telnetd/telnetd.c b/apps/telnetd/telnetd.c index 34ed57c88..a6817ac34 100644 --- a/apps/telnetd/telnetd.c +++ b/apps/telnetd/telnetd.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki desktop OS. * - * $Id: telnetd.c,v 1.1 2006/06/17 22:41:13 adamdunkels Exp $ + * $Id: telnetd.c,v 1.2 2007/04/13 21:04:52 oliverschmidt Exp $ * */ @@ -394,6 +394,3 @@ telnetd_appcall(void *ts) } } /*-----------------------------------------------------------------------------------*/ -void -program_handler_load(char *name, char *arg) -{} diff --git a/platform/gtk/contiki-conf.h b/platform/gtk/contiki-conf.h index 7ef5ae0d0..261f8097d 100644 --- a/platform/gtk/contiki-conf.h +++ b/platform/gtk/contiki-conf.h @@ -99,6 +99,11 @@ typedef unsigned long clock_time_t; #define PROGRAM_HANDLER_CONF_MAX_NUMDSCS 10 + +#define SHELL_CONF_WITH_PROGRAM_HANDLER 1 + + + #define SHELL_GUI_CONF_XSIZE 46 #define SHELL_GUI_CONF_YSIZE 22 diff --git a/platform/win32/contiki-conf.h b/platform/win32/contiki-conf.h index 37ed2f6c3..4503e3c0c 100644 --- a/platform/win32/contiki-conf.h +++ b/platform/win32/contiki-conf.h @@ -105,6 +105,10 @@ typedef unsigned long clock_time_t; +#define SHELL_CONF_WITH_PROGRAM_HANDLER 1 + + + #define SHELL_GUI_CONF_XSIZE 46 #define SHELL_GUI_CONF_YSIZE 22 @@ -137,4 +141,9 @@ typedef unsigned short uip_stats_t; #define WWW_CONF_MAX_INPUTNAMELEN 200 #define WWW_CONF_MAX_INPUTVALUELEN 240 + + +#define TELNETD_CONF_LINELEN 64 +#define TELNETD_CONF_NUMLINES 16 + #endif /* __CONTIKI_CONF_H__ */