Commit graph

68 commits

Author SHA1 Message Date
Frank Gevaerts
530c25130f Make the sim buildable with mingw again
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26037 a1c6a512-1295-4272-9138-f99709370657
2010-05-14 22:57:52 +00:00
Thomas Martitz
68947473e1 Move math.h to firmware/libc/include/ and fix slight incompatibilities between our and the host's math.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26020 a1c6a512-1295-4272-9138-f99709370657
2010-05-14 12:43:45 +00:00
Michael Sevakis
057c11147e Fix LUA red and yellow.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26007 a1c6a512-1295-4272-9138-f99709370657
2010-05-14 07:17:03 +00:00
Thomas Martitz
50a6ca39ad Move c/h files implementing/defining standard library stuff into a new libc directory, also standard'ify some parts of the code base (almost entirely #include fixes).
This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 21:04:40 +00:00
Thomas Martitz
0a1d7c28b7 Make open() posix compliant api-wise. A few calls (those with O_CREAT) need the additional optional mode parameter so add it. Impact for the core is almost zero, as open() is a wrapper macro for the real open function which doesn't take the variable parameter.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25844 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 17:35:13 +00:00
Thomas Martitz
9a3c0778c6 Fix two warnings that appear with gcc4.4.3. The one in recording.c ("compact_view is used uninitialized" seems to be false positive unfortunately).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25082 a1c6a512-1295-4272-9138-f99709370657
2010-03-08 23:56:54 +00:00
Maurus Cuelenaere
1251fa5766 Lua fscanf: use pointer of file descriptor instead of file descriptor itself to avoid 64-bit pointer<->int clash (aka fix yellow).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24633 a1c6a512-1295-4272-9138-f99709370657
2010-02-13 14:51:38 +00:00
Maurus Cuelenaere
9bf28debd8 Fix FS#11007: Lua didn't parse negative numbers correct when reading from files
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24632 a1c6a512-1295-4272-9138-f99709370657
2010-02-13 14:41:00 +00:00
Maurus Cuelenaere
5ca112b21e Lua: return nil when function failed instead of returning nothing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23405 a1c6a512-1295-4272-9138-f99709370657
2009-10-29 17:13:36 +00:00
Maurus Cuelenaere
b1a7511990 Also expose functions having (s)size_t or off_t as argument/return type to Lua.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23403 a1c6a512-1295-4272-9138-f99709370657
2009-10-29 16:52:09 +00:00
Kevin Ferrare
19c3e77fa0 Boomshine plugin : port to Greyscale and B/W targets, and targets without touchscreen (currently using the virtual keyboard keymap)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23397 a1c6a512-1295-4272-9138-f99709370657
2009-10-29 07:48:26 +00:00
Maurus Cuelenaere
8dbef6d8d0 Lua: add lib/helper.c wrappers
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23360 a1c6a512-1295-4272-9138-f99709370657
2009-10-26 17:07:56 +00:00
Maurus Cuelenaere
6314952ff1 Lua: add parts of the math library (all floating point functions are #ifdef'ed out)
Flyspray: FS#10389
Author: myself

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23321 a1c6a512-1295-4272-9138-f99709370657
2009-10-23 10:49:55 +00:00
Maurus Cuelenaere
9dd25adae4 Lua: add do_menu() wrapper. Also fix potential NULL pointer dereference
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23320 a1c6a512-1295-4272-9138-f99709370657
2009-10-23 10:38:20 +00:00
Thomas Martitz
8855b0c613 Use PLUGINFLAGS in lua.make, instead of only CFLAGS.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23121 a1c6a512-1295-4272-9138-f99709370657
2009-10-11 21:30:37 +00:00
Frank Gevaerts
e99dd1898e Make sure to use $(CFLAGS) to get all defines when preprocessing actions.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23119 a1c6a512-1295-4272-9138-f99709370657
2009-10-11 20:55:47 +00:00
Maurus Cuelenaere
8898339fcf Lua plugin: fix bad behaviour for io.open(path, 'w')
Author: Christophe Gragnic
Patch: FS#10592

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22645 a1c6a512-1295-4272-9138-f99709370657
2009-09-06 21:41:48 +00:00
Maurus Cuelenaere
527b069653 Lua: implement the ^ and % operators
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22070 a1c6a512-1295-4272-9138-f99709370657
2009-07-27 16:06:51 +00:00
Maurus Cuelenaere
1fde0dd8e4 Lua: return nil when kbd_input() gets aborted and make it possible to preset the input string (based on FS#10455 by Christophe Gragnic)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22008 a1c6a512-1295-4272-9138-f99709370657
2009-07-23 00:54:35 +00:00
Maurus Cuelenaere
1dc0c46d93 Lua IOlib: when opening files for writing/appending, check if they exist and if not, add O_CREAT.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21918 a1c6a512-1295-4272-9138-f99709370657
2009-07-17 11:09:51 +00:00
Maurus Cuelenaere
be54b7f6a2 Revert r21863 partly: fixes Lua
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21883 a1c6a512-1295-4272-9138-f99709370657
2009-07-15 15:16:55 +00:00
Nils Wallménius
3d4701a6e4 FS#10080
* Move strncpy() from core to the pluginlib
* Introduce strlcpy() and use that instead in most places (use memcpy in a few) in core and some plugins
* Drop strncpy() from the codec api as no codec used it
* Bump codec and plugin api versions


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21863 a1c6a512-1295-4272-9138-f99709370657
2009-07-14 13:57:45 +00:00
Maurus Cuelenaere
80b4e5d55d Lua:
* add ./?/init.lua to the search path for require
 * put Lua libs in /.rockbox/rocks/viewers/lua/


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21739 a1c6a512-1295-4272-9138-f99709370657
2009-07-10 11:30:26 +00:00
Maurus Cuelenaere
cfffedfa8b Lua IOlib: don't create files when they don't exist
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21715 a1c6a512-1295-4272-9138-f99709370657
2009-07-08 14:54:40 +00:00
Maurus Cuelenaere
59c4b6816b Lua: expose SCREEN_MAIN & SCREEN_REMOTE (for rb.lcd_*() functions)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21712 a1c6a512-1295-4272-9138-f99709370657
2009-07-08 11:59:05 +00:00
Maurus Cuelenaere
3653aea4f8 Lua: use rb->screens[] to do painting
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21676 a1c6a512-1295-4272-9138-f99709370657
2009-07-05 19:34:57 +00:00
Maurus Cuelenaere
427bf0b893 Also make rocklib_aux.c depend on $(LUA_OBJ)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21663 a1c6a512-1295-4272-9138-f99709370657
2009-07-05 17:59:45 +00:00
Maurus Cuelenaere
beb9066d9f Lua: implement gui_syncyesno_run
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21662 a1c6a512-1295-4272-9138-f99709370657
2009-07-05 16:41:16 +00:00
Maurus Cuelenaere
ce5e6cefb8 Fix sim_* errors when compiling Lua
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21660 a1c6a512-1295-4272-9138-f99709370657
2009-07-05 15:52:08 +00:00
Maurus Cuelenaere
9db43dac62 Fix actions.lua & buttons.lua make errors
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21659 a1c6a512-1295-4272-9138-f99709370657
2009-07-05 15:45:26 +00:00
Maurus Cuelenaere
a9fdd6001f Add a Rockbox header..
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21658 a1c6a512-1295-4272-9138-f99709370657
2009-07-05 15:39:17 +00:00
Maurus Cuelenaere
d755a5ac58 Lua: add script which wraps not-yet ported C functions to Lua
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21657 a1c6a512-1295-4272-9138-f99709370657
2009-07-05 15:33:08 +00:00
Maurus Cuelenaere
69c73e8bd6 Lua: always expose BUTTON_TOUCHSCREEN and remove BUTTON_ constants from rocklib.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21630 a1c6a512-1295-4272-9138-f99709370657
2009-07-03 23:03:07 +00:00
Maurus Cuelenaere
9bff845b49 Lua: because Rockbox doesn't support any current working directory functionality, 'hack' loadlib so it replace '$' in LUA_PATH_DEFAULT with the directory wherein the current script is.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21595 a1c6a512-1295-4272-9138-f99709370657
2009-07-01 17:01:22 +00:00
Maurus Cuelenaere
bc4d223b6c Correct comment
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21574 a1c6a512-1295-4272-9138-f99709370657
2009-06-30 09:35:36 +00:00
Maurus Cuelenaere
f3efc26445 Lua: also expose BUTTON_REL, BUTTON_REPEAT & BUTTON_TOUCHSCREEN
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21573 a1c6a512-1295-4272-9138-f99709370657
2009-06-30 09:34:41 +00:00
Maurus Cuelenaere
2b92fe2332 Lua: remove BUTTON_TOUCHSCREEN as this constant is available in buttons.lua
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21544 a1c6a512-1295-4272-9138-f99709370657
2009-06-28 15:51:32 +00:00
Maurus Cuelenaere
e7db6f962a Fix typo & red
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21543 a1c6a512-1295-4272-9138-f99709370657
2009-06-28 15:04:49 +00:00
Maurus Cuelenaere
681ca21a1e Lua:
* add IO lib (adapted to Rockbox)
 * remove old IO wrappers
 * rework helloworld.lua to work with the IO lib
 * do some stuff in helloworld.lua better (part of FS#10379, by James Callahan)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21541 a1c6a512-1295-4272-9138-f99709370657
2009-06-28 14:55:16 +00:00
Maurus Cuelenaere
3ff84e5e4f Lua: add the package library
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21506 a1c6a512-1295-4272-9138-f99709370657
2009-06-25 13:26:05 +00:00
Maurus Cuelenaere
af980d8bcb Lua: expose BUTTON_* defines
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21500 a1c6a512-1295-4272-9138-f99709370657
2009-06-24 21:46:17 +00:00
Maurus Cuelenaere
388e31cb96 Fix FS#10378: Lua crashes when loading non-existing files
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21488 a1c6a512-1295-4272-9138-f99709370657
2009-06-24 10:39:07 +00:00
Maurus Cuelenaere
3391bf3543 Fix yellow
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21292 a1c6a512-1295-4272-9138-f99709370657
2009-06-15 13:58:19 +00:00
Maurus Cuelenaere
153ac73c04 Fix helloworld.lua for mono targets (+ add lcd_mono_bitmap() & lcd_mono_bitmap_part() to Lua API)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21291 a1c6a512-1295-4272-9138-f99709370657
2009-06-15 13:46:10 +00:00
Magnus Holmgren
a7621fcb8b Correct the includes; the old way broke parallel builds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21234 a1c6a512-1295-4272-9138-f99709370657
2009-06-09 11:23:25 +00:00
Maurus Cuelenaere
9c3e679d18 Lua: add touchscreen_set_mode & current_path (+ some constants)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21165 a1c6a512-1295-4272-9138-f99709370657
2009-06-01 22:31:32 +00:00
Maurus Cuelenaere
82eea9ed69 Lua: add bitlib (makes bitwise operators possible)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21164 a1c6a512-1295-4272-9138-f99709370657
2009-06-01 22:02:18 +00:00
Maurus Cuelenaere
acbbf93615 Lua: make sure action.h gets C preprocessed before processing it
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21123 a1c6a512-1295-4272-9138-f99709370657
2009-05-28 22:02:53 +00:00
Maurus Cuelenaere
1e980cd977 Fix yellow & red
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21107 a1c6a512-1295-4272-9138-f99709370657
2009-05-27 23:02:17 +00:00
Maurus Cuelenaere
b2581e143d Lua: add support for os library
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21106 a1c6a512-1295-4272-9138-f99709370657
2009-05-27 22:48:50 +00:00