projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20001125-3-src
[rocksndiamonds.git]
/
src
/
pcx.c
diff --git
a/src/pcx.c
b/src/pcx.c
index cb8e54980fdc1490b8fb09d9c624bb3928367aaf..b075940c8447a0a273938c63cb0ce5ddc325b6ad 100644
(file)
--- a/
src/pcx.c
+++ b/
src/pcx.c
@@
-11,6
+11,8
@@
* pcx.c *
***********************************************************/
* pcx.c *
***********************************************************/
+#ifndef TARGET_SDL
+
#include "pcx.h"
#include "image.h"
#include "misc.h"
#include "pcx.h"
#include "image.h"
#include "misc.h"
@@
-154,6
+156,7
@@
Image *Read_PCX_to_Image(char *filename)
{
/* PCX file is too short to contain a valid PCX header */
fclose(file);
{
/* PCX file is too short to contain a valid PCX header */
fclose(file);
+
errno_pcx = PCX_FileInvalid;
return NULL;
}
errno_pcx = PCX_FileInvalid;
return NULL;
}
@@
-190,6
+193,7
@@
Image *Read_PCX_to_Image(char *filename)
width < 0 || height < 0)
{
free(file_buffer);
width < 0 || height < 0)
{
free(file_buffer);
+
errno_pcx = PCX_FileInvalid;
return NULL;
}
errno_pcx = PCX_FileInvalid;
return NULL;
}
@@
-198,7
+202,7
@@
Image *Read_PCX_to_Image(char *filename)
if (options.verbose)
{
printf("%s is a %dx%d PC Paintbrush image with %d bitplanes\n",
if (options.verbose)
{
printf("%s is a %dx%d PC Paintbrush image with %d bitplanes\n",
- filename,
pcx.xmax, pcx.ymax
,
+ filename,
width, height
,
pcx.color_planes);
printf("depth: %d\n", pcx.bits_per_pixel);
printf("color_planes: %d\n", pcx.color_planes);
pcx.color_planes);
printf("depth: %d\n", pcx.bits_per_pixel);
printf("color_planes: %d\n", pcx.color_planes);
@@
-220,6
+224,7
@@
Image *Read_PCX_to_Image(char *filename)
{
free(file_buffer);
freeImage(image);
{
free(file_buffer);
freeImage(image);
+
errno_pcx = PCX_FileInvalid;
return NULL;
}
errno_pcx = PCX_FileInvalid;
return NULL;
}
@@
-256,3
+261,5
@@
Image *Read_PCX_to_Image(char *filename)
return image;
}
return image;
}
+
+#endif /* !TARGET_SDL */