Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/imbuf/intern/targa.c')
-rw-r--r--source/blender/imbuf/intern/targa.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c
index fe1e00b4c2f..f334409133f 100644
--- a/source/blender/imbuf/intern/targa.c
+++ b/source/blender/imbuf/intern/targa.c
@@ -27,6 +27,11 @@
* $Id$
*/
+/** \file blender/imbuf/intern/targa.c
+ * \ingroup imbuf
+ */
+
+
#ifdef WIN32
#include <io.h>
#endif
@@ -191,8 +196,8 @@ static int dumptarga(struct ImBuf * ibuf, FILE * file)
int size;
uchar *rect;
- if (ibuf == 0) return (0);
- if (ibuf->rect == 0) return (0);
+ if (ibuf == NULL) return (0);
+ if (ibuf->rect == NULL) return (0);
size = ibuf->x * ibuf->y;
rect = (uchar *) ibuf->rect;
@@ -361,8 +366,8 @@ static void decodetarga(struct ImBuf *ibuf, unsigned char *mem, size_t mem_size,
unsigned int *rect;
uchar * cp = (uchar *) &col;
- if (ibuf == 0) return;
- if (ibuf->rect == 0) return;
+ if (ibuf == NULL) return;
+ if (ibuf->rect == NULL) return;
size = ibuf->x * ibuf->y;
rect = ibuf->rect;
@@ -472,8 +477,8 @@ static void ldtarga(struct ImBuf * ibuf,unsigned char * mem, size_t mem_size, in
unsigned int *rect;
uchar * cp = (uchar *) &col;
- if (ibuf == 0) return;
- if (ibuf->rect == 0) return;
+ if (ibuf == NULL) return;
+ if (ibuf->rect == NULL) return;
size = ibuf->x * ibuf->y;
rect = ibuf->rect;
@@ -530,12 +535,12 @@ struct ImBuf *imb_loadtarga(unsigned char *mem, size_t mem_size, int flags)
unsigned int *rect, *cmap= NULL, mincol= 0, maxcol= 0;
uchar * cp = (uchar *) &col;
- if (checktarga(&tga,mem) == 0) return(0);
+ if (checktarga(&tga,mem) == 0) return(NULL);
if (flags & IB_test) ibuf = IMB_allocImBuf(tga.xsize,tga.ysize,tga.pixsize, 0);
else ibuf = IMB_allocImBuf(tga.xsize,tga.ysize,(tga.pixsize + 0x7) & ~0x7, IB_rect);
- if (ibuf == 0) return(0);
+ if (ibuf == NULL) return(NULL);
ibuf->ftype = TGA;
ibuf->profile = IB_PROFILE_SRGB;
mem = mem + 18 + tga.numid;