mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Ignore "#" delimited comments in input file to pnm2png.c.
This commit is contained in:
parent
34df4eb5ad
commit
6ab1f4903f
1
ANNOUNCE
1
ANNOUNCE
@ -52,6 +52,7 @@ Version 1.6.3beta05 [May 7, 2013]
|
|||||||
Zlib-1.2.8 and earlier don't allow us to decrease the windowBits, so
|
Zlib-1.2.8 and earlier don't allow us to decrease the windowBits, so
|
||||||
undid the improvement in beta04.
|
undid the improvement in beta04.
|
||||||
Check for EOF in contrib/pngminus/pnm2png.c (Paul Stewart).
|
Check for EOF in contrib/pngminus/pnm2png.c (Paul Stewart).
|
||||||
|
Ignore "#" delimited comments in input file to pnm2png.c.
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
1
CHANGES
1
CHANGES
@ -4535,6 +4535,7 @@ Version 1.6.3beta05 [May 7, 2013]
|
|||||||
Zlib-1.2.8 and earlier don't allow us to decrease the windowBits, so
|
Zlib-1.2.8 and earlier don't allow us to decrease the windowBits, so
|
||||||
undid the improvement in beta04.
|
undid the improvement in beta04.
|
||||||
Check for EOF in contrib/pngminus/pnm2png.c (Paul Stewart).
|
Check for EOF in contrib/pngminus/pnm2png.c (Paul Stewart).
|
||||||
|
Ignore "#" delimited comments in input file to pnm2png.c.
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
@ -462,10 +462,18 @@ void get_token(FILE *pnm_file, char *token)
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* remove white-space */
|
/* remove white-space and comment lines */
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
ret = fgetc(pnm_file);
|
ret = fgetc(pnm_file);
|
||||||
|
if (ret == '#') {
|
||||||
|
/* the rest of this line is a comment */
|
||||||
|
do
|
||||||
|
{
|
||||||
|
ret = fgetc(pnm_file);
|
||||||
|
}
|
||||||
|
while ((ret != '\n') && (ret != '\r') && (ret != EOF));
|
||||||
|
}
|
||||||
if (ret == EOF) break;
|
if (ret == EOF) break;
|
||||||
token[i] = (unsigned char) ret;
|
token[i] = (unsigned char) ret;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user