Commit Graph

592 Commits

Author SHA1 Message Date
Bertrik Sikken 449dff44ce Calculate day-of-week after reading time from RTC. Should fix FS#11814
Change-Id: I31dc0b0db5272d16ae55790252e3963e1a91d5bb
2012-04-12 21:32:25 +02:00
Marcin Bukat 2f8b44aae2 Add RKW firmware file format loader
Change-Id: I5283fdcdb8d263fd9375a6d29396f82650aeb686
2012-03-04 00:34:26 +01:00
Frank Gevaerts efd25bf6db Disable some more sim_ and app_ redirection for __PCTOOL__.
This makes checkwps build again for apps

Change-Id: I6fcd299076bd201053012d09e208a0845c2145e2
2012-03-03 20:23:51 +01:00
Thomas Martitz 295c1c1e8b checkwps: Fix buildall.sh and some RaaA/ypr0 versions.
Change-Id: I5889743e94ed568c8f7dcc50de0b03b8421969f7
2012-02-10 20:27:59 +01:00
Thomas Martitz c94cf3b888 Move optimized ffs to firmware/asm, using the new automatic-asm-picking infrastructure.
Change-Id: I5e7bdc8be7de50ef604c16078857fff1b84650dc
2012-01-22 18:46:45 +01:00
Thomas Martitz a035261089 Move optimized memcpy and friends and strlen to firmware/asm,
using the new automatic-asm-picking infrastructure.
2012-01-22 18:46:45 +01:00
Thomas Martitz 5d13ecc4a8 android/ypr0: Merge fs-*.c to generic filesystem-unix.c.
Change-Id: I52e2c29346baf0d282243880477cd149311ce3d1
2012-01-21 18:39:19 +01:00
Thomas Martitz 20b662a946 rbpaths: Add new special dir HOME_DIR for RaaA.
HOME_DIR is intended for not-so-advanced files which shall be user
visible, and thus not in /.rockbox. Therefore HOME_DIR is translated
to $HOME on RaaA, /sdcard on android, the internal memory on ypr0
and "/" on native targets.

ROCKBOX_DIR ("/.rockbox") already existed as special and is translated
to whatever the real rockbox dir is on the target (e.g. /sdcard/rockbox
on android), but it's not suitable for some files we generate
(e.g. battery-bench.txt).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31430 a1c6a512-1295-4272-9138-f99709370657
2011-12-25 20:11:18 +00:00
Thomas Martitz 249bba03f1 Initial commit of the Samsung YP-R0 port.
This port is a hybrid native/RaaA port. It runs on a embedded linux system,
but is the only application. It therefore can implement lots of stuff that
native targets also implement, while leveraging the underlying linux kernel.

The port is quite advanced. User interface, audio playback, plugins work
mostly fine. Missing is e.g. power mangement and USB (see SamsungYPR0 wiki page).

Included in utils/ypr0tools are scripts and programs required to generate
a patched firmware. The patched firmware has the rootfs modified to load
Rockbox. It includes a early/safe USB mode.

This port needs a new toolchain, one that includes glibc headers and libraries.
rockboxdev.sh can generate it, but e.g. codesourcey and distro packages may
also work.

Most of the initial effort is done by Lorenzo Miori and others (on ABI),
including reverse engineering and patching of the original firmware,
initial drivers, and more. Big thanks to you.

Flyspray: FS#12348
Author: Lorenzo Miori, myself

Merry christmas to ypr0 owners! :)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31415 a1c6a512-1295-4272-9138-f99709370657
2011-12-24 11:56:46 +00:00
Amaury Pouly ba2740a5b8 disk: fix sector multiplier init, also remove a test which has became obsolete
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31356 a1c6a512-1295-4272-9138-f99709370657
2011-12-19 00:40:11 +00:00
Boris Gjenero ff1c567417 Remove USB time sync code when there's no RTC.
Without an RTC, Rockbox doesn't keep time. In that situation, USB time sync
previously did nothing but reported success. After this change, the USB time
sync request won't be recognized on those targets.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31319 a1c6a512-1295-4272-9138-f99709370657
2011-12-16 00:09:28 +00:00
Boris Gjenero 8414a44ad4 Remove conditional added around set_day_of_week in r31301.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31305 a1c6a512-1295-4272-9138-f99709370657
2011-12-15 21:49:48 +00:00
Boris Gjenero 871c7bd34c Add conditionals around functions that are only needed when RTC is present.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31301 a1c6a512-1295-4272-9138-f99709370657
2011-12-15 21:38:23 +00:00
Amaury Pouly 5ab697e8e1 Really fix red
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31273 a1c6a512-1295-4272-9138-f99709370657
2011-12-15 17:22:47 +00:00
Amaury Pouly 853638274d Fix red
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31272 a1c6a512-1295-4272-9138-f99709370657
2011-12-15 17:19:59 +00:00
Amaury Pouly 3a6e3c254e Add support for for per-drive logical sector size. This allows targets to have a different logical sector size for the internal storage and the sd card, like on the fuze+ for example.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31270 a1c6a512-1295-4272-9138-f99709370657
2011-12-15 17:07:19 +00:00
Jonathan Gordon 6461f74ae4 Try $RBROOT before $HOME when looking for the sdl apps rockbox root dir
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31151 a1c6a512-1295-4272-9138-f99709370657
2011-12-05 12:07:23 +00:00
Rafaël Carré 09f6556e22 Compile fix for mingw-w64
Don't build str(n)casecmp as functions if they are already defined by preprocessor

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31147 a1c6a512-1295-4272-9138-f99709370657
2011-12-04 21:07:06 +00:00
Fred Bauer a71e87f132 Update some missed pointers when moving the dircache allocation
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31028 a1c6a512-1295-4272-9138-f99709370657
2011-11-19 14:57:56 +00:00
Thomas Martitz 1645c148e3 Simulate usb plugging on the sim better using sim_tasks.
Now all threads need to ack the connection like on real target, dircache is unloaded and playback stops accordingly.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31009 a1c6a512-1295-4272-9138-f99709370657
2011-11-17 18:40:00 +00:00
Thomas Martitz 9886126858 Fix FS#12325 - screen corruption on early usb.
When booting with USB inserted, the dircache build can get interrupted by the usb connection, in which case the dircache buffer is freed.
Due to a bug the re-creation of dircache used the old freed buffer and overwrite new allocs (causing screen corruption).

Set allocated_size to 0 to make it not take the code path that assumes an existing buffer,
and bring that and freeing together in the code.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30845 a1c6a512-1295-4272-9138-f99709370657
2011-10-28 16:38:52 +00:00
Fred Bauer 8e18dc85cf fix sign error
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30812 a1c6a512-1295-4272-9138-f99709370657
2011-10-21 06:45:26 +00:00
Robert Kukla d25341a032 revert r30566 and r30567 to fix FS#12294 (superfloppy not mounting)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30632 a1c6a512-1295-4272-9138-f99709370657
2011-10-02 11:39:31 +00:00
Torne Wuff e12a832758 Also remove the fat_partition_types array.
If we aren't going to check for the partition type, we don't need the array of
known FAT partition types.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30567 a1c6a512-1295-4272-9138-f99709370657
2011-09-17 22:49:30 +00:00
Torne Wuff 36d04ac76e Allow any partition type, not just known FAT types.
Instead of only mounting partitions with a FAT partition type, try any
partition that isn't type 0 (unallocated) or 5 (extended). This makes it easier
to reformat SDXC cards which have the exFAT partition type, and also brings us
in line with pretty much every other OS at this point. Anything with a
valid-looking FAT superblock will get mounted.



git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30566 a1c6a512-1295-4272-9138-f99709370657
2011-09-17 22:45:59 +00:00
Thomas Martitz 7e14b935df Dircache: Allow dircache to be enabled without reboot.
Also add two dircache function, one of which does what dircache_disable()
did previously as this now also frees the dircache buffer.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30393 a1c6a512-1295-4272-9138-f99709370657
2011-08-30 21:07:46 +00:00
Thomas Martitz baa070cca6 GSoC/Buflib: Enable compaction in buflib.
This enables the ability to allocate (and free) memory dynamically
without fragmentation, through compaction. This means allocations can move
and fragmentation be reduced. Most changes are preparing Rockbox for this,
which many times means adding a move callback which can temporarily disable
movement when the corresponding code is in a critical section.

For now, the audio buffer allocation has a central role, because it's the one
having allocated most. This buffer is able to shrink itself, for which it
needs to stop playback for a very short moment. For this,
audio_buffer_available() returns the size of the audio buffer which can
possibly be used by other allocations because the audio buffer can shrink.

lastfm scrobbling and timestretch can now be toggled at runtime without
requiring a reboot.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30381 a1c6a512-1295-4272-9138-f99709370657
2011-08-30 14:01:45 +00:00
Thomas Martitz d0b72e2590 GSoC/Buflib: Add buflib memory alocator to the core.
The buflib memory allocator is handle based and can free and
compact, move or resize memory on demand. This allows to effeciently
allocate memory dynamically without an MMU, by avoiding fragmentation
through memory compaction.

This patch adds the buflib library to the core, along with
convinience wrappers to omit the context parameter. Compaction is
not yet enabled, but will be in a later patch. Therefore, this acts as a
replacement for buffer_alloc/buffer_get_buffer() with the benifit of a debug
menu.

See buflib.h for some API documentation.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30380 a1c6a512-1295-4272-9138-f99709370657
2011-08-30 14:01:33 +00:00
Thomas Martitz c08299cedd Dircache: Fix memory leak (and recently panic).
If the dircache was interrupted during generation (e.g. through USB
insertion), then the allocated buffer was leaked and a new one
was allocated for the second cache generation. This causes a
panic since r30308 since playback holds the control over the
audiobuffer at that time.

The fix is to simply check allocated_size instead of
dircache_size which is reset to 0 upon cancellation.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30321 a1c6a512-1295-4272-9138-f99709370657
2011-08-16 13:01:03 +00:00
Thomas Martitz 4087875f1c Dircache: Fix bug introduced in r30308.
dircache_root wasn't initialized at all and the giving allocated_size
passed to buffer_release_buffer() didn't account for alignment padding.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30318 a1c6a512-1295-4272-9138-f99709370657
2011-08-15 15:13:17 +00:00
Thomas Martitz d1322b7159 GSoC/Buflib: Replace all direct accesses to audiobuf with buffer API functions.
Namely, introduce buffer_get_buffer() and buffer_release_buffer().
buffer_get_buffer() aquires all available and grabs a lock, attempting to
call buffer_alloc() or buffer_get_buffer() while this lock is locked will cause
a panicf() (doesn't actually happen, but is for debugging purpose).
buffer_release_buffer() unlocks that lock and can additionally increment the
audiobuf buffer to make an allocation. Pass 0 to only unlock if buffer was
used temporarily only.
buffer_available() is a replacement function to query audiobuflen, i.e. what's
left in the buffer.
Buffer init is moved up in the init chain and handles ipodvideo64mb internally.

Further changes happened to mp3data.c and talk.c as to not call the above API
functions, but get the buffer from callers. The caller is the audio system
which has the buffer lock while mp3data.c and talk mess with the buffer.
mpeg.c now implements some buffer related functions of playback.h, especially
audio_get_buffer(), allowing to reduce #ifdef hell a tiny bit.

audiobuf and audiobufend are local to buffer.c now.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30308 a1c6a512-1295-4272-9138-f99709370657
2011-08-14 15:13:00 +00:00
Thomas Martitz 44ffa3ef93 format/*printf: Add simple support for %p format specifier.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30249 a1c6a512-1295-4272-9138-f99709370657
2011-08-04 10:44:41 +00:00
Thomas Martitz 32b54164d8 Dircache: Fix 2 nasty bugs introduced with the reworks starting with r30032.
The first is an off-by-one that leads to miscalculation of the dircache size.
The format string size was used but dircache size was incremented by the snprintf() result which is smaller.
The other forgot to update the location of the "." and ".." strings upon compaction,
so that new folders got assigned orphaned pointers for those directory entires.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30224 a1c6a512-1295-4272-9138-f99709370657
2011-07-30 23:21:58 +00:00
Thomas Martitz 1b7ff725c6 Revert "Introduce bsearch() and use it in tagtree.c."
It was committed by accident (it's on FS still).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30157 a1c6a512-1295-4272-9138-f99709370657
2011-07-18 18:57:50 +00:00
Thomas Martitz 74ab227b58 Introduce bsearch() and use it in tagtree.c.
bsearch() is a general purpose binary search function for arrays.
It's supposedly faster than looping over arrays.
The array needs to be sorted in ascending order under the provided
comparison function. If the key and array element are of the same kind,
then the same compare function can be used for qsort() and bsearch().

Code taken from glibc.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30155 a1c6a512-1295-4272-9138-f99709370657
2011-07-18 18:55:20 +00:00
Miika Pekkarinen e06bb54d12 Initialize the d_names_start pointer correctly in dircache. This should
prevent d_names data from being overwritten (likely causing garbage in
file browser and other strange symptoms).


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30122 a1c6a512-1295-4272-9138-f99709370657
2011-07-04 17:13:48 +00:00
Miika Pekkarinen 563a185ff4 Fixed incorrect dircache reallocation during tagcache commit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30108 a1c6a512-1295-4272-9138-f99709370657
2011-07-01 13:38:20 +00:00
Thomas Martitz 88234fa921 Fix loading dircache stat on h100. Relocating the data was broken due to struct alignment problems.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30051 a1c6a512-1295-4272-9138-f99709370657
2011-06-22 14:18:22 +00:00
Thomas Martitz 2b61f7ce64 Use ALIGN_UP() macro for alignment, in a more correct way also.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30041 a1c6a512-1295-4272-9138-f99709370657
2011-06-20 20:12:58 +00:00
Thomas Martitz 287d69d7c4 Dircache: A bit of follow-up code cleanup suggested by Amaury Pouly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30040 a1c6a512-1295-4272-9138-f99709370657
2011-06-20 20:12:52 +00:00
Thomas Martitz 3b29aa49d3 Optimize new dircache_copy_path so that the helper (strlcat) doesn't need to walk through the entire string repeatedly.
Also fix a off-by-one.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30039 a1c6a512-1295-4272-9138-f99709370657
2011-06-20 20:12:47 +00:00
Thomas Martitz af7aaae478 Dircache: Don't expose struct dircache_entry and pointers into the cache, use IDs instead.
Only integer IDs are exposed from dircache with this. This way the cache is isolated from other modules.
This is needed for my buflib gsoc project.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30038 a1c6a512-1295-4272-9138-f99709370657
2011-06-20 20:12:42 +00:00
Thomas Martitz 0b9c57d33e Dircache: Move struct maindata declaration to dircache.c and actually check for DIRCACHE_MAGIC when loading from disk.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30037 a1c6a512-1295-4272-9138-f99709370657
2011-06-20 20:12:35 +00:00
Thomas Martitz 52abbb186d Dircache: Change internal cache layout.
The dircache_entry structs are now allocated subsequently from the front, allowing to treat them as an array.  The d_names are allocated from the back (in reverse order, growing downwards).
This allows the cache to be moved around (needed for my buflib gsoc project). It is utilized when loading the cache from disk (on the h100), now the pointer to the cache begin doesn't need to be the same across reboots anymore.

This should save a bit memory usage, since there's no need for aligning padding bytes after d_names anymore.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30036 a1c6a512-1295-4272-9138-f99709370657
2011-06-20 20:12:30 +00:00
Thomas Martitz b67f4a1824 Fix dircache_size calculation bug introcuced 3 revisions ago.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30035 a1c6a512-1295-4272-9138-f99709370657
2011-06-20 20:12:26 +00:00
Thomas Martitz e063725534 Dircache: Return the size of the result string in dircache_copy_path() so that callers don't need to call strlen on it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30034 a1c6a512-1295-4272-9138-f99709370657
2011-06-20 20:12:15 +00:00
Thomas Martitz 38da400e58 Dircache: Rework and simplify dircache_copy_path().
Use a recursive helper function with strlcat to build up the path backwards. This way the tree doesn't need to be walked twice and no extraneous size calculation is needed.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30033 a1c6a512-1295-4272-9138-f99709370657
2011-06-20 20:12:10 +00:00
Thomas Martitz 60e4f20c38 Dircache: Remove dircache_entry::name_len.
It's reduntant, and enlarges the dircache unnecessarily. Saves 4 byte per file in the whole filesystem.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30032 a1c6a512-1295-4272-9138-f99709370657
2011-06-20 20:07:35 +00:00
Andree Buschmann 67f215032d Fix a bunch of 'variable set but not used' warnings reported from GCC 4.6.0.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29841 a1c6a512-1295-4272-9138-f99709370657
2011-05-08 21:06:38 +00:00
Thomas Martitz 294d058034 Return -1 for not implemented RTC functions.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29546 a1c6a512-1295-4272-9138-f99709370657
2011-03-08 21:36:47 +00:00
Thomas Jarosch f9f89cf5cb RaaA: Fix write locations of plugins
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29506 a1c6a512-1295-4272-9138-f99709370657
2011-03-02 23:43:54 +00:00
Thomas Jarosch 6e9e6a7571 RaaA: Add initial Pandora support
More information: www.openpandora.org

Possible things to implement:
- Special button mappings
- Battery monitoring
- ALSA audio backend
- Automate creation of "pnd" (=binary) file

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29451 a1c6a512-1295-4272-9138-f99709370657
2011-02-27 23:42:37 +00:00
Michael Sparmann a5034bd244 Fix yellow
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29449 a1c6a512-1295-4272-9138-f99709370657
2011-02-27 23:22:09 +00:00
Michael Sparmann 59c5e791a1 iPod Classic CE-ATA Support (Part 3 of 4: Introduce STORAGE_NEEDS_ALIGN, which ensures that no unaligned storage accesses are performed through file.c)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29447 a1c6a512-1295-4272-9138-f99709370657
2011-02-27 22:47:33 +00:00
Michael Sparmann 1b5e31ed43 iPod Classic CE-ATA Support (Part 2 of 4: Remove on-stack sector buffers, and replace them with a single statically allocated sector buffer that's arbitrated amongst users)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29445 a1c6a512-1295-4272-9138-f99709370657
2011-02-27 22:44:54 +00:00
Michael Sparmann 751303c2ac iPod Classic CE-ATA Support (Part 1 of 4: Cacheline align some statically allocated sector buffers)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29444 a1c6a512-1295-4272-9138-f99709370657
2011-02-27 22:44:30 +00:00
Thomas Jarosch 70e48bf66d RaaA: Create full config directory tree during initialization
Also robustify against unset HOME environment var.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29397 a1c6a512-1295-4272-9138-f99709370657
2011-02-25 14:31:26 +00:00
Thomas Jarosch 351c851d08 RaaA: app_rename() must also do ROCKBOX_DIR translation for the target path
Fixes the "recent bookmarks" feature

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29316 a1c6a512-1295-4272-9138-f99709370657
2011-02-15 22:46:36 +00:00
Michael Sevakis b15aa47c56 All kernel objects in code shared amongs targets (core, plugins, codecs) should be declared SHAREDBSS_ATTR as any core could potentially touch them even though they seem only to involve threads on one core. The exception is target code for particular CPUs where proper allocation is fixed. playlist.c was a little odd too-- use one mutex for the current playlist and a separate one for created playlists (still pondering the necessity of more than one).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29305 a1c6a512-1295-4272-9138-f99709370657
2011-02-14 11:27:45 +00:00
Thomas Jarosch 5f037ac015 Initial maemo platform support
Adds Nokia N900, N810 and N800 support.

Features:
- Introduce maemo specific platform defines
- Play audio in silent mode
- Stop playback on incoming calls
- Battery level readout
- Bluetooth headset support
- Save CPU by disabling screen updates if the display
  is off or the app doesn't have input focus
- N900: GStreamer audio backend

Kudos to kugel for the code review.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29248 a1c6a512-1295-4272-9138-f99709370657
2011-02-08 20:05:25 +00:00
Andree Buschmann 5d849a963e Clean up multiple definitions of RAM size. Remove -DMEM (make) and MEM (code), use the already defined MEMORYSIZE instead.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29189 a1c6a512-1295-4272-9138-f99709370657
2011-02-02 17:43:32 +00:00
Thomas Martitz 771011a6fc RaaA: Fix database duplication issue on every start
The code in tagcache.c:commit() was unable to delete
the to-be-commited database file as it read from
$(HOME)/.config/rockbox.org and tried to delete
the file later on in /.rockbox/.

As we didn't specify any flags like IS_FILE or NEED_WRITE
in _get_user_file_path() (which is called by f.e. app_remove()),
it searched for the file in two places.

In case of app_rename() IS_FILE would be wrong, so we just
add a NEED_WRITE to any write operation.

Author: Thomas Jarosch

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29148 a1c6a512-1295-4272-9138-f99709370657
2011-01-27 21:09:25 +00:00
Michael Sparmann 7fea136903 Autodetect sector size on superfloppy volumes based on the FAT32 BPB (kudos to Frank Gevaerts)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28946 a1c6a512-1295-4272-9138-f99709370657
2011-01-02 22:28:22 +00:00
Teruaki Kawashima b1a888a023 correct argument of open.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28756 a1c6a512-1295-4272-9138-f99709370657
2010-12-07 12:20:27 +00:00
Thomas Martitz 2c2416094f Get rid of get_user_file_path and do the path handling in wrappers for open() and friends.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28752 a1c6a512-1295-4272-9138-f99709370657
2010-12-06 22:26:31 +00:00
Frank Gevaerts 1db3dfdd75 Accept FS#11774 by Michael Hohmuth (with some own modifications to #ifdef conditions)
Unmount all filesystems before connecting USB. This ensures that all filehandles are closed, which avoids possible filesystem corruption



git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28693 a1c6a512-1295-4272-9138-f99709370657
2010-11-28 15:22:51 +00:00
Michael Sparmann 79d26ed7f9 Reduce the amount of stack space needed by fat_rename and mkdir_uncached.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28576 a1c6a512-1295-4272-9138-f99709370657
2010-11-13 15:41:18 +00:00
Michael Sparmann 01cdb6a21f Fix screendump on iPod Nano 2G by increasing the usb thread stack size and reducing the stack usage of FAT and storage functions
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28356 a1c6a512-1295-4272-9138-f99709370657
2010-10-25 12:36:57 +00:00
Rafaël Carré 7240478457 file_exists(): fix DEBUGF()
- %s was missing the argument (function name)
- add %p to print the function argument
- also don't call strlen() to test string nullity (and strlen() can't return a negative result)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28123 a1c6a512-1295-4272-9138-f99709370657
2010-09-20 16:39:22 +00:00
Rafaël Carré 5a98ad2d7f format() (and its alias vuprintf) return values are uncheck -> void
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28119 a1c6a512-1295-4272-9138-f99709370657
2010-09-20 08:55:45 +00:00
Thomas Martitz ded525e466 Revert r27972 to fix FS#11610 (but in a way android builds still work).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28050 a1c6a512-1295-4272-9138-f99709370657
2010-09-08 21:26:36 +00:00
Thomas Martitz a4264eb89a Redo previous commit to not break android builds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27972 a1c6a512-1295-4272-9138-f99709370657
2010-09-01 22:06:03 +00:00
Thomas Martitz 4ada1ee44e Fix database
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27971 a1c6a512-1295-4272-9138-f99709370657
2010-09-01 21:58:00 +00:00
Thomas Martitz eac36d5a09 struct DIR -> DIR, should fix most if not all reds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27970 a1c6a512-1295-4272-9138-f99709370657
2010-09-01 21:45:58 +00:00
Thomas Martitz 6eaab4d004 Ged rid of uisimulator/common/io.c for android builds.
Use host's functions for file i/o directly (open(), close() ,etc.), not the sim_* variants.
Some dir functions need to be wrapped still because we need to cache the parents dir's path (host's dirent doesn't let us know).
For the same reason (incompatibility) with host's dirent) detach some members from Rockbox' dirent struct and put it into an extra one,
the values can be retrieved via the new dir_get_info().

Get rid of the sim_ prefix for sleep as well and change the signature to unix sleep().

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27968 a1c6a512-1295-4272-9138-f99709370657
2010-09-01 21:29:34 +00:00
Rafaël Carré 1477aca562 typo in r27953 spotted by kugel: s/long/ssize_t/
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27955 a1c6a512-1295-4272-9138-f99709370657
2010-08-30 23:15:00 +00:00
Rafaël Carré 640c4107f3 format: supports %zd (ssize_t) and %zu (ssize_t)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27953 a1c6a512-1295-4272-9138-f99709370657
2010-08-30 23:08:08 +00:00
Thomas Martitz 87409a2619 Move memset6() declaration to string-extra.h, kills a warning compiling for android since it ships a memory.h.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27789 a1c6a512-1295-4272-9138-f99709370657
2010-08-12 13:55:01 +00:00
Bertrik Sikken 82a2cdb2ad Various minor fixes for Samsung YH* targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27751 a1c6a512-1295-4272-9138-f99709370657
2010-08-08 09:02:41 +00:00
Thomas Martitz 240923a801 Rockbox as an application: Commit current Android port progress.
General state is: Rockbox is usable (plays music, saves configuration, touchscreen works too).
Problems:
 - Playing music in the background (i.e. when switching to another app) doesn't work reliably, but I'm working on that now.
 - no cabbiev2 (only some preliminary files for it), no other default theme.
 - screen flickers sometimes if the updates are too frequent
 - no multi screen apk/package
 - strange behavior when a phone call comes in

The java files (and the eclipse project) resides in android/, which is also supposed to be the build folder.
I've put a small README in there for instructions. There are some steps needed after the make part, which are described there,
and which eclipse mostly handles. But there ought to be some script/makefile rules which do that instead in the future.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27668 a1c6a512-1295-4272-9138-f99709370657
2010-08-02 20:34:47 +00:00
Thomas Martitz 5d8ab7b364 Fix reds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27657 a1c6a512-1295-4272-9138-f99709370657
2010-08-01 16:22:48 +00:00
Thomas Martitz 9c0b2479f7 Rockbox as an application: add get_user_file_path().
For RaaA it evaluates user paths at runtime. For everything but codecs/plugins it will give the path under $HOME/.config/rockbox.org if write access is needed or if the file/folder in question exists there (otherwise it gives /usr/local/share/rockbox).
This allows for installing themes under $HOME as well as having config.cfg and other important files there while installing the application (and default themes) under /usr/local.

On the DAPs it's a no-op, returing /.rockbox directly.

Not converted to use get_user_file_path() are plugins themselves, because RaaA doesn't build plugins yet.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27656 a1c6a512-1295-4272-9138-f99709370657
2010-08-01 16:15:27 +00:00
Bertrik Sikken 028d91aa0c Let format.c #include its own format.h header file
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27633 a1c6a512-1295-4272-9138-f99709370657
2010-07-31 10:09:55 +00:00
Thomas Martitz 74085d2103 Factor out opening and removing DIRCACHE_FILE into separate functions.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27575 a1c6a512-1295-4272-9138-f99709370657
2010-07-26 13:41:47 +00:00
Frank Gevaerts 63011c6743 Revert accidental commit of "%z" support in r26071 (the implementation assumed size_t==long, which is not always the case in hosted environments)
Remove four remaining uses of %z, three of which were in DEBUGF


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27479 a1c6a512-1295-4272-9138-f99709370657
2010-07-18 12:42:47 +00:00
Thomas Martitz 35e8b1429a Rockbox as an application: Replace many occurences of #ifdef SIMULATOR with #if (CONFIG_PLATFORM & PLATFORM_HOSTED) (or equivalently).
The simulator defines PLATFORM_HOSTED, as RaaA will do (RaaA will not define SIMULATOR).
The new define is to (de-)select code to compile on hosted platforms generally.

Should be no functional change to targets or the simulator.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27019 a1c6a512-1295-4272-9138-f99709370657
2010-06-21 16:53:00 +00:00
Frank Gevaerts 2b0ef19900 Don't autogenerate version.c. Just version.h is enough
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27003 a1c6a512-1295-4272-9138-f99709370657
2010-06-21 00:18:29 +00:00
Frank Gevaerts d39ac31877 Make disk_init() non-static again. I forgot to look at the bootloaders
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26629 a1c6a512-1295-4272-9138-f99709370657
2010-06-06 13:28:13 +00:00
Frank Gevaerts 9c43b2ce17 Remove card_enable_monitoring() and use a mutex instead. The card_enable_monitoring() method actually didn't eliminate the possible race conditions it was meant to fix.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26627 a1c6a512-1295-4272-9138-f99709370657
2010-06-06 13:20:47 +00:00
Frank Gevaerts a0557b23f0 remane hotswap.* to sdmmc.*. The contents have nothing at all to do with hotswapping things
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26598 a1c6a512-1295-4272-9138-f99709370657
2010-06-05 21:12:16 +00:00
Amaury Pouly b8ad90aba8 dircache:
- fix check_event_queue to use queue_peek and not mess message order
- change check_dircache_state to a more modest check to avoid messing up dircache state

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26228 a1c6a512-1295-4272-9138-f99709370657
2010-05-21 12:50:50 +00:00
Michael Chicoine 5e98b27178 Fix typos in comment
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26224 a1c6a512-1295-4272-9138-f99709370657
2010-05-21 10:35:35 +00:00
Amaury Pouly 7c205aa686 FS#10913: fix file browser not updated on microsd insertion/removal. This is a synchro bug in dircache: the system send a SYS_FS_CHANGED message which is first handled by the main thread which rescan the directory but as dircache main treats the message after, the file browser get the old version... Workaround is to check message queue before opening a directory.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26222 a1c6a512-1295-4272-9138-f99709370657
2010-05-21 08:31:11 +00:00
Rafaël Carré 24aeac2a75 disk/file: Do not use & on arrays
it might be valid C but is confusing, and not consistent with the rest of file.c

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26191 a1c6a512-1295-4272-9138-f99709370657
2010-05-20 12:59:12 +00:00
Frank Gevaerts 3763ace3ec Revert r26048. APE tags in mp3 is explicitely on http://www.rockbox.org/wiki/NoDo
This sort of change should never go in without prior discussion or consensus


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26071 a1c6a512-1295-4272-9138-f99709370657
2010-05-15 21:57:17 +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 c61e89c0ed Make creat() posix compliant API-wise. Shouldn't affect the core as it's wrapped via a static inline.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25843 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 17:35:04 +00:00
Amaury Pouly 57dc493db5 dircache: increase stack size to handle the worse case path during rebuild (dircache->fat->ata-sd-pp+sdhc) and allows directory with depth up to 20 approximately
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25697 a1c6a512-1295-4272-9138-f99709370657
2010-04-22 08:31:10 +00:00
Tomer Shalev 56058c7213 FS#11187 - diacritic.c is in 'drivers' but it does not belong there
- Move diacritic.c to firmware/common
- The function is_diacritic returns bool now


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25526 a1c6a512-1295-4272-9138-f99709370657
2010-04-07 20:41:18 +00:00
Frank Gevaerts 376d8d577f Add IO priority handling. Currently all IO has equal priority, except the dircache scanning thread which is lower. This fixes the slow boot problem for me, with the added benefit that actual audio playback also starts faster.
Lots of the changes are due to changing storage_(read|write)sectors() from macros to wrapper functions. This means that they have to be called with IF_MD2(drive,) again.

Flyspray: FS#11167
Author: Frank Gevaerts


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25459 a1c6a512-1295-4272-9138-f99709370657
2010-04-03 22:02:09 +00:00
Amaury Pouly 42660535be dir_uncached: fix opendir_uncached to have opened directories keep enough information to update metadata; this is necessary because of the way rmdir_uncached is implemented
FS#11107: should be fixed now

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25203 a1c6a512-1295-4272-9138-f99709370657
2010-03-15 12:32:04 +00:00
Amaury Pouly 56069476be Get rid of the parent_dir field in dir_uncached.c by using the same FAT trick as in dircache. This should save ~20KB on 512B/sector targets and ~80KB on 2K/sector ones.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25105 a1c6a512-1295-4272-9138-f99709370657
2010-03-10 08:56:27 +00:00
Andree Buschmann 0b7dcd69c8 Remove tabs in firmware path (taking into account the original spacing).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24864 a1c6a512-1295-4272-9138-f99709370657
2010-02-22 21:24:09 +00:00
Amaury Pouly 4832c3ce42 Fix a dircache NULL-pointer dereference.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24835 a1c6a512-1295-4272-9138-f99709370657
2010-02-21 22:48:54 +00:00
Amaury Pouly eb54ede182 Fix error handling in dircache generation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24730 a1c6a512-1295-4272-9138-f99709370657
2010-02-17 19:31:07 +00:00
Amaury Pouly 53b1af7a61 -Cosmetic change in a comparison
-Move fat_dir structure out of dircache stack to RAM. Reduce dircache stack size (max level depth should stay be around 20). This should fix nano2g dircache stkov of FS#10679
-Change the structure returned by readdir_cached to match the one returned by readdir_uncached: remove useless fields to save space and avoid any potential incoherence
-Remove one field from the internal structure used by {opend,read,close}dir_cached because it was mostly redundant.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24708 a1c6a512-1295-4272-9138-f99709370657
2010-02-16 22:49:11 +00:00
Amaury Pouly 26c0e753d1 Rewrite dircache generation to take advantage for the FAT code. Reduce RAM usage by ~30Kb and binsize by at least several hundreds bytes. Also remove the directory depth limit of dircache.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24657 a1c6a512-1295-4272-9138-f99709370657
2010-02-14 19:09:52 +00:00
Amaury Pouly cbf136d57a Remove a file that mcuelenaere forgot to delete (see r23763 and r23767).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24543 a1c6a512-1295-4272-9138-f99709370657
2010-02-07 13:31:52 +00:00
Amaury Pouly 64c0cfb0bd Optimize (size and speed) strncasecmp (based on a newlib patch).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24542 a1c6a512-1295-4272-9138-f99709370657
2010-02-07 00:37:47 +00:00
Amaury Pouly 1459bbc45f Various dircache improvements: reduce size of a path buffer to MAX_PATH and rewrote copy_path to improve stack usage. Also simplified get_entry.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24445 a1c6a512-1295-4272-9138-f99709370657
2010-02-01 23:00:35 +00:00
Amaury Pouly 4b930df35e Fix a dircache bug (opening a directory opens the first file of that directory). Also clarify the behaviour of dircache_get_entry.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24420 a1c6a512-1295-4272-9138-f99709370657
2010-01-31 17:02:56 +00:00
Andree Buschmann 508bf2b45a Final removal of tabs in firmware path
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24158 a1c6a512-1295-4272-9138-f99709370657
2010-01-03 11:31:14 +00:00
Torne Wuff 6e9af8bd44 Add strlcat to core to match strlcpy (also add to plugin api). Some uses of strcat could probably do with being changed to this.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24141 a1c6a512-1295-4272-9138-f99709370657
2010-01-02 13:31:46 +00:00
Amaury Pouly 839007872a FS#9409: fix rename which didn't close file handles on error and enventually cause cut/paste to fail between volumes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24134 a1c6a512-1295-4272-9138-f99709370657
2010-01-01 20:41:29 +00:00
Frank Gevaerts 5509372f03 Make read() and write() return -1/EISDIR on directories
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24106 a1c6a512-1295-4272-9138-f99709370657
2009-12-23 22:13:37 +00:00
Frank Gevaerts e0263b166c only get the file pointer if fd is actually valid.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24105 a1c6a512-1295-4272-9138-f99709370657
2009-12-23 21:51:29 +00:00
Maurus Cuelenaere d7d3bc248f Move strip_volume() to filefuncs.c and set properties.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23767 a1c6a512-1295-4272-9138-f99709370657
2009-11-26 22:34:08 +00:00
Maurus Cuelenaere d027ddb75d Forgot file
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23763 a1c6a512-1295-4272-9138-f99709370657
2009-11-26 17:41:19 +00:00
Maurus Cuelenaere eab70ca28c - Split off strip_volume() to a separate file
- fix some yellows

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23762 a1c6a512-1295-4272-9138-f99709370657
2009-11-26 17:39:30 +00:00
Maurus Cuelenaere d052ced874 Merge branch 'hotswap'
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23759 a1c6a512-1295-4272-9138-f99709370657
2009-11-26 16:57:30 +00:00
Thomas Martitz 1ddb91ad36 Rename vfnprintf to vuprintf (u stands for user for the user callback and data passed to it) to avoid confusion with file and buffer size related functions from the printf-family, and add a comment to its declaration.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23503 a1c6a512-1295-4272-9138-f99709370657
2009-11-03 21:20:09 +00:00
Nils Wallménius 0b302f0cb9 Little bit of const correctness
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23343 a1c6a512-1295-4272-9138-f99709370657
2009-10-25 10:42:21 +00:00
Bertrik Sikken d24d885aa4 Use wrap-safe TIME_BEFORE/TIME_AFTER macros to compare times with current_time, instead of comparing them directly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23246 a1c6a512-1295-4272-9138-f99709370657
2009-10-18 15:50:30 +00:00
Dave Chapman 14eb02d347 Patch #1 from FS#10633 (Nano 2G developments) by Michael Sparmann - Allows targets to set a different sector size than 512 for the storage system. Should not affect any other target.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22874 a1c6a512-1295-4272-9138-f99709370657
2009-10-02 16:41:55 +00:00
Nils Wallménius c8b87d76eb FS#10569 RTC driver cleanup
Change the RTC drivers so that the rtc_(read|write)_datetime functions now deal directly with the tm struct instead of passing a string of bcd digits to/from (set|get)_time .
This simplifies drivers for rtc's that do not use a bcd representation internally and cleans up some target specific code and #ifdefs in generic code. Implement simple stubs for the sim to avoid #ifdefing for that too.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22839 a1c6a512-1295-4272-9138-f99709370657
2009-09-26 14:58:32 +00:00
Maurus Cuelenaere 20b0dd2788 A new implementation of logf, logfdisplay and logfdump.
Flyspray: FS#10528
Author: Amaury Pouly


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22462 a1c6a512-1295-4272-9138-f99709370657
2009-08-21 22:54:23 +00:00
Alexander Levin 345920fe7e Remove dead code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22268 a1c6a512-1295-4272-9138-f99709370657
2009-08-12 13:49:29 +00:00
Alexander Levin d353a7fd4e Change the function name in strnatsort so that the code doesn't contradict itself
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22267 a1c6a512-1295-4272-9138-f99709370657
2009-08-12 13:44:50 +00:00
Frank Gevaerts ceccec503e Move yearday_to_daymonth() to usb_storage.c. It's the only user, this function is pretty specific, and it seems to be the cleanest way to avoid ram usage increases for unrelated targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22259 a1c6a512-1295-4272-9138-f99709370657
2009-08-11 20:03:59 +00:00
Frank Gevaerts 2dc50471ca Consolidate day of week calculation
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22258 a1c6a512-1295-4272-9138-f99709370657
2009-08-11 19:30:19 +00:00
Frank Gevaerts eadfa483d1 rework new time handling functions a bit to be more memory efficient
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22257 a1c6a512-1295-4272-9138-f99709370657
2009-08-11 18:54:13 +00:00
Frank Gevaerts ed73a3274c Add support for setting the clock using a special SCSI command. This is the same method that itunes uses, and there are host-side tools for it (e.g. libgpod)
Flyspray: FS#10514
Author: Laurent Papier and myself



git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22255 a1c6a512-1295-4272-9138-f99709370657
2009-08-11 17:54:47 +00:00
Thomas Martitz 28fbb49c0b Fix for:
FS#10031 - "improper sorting of names with underscores when Interpret numbers when sorting is used" and
FS#10200 - "Incorrect sorting of roman numerals when whole numbers selected"

a) By using tolower instead of toupper for case-insensitive sorting
b) By not ignoring spaces (which isn't really what we aimed for anyway).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22153 a1c6a512-1295-4272-9138-f99709370657
2009-08-04 13:00:40 +00:00
Frank Gevaerts c0a5a67387 Commit FS#9545, storage cleanup and multi-driver support
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21933 a1c6a512-1295-4272-9138-f99709370657
2009-07-17 22:28:49 +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
Alexander Levin eaa9df37e0 Fix yellow introduced in r21561
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21563 a1c6a512-1295-4272-9138-f99709370657
2009-06-29 14:58:02 +00:00
Alexander Levin 44bf40988b Make the get_time on non-RTC sims behave like target, i.e. always return a constant time (FS#10390)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21561 a1c6a512-1295-4272-9138-f99709370657
2009-06-29 14:31:46 +00:00
Bertrik Sikken bef264264c Add missing #includes for the ondas.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20457 a1c6a512-1295-4272-9138-f99709370657
2009-03-22 15:40:40 +00:00
Thomas Martitz 877efe1123 Update the comment about our changes too.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20341 a1c6a512-1295-4272-9138-f99709370657
2009-03-17 19:01:25 +00:00
Thomas Martitz fa2d011a55 Restore behavior of the original implementation strnatcmp to not ignore leading zeros. Fixes FS#10029 (Files being sorted incorrectly in latest builds), leads to better sorting of decimal numbers. It also doesn't sort 2 before 03 (but still before 10) anymore.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20340 a1c6a512-1295-4272-9138-f99709370657
2009-03-17 18:58:47 +00:00
Frank Gevaerts babda88228 Make strnatcmp() and strnatcasecmp() call strcmp() or strcasecmp() if strings otherwise sort the same. This is done to make sure that strings always sort the same.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20265 a1c6a512-1295-4272-9138-f99709370657
2009-03-09 22:04:40 +00:00
Alexander Levin 7389928d89 Make sure that sorting works both for signed and unsigned char (it depends on the platform/compiler used)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20183 a1c6a512-1295-4272-9138-f99709370657
2009-03-02 22:02:13 +00:00
Alexander Levin 22b925495a Make natural sorting work properly with cyrillic chars: they should be placed after the latin ones (FS#9975).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20180 a1c6a512-1295-4272-9138-f99709370657
2009-03-02 21:35:05 +00:00
Thomas Martitz 7125b9ebcb Actually apply the patch...thanks again to Bryan Vandyke (and Tom Ross for notifying me about my commit-fail).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20167 a1c6a512-1295-4272-9138-f99709370657
2009-03-02 02:30:39 +00:00
Thomas Martitz 4fd02fdd42 FS#9972 - Simplify strnatcmp. As we do ignore leading zeros (as opposed to the original version), we can remove some unused code.
Also, change the header to state that we changed it and do not use the original version.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20166 a1c6a512-1295-4272-9138-f99709370657
2009-03-02 02:07:13 +00:00
Tom Ross c645752314 Fix some memset calls that use the wrong order for arguments.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20165 a1c6a512-1295-4272-9138-f99709370657
2009-03-02 01:40:41 +00:00
Thomas Martitz d13f1a485f Commit FS#8314. This adds strnat[case]cmp written by Martin Pool, which respects numbers within strings, and gives a more intuitive
sorting. This also adds a setting, so that the sorting can be used in the file browser. The implementation is very generic, and can possibly 
be used in other places.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20155 a1c6a512-1295-4272-9138-f99709370657
2009-03-01 17:55:59 +00:00
Maurus Cuelenaere 4532d145f1 Onda VX747:
* Add preliminary keymap
 * Split up generic MIPS stuff from Ingenic specific
 * Make apps/ compilable
 * Add SD driver
 * Fix RTC driver
 * Add debug screen
 * Other cleanups/rewrites/fixes


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19993 a1c6a512-1295-4272-9138-f99709370657
2009-02-13 00:45:49 +00:00
Björn Stenberg ee46a3d88e Moved database builder into a separate directory, and gave it its' own Makefile. Now it compiles cleanly and builds a database if ran in root of music tree.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19448 a1c6a512-1295-4272-9138-f99709370657
2008-12-15 23:42:19 +00:00