Commit Graph

31 Commits

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
Adam Dunkels
2d203cc713 Fix compiler warnings 2015-10-20 10:11:31 +02: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
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
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
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
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
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
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
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
d8330e9416 Removed compiler warning. 2007-11-18 01:46:53 +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
eec5ae40c9 Avoid compiler warnings. 2007-04-15 13:09:23 +00:00
oliverschmidt
ad4a8df425 Allow to build telnet-server example for targets not defining CTK_CONF_MAXMENUITEMS. 2007-03-26 23:01:11 +00:00
oliverschmidt
d3d215d142 The special handling of mouse-over detection for bitmaps and icons seems unnecessary since the the member 'h' is always present and can always be assumed to be initialized. Furthermore the special handling prevented multiline textentries to be treated correctly. Therefore the special handling is now completely removed (and the handling of the 'h' member is adjusted). 2006-08-30 23:12:33 +00:00
oliverschmidt
d4a00f67fe The program_handler_add() mechanism relied on being used after the initialization of the program_handler (and the ctk) process but before entering the event handling. In Contiki 2.x there's no such explicit process initialization anymore - and the implicit asynchronous initialization runs after program_handler_add(). Therefore the initialization of the data structures modified by program_handler_add() had to be removed from that asynchronous process initialization. Instead C-langugae global data.initialization is used. 2006-08-15 00:11:45 +00:00
oliverschmidt
be675345ad Avoid compiler warnings. 2006-08-13 14:08:43 +00:00
adamdunkels
c9e808d638 Import of the contiki-2.x development code from the SICS internal CVS server 2006-06-17 22:41:10 +00:00