From 0a8f384a4021db296fff653e31dd32643430a87c Mon Sep 17 00:00:00 2001 From: oliverschmidt Date: Thu, 7 Feb 2008 16:28:11 +0000 Subject: [PATCH] Allow to optionally (triggered with SELFSTART_PROCESS) self start the application. --- apps/about/about.c | 6 +++++- apps/calc/calc.c | 6 +++++- apps/dhcp/dhcp.c | 4 ++++ apps/directory/directory.c | 6 +++++- apps/email/email.c | 6 +++++- apps/ftp/ftp.c | 6 +++++- apps/irc/irc.c | 6 +++++- apps/netconf/netconf.c | 6 +++++- apps/process-list/process-list.c | 6 +++++- apps/program-handler/program-handler.c | 6 +++++- apps/telnet/simpletelnet.c | 6 +++++- apps/webbrowser/www.c | 6 +++++- apps/webserver/webserver.c | 6 +++++- 13 files changed, 64 insertions(+), 12 deletions(-) diff --git a/apps/about/about.c b/apps/about/about.c index 9c57bcf79..c7c30cb1b 100644 --- a/apps/about/about.c +++ b/apps/about/about.c @@ -29,7 +29,7 @@ * * This file is part of the Contiki desktop environment * - * $Id: about.c,v 1.2 2006/08/13 13:59:07 oliverschmidt Exp $ + * $Id: about.c,v 1.3 2008/02/07 16:28:11 oliverschmidt Exp $ * */ @@ -60,6 +60,10 @@ static struct ctk_button aboutclose = PROCESS(about_process, "About Contiki"); +#if SELFSTART_PROCESS +AUTOSTART_PROCESSES(&about_process); +#endif /* SELFSTART_PROCESS */ + /*-----------------------------------------------------------------------------------*/ static void about_quit(void) diff --git a/apps/calc/calc.c b/apps/calc/calc.c index 9f30923c0..c3861f6ba 100644 --- a/apps/calc/calc.c +++ b/apps/calc/calc.c @@ -29,7 +29,7 @@ * * This an example program for the Contiki desktop OS * - * $Id: calc.c,v 1.3 2007/11/17 22:50:49 oliverschmidt Exp $ + * $Id: calc.c,v 1.4 2008/02/07 16:28:27 oliverschmidt Exp $ * */ @@ -82,6 +82,10 @@ static struct ctk_button calcbutton = PROCESS(calc_process, "Calculator"); +#if SELFSTART_PROCESS +AUTOSTART_PROCESSES(&calc_process); +#endif /* SELFSTART_PROCESS */ + static unsigned long operand1, operand2; static unsigned char op; #define OP_ADD 1 diff --git a/apps/dhcp/dhcp.c b/apps/dhcp/dhcp.c index 419d7008c..9f756abd6 100644 --- a/apps/dhcp/dhcp.c +++ b/apps/dhcp/dhcp.c @@ -6,6 +6,10 @@ PROCESS(dhcp_process, "DHCP"); +#if SELFSTART_PROCESS +AUTOSTART_PROCESSES(&dhcp_process); +#endif /* SELFSTART_PROCESS */ + static struct ctk_window window; static struct ctk_button getbutton = {CTK_BUTTON(0, 0, 16, "Request address")}; diff --git a/apps/directory/directory.c b/apps/directory/directory.c index 612cb0de5..67d3d6476 100644 --- a/apps/directory/directory.c +++ b/apps/directory/directory.c @@ -29,7 +29,7 @@ * * This file is part of the Contiki desktop environment * - * $Id: directory.c,v 1.4 2007/12/15 21:04:51 oliverschmidt Exp $ + * $Id: directory.c,v 1.5 2008/02/07 16:29:08 oliverschmidt Exp $ * */ @@ -76,6 +76,10 @@ static struct ctk_button reloadbutton = PROCESS(directory_process, "Directory browser"); +#if SELFSTART_PROCESS +AUTOSTART_PROCESSES(&directory_process); +#endif /* SELFSTART_PROCESS */ + static unsigned char width, height; #define LOADING_DIR 1 diff --git a/apps/email/email.c b/apps/email/email.c index e51ca6879..b8e7b74ac 100644 --- a/apps/email/email.c +++ b/apps/email/email.c @@ -29,7 +29,7 @@ * * This file is part of the Contiki desktop environment for the C64. * - * $Id: email.c,v 1.3 2007/11/18 00:57:44 oliverschmidt Exp $ + * $Id: email.c,v 1.4 2008/02/07 16:29:24 oliverschmidt Exp $ * */ @@ -157,6 +157,10 @@ static struct ctk_button setupokbutton = PROCESS(email_process, "E-mail client"); +#if SELFSTART_PROCESS +AUTOSTART_PROCESSES(&email_process); +#endif /* SELFSTART_PROCESS */ + /*-----------------------------------------------------------------------------------*/ static void email_quit(void) diff --git a/apps/ftp/ftp.c b/apps/ftp/ftp.c index aef3acfbd..6a40fbef9 100644 --- a/apps/ftp/ftp.c +++ b/apps/ftp/ftp.c @@ -30,7 +30,7 @@ * * Author: Adam Dunkels * - * $Id: ftp.c,v 1.4 2007/11/18 01:05:10 oliverschmidt Exp $ + * $Id: ftp.c,v 1.5 2008/02/07 16:30:08 oliverschmidt Exp $ */ /* Note to self: It would be nice to have a "View" option in the download dialog. */ @@ -52,6 +52,10 @@ PROCESS(ftp_process, "FTP client"); +#if SELFSTART_PROCESS +AUTOSTART_PROCESSES(&ftp_process); +#endif /* SELFSTART_PROCESS */ + static void *connection; /* --- The main window --- */ diff --git a/apps/irc/irc.c b/apps/irc/irc.c index c4caefdb3..b4af8904b 100644 --- a/apps/irc/irc.c +++ b/apps/irc/irc.c @@ -30,7 +30,7 @@ * * Author: Adam Dunkels * - * $Id: irc.c,v 1.5 2007/11/22 12:02:24 oliverschmidt Exp $ + * $Id: irc.c,v 1.6 2008/02/07 16:30:24 oliverschmidt Exp $ */ #include @@ -60,6 +60,10 @@ PROCESS(irc_process, "IRC client"); +#if SELFSTART_PROCESS +AUTOSTART_PROCESSES(&irc_process); +#endif /* SELFSTART_PROCESS */ + static struct ctk_window window; static char log[LOG_WIDTH * LOG_HEIGHT]; static char line[LOG_WIDTH*2]; diff --git a/apps/netconf/netconf.c b/apps/netconf/netconf.c index 13685d7f0..e28dea951 100644 --- a/apps/netconf/netconf.c +++ b/apps/netconf/netconf.c @@ -29,7 +29,7 @@ * * This file is part of the Contiki desktop environment * - * $Id: netconf.c,v 1.6 2007/09/29 04:12:16 matsutsuka Exp $ + * $Id: netconf.c,v 1.7 2008/02/07 16:30:42 oliverschmidt Exp $ * */ @@ -67,6 +67,10 @@ static struct ctk_button tcpipclosebutton = PROCESS(netconf_process, "Network configurator"); +#if SELFSTART_PROCESS +AUTOSTART_PROCESSES(&netconf_process); +#endif /* SELFSTART_PROCESS */ + static void makestrings(void); /*-----------------------------------------------------------------------------------*/ diff --git a/apps/process-list/process-list.c b/apps/process-list/process-list.c index 9340914e1..097d69bd0 100644 --- a/apps/process-list/process-list.c +++ b/apps/process-list/process-list.c @@ -29,7 +29,7 @@ * * This file is part of the Contiki desktop environment * - * $Id: process-list.c,v 1.6 2007/09/30 02:32:23 matsutsuka Exp $ + * $Id: process-list.c,v 1.7 2008/02/07 16:30:58 oliverschmidt Exp $ * */ @@ -65,6 +65,10 @@ static struct ctk_button processclosebutton = PROCESS(processes_process, "Process listing"); +#if SELFSTART_PROCESS +AUTOSTART_PROCESSES(&processes_process); +#endif /* SELFSTART_PROCESS */ + enum { EVENT_UPDATE }; diff --git a/apps/program-handler/program-handler.c b/apps/program-handler/program-handler.c index b9404b51a..229d0dec6 100644 --- a/apps/program-handler/program-handler.c +++ b/apps/program-handler/program-handler.c @@ -43,7 +43,7 @@ * * This file is part of the Contiki desktop OS * - * $Id: program-handler.c,v 1.7 2007/12/15 13:03:17 oliverschmidt Exp $ + * $Id: program-handler.c,v 1.8 2008/02/07 16:31:14 oliverschmidt Exp $ * */ @@ -124,6 +124,10 @@ static struct ctk_button errorokbutton = PROCESS(program_handler_process, "Program handler"); +#if SELFSTART_PROCESS +AUTOSTART_PROCESSES(&program_handler_process); +#endif /* SELFSTART_PROCESS */ + static const char * const errormsgs[] = { "Ok", "Read error", diff --git a/apps/telnet/simpletelnet.c b/apps/telnet/simpletelnet.c index 171fb3128..5a4efe131 100644 --- a/apps/telnet/simpletelnet.c +++ b/apps/telnet/simpletelnet.c @@ -29,7 +29,7 @@ * * This file is part of the Contiki desktop environment * - * $Id: simpletelnet.c,v 1.3 2007/09/29 04:02:06 matsutsuka Exp $ + * $Id: simpletelnet.c,v 1.4 2008/02/07 16:31:34 oliverschmidt Exp $ * */ @@ -91,6 +91,10 @@ static char sendline[31+2]; PROCESS(simpletelnet_process, "Telnet client"); +#if SELFSTART_PROCESS +AUTOSTART_PROCESSES(&simpletelnet_process); +#endif /* SELFSTART_PROCESS */ + /*-----------------------------------------------------------------------------------*/ static void scrollup(void) diff --git a/apps/webbrowser/www.c b/apps/webbrowser/www.c index c4c14b980..3fddb4930 100644 --- a/apps/webbrowser/www.c +++ b/apps/webbrowser/www.c @@ -29,7 +29,7 @@ * * This file is part of the Contiki desktop environment * - * $Id: www.c,v 1.7 2007/12/15 21:56:23 oliverschmidt Exp $ + * $Id: www.c,v 1.8 2008/02/07 16:31:51 oliverschmidt Exp $ * */ @@ -164,6 +164,10 @@ static char receivingmsgs[4][23] = { PROCESS(www_process, "Web browser"); +#if SELFSTART_PROCESS +AUTOSTART_PROCESSES(&www_process); +#endif /* SELFSTART_PROCESS */ + static void formsubmit(struct formattribs *attribs); /*-----------------------------------------------------------------------------------*/ diff --git a/apps/webserver/webserver.c b/apps/webserver/webserver.c index 3728c3f97..6e8d2ba8d 100644 --- a/apps/webserver/webserver.c +++ b/apps/webserver/webserver.c @@ -29,7 +29,7 @@ * * This file is part of the Contiki desktop environment for the C64. * - * $Id: webserver.c,v 1.3 2007/04/23 21:19:55 oliverschmidt Exp $ + * $Id: webserver.c,v 1.4 2008/02/07 16:32:11 oliverschmidt Exp $ * */ @@ -51,6 +51,10 @@ static struct ctk_label message = PROCESS(webserver_process, "Web server"); +#if SELFSTART_PROCESS +AUTOSTART_PROCESSES(&webserver_process); +#endif /* SELFSTART_PROCESS */ + #define LOG_WIDTH 38 #define LOG_HEIGHT 16 static char log[LOG_WIDTH*LOG_HEIGHT];