Added new Contiki port.

Contiki can now be built to run as win32 console application on Windows using Microsoft Visual C++ 6.0. The main purpose is easy testing / debugging. Currently there is no network access whatsoever available.
diff --git a/contiki-win32/conf/cc-conf.h b/contiki-win32/conf/cc-conf.h
new file mode 100644
index 0000000..187a1c9
--- /dev/null
+++ b/contiki-win32/conf/cc-conf.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2003, Adam Dunkels.
+ * All rights reserved. 
+ *
+ * Redistribution and use in source and binary forms, with or without 
+ * modification, are permitted provided that the following conditions 
+ * are met: 
+ * 1. Redistributions of source code must retain the above copyright 
+ *    notice, this list of conditions and the following disclaimer. 
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution. 
+ * 3. The name of the author may not be used to endorse or promote
+ *    products derived from this software without specific prior
+ *    written permission.  
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+ *
+ * This file is part of the Contiki desktop OS
+ *
+ * $Id: cc-conf.h,v 1.1 2004/07/15 00:35:49 oliverschmidt Exp $
+ *
+ */
+#ifndef __CC_CONF_H__
+#define __CC_CONF_H__
+
+#define CC_CONF_REGISTER_ARGS          1
+#define CC_CONF_FUNCTION_POINTER_ARGS  1
+#define CC_CONF_FASTCALL
+
+#endif /* __CC_CONF_H__ */
+
diff --git a/contiki-win32/conf/clock-conf.h b/contiki-win32/conf/clock-conf.h
new file mode 100644
index 0000000..4c6a831
--- /dev/null
+++ b/contiki-win32/conf/clock-conf.h
@@ -0,0 +1,8 @@
+#ifndef __CLOCK_CONF_H__
+#define __CLOCK_CONF_H__
+
+typedef unsigned long clock_time_t;
+
+#define CLOCK_CONF_SECOND CLK_TCK
+
+#endif /* __CLOCK_CONF_H__ */
diff --git a/contiki-win32/conf/ctk-conf.h b/contiki-win32/conf/ctk-conf.h
new file mode 100644
index 0000000..2da2615
--- /dev/null
+++ b/contiki-win32/conf/ctk-conf.h
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2004, Adam Dunkels.
+ * All rights reserved. 
+ *
+ * Redistribution and use in source and binary forms, with or without 
+ * modification, are permitted provided that the following conditions 
+ * are met: 
+ * 1. Redistributions of source code must retain the above copyright 
+ *    notice, this list of conditions and the following disclaimer. 
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution. 
+ * 3. All advertising materials mentioning features or use of this
+ *    software must display the following acknowledgement:
+ *        This product includes software developed by Adam Dunkels. 
+ * 4. The name of the author may not be used to endorse or promote
+ *    products derived from this software without specific prior
+ *    written permission.  
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+ *
+ * This file is part of the "ctk" console GUI toolkit for cc65
+ *
+ * $Id: ctk-conf.h,v 1.1 2004/07/15 00:35:49 oliverschmidt Exp $
+ *
+ */
+
+#ifndef __CTK_CONF_H__
+#define __CTK_CONF_H__
+
+/*
+ * This file is used for setting various compile time settings for the
+ * CTK GUI toolkit.
+*/
+
+/* Defines which key that is to be used for activating the menus */
+#define CTK_CONF_MENU_KEY             -1  /* F10 */
+
+/* Defines which key that is to be used for switching the frontmost
+   window.  */
+#define CTK_CONF_WINDOWSWITCH_KEY     -2  /* AltGr-Tab */
+
+/* Defines which key that is to be used for switching to the prevoius
+   widget.  */
+#define CTK_CONF_WIDGETUP_KEY         -3  /* Ctrl-Tab */
+
+/* Defines which key that is to be used for switching to the next
+   widget.  */
+#define CTK_CONF_WIDGETDOWN_KEY       '\t'
+
+/* Toggles mouse support (must have support functions in the
+architecture specific files to work). */
+#define CTK_CONF_MOUSE_SUPPORT        0 /* 1342 bytes */
+
+/* Toggles support for icons. */
+#define CTK_CONF_ICONS                1 /* 107 bytes */
+
+/* Toggles support for icon bitmaps. */
+#define CTK_CONF_ICON_BITMAPS         0
+
+/* Toggles support for icon textmaps. */
+#define CTK_CONF_ICON_TEXTMAPS        1
+
+/* Toggles support for movable windows. */
+#define CTK_CONF_WINDOWMOVE           1 /* 333 bytes */
+
+/* Toggles support for closable windows. */
+#define CTK_CONF_WINDOWCLOSE          1 /* 14 bytes */
+
+/* Toggles support for menus. */
+#define CTK_CONF_MENUS                1 /* 1384 bytes */
+
+/* Defines the default width of a menu. */
+#define CTK_CONF_MENUWIDTH            16
+/* The maximum number of menu items in each menu. */
+#define CTK_CONF_MAXMENUITEMS         10
+
+/* Toggles support for screen savers. */
+#define CTK_CONF_SCREENSAVER          0
+
+#endif /* __CTK_CONF_H__ */
diff --git a/contiki-win32/conf/ctk-conio-conf.h b/contiki-win32/conf/ctk-conio-conf.h
new file mode 100644
index 0000000..42e03c2
--- /dev/null
+++ b/contiki-win32/conf/ctk-conio-conf.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2004, Adam Dunkels.
+ * All rights reserved. 
+ *
+ * Redistribution and use in source and binary forms, with or without 
+ * modification, are permitted provided that the following conditions 
+ * are met: 
+ * 1. Redistributions of source code must retain the above copyright 
+ *    notice, this list of conditions and the following disclaimer. 
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution. 
+ * 3. All advertising materials mentioning features or use of this
+ *    software must display the following acknowledgement:
+ *        This product includes software developed by Adam Dunkels. 
+ * 4. The name of the author may not be used to endorse or promote
+ *    products derived from this software without specific prior
+ *    written permission.  
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+ *
+ * This file is part of the "ctk" console GUI toolkit for cc65
+ *
+ * $Id: ctk-conio-conf.h,v 1.1 2004/07/15 00:35:49 oliverschmidt Exp $
+ *
+ */
+
+#ifndef __CTK_CONIO_CONF_H__
+#define __CTK_CONIO_CONF_H__
+
+#define BORDERCOLOR         COLOR_BLUE
+#define SCREENCOLOR         COLOR_BLUE
+
+#define WINDOWCOLOR         COLOR_GRAY
+#define WINDOWCOLOR_FOCUS   COLOR_WHITE
+#define DIALOGCOLOR         COLOR_WHITE
+
+#define WIDGETCOLOR         COLOR_GRAY
+#define WIDGETCOLOR_FWIN    COLOR_WHITE
+#define WIDGETCOLOR_DIALOG  COLOR_WHITE
+#define WIDGETCOLOR_HLINK   COLOR_CYAN
+#define WIDGETCOLOR_FOCUS   COLOR_YELLOW
+
+#define MENUCOLOR           COLOR_WHITE
+#define OPENMENUCOLOR       COLOR_CYAN
+#define ACTIVEMENUITEMCOLOR COLOR_YELLOW
+
+#endif /* __CTK_CONIO_CONF_H__ */
diff --git a/contiki-win32/conf/ek-conf.h b/contiki-win32/conf/ek-conf.h
new file mode 100644
index 0000000..35294c1
--- /dev/null
+++ b/contiki-win32/conf/ek-conf.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2002, Adam Dunkels.
+ * All rights reserved. 
+ *
+ * Redistribution and use in source and binary forms, with or without 
+ * modification, are permitted provided that the following conditions 
+ * are met: 
+ * 1. Redistributions of source code must retain the above copyright 
+ *    notice, this list of conditions and the following disclaimer. 
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution. 
+ * 3. The name of the author may not be used to endorse or promote
+ *    products derived from this software without specific prior
+ *    written permission.  
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+ *
+ * This file is part of the "ek" event kernel.
+ *
+ * $Id: ek-conf.h,v 1.1 2004/07/15 00:35:49 oliverschmidt Exp $
+ *
+ */
+
+
+#ifndef __EK_CONF_H__
+#define __EK_CONF_H__
+
+#include <time.h>
+
+typedef void *ek_data_t;
+
+typedef unsigned char ek_signal_t;
+typedef unsigned char ek_event_t;
+typedef unsigned char ek_id_t;
+
+/* ek_ticks_t: should be defined to be the largest type that fits the
+   highest timeout value used by the system. For example, if all
+   timeouts are between 1 and 150, the ek_ticks_t can be typedef'd as
+   "unsigned char", but if the maximum timeout is over 256, "unsigned
+   short" is a better choise. */
+typedef unsigned short ek_ticks_t;
+
+/* ek_clock_t: should be defined to be the native clock ticks type
+   used by the underlying system. (Look for time_t or similar.) */
+typedef unsigned long ek_clock_t; 
+
+#define EK_CONF_NUMLISTENERS  32    /* Must be 2^n */
+typedef unsigned char ek_num_listeners_t;
+
+#define EK_CONF_MAXPROCS 32
+
+#define EK_CONF_NUMEVENTS 32
+typedef unsigned char ek_num_events_t;
+
+#endif /* __EK_CONF_H__ */
diff --git a/contiki-win32/conf/uip-conf.h b/contiki-win32/conf/uip-conf.h
new file mode 100644
index 0000000..9b78cbb
--- /dev/null
+++ b/contiki-win32/conf/uip-conf.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2003, Adam Dunkels.
+ * All rights reserved. 
+ *
+ * Redistribution and use in source and binary forms, with or without 
+ * modification, are permitted provided that the following conditions 
+ * are met: 
+ * 1. Redistributions of source code must retain the above copyright 
+ *    notice, this list of conditions and the following disclaimer. 
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution. 
+ * 3. The name of the author may not be used to endorse or promote
+ *    products derived from this software without specific prior
+ *    written permission.  
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+ *
+ * This file is part of the Contiki Destop OS
+ *
+ * $Id: uip-conf.h,v 1.1 2004/07/15 00:35:49 oliverschmidt Exp $
+ *
+ */
+#ifndef __UIP_CONF_H__
+
+#define UIP_CONF_MAX_CONNECTIONS 40
+#define UIP_CONF_MAX_LISTENPORTS 40
+#define UIP_CONF_BUFFER_SIZE     800
+
+#define UIP_CONF_BYTE_ORDER      LITTLE_ENDIAN
+
+#endif /* __UIP_CONF_H__ */
diff --git a/contiki-win32/conf/www-conf.h b/contiki-win32/conf/www-conf.h
new file mode 100644
index 0000000..b776b1b
--- /dev/null
+++ b/contiki-win32/conf/www-conf.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2002, Adam Dunkels.
+ * All rights reserved. 
+ *
+ * Redistribution and use in source and binary forms, with or without 
+ * modification, are permitted provided that the following conditions 
+ * are met: 
+ * 1. Redistributions of source code must retain the above copyright 
+ *    notice, this list of conditions and the following disclaimer. 
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution. 
+ * 3. All advertising materials mentioning features or use of this
+ *    software must display the following acknowledgement:
+ *        This product includes software developed by Adam Dunkels. 
+ * 4. The name of the author may not be used to endorse or promote
+ *    products derived from this software without specific prior
+ *    written permission.  
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+ *
+ * This file is part of the Contiki desktop environment
+ *
+ * $Id: www-conf.h,v 1.1 2004/07/15 00:35:49 oliverschmidt Exp $
+ *
+ */
+#ifndef __WWW_CONF_H__
+#define __WWW_CONF_H__
+
+#define WWW_CONF_HOMEPAGE "http://www.apple2.org/"
+
+/* The size of the HTML viewing area. */
+#define WWW_CONF_WEBPAGE_WIDTH 76
+#define WWW_CONF_WEBPAGE_HEIGHT 30
+
+/* The size of the "Back" history. */
+#define WWW_CONF_HISTORY_SIZE 40
+
+/* Defines the maximum length of an URL */
+#define WWW_CONF_MAX_URLLEN 200
+
+/* The maxiumum number of widgets (i.e., hyperlinks, form elements) on
+   a page. */
+#define WWW_CONF_MAX_NUMPAGEWIDGETS 80
+
+/* Turns <center> support on or off; must be on for forms to work. */
+#define WWW_CONF_RENDERSTATE 1
+
+/* Toggles support for HTML forms. */
+#define WWW_CONF_FORMS       1
+
+/* Maximum lengths for various HTML form parameters. */
+#define WWW_CONF_MAX_FORMACTIONLEN  400
+#define WWW_CONF_MAX_FORMNAMELEN    200
+#define WWW_CONF_MAX_INPUTNAMELEN   200
+#define WWW_CONF_MAX_INPUTVALUELEN  340
+
+#define WWW_CONF_PAGEVIEW 1
+
+#endif /* __WWW_CONF_H__ */