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/recorder | |
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/recorder')
-rw-r--r-- | apps/recorder/albumart.c | 3 | ||||
-rw-r--r-- | apps/recorder/icons.c | 1 | ||||
-rw-r--r-- | apps/recorder/jpeg_load.c | 18 | ||||
-rw-r--r-- | apps/recorder/keyboard.c | 2 | ||||
-rw-r--r-- | apps/recorder/peakmeter.c | 1 | ||||
-rw-r--r-- | apps/recorder/radio.c | 3 | ||||
-rw-r--r-- | apps/recorder/recording.c | 4 |
7 files changed, 14 insertions, 18 deletions
diff --git a/apps/recorder/albumart.c b/apps/recorder/albumart.c index be787538a3..5eca713542 100644 --- a/apps/recorder/albumart.c +++ b/apps/recorder/albumart.c | |||
@@ -19,8 +19,7 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | #include <string.h> | 22 | #include "string-extra.h" |
23 | #include "sprintf.h" | ||
24 | #include "system.h" | 23 | #include "system.h" |
25 | #include "albumart.h" | 24 | #include "albumart.h" |
26 | #include "metadata.h" | 25 | #include "metadata.h" |
diff --git a/apps/recorder/icons.c b/apps/recorder/icons.c index 0b48c125d1..e6c3926759 100644 --- a/apps/recorder/icons.c +++ b/apps/recorder/icons.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include "lcd.h" | 22 | #include "lcd.h" |
23 | #include "font.h" | 23 | #include "font.h" |
24 | #include "kernel.h" | 24 | #include "kernel.h" |
25 | #include "sprintf.h" | ||
26 | #include "rtc.h" | 25 | #include "rtc.h" |
27 | #include "powermgmt.h" | 26 | #include "powermgmt.h" |
28 | 27 | ||
diff --git a/apps/recorder/jpeg_load.c b/apps/recorder/jpeg_load.c index f75176dae1..1af65fab6c 100644 --- a/apps/recorder/jpeg_load.c +++ b/apps/recorder/jpeg_load.c | |||
@@ -856,7 +856,7 @@ static const struct idct_entry idct_tbl[] = { | |||
856 | /* JPEG decoder implementation */ | 856 | /* JPEG decoder implementation */ |
857 | 857 | ||
858 | #ifdef JPEG_FROM_MEM | 858 | #ifdef JPEG_FROM_MEM |
859 | INLINE unsigned char *getc(struct jpeg* p_jpeg) | 859 | INLINE unsigned char *jpeg_getc(struct jpeg* p_jpeg) |
860 | { | 860 | { |
861 | if (LIKELY(p_jpeg->len)) | 861 | if (LIKELY(p_jpeg->len)) |
862 | { | 862 | { |
@@ -880,7 +880,7 @@ INLINE bool skip_bytes(struct jpeg* p_jpeg, int count) | |||
880 | } | 880 | } |
881 | } | 881 | } |
882 | 882 | ||
883 | INLINE void putc(struct jpeg* p_jpeg) | 883 | INLINE void jpeg_putc(struct jpeg* p_jpeg) |
884 | { | 884 | { |
885 | p_jpeg->len++; | 885 | p_jpeg->len++; |
886 | p_jpeg->data--; | 886 | p_jpeg->data--; |
@@ -892,7 +892,7 @@ INLINE void fill_buf(struct jpeg* p_jpeg) | |||
892 | p_jpeg->buf_index = 0; | 892 | p_jpeg->buf_index = 0; |
893 | } | 893 | } |
894 | 894 | ||
895 | static unsigned char *getc(struct jpeg* p_jpeg) | 895 | static unsigned char *jpeg_getc(struct jpeg* p_jpeg) |
896 | { | 896 | { |
897 | if (UNLIKELY(p_jpeg->buf_left < 1)) | 897 | if (UNLIKELY(p_jpeg->buf_left < 1)) |
898 | fill_buf(p_jpeg); | 898 | fill_buf(p_jpeg); |
@@ -917,7 +917,7 @@ static bool skip_bytes(struct jpeg* p_jpeg, int count) | |||
917 | return p_jpeg->buf_left >= 0 || skip_bytes_seek(p_jpeg); | 917 | return p_jpeg->buf_left >= 0 || skip_bytes_seek(p_jpeg); |
918 | } | 918 | } |
919 | 919 | ||
920 | static void putc(struct jpeg* p_jpeg) | 920 | static void jpeg_putc(struct jpeg* p_jpeg) |
921 | { | 921 | { |
922 | p_jpeg->buf_left++; | 922 | p_jpeg->buf_left++; |
923 | p_jpeg->buf_index--; | 923 | p_jpeg->buf_index--; |
@@ -933,14 +933,14 @@ do {\ | |||
933 | #define e_getc(jpeg, code) \ | 933 | #define e_getc(jpeg, code) \ |
934 | ({ \ | 934 | ({ \ |
935 | unsigned char *c; \ | 935 | unsigned char *c; \ |
936 | if (UNLIKELY(!(c = getc(jpeg)))) \ | 936 | if (UNLIKELY(!(c = jpeg_getc(jpeg)))) \ |
937 | return (code); \ | 937 | return (code); \ |
938 | *c; \ | 938 | *c; \ |
939 | }) | 939 | }) |
940 | 940 | ||
941 | #define d_getc(jpeg, def) \ | 941 | #define d_getc(jpeg, def) \ |
942 | ({ \ | 942 | ({ \ |
943 | unsigned char *cp = getc(jpeg); \ | 943 | unsigned char *cp = jpeg_getc(jpeg); \ |
944 | unsigned char c = LIKELY(cp) ? *cp : (def); \ | 944 | unsigned char c = LIKELY(cp) ? *cp : (def); \ |
945 | c; \ | 945 | c; \ |
946 | }) | 946 | }) |
@@ -958,7 +958,7 @@ static int process_markers(struct jpeg* p_jpeg) | |||
958 | if (c != 0xFF) /* no marker? */ | 958 | if (c != 0xFF) /* no marker? */ |
959 | { | 959 | { |
960 | JDEBUGF("Non-marker data\n"); | 960 | JDEBUGF("Non-marker data\n"); |
961 | putc(p_jpeg); | 961 | jpeg_putc(p_jpeg); |
962 | break; /* exit marker processing */ | 962 | break; /* exit marker processing */ |
963 | } | 963 | } |
964 | 964 | ||
@@ -969,7 +969,7 @@ static int process_markers(struct jpeg* p_jpeg) | |||
969 | case 0xFF: /* Fill byte */ | 969 | case 0xFF: /* Fill byte */ |
970 | ret |= FILL_FF; | 970 | ret |= FILL_FF; |
971 | case 0x00: /* Zero stuffed byte - entropy data */ | 971 | case 0x00: /* Zero stuffed byte - entropy data */ |
972 | putc(p_jpeg); | 972 | jpeg_putc(p_jpeg); |
973 | continue; | 973 | continue; |
974 | 974 | ||
975 | case 0xC0: /* SOF Huff - Baseline DCT */ | 975 | case 0xC0: /* SOF Huff - Baseline DCT */ |
@@ -1669,7 +1669,7 @@ static void search_restart(struct jpeg *p_jpeg) | |||
1669 | return; | 1669 | return; |
1670 | } | 1670 | } |
1671 | else | 1671 | else |
1672 | putc(p_jpeg); | 1672 | jpeg_putc(p_jpeg); |
1673 | } | 1673 | } |
1674 | } | 1674 | } |
1675 | } | 1675 | } |
diff --git a/apps/recorder/keyboard.c b/apps/recorder/keyboard.c index 3df3142897..f8b390d932 100644 --- a/apps/recorder/keyboard.c +++ b/apps/recorder/keyboard.c | |||
@@ -20,7 +20,7 @@ | |||
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | #include "kernel.h" | 21 | #include "kernel.h" |
22 | #include "system.h" | 22 | #include "system.h" |
23 | #include <string.h> | 23 | #include "string-extra.h" |
24 | #include "font.h" | 24 | #include "font.h" |
25 | #include "screens.h" | 25 | #include "screens.h" |
26 | #include "talk.h" | 26 | #include "talk.h" |
diff --git a/apps/recorder/peakmeter.c b/apps/recorder/peakmeter.c index 8f32a837a7..154f605898 100644 --- a/apps/recorder/peakmeter.c +++ b/apps/recorder/peakmeter.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include "storage.h" | 29 | #include "storage.h" |
30 | #include "lcd.h" | 30 | #include "lcd.h" |
31 | #include "scrollbar.h" | 31 | #include "scrollbar.h" |
32 | #include "sprintf.h" | ||
33 | #include "button.h" | 32 | #include "button.h" |
34 | #include "system.h" | 33 | #include "system.h" |
35 | #include "font.h" | 34 | #include "font.h" |
diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c index 7cf91d62f7..7761f248ca 100644 --- a/apps/recorder/radio.c +++ b/apps/recorder/radio.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <stdio.h> | 23 | #include <stdio.h> |
24 | #include <stdbool.h> | 24 | #include <stdbool.h> |
25 | #include <stdlib.h> | 25 | #include <stdlib.h> |
26 | #include "sprintf.h" | ||
27 | #include "mas.h" | 26 | #include "mas.h" |
28 | #include "settings.h" | 27 | #include "settings.h" |
29 | #include "button.h" | 28 | #include "button.h" |
@@ -35,7 +34,7 @@ | |||
35 | #include "file.h" | 34 | #include "file.h" |
36 | #include "general.h" | 35 | #include "general.h" |
37 | #include "errno.h" | 36 | #include "errno.h" |
38 | #include "string.h" | 37 | #include "string-extra.h" |
39 | #include "system.h" | 38 | #include "system.h" |
40 | #include "radio.h" | 39 | #include "radio.h" |
41 | #include "menu.h" | 40 | #include "menu.h" |
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index fc527923db..0f1ff30cf5 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c | |||
@@ -1762,7 +1762,7 @@ bool recording_screen(bool no_source) | |||
1762 | draw attention */ | 1762 | draw attention */ |
1763 | /* Don't use language string unless agreed upon to make this | 1763 | /* Don't use language string unless agreed upon to make this |
1764 | method permanent - could do something in the statusbar */ | 1764 | method permanent - could do something in the statusbar */ |
1765 | snprintf(buf, sizeof(buf), "Warning: %08X", | 1765 | snprintf(buf, sizeof(buf), "Warning: %08lX", |
1766 | pcm_rec_get_warnings()); | 1766 | pcm_rec_get_warnings()); |
1767 | } | 1767 | } |
1768 | else | 1768 | else |
@@ -1771,7 +1771,7 @@ bool recording_screen(bool no_source) | |||
1771 | (global_settings.rec_split_method)) | 1771 | (global_settings.rec_split_method)) |
1772 | { | 1772 | { |
1773 | dmb = dsize/1024/1024; | 1773 | dmb = dsize/1024/1024; |
1774 | snprintf(buf, sizeof(buf), "%s %dMB", | 1774 | snprintf(buf, sizeof(buf), "%s %luMB", |
1775 | str(LANG_SPLIT_SIZE), dmb); | 1775 | str(LANG_SPLIT_SIZE), dmb); |
1776 | } | 1776 | } |
1777 | else | 1777 | else |