diff options
| author | Greg Ercolano <erco@seriss.com> | 2013-09-21 16:41:23 +0000 |
|---|---|---|
| committer | Greg Ercolano <erco@seriss.com> | 2013-09-21 16:41:23 +0000 |
| commit | 2082d7e1978952138155be7dce29f20004bd71a5 (patch) | |
| tree | 0c64cec27ca635de750158a18715cf39d482bfa7 /src/Fl_JPEG_Image.cxx | |
| parent | 2fc6c3a39b6be6f8a6b9a9dd1d030b46d7ea71bf (diff) | |
Fixes STR# 2973: collection of Sun compiler fixes.
Applied str_2973_r9979_sun-fix-warnings-7.patch (with small mods)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9980 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_JPEG_Image.cxx')
| -rw-r--r-- | src/Fl_JPEG_Image.cxx | 52 |
1 files changed, 28 insertions, 24 deletions
diff --git a/src/Fl_JPEG_Image.cxx b/src/Fl_JPEG_Image.cxx index ade8df56e..47120a7de 100644 --- a/src/Fl_JPEG_Image.cxx +++ b/src/Fl_JPEG_Image.cxx @@ -212,35 +212,39 @@ typedef struct { typedef my_source_mgr *my_src_ptr; -void init_source (j_decompress_ptr cinfo) { - my_src_ptr src = (my_src_ptr)cinfo->src; - src->s = src->data; -} +extern "C" { -boolean fill_input_buffer(j_decompress_ptr cinfo) { - my_src_ptr src = (my_src_ptr)cinfo->src; - size_t nbytes = 4096; - src->pub.next_input_byte = src->s; - src->pub.bytes_in_buffer = nbytes; - src->s += nbytes; - return TRUE; -} + static void init_source(j_decompress_ptr cinfo) { + my_src_ptr src = (my_src_ptr)cinfo->src; + src->s = src->data; + } -void term_source(j_decompress_ptr cinfo) -{ -} + static boolean fill_input_buffer(j_decompress_ptr cinfo) { + my_src_ptr src = (my_src_ptr)cinfo->src; + size_t nbytes = 4096; + src->pub.next_input_byte = src->s; + src->pub.bytes_in_buffer = nbytes; + src->s += nbytes; + return TRUE; + } + + static void term_source(j_decompress_ptr cinfo) + { + } -void skip_input_data(j_decompress_ptr cinfo, long num_bytes) { - my_src_ptr src = (my_src_ptr)cinfo->src; - if (num_bytes > 0) { - while (num_bytes > (long)src->pub.bytes_in_buffer) { - num_bytes -= (long)src->pub.bytes_in_buffer; - fill_input_buffer(cinfo); + static void skip_input_data(j_decompress_ptr cinfo, long num_bytes) { + my_src_ptr src = (my_src_ptr)cinfo->src; + if (num_bytes > 0) { + while (num_bytes > (long)src->pub.bytes_in_buffer) { + num_bytes -= (long)src->pub.bytes_in_buffer; + fill_input_buffer(cinfo); + } + src->pub.next_input_byte += (size_t) num_bytes; + src->pub.bytes_in_buffer -= (size_t) num_bytes; } - src->pub.next_input_byte += (size_t) num_bytes; - src->pub.bytes_in_buffer -= (size_t) num_bytes; } -} + +} // extern "C" static void jpeg_mem_src(j_decompress_ptr cinfo, const unsigned char *data) { |
