Commit graph

32797 commits

Author SHA1 Message Date
Frank Gevaerts
3d983866a1 Set latex input to /dev/null to avoid blocking on errors
Change-Id: If8878efb5d4244f5d25b9bfd4751a262080af53f
2015-01-12 12:18:26 +01:00
Marcin Bukat
9ffd9327e3 Fix red/yellow
Change-Id: Ie01251af2cd843979b5fdefcfa541ba377d13bd7
2015-01-12 12:02:24 +01:00
Marcin Bukat
bbd7d1dba3 regtools/headergen: Make generator more flexible
Change-Id: I2328ec021ed990a40257d4ce6f4fc5b3db2ba998
2015-01-12 11:28:52 +01:00
Marcin Bukat
89ba7e818c Get rid of stupid _backlight_* function names
_remote_backlight_* and _buttonlight_* are cleaned as well

Change-Id: I73653752831bbe170c26ba95d3bc04c2e3a5cf30
2015-01-12 11:09:27 +01:00
Thomas Jarosch
2a3e1628a5 Limit more variables to file scope
Change-Id: I30219d626316776eb73b4205d63376fa3dbc6361
2015-01-11 21:40:51 +01:00
Thomas Jarosch
85c98bc63c Improve readability by adding parenthesis
Change-Id: Iff51ab441a59f1ba842132b809a49d1fe7232e05
2015-01-11 18:19:26 +01:00
Thomas Jarosch
cfbd9cb22f Make a few local variables static
Change-Id: Ieb77a7f2cdf765afa3121320d03c0478cd97eb0f
2015-01-11 18:02:43 +01:00
Thomas Jarosch
5f5a83e1c9 maemo: Clean up unused variables
Change-Id: I5fbb0b0cc56fa565499345844464d1c94ff3ba1a
2015-01-11 17:45:56 +01:00
Franklin Wei
2d41866d5a Remove playback control from XWorld, fix comments a bit
XWorld grabs the audio buffer when it starts, so there can be no playback, making the playback control menu useless :P

Change-Id: Ia4e2c207f41619ef9b028917130d6dbf7dfba054
2015-01-08 23:45:37 +01:00
Amaury Pouly
761e7987c8 usb: finally get rid of USE_ROCKBOX_USB in Sansa bootloader, use bootloader usb
For some reason, the bootloader and config files didn't define
HAVE_BOOTLOADER_USB_MODE, also remove the special cases in usb.c which they
implied.

Change-Id: I68c29be7d03627e64cac4ff7678e0c211e087a8c
2015-01-08 22:30:22 +01:00
Amaury Pouly
246026cfcc imx233: add a comment in the bootloader
Change-Id: I4bf82565e730a40f37f4a29244fd461cb3214318
2015-01-08 22:18:22 +01:00
Frank Gevaerts
9d160c2a8c Include scrreprt.4ht from http://tug.org/svn/texlive/trunk/Master/texmf-dist/tex/generic/tex4ht/
This is needed because the version in scrreprt.4ht in debian isn't compatible
with other current bits of the TeX installation.

Change-Id: Ibf31f387ecc9fdb8a6ad7b7362d5b650e657bb5b
2015-01-08 18:32:01 +01:00
Amaury Pouly
3aebdfa642 usb: make usb_release_exclusive_storage private
Change-Id: I0383760b7d8e67cc99bbe4e4979bca92ef436c8d
Reviewed-on: http://gerrit.rockbox.org/1098
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2015-01-08 16:45:41 +01:00
Amaury Pouly
dc127f213c Clarify usb_powered() and fix some code.
Either by mistake or because its meaning changed, usb_powered() doesn't mean
what the name suggest, so clarify its meaning by renaming it to usb_powered_only.
So use of usb_powered() are replaced by usb_inserted() when it makes more sense.

Change-Id: I112887e2d8560e84587bee5f55c826dde8c806d8
Reviewed-on: http://gerrit.rockbox.org/1097
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2015-01-08 16:45:32 +01:00
Amaury Pouly
1ab91550e6 usb: document usb states, powering and detection
Change-Id: Ia3b7d6c6294bfb9272355c3f28a994dd0e83cbce
Reviewed-on: http://gerrit.rockbox.org/1096
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2015-01-08 16:45:22 +01:00
Amaury Pouly
ae37d1944f usb: document usb_status_event and #ifdef it with USB_STATUS_BY_EVENT
Change-Id: I62cdb8ad71a598279fe99cc91d87eafda26cbbc7
Reviewed-on: http://gerrit.rockbox.org/1095
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2015-01-08 16:45:11 +01:00
Amaury Pouly
268114ee66 usb: move usb charging function prototype from usb_core.h to usb.h
Change-Id: Id29c60d3aa26f8badca6c38c1cbb2e5a39c554dc
Reviewed-on: http://gerrit.rockbox.org/1094
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2015-01-08 16:44:55 +01:00
Amaury Pouly
66690ca987 Get rid of USE_ROCKBOX_USB
Except for unfinished or experimental ports, it isthe case that
USE_ROCKBOX_USB and HAVE_USBSTACK are both defined or both undefined.
Furthermore, it is a leftover of some early developments on the USB stack and
doesn't make sense anymore.

Change-Id: Ic87a865b6bb4c7c9a8d45d1f0bb0f2fb536b8cad
Reviewed-on: http://gerrit.rockbox.org/1091
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2015-01-08 16:07:12 +01:00
Thomas Jarosch
f91434cc7b Fix yellow
Change-Id: I8685198c208b5324b09b5ad59f7379502e9ed977
2015-01-05 19:09:33 +01:00
Thomas Jarosch
fdd4aef340 Make thirty functions static to reduce binary size
If any of those functions should be (unused) API functions,
they can easily be turned back once really needed.

Detected using a new cppcheck check that
uses the internal symbol database to catch
functions that are only used in the current file.

Change-Id: Ic2b1e5b8020b76397f11cefc4e205f3b7ac1f184
2015-01-05 18:44:36 +01:00
Thomas Jarosch
c907e127f8 jz4740 usbtool: Fix undefined behavior in set_reg()
The variable 'i' should actually be 'size'.
See the read_reg() function above it.

Confirmed via private email from Maurus Cuelenaere. Thanks!
(who also remembered having trouble reading/setting
 registers over USB back then ;))

cppcheck reported:
[rockbox/utils/jz4740_tools/jz4740_usbtool.c:281]: (error) Uninitialized variable: i

Change-Id: I0f34834335e89d2504e7597e8db22cf69b5ca7e7
2015-01-04 18:16:44 +01:00
Thomas Jarosch
b43fcbdab2 mktime(): Remove redundant assignment of 'result'
Checked with upstream lynx source code and the
second calculation line is the upstream one, too.
(In fact I diffed the whole function to check for changes)

cppcheck reported:
[rockbox/firmware/libc/mktime.c:43] -> [rockbox/firmware/libc/mktime.c:44]: (performance) Variable 'result' is reassigned a value before the old one has been used.

Change-Id: Ia04c5f55da7d86cd74cff4fce675a9c85ddce3e2
2015-01-04 17:37:35 +01:00
Thomas Jarosch
404ebb8b0b hosted target: Fix uninitialized variable in dirinfo.attribute
cppcheck reported:
[rockbox/firmware/target/hosted/filesystem-app.c:509]: (error) Uninitialized struct member: ret.attribute
[rockbox/firmware/target/hosted/filesystem-app.c:517]: (error) Uninitialized struct member: ret.attribute

Change-Id: Ie8cab727faa8110a6fe3926dbcf852e8b9e96ca7
2015-01-04 13:52:29 +01:00
Thomas Jarosch
89ab3c2761 Fix uninitialized variable (should fix libusb retry handling)
Reported by cppcheck

Change-Id: I5ac7b73f2e3eaee3d5427d118944613e572f684d
2015-01-04 13:35:47 +01:00
Thomas Jarosch
8f1fbd1dc8 Remove unneeded std::string .c_str() call
cppcheck reported:
[utils/zenutils/source/update_patch/main.cpp:105]: (performance) Passing the result of c_str() to a function that takes std::string as argument no. 1 is slow and redundant.

Change-Id: Ied9de135e693af22e1fdc3aa3b67d14b7d2c21e6
2015-01-04 12:33:09 +01:00
Franklin Wei
d0fffd6c6d Fix a tiny whitespace error in CREDITS
Change-Id: I5273d5a70c504b976ced63f731bf39b35454f6ea
Reviewed-on: http://gerrit.rockbox.org/1117
Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
2015-01-04 05:23:37 +01:00
Thomas Jarosch
a5ec3f4f91 Add buflib tests to .gitignore
Change-Id: Iabb499a77ec4d3459fe610d9bb7e4f23db01f885
2015-01-03 18:21:59 +01:00
Thomas Jarosch
c5933f4a81 Add and adapt buflib shrink tests
Change-Id: I8aad86226c9c9b2c04727a3703941615638b3a49
2015-01-03 18:17:11 +01:00
Thomas Jarosch
77aa94bdac Add buflib test for maximum allocation
Change-Id: I9076b81d2fd2609ab3e9c8c5a087f8a387480f46
2015-01-03 18:17:11 +01:00
Thomas Jarosch
5f824e21e0 Add and adapt buflib move tests
Change-Id: I57929f8f6a18cf9570f7358d48ad33f285b9ab0f
2015-01-03 18:17:11 +01:00
Thomas Jarosch
7d5f133007 Bring abroad second buflib test
Interfaces with core_alloc_* instead of buflib directly.

Provide UT_core_allocator_init() with
a fixed buffer size for predictable results.

Change-Id: I26a7b3101f7782063547940bded52d8202638394
2015-01-03 18:17:11 +01:00
Thomas Jarosch
e7d94323bc Enable printing of buflib allocations
Change-Id: Ie446177931032d585f69e0651f05ff88ebc6e8ba
2015-01-03 18:17:11 +01:00
Thomas Jarosch
e138016256 Initial import of simple buflib unit test
Taken from kugel's out-of-tree version:
https://github.com/kugel-/buflib

Needs some API adaptions. More test will follow.

Note: The expected output needs an update since
the in-tree version of buflib does buffer alignment
and also progressed a bit. Still the tests are a very good start.

Added Rockbox copyright header during import were needed.

Change-Id: Ib39ec4301285f1dd53059b7bed0c0d6646297dc5
2015-01-03 18:15:07 +01:00
Thomas Jarosch
eb9c845db5 Fix up some DEBUGF statements
The last big filesystem code refactoring
broke a lot of debug statements.

firmware/test/fat/ doesn't build anymore,
but that's more or less unrelated.

Change-Id: I4c9e1289eeabe1b59d436b176f1d35a02176614f
2015-01-03 16:01:39 +01:00
Thomas Jarosch
98280bb203 Multiple variables for 'my' need to be in parenthesis
perl -wc reported:

Parentheses missing around "my" list at sims.pl line 9.
Useless use of a variable in void context at sims.pl line 9.
Useless use of a variable in void context at sims.pl line 9.
Useless use of a variable in void context at sims.pl line 9.
Useless use of a variable in void context at sims.pl line 9.
Name "main::doonly" used only once: possible typo at sims.pl line 9.

-> now it's happy.

Change-Id: I3b3685d6918ddb77e47c58bade931897075c6e04
2015-01-03 15:25:09 +01:00
Thomas Jarosch
dd75bb756d Don't build sims twice
Some of those builds are already in the 'builds' list.

Change-Id: I6985702d50ff00e166463384d78f823f6fad9873
2015-01-03 15:20:27 +01:00
Thomas Jarosch
5f603d36a1 Fix syntax error (missing semicolon)
Reported by TheSeven on IRC.

Change-Id: Ie4bb331f9db050a90d99732e46c23f6402c7c320
2015-01-03 15:02:23 +01:00
Thomas Jarosch
bce72e6f2c buflib: Switch from term "cookie" to "metadata"
The documentation of buflib first mentions metadata
and then changes to "cookie" without explaining it.

Fix it by sticking to metadata.

Change-Id: I0b36b18f4f2590132901c10326481975f8b9b9da
2015-01-02 19:26:03 +01:00
Thomas Jarosch
66df5f3891 Improve core_alloc() / buflib_alloc() documentation
Document the fact that buffers are movable by default.
Care must be taken to not pass them to functions that yield().

Also clarify other things:
- Passing NULL as "ops" to buflib_alloc_ex() causes
  buffers to be movable by default (but not shrinkable).

- If you want shrinkable buffers during compaction,
  you have to provide a shrink callback.

- To disable buffer movement, you have to pass NULL
  for the move_callback inside the callback structure.

- The concept of default callbacks was removed
  long ago, remove the only reference of it.

Change-Id: I3bf0ea6b08b507d80a19f3c2c835aca32b3f7800
2015-01-02 18:51:15 +01:00
Thomas Jarosch
7265375087 Shortcuts: Add move callback for buflib allocations
If we don't provide a callback to buflib_alloc(),
the buffer is always movable (to reduce fragmentation).

We were passing around buffers to multiple functions
that call yield() and might trigger buflib compaction.

-> add locking while we are working on the buffers.

Also added source code comments that explain
why we added the locking in that particular section.

Change-Id: Ie32867b0b735ddb2905fd4bd51342f61035f836f
2015-01-02 01:11:54 +01:00
Thomas Jarosch
9076b433d1 PictureFlow: Add move callback for buflib allocations
If we don't provide a callback to buflib_alloc(),
the buffer is always movable (to reduce fragmentation).

Since we pass our buffer to functions that call yield(),
this could lead to memory corruption on buflib compaction.

Change-Id: Id1fad1822479d692551c55cb8bc87cea7b78f759
2015-01-01 23:49:41 +01:00
Franklin Wei
b0277e4b6d XWorld: fix some typos in keymaps.h
Happy New Year!

Change-Id: I228e4b9af9561eb70f75ebb57e333c78065873df
Reviewed-on: http://gerrit.rockbox.org/1093
Reviewed-by: Thomas Jarosch <tomj@simonv.com>
Tested: Thomas Jarosch <tomj@simonv.com>
2015-01-01 17:28:22 +01:00
Thomas Jarosch
812406f430 Limit "struct dircache_runinfo" to file scope
Change-Id: Ib3edef9a4568605a36bdacde174dfa6bca2d26fa
2015-01-01 13:51:08 +01:00
Thomas Jarosch
09f7bb82ca Add missing newline in debug output
Change-Id: Ifd67dbcc80db328391464ec93316c48f914bc590
2014-12-30 00:17:38 +01:00
Thomas Jarosch
da5a36d6d2 Document 'union buflib_data'
Change-Id: Ia98fa8e7887338d6c0b7a5795a0ae5c7a13014ba
2014-12-29 23:49:12 +01:00
Franklin Wei
193c5df75d XWorld: cleanup
- Comment keymaps.h
 - Tie XWORLD_DEBUG into ROCKBOX_HAS_LOGF to ease debugging
 - Fix up the manual a little bit

Change-Id: I12cfb58001199036cd67dbaa27f164e6790a199d
Reviewed-on: http://gerrit.rockbox.org/1084
Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
2014-12-28 02:48:42 +01:00
Thomas Jarosch
e7c282fed7 More standard conforming codec_realloc()
- Leave original ptr untouched if allocation fails
  (bail out early)
- Behave like malloc() in case ptr is NULL

Change-Id: Ib854ca19bd0e069999b7780d2d9a533ece705add
2014-12-27 17:33:24 +01:00
Thomas Jarosch
d68262eede Two more typo fixes
Change-Id: Id3ec7c1da356cb7c617a1d9ad57c9e0ae9fa6611
2014-12-27 02:00:15 +01:00
Thomas Jarosch
91f1393f75 Fix typos in documentation
Change-Id: I3c7e204bcf67bf0004314fe4b2aec98cae145273
2014-12-27 01:38:11 +01:00
Benjamin Brown
ce94c3ed86 Fix for DX50 xworld keymaps.h
Change-Id: I6bf564cf009d935ebb1d7fb77ccb2eab8c87d2c7
Reviewed-on: http://gerrit.rockbox.org/1083
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-24 12:00:00 +01:00