X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2Fjdatasrc.cxx;h=53717cd5006b1ae246d6cc8b4b8576be511c1ffb;hb=afb4925bd3110d67669db7264f78a238d4fb9333;hp=c0fb1220d5b923a6e5674effcc40f0e58c42434d;hpb=0e0403151bbff57175d2b974ee2d14b8195f9234;p=gdcm.git diff --git a/src/jdatasrc.cxx b/src/jdatasrc.cxx index c0fb1220..53717cd5 100644 --- a/src/jdatasrc.cxx +++ b/src/jdatasrc.cxx @@ -1,5 +1,5 @@ /* - * jdatasrc.c + * jdatasrc.cxx * * Copyright (C) 1994-1996, Thomas G. Lane. * This file is part of the Independent JPEG Group's software. @@ -18,6 +18,12 @@ /* Expanded data source object for stdio input */ +extern "C" { + typedef boolean(*boolean_jpeg_decompress_struct)(jpeg_decompress_struct*); + typedef void(*void_jpeg_decompress_struct)(jpeg_decompress_struct*); + typedef void(*void_jpeg_decompress_struct_long)(jpeg_decompress_struct*,long); +} + typedef struct { struct jpeg_source_mgr pub; /* public fields */ @@ -214,11 +220,11 @@ jpeg_stdio_src (j_decompress_ptr cinfo, std::ifstream * infile, gdcm::JPEGFragme } src = (my_src_ptr) cinfo->src; - src->pub.init_source = init_source; - src->pub.fill_input_buffer = fill_input_buffer; - src->pub.skip_input_data = skip_input_data; + src->pub.init_source = reinterpret_cast(init_source); + src->pub.fill_input_buffer = reinterpret_cast(fill_input_buffer); + src->pub.skip_input_data = reinterpret_cast(skip_input_data); src->pub.resync_to_restart = jpeg_resync_to_restart; /* use default method */ - src->pub.term_source = term_source; + src->pub.term_source = reinterpret_cast(term_source); src->infile = infile; // Need to setup a new buffer, clean bytes_in_buffer and next_input_byte