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/jpeg_load.c | |
parent | adb506df14aded06ed6e9ebf8540e6fd383ffd6a (diff) |
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/jpeg_load.c')
-rw-r--r-- | apps/recorder/jpeg_load.c | 18 |
1 files changed, 9 insertions, 9 deletions
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[] = { /* JPEG decoder implementation */ #ifdef JPEG_FROM_MEM -INLINE unsigned char *getc(struct jpeg* p_jpeg) +INLINE unsigned char *jpeg_getc(struct jpeg* p_jpeg) { if (LIKELY(p_jpeg->len)) { @@ -880,7 +880,7 @@ INLINE bool skip_bytes(struct jpeg* p_jpeg, int count) } } -INLINE void putc(struct jpeg* p_jpeg) +INLINE void jpeg_putc(struct jpeg* p_jpeg) { p_jpeg->len++; p_jpeg->data--; @@ -892,7 +892,7 @@ INLINE void fill_buf(struct jpeg* p_jpeg) p_jpeg->buf_index = 0; } -static unsigned char *getc(struct jpeg* p_jpeg) +static unsigned char *jpeg_getc(struct jpeg* p_jpeg) { if (UNLIKELY(p_jpeg->buf_left < 1)) fill_buf(p_jpeg); @@ -917,7 +917,7 @@ static bool skip_bytes(struct jpeg* p_jpeg, int count) return p_jpeg->buf_left >= 0 || skip_bytes_seek(p_jpeg); } -static void putc(struct jpeg* p_jpeg) +static void jpeg_putc(struct jpeg* p_jpeg) { p_jpeg->buf_left++; p_jpeg->buf_index--; @@ -933,14 +933,14 @@ do {\ #define e_getc(jpeg, code) \ ({ \ unsigned char *c; \ - if (UNLIKELY(!(c = getc(jpeg)))) \ + if (UNLIKELY(!(c = jpeg_getc(jpeg)))) \ return (code); \ *c; \ }) #define d_getc(jpeg, def) \ ({ \ - unsigned char *cp = getc(jpeg); \ + unsigned char *cp = jpeg_getc(jpeg); \ unsigned char c = LIKELY(cp) ? *cp : (def); \ c; \ }) @@ -958,7 +958,7 @@ static int process_markers(struct jpeg* p_jpeg) if (c != 0xFF) /* no marker? */ { JDEBUGF("Non-marker data\n"); - putc(p_jpeg); + jpeg_putc(p_jpeg); break; /* exit marker processing */ } @@ -969,7 +969,7 @@ static int process_markers(struct jpeg* p_jpeg) case 0xFF: /* Fill byte */ ret |= FILL_FF; case 0x00: /* Zero stuffed byte - entropy data */ - putc(p_jpeg); + jpeg_putc(p_jpeg); continue; case 0xC0: /* SOF Huff - Baseline DCT */ @@ -1669,7 +1669,7 @@ static void search_restart(struct jpeg *p_jpeg) return; } else - putc(p_jpeg); + jpeg_putc(p_jpeg); } } } |