Commit Graph

64 Commits (master)

Author SHA1 Message Date
Simon Duquennoy fbd78a7e3b Merge pull request #1293 from simonduq/pr/fix-warnings
Fix a number of compiler warnings and enable -Werror in Travis
2015-11-10 08:49:11 +01:00
Oliver Schmidt 1639b712bb Removed CC_FASTCALL.
CC_FASTCALL was introduced many years ago for the cc65 tool chain. It was never used for another tool chain. With a798b1d648 the cc65 tool chain doesn't need CC_FASTCALL anymore.
2015-11-01 18:10:17 +01:00
Oliver Schmidt a29502ed0d Changed 'data' casting for 'ctk_signal_keypress'.
In these cases data was set as `process_post_synch(window->owner, ctk_signal_keypress, (process_data_t)(size_t)c);` so it seems reasonable to cast "back" to `size_t`. Additionally the comparison can be limited to `char`. See i.e. calcc for reference:
```
if(ev == ctk_signal_keypress) {
  if((char)(size_t)data >= '0' &&
     (char)(size_t)data <= '9') {
```
2015-10-20 10:11:51 +02:00
Adam Dunkels 2d203cc713 Fix compiler warnings 2015-10-20 10:11:31 +02:00
Adam Dunkels c262eafe97 Fix compiler warnings 2015-10-20 10:11:30 +02:00
George Oikonomou 0b382a933a Fix warnings caused by unescaped special doxygen chars 2015-02-15 20:11:09 +01:00
George Oikonomou fb22e15844 Fix warnings caused by incorrect param names / undocumented params 2015-02-15 20:11:08 +01:00
Enrico Joerns 85b494c16b [doc] Give files a common structure by placing license first (partial)
Followed by doxyen file and group tags.
This patch is only a first attempt to make provide a clean structure,
many more files require rework, too.
2014-11-10 23:54:49 +01:00
Adam Dunkels b244f30480 Moved the ctk files from core/lib into core/lib/ and core/lib/libconio 2014-01-26 23:20:46 +01:00
Adam Dunkels bddd96d5c8 Removed all module makefiles. Instead, all .c files in a module directory are compiled. 2014-01-26 23:20:46 +01:00
Adam Dunkels a40a73db9a Made a module out of the core/ctk code 2014-01-26 23:20:44 +01:00
Adam Dunkels 611c659e51 Removed the VNC/CTK server and the VNC viewer app 2013-11-28 14:10:47 +01:00
Adam Dunkels bb2dcaa057 A massive all-tree automated update of all double inclusion guard #defines that changes from using two underscores as a prefix, which are reserved, to not using two underscores as a prefix 2013-11-24 20:20:11 +01:00
Adam Dunkels 944537fccf Removed all old RCS tags in the Contiki source tree. Those RCS tags are not used any more, as we are now using git to manage the Contiki source tree 2012-10-26 15:54:49 +02:00
David Kopf 6e45dfe5ff PROGMEM changes needed for newer avr-gcc compiler 2012-02-21 11:10:57 -05:00
Nicholas J Humfrey 372de7d08a Converted u8_t to uint8_t and u16_t to uint16_t in the rest of core (specifically ctk/vnc, slip and the loader code) 2012-02-21 08:33:24 -05:00
adamdunkels 5585d72c86 A simple but substantial change: uIP used the htons()/HTONS() macro
functions for converting between host and network byte order. These
names are the de facto standard names for this functionality because
of the original BSD TCP/IP implementation. But they cause problems for
uIP/Contiki: some platforms define these names themselves (Mac OS,
most notably), causing compilation problems for Contiki on those
platforms.

This commit changes all htons to uip_htons instead. Same goes for
htonl, ntohs, and ntohl. All-caps versions as well.
2010-10-19 18:29:03 +00:00
oliverschmidt a0b8927777 Allow to exit the process owning the foreground window by pressing ctrl-c. This is especially useful if there's no closebutton on the window frames (or no windows at all). 2010-09-09 20:21:26 +00:00
oliverschmidt 89f6235c13 Using wherex() to determine the length of the string printed with cputsn() fails if the right edge of the screen was reached as wherex() then returns 0.
Therefore we rather count the chars actually printed in cputsn() and return that value thus avoiding usage of wherex() in those scenarios altogether.
2010-07-20 22:19:23 +00:00
oliverschmidt c284092a53 - Set cursor in ctk_draw_init() to top left corner as it is called for re-initialization on Contiki exit. 2010-02-07 21:43:03 +00:00
oliverschmidt 1d1f3a23af - No need for textcolor() before cclear().
- Set textcolor() in ctk_draw_init() to some reasonable value as it is called for re-initialization on Contiki exit.
2010-02-07 21:38:01 +00:00
oliverschmidt 9e809ef5a4 Provide optional prototypes for all three keyboard input related functions. 2010-01-31 12:48:46 +00:00
oliverschmidt a7cb609321 With dynamic loading enabled the function ctk_textentry_input_null() lives in the persistent core while the macro CTK_TEXTENTRY() is typically used in loadable modules. So ctk_textentry_input_null() needs to be dynamically resolved.
On Win32 dynamic resolving isn't done by patching the dynamically loaded segments. Rather the code generated by the compiler for accessing symbols declared with __declspec(dllimport) is implicitly modified to actually go through pointer dereferenciations. The dynamic linker only initializes this pointers.

But with the symbol ctk_textentry_input_null becoming a pointer to a function it isn't a constant anymore and so it can't be used as initializer element - and thus breaking CTK_TEXTENTRY().

So the only viable solution seems to stick to the inversally available NULL pointer on Win32. But if there's an ugly #ifdef <platform> necessary anyway than it seems resonable to classify ctk_textentry_input_null as the special case and therefore use #ifdef SDCC:
- It saves some bytes on all non-SDCC platforms
- Is matches the exsisting inline documentation
2009-02-28 10:43:30 +00:00
oliverschmidt 1d820bae87 Avoid compiler warning by returning a value from non-void function but no not avoid calling into the function now returning a meaningful value. 2009-02-27 14:42:49 +00:00
oliverschmidt d816b712c3 Minimal reformatting only. 2009-02-27 08:18:54 +00:00
adamdunkels 54fd65be5b Added check for NULL textentry input, and a typecast to make cc65 happy 2009-02-25 10:34:47 +00:00
adamdunkels 45387fea3f Removed leftover semicolon 2009-02-25 09:13:51 +00:00
adamdunkels 669bf3743e Fixed function prototype so that it compiles again... 2009-02-25 09:01:38 +00:00
adamdunkels 0ded8897e6 Added a dummy function instead of a NULL callback in the textentry widget because sdcc does not like NULL function pointers 2009-02-24 21:30:02 +00:00
adamdunkels 589a03b0e5 Added fallback #define of CH_ENTER 2008-11-27 23:40:24 +00:00
oliverschmidt 878f56837d Did more aggressive fullscreen ctk codesize optimization. Now ctk draw implementations need adjustment as the struct window member x and y are gone. Another potential optimization would be to remove clipping... 2007-12-20 20:45:06 +00:00
oliverschmidt 4b11df81ba Mustn't include libconio header as this is just one possible implementation of the conio API (and further code exlusion for fullscreen ctk). 2007-12-16 13:00:51 +00:00
oliverschmidt dca1f5cc19 Exclude unnecessary code in ctk fullscreen mode. 2007-12-15 22:18:13 +00:00
oliverschmidt 80d47e851f Have the fullscreen mode (triggered by not setting CTK_CONF_WINDOWS) work with mouse support. 2007-12-15 21:29:46 +00:00
oliverschmidt 9c9e336f45 Some source reformatting. 2007-12-15 21:04:20 +00:00
oliverschmidt 4671ee3d10 Have ctk (at least on conio) work correctly without menus. 2007-12-15 20:46:15 +00:00
oliverschmidt 6fd3b0dbae Removed CTK_CONF_HYPERLINK from shared code as its use is still unclear (and the implementation was incomplete anyway). 2007-12-15 11:34:59 +00:00
oliverschmidt 3e1431b854 Ooops, forgot to remove debug printfs before committing :-( 2007-12-14 23:38:00 +00:00
oliverschmidt 2da3a926a2 Introduced CTK_CONF_WINDOWS.
If it is set the behaviour is (supposed to be) as before. Otherwise ctk supports just one window in fullscreen mode: No windows, no borders, no menu, no dialogs, no desktop.
The ctk draw interface stays stable but obviously further code savings are possible by making ctk draw implementations CTK_CONF_WINDOWS aware.
Currently the fullscreen mode doesn't work with mouse support - this is supposed to come later...
2007-12-14 23:34:19 +00:00
oliverschmidt 5aa55f3f80 Enhanced CTK_CONF_ICONS support. 2007-11-30 22:37:22 +00:00
oliverschmidt 7669fd8724 Enhanced CTK_CONF_MENUS support. 2007-11-30 21:50:09 +00:00
oliverschmidt 2748a0803f Minor formatting change. 2007-11-30 11:15:41 +00:00
matsutsuka 2f121a1609 CTK_WINDOW_CLOSE support is enhanced.
CTK_CONF_HYPERLINK is introduced.
Both are for the memory sake.
2007-11-28 10:13:57 +00:00
oliverschmidt 536f20efba Removed compiler warnings. 2007-11-18 01:49:48 +00:00
oliverschmidt d8330e9416 Removed compiler warning. 2007-11-18 01:46:53 +00:00
matsutsuka 7dec361a80 #include <conio.h>
doesn't work on z80 version, because this is not a standard library.
2007-09-19 12:50:23 +00:00
matsutsuka 9d4fc0a1a8 Support for z80(sdcc) port.
In order to support, some core modules are modified as follows:

core/sys/dsc.h
- If CTK_CONF_ICONS is diabled, the whole icon-related code is disabled.
- DSC_HEADER is changed to remove extra semicolon.

core/sys/process.h
- process_data_t is expressed by void* in signatures (known bug on sdcc).

core/sys/autostart.h
- autostart_processes is changed to remove extra semicolon.

core/sys/cc.h
- CC_CONF_ASSIGN_AGGREGATE is introduced.
- CC_CONF_INC_CAST_POINTER is introduced, a workaround of a kind
  of sdcc bug for an increment.

core/net/hc.c
core/net/uip_arp.c
core/net/uaodv.c
- Aggregation assignments are changed to uip_ipaddr_copy.

core/net/psock.c
core/net/uipbuf.c
core/net/dhcpc.c
apps/shell/shell.c
core/ctk/vnc-server.c
core/ctk/vnc-out.c
- "register" keyword in a signature cannot be used in sdcc,
  CC_REGISTER_ARG is used instead.

core/net/uip-over-mesh.c
- An extra semicolon is removed.

apps/dhcp/dhcp-dsc.c
apps/shell/shell-dsc.
apps/ftp/ftp-dsc.c
apps/process-list/process-list-dsc.c
apps/email/email-dsc.c
apps/webserver/webserver-dsc.c
apps/vnc/vnc-dsc.c
apps/vnc/vnc-viewer.h
apps/webbrowser/www-dsc.c
apps/about/about-dsc.c
apps/irc/irc-dsc.c
apps/telnet/telnet-dsc.c
apps/telnetd/telnetd-dsc.c
apps/netconf/netconf-dsc.c
apps/directory/directory-dsc.c
pps/calc/calc-dsc.c
- Modify an extern type to a real declaration, which is static
  to prevent a compile error.

core/net/mac/xmac.c
- Variables cannot be defined in a head of block on sdcc.

core/ctk/ctk.h
core/ctk/ctk.c
apps/program-handler/program-handler.c
- If CTK_CONF_ICONS is diabled, the whole icon-related code is disabled.

Makefile.include
- Add a set of configuration for an assembler.
- $(CLEAN) variable is introduced for customized cleanup.

apps/process-list/process-list.c
- PROCESSLIST_CONF_HEIGHT is introduced to address smaller screen size.

core/lib/ctk-filedialog.c
- FILES_CONF_HEIGHT is introduced to address smaller screen size.
- "register" keyword in a signature cannot be used in sdcc,
  CC_REGISTER_ARG is used instead.

apps/vnc/vnc-viewer.c
- A cast is added to prevent a compile error.
- "register" keyword in a signature cannot be used in sdcc,
  CC_REGISTER_ARG is used instead.

apps/webbrowser/webclient.c
- CC_CONF_INC_CAST_POINTER is introduced, a workaround of a kind
  of sdcc bug for an increment.

core/loader/elfloader.c
- A cast is added to prevent a compile error.

core/net/rime/rimeaddr.c
- An initialization is added to prevent a compile error.

core/net/rime/rudolph0.c
- NULL is changed to 0, because NULL causes a compile error.

core/net/rime/route-discovery.c
- Add an argument to match the definition of nf_callbacks.

cpu/z80/strcasecmp.h
cpu/z80/strcasecmp.c
cpu/z80/contiki-sdcc-conf.h
cpu/z80/mtarch.c
cpu/z80/mtarch.h
cpu/z80/Makefile.z80
- New files to make compilation availble on sdcc.
- Added support for multithreading.
2007-08-30 14:39:16 +00:00
oliverschmidt 5e7ecef8ab Moved CTK terminal support into backyard as it depends on stuff recently moved in backyard as well. 2007-05-26 21:54:08 +00:00
oliverschmidt 4521c330d5 Moved into backyard as it was never ported to Contiki 2.x. 2007-05-26 21:46:00 +00:00
oliverschmidt 9cb735180e Moved into backyard as it was never ported to Contiki 2.x. 2007-05-26 21:38:16 +00:00