Imported from libpng-1.0.5q.tar

This commit is contained in:
Glenn Randers-Pehrson
2000-02-04 23:40:16 -06:00
parent 166c5a397e
commit 61c32d9e66
49 changed files with 7587 additions and 1120 deletions

52
contrib/pngminus/makefile Normal file
View File

@@ -0,0 +1,52 @@
# Makefile for PngMinus (png2pnm and pnm2png)
# Linux / Unix
CC=cc -O -n32
LD=cc -O -n32
#CC=gcc -O
#LD=gcc -O
LB=ar
RM=rm
CP=cp
PNGPATH = /usr/local
PNGINC = $(PNGPATH)/include
PNGLIB = $(PNGPATH)/lib -lpng
# PNGLIB = $(PNGPATH)/libpng.a
ZPATH = /usr/local
ZINC = $(ZPATH)/include
ZLIB = $(ZPATH)/lib -lz
# ZLIB = $(ZPATH)/libz.a
CCFLAGS=-I$(PNGINC) -I$(ZINC)
LDFLAGS=-L$(PNGLIB) -L$(ZLIB) -lm
C=.c
O=.o
L=.a
E=
# dependencies
all: png2pnm$(E) pnm2png$(E)
png2pnm$(O): png2pnm$(C)
$(CC) -c $(CCFLAGS) png2pnm$(C)
png2pnm$(E): png2pnm$(O)
$(LD) -o png2pnm$(E) png2pnm$(O) $(LDFLAGS)
pnm2png$(O): pnm2png$(C)
$(CC) -c $(CCFLAGS) pnm2png$(C)
pnm2png$(E): pnm2png$(O)
$(LD) -o pnm2png$(E) pnm2png$(O) $(LDFLAGS)
clean:
$(RM) png2pnm$(O)
$(RM) pnm2png$(O)
$(RM) png2pnm$(E)
$(RM) pnm2png$(E)
# End of makefile for png2pnm / pnm2png

View File

@@ -77,7 +77,8 @@ int main(int argc, char *argv[])
if ((fp_al = fopen (argv[argi], "rb")) == NULL)
{
fprintf (stderr, "PNM2PNG\n");
fprintf (stderr, "Error: alpha-channel file %s does not exist\n", argv[argi]);
fprintf (stderr, "Error: alpha-channel file %s does not exist\n",
argv[argi]);
exit (1);
}
break;
@@ -511,8 +512,8 @@ png_uint_32 get_value (FILE *pnm_file, int depth)
for (i = 0; i < depth; i++)
mask = (mask << 1) | 0x01;
get_token (pnm_file, token);
sscanf (token, "%lu", &ret_value);
get_token (pnm_file, (char *) token);
sscanf ((const char *) token, "%lu", &ret_value);
ret_value &= mask;