X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2Fgdcmmpeg2%2Fsrc%2Fmpeg2dec%2Fmpeg2dec.h;h=d6f06b947e7c1f166802f090e734390803204794;hb=3705811f0b24769b2222f7d5ad2b14f8fd932104;hp=e80686780ae4b5a1576f2d0fe427af9edbf273b9;hpb=3c6a904a83c26b203d7f2d2fb35f4edc30ef140c;p=gdcm.git diff --git a/src/gdcmmpeg2/src/mpeg2dec/mpeg2dec.h b/src/gdcmmpeg2/src/mpeg2dec/mpeg2dec.h index e8068678..d6f06b94 100644 --- a/src/gdcmmpeg2/src/mpeg2dec/mpeg2dec.h +++ b/src/gdcmmpeg2/src/mpeg2dec/mpeg2dec.h @@ -127,19 +127,42 @@ #define MB_WEIGHT 32 #define MB_CLASS4 64 +/* FIXME */ +#include +#if defined(_MSC_VER) || defined(__BORLANDC__) +typedef int ssize_t; +#endif + + +#define FILESTAR + #include +#ifndef __cplusplus +typedef struct +{ +#ifdef FILESTAR + FILE* InFd; +#else + int InFd; +#endif +} istream; +#endif + typedef struct { - FILE* Fd; + FILE* OutFd; } ostream; -int my_open(char *filename); int my_printf(const char *format, ...); int my_fprintf(const char *format, ...); int my_sprintf(char *str, const char *format, ...); void my_exit(int status); -ostream *my_fopen(const char *path, const char *mode); +int my_fopenr(const char *path, const char *mode, istream *os); +int my_fopen(const char *path, const char *mode, ostream *os); int my_fseek(ostream *stream, long offset, int whence); -size_t my_fread(void *ptr, size_t size, size_t nmemb, ostream *stream); +int my_fseekr(istream *stream, long offset, int whence); +size_t my_fread(void *ptr, size_t size, size_t nmemb, istream *stream); +size_t my_fwrite(const void *ptr, size_t size, size_t nmemb, ostream *stream); int my_fclose(ostream *fp); +int my_fcloser(istream *fp);