replace applicable calls to strlcpy with calls to strmemccpy
which null terminates on truncation
in theory the strmemccpy calls should be slightly faster since they
don't traverse the rest of the source string on truncation
but I seriously doubt there is too much of that going on in the code base
Change-Id: Ia0251514e36a6242bbf3f03c5e0df123aba60ed2
splits on spaces also considers \r\n\f\v\t as mandatory breaks
I'm still working on the strptokspn function
my goal is to use it directly rather than storing the matched char
and modifying the source string with \0 in order to tokenize the output
--Done
Change-Id: I7f378b5b9c4df8f10899b9a55a98950afb3931dc
Several places in the codebase implemented an ad-hoc form of pinning;
they can be converted to use buflib pinning instead.
Change-Id: I4450be007e80f6c9cc9f56c2929fa4b9b85ebff3
allow buflib_free to check for invalid or already freed handles
within the function -- remove all the invalid handle guards thru core_free
Change-Id: Ibdcbc82760fc93b674c42283fca420d94907df8e
(Don't include rbpaths.h in settings.h, or string-extra.h in rbpaths.h)
Build-tested on rocker, erosq, mini2g, nano2g,
xduoox3, clipzip, dx50, and uisim
Change-Id: If32e9c9910f5c8247a655cb64522b84d6d7ccbb5
The Q and K have a slightly different case, but the hardware under the
shell is completely identical.
These models are rebadged versions:
* Hifiwalker H2 (== Q)
* AGPTek H3 (== K)
* Surfans F20 (== K)
Other notes:
* Significant improvements in the shared Hiby-platform launcher/loader
* SD card can theoretically be hot-swapped now
* Support external USB mass storage!
* Some consolidation of Hiby-platform targets
* Some consolidation of plugin keymaps
Todo/known issues:
* Keymaps need to be gone over properly
* Convert to HAVE_SCROLLWHEEL?
Change-Id: I5a8a4f22c38a5b69392ca7c0a8ad8c4e07d9523c
SUPPORTED SERIES:
- NWZ-E450
- NWZ-E460
- NWZ-E470
- NWZ-E580
- NWZ-A10
NOTES:
- bootloader makefile convert an extra font to be installed alongside the bootloader
since sysfont is way too small
- the toolsicon bitmap comes from the Oxygen iconset
- touchscreen driver is untested
TODO:
- implement audio routing driver (pcm is handled by pcm-alsa)
- fix playback: it crashes on illegal instruction in DEBUG builds
- find out why the browser starts at / instead of /contents
- implement radio support
- implement return to OF for usb handling
- calibrate battery curve (NB: of can report a battery level on a 0-5 scale but
probabl don't want to use that ?)
- implement simulator build (we need a nice image of the player)
- figure out if we can detect jack removal
POTENTIAL TODOS:
- try to build a usb serial gadget and gdbserver
Change-Id: Ic77d71e0651355d47cc4e423a40fb64a60c69a80
The builtin sysfont does not have an associated buflib_alloc_data
(because it's builtin right?). font_get_{width,bits} accessed a field of
it for all fonts which crashed on some systems but not on mine.
Solution: Move this field to struct font directly.
The cache size calculated was also busted.
Fixes FS#12944 and most likely FS#12938.
Change-Id: I32303c4335a12a6c421fdca34f7ece851aac12ca
The font engine can now perform cache lookups even if the font file is
closed, if the font was disabled with the new font_disable_all() function.
It is highly probable that the lookup succeeds but in the cache-miss case
a blank, full-width glyph will be returned.
Change-Id: I3c97e747d2a0ba30c7b495c6118c9f029d265b56
Buffers are not allocated and thread is not created until the first
call where voice is required.
Adds a different callback (sync_callback) to buflib so that other
sorts of synchonization are possible, such as briefly locking-out the
PCM callback for a buffer move. It's sort of a messy addition but it
is needed so voice decoding won't have to be stopped when its buffer
is moved.
Change-Id: I4d4d8c35eed5dd15fb7ee7df9323af3d036e92b3
This fixes errornous pointer addition (+ on a short*), which crashed in some situation.
Fixes FS#12317 and should hopefully get the clips booting again.
Thanks to Jonathan Gordon for spotting the bad pointer arithmetic.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30724 a1c6a512-1295-4272-9138-f99709370657
This enables Rockbox to render anti-aliased fonts using an alpha blending method.
The input font bitmaps are 4bit, i.e. 4x larger, but the metadata size stays the same.
A tool, convttf, for converting ttf fonts directly to the Rockbox fnt format is provided.
It has a useful help output, but the parameter that works best is -c1 or -c2 (2 for larger font sizes).
Flyspray: FS#8961
Author: Initial work by Jonas Hurrelmann, further work by Fred Bauer, Andrew Mahone, Teruaki Kawashima and myself.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29523 a1c6a512-1295-4272-9138-f99709370657
%Fl now takes an optional 3rd param which is the number of glyphs to cache (default to 256). the smaller the number, the less ram will be used (i.e using 15 for a font which only shown numbers is a good idea)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27882 a1c6a512-1295-4272-9138-f99709370657