diff options
author | Thomas Martitz <kugel@rockbox.org> | 2010-05-06 21:04:40 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2010-05-06 21:04:40 +0000 |
commit | 50a6ca39ad4ed01922aa4f755f0ca579788226cf (patch) | |
tree | c7881b015b220558167310345b162324c96be15a /apps/plugins/lib | |
parent | adb506df14aded06ed6e9ebf8540e6fd383ffd6a (diff) | |
download | rockbox-50a6ca39ad4ed01922aa4f755f0ca579788226cf.tar.gz rockbox-50a6ca39ad4ed01922aa4f755f0ca579788226cf.zip |
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
Diffstat (limited to 'apps/plugins/lib')
-rw-r--r-- | apps/plugins/lib/buflib.c | 4 | ||||
-rw-r--r-- | apps/plugins/lib/jhash.h | 4 | ||||
-rw-r--r-- | apps/plugins/lib/strncpy.c | 1 |
3 files changed, 5 insertions, 4 deletions
diff --git a/apps/plugins/lib/buflib.c b/apps/plugins/lib/buflib.c index 5d03ca4bb9..930e49d02e 100644 --- a/apps/plugins/lib/buflib.c +++ b/apps/plugins/lib/buflib.c | |||
@@ -23,8 +23,8 @@ | |||
23 | * | 23 | * |
24 | ****************************************************************************/ | 24 | ****************************************************************************/ |
25 | 25 | ||
26 | #include <stdlib.h> /* for abs() */ | ||
26 | #include "buflib.h" | 27 | #include "buflib.h" |
27 | |||
28 | /* The main goal of this design is fast fetching of the pointer for a handle. | 28 | /* The main goal of this design is fast fetching of the pointer for a handle. |
29 | * For that reason, the handles are stored in a table at the end of the buffer | 29 | * For that reason, the handles are stored in a table at the end of the buffer |
30 | * with a fixed address, so that returning the pointer for a handle is a simple | 30 | * with a fixed address, so that returning the pointer for a handle is a simple |
@@ -311,7 +311,7 @@ buflib_free(struct buflib_context *ctx, int handle_num) | |||
311 | while (next_block < freed_block) | 311 | while (next_block < freed_block) |
312 | { | 312 | { |
313 | block = next_block; | 313 | block = next_block; |
314 | next_block += ABS(block->val); | 314 | next_block += abs(block->val); |
315 | } | 315 | } |
316 | /* If next_block == block, the above loop didn't go anywhere. If it did, | 316 | /* If next_block == block, the above loop didn't go anywhere. If it did, |
317 | * and the block before this one is empty, we can combine them. | 317 | * and the block before this one is empty, we can combine them. |
diff --git a/apps/plugins/lib/jhash.h b/apps/plugins/lib/jhash.h index 97d1ac3d93..7699e24587 100644 --- a/apps/plugins/lib/jhash.h +++ b/apps/plugins/lib/jhash.h | |||
@@ -24,8 +24,8 @@ | |||
24 | #ifndef _LIB_JHASH_H_ | 24 | #ifndef _LIB_JHASH_H_ |
25 | #define _LIB_JHASH_H_ | 25 | #define _LIB_JHASH_H_ |
26 | #include <inttypes.h> /* defines uint32_t etc */ | 26 | #include <inttypes.h> /* defines uint32_t etc */ |
27 | #include <sys/types.h> | 27 | #include <string.h> /* size_t */ |
28 | #include <plugin.h> | 28 | #include "plugin.h" |
29 | 29 | ||
30 | /* | 30 | /* |
31 | hashw() -- hash an array of uint32_t into a 32-bit value | 31 | hashw() -- hash an array of uint32_t into a 32-bit value |
diff --git a/apps/plugins/lib/strncpy.c b/apps/plugins/lib/strncpy.c index 7c1973ba66..f80e759969 100644 --- a/apps/plugins/lib/strncpy.c +++ b/apps/plugins/lib/strncpy.c | |||
@@ -39,6 +39,7 @@ QUICKREF | |||
39 | 39 | ||
40 | #include <string.h> | 40 | #include <string.h> |
41 | #include <limits.h> | 41 | #include <limits.h> |
42 | #include "plugin.h" | ||
42 | 43 | ||
43 | /*SUPPRESS 560*/ | 44 | /*SUPPRESS 560*/ |
44 | /*SUPPRESS 530*/ | 45 | /*SUPPRESS 530*/ |