diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-05-10 17:11:36 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-05-10 17:11:36 +0400 |
commit | eabb4441061401245f4e12de7c54f9c46c7b3826 (patch) | |
tree | fba466a4876491f3ca7a3b9fd8e39d8e5d937b38 /source/blender/imbuf/intern | |
parent | 6d5f0bfac6408f511f556ec756941512ec0b9a6d (diff) |
minor cleanup: make functions static, use NULL for pointer comparisons,
also fixed a possible bug assigning incorrect DPX function types to
imbuf.
Diffstat (limited to 'source/blender/imbuf/intern')
-rw-r--r-- | source/blender/imbuf/intern/cineon/cineon_dpx.c | 9 | ||||
-rw-r--r-- | source/blender/imbuf/intern/cineon/cineonfile.h | 13 | ||||
-rw-r--r-- | source/blender/imbuf/intern/cineon/cineonlib.c | 4 | ||||
-rw-r--r-- | source/blender/imbuf/intern/cineon/logmemfile.c | 2 |
4 files changed, 9 insertions, 19 deletions
diff --git a/source/blender/imbuf/intern/cineon/cineon_dpx.c b/source/blender/imbuf/intern/cineon/cineon_dpx.c index 504817b263f..8df2a9f6985 100644 --- a/source/blender/imbuf/intern/cineon/cineon_dpx.c +++ b/source/blender/imbuf/intern/cineon/cineon_dpx.c @@ -44,6 +44,7 @@ #include "IMB_imbuf_types.h" #include "IMB_imbuf.h" +#include "IMB_filetype.h" #include "BKE_global.h" @@ -192,7 +193,7 @@ static int imb_save_dpx_cineon(ImBuf *ibuf, const char *filename, int use_cineon return 1; } -short imb_savecineon(struct ImBuf *buf, const char *myfile, int flags) +int imb_savecineon(struct ImBuf *buf, const char *myfile, int flags) { return imb_save_dpx_cineon(buf, myfile, 1, flags); } @@ -203,14 +204,14 @@ int imb_is_cineon(unsigned char *buf) return cineonIsMemFileCineon(buf); } -ImBuf *imb_loadcineon(unsigned char *mem, int size, int flags) +ImBuf *imb_loadcineon(unsigned char *mem, size_t size, int flags) { if(imb_is_cineon(mem)) return imb_load_dpx_cineon(mem, 1, size, flags); return NULL; } -short imb_save_dpx(struct ImBuf *buf, const char *myfile, int flags) +int imb_save_dpx(struct ImBuf *buf, const char *myfile, int flags) { return imb_save_dpx_cineon(buf, myfile, 0, flags); } @@ -220,7 +221,7 @@ int imb_is_dpx(unsigned char *buf) return dpxIsMemFileCineon(buf); } -ImBuf *imb_loaddpx(unsigned char *mem, int size, int flags) +ImBuf *imb_loaddpx(unsigned char *mem, size_t size, int flags) { if(imb_is_dpx(mem)) return imb_load_dpx_cineon(mem, 0, size, flags); diff --git a/source/blender/imbuf/intern/cineon/cineonfile.h b/source/blender/imbuf/intern/cineon/cineonfile.h index 31aa56f560c..896e0af65b3 100644 --- a/source/blender/imbuf/intern/cineon/cineonfile.h +++ b/source/blender/imbuf/intern/cineon/cineonfile.h @@ -126,19 +126,6 @@ typedef struct { ASCII reserved[740]; } CineonMPISpecificInformation; -#if 0 -/* create CineonFile from data in header */ -/* return 0 for OK */ -int readCineonGenericHeader(CineonFile* cineon, CineonGenericHeader* header); - -/* create header from data in CineonFile */ -int initCineonGenericHeader( - CineonFile* cineon, CineonGenericHeader* header, const char* imagename); - -/* Note: dump routine assumes network byte order */ -void dumpCineonGenericHeader(CineonGenericHeader* header); -#endif - #ifdef __cplusplus } #endif diff --git a/source/blender/imbuf/intern/cineon/cineonlib.c b/source/blender/imbuf/intern/cineon/cineonlib.c index fdcd3491af1..922cfcf9629 100644 --- a/source/blender/imbuf/intern/cineon/cineonlib.c +++ b/source/blender/imbuf/intern/cineon/cineonlib.c @@ -276,7 +276,7 @@ dumpCineonOriginationInfo(CineonOriginationInformation* originInfo) { d_printf("Input device gamma %f\n", ntohf(originInfo->input_device_gamma)); } -int +static int initCineonGenericHeader(CineonFile* cineon, CineonGenericHeader* header, const char* imagename) { fillCineonFileInfo(cineon, &header->fileInfo, imagename); @@ -287,7 +287,7 @@ initCineonGenericHeader(CineonFile* cineon, CineonGenericHeader* header, const c return 0; } -void +static void dumpCineonGenericHeader(CineonGenericHeader* header) { dumpCineonFileInfo(&header->fileInfo); dumpCineonImageInfo(&header->imageInfo); diff --git a/source/blender/imbuf/intern/cineon/logmemfile.c b/source/blender/imbuf/intern/cineon/logmemfile.c index 6347eb5fdf9..d3a32774efd 100644 --- a/source/blender/imbuf/intern/cineon/logmemfile.c +++ b/source/blender/imbuf/intern/cineon/logmemfile.c @@ -27,6 +27,8 @@ #include "logImageCore.h" +#include "logmemfile.h" /* own include */ + int logimage_fseek(void* logfile, intptr_t offsett, int origin) { struct _Log_Image_File_t_ *file = (struct _Log_Image_File_t_*) logfile; |