update radiance load from upstream
thanks Greg Ward
This commit is contained in:
parent
0beb5e9165
commit
0b3565c04d
@ -36,6 +36,7 @@
|
|||||||
- get EXIF tag names from tag plus ifd [@Nan619]
|
- get EXIF tag names from tag plus ifd [@Nan619]
|
||||||
- escape ASCII control characters in XML
|
- escape ASCII control characters in XML
|
||||||
- magickload now sniffs some file types itself
|
- magickload now sniffs some file types itself
|
||||||
|
- update radiance load from upstream
|
||||||
|
|
||||||
12/3/18 started 8.6.4
|
12/3/18 started 8.6.4
|
||||||
- better fitting of fonts with overhanging edges [Adrià]
|
- better fitting of fonts with overhanging edges [Adrià]
|
||||||
|
@ -172,8 +172,6 @@
|
|||||||
* 4. make all functions static
|
* 4. make all functions static
|
||||||
* 5. reorder to remove forward refs
|
* 5. reorder to remove forward refs
|
||||||
* 6. remove unused funcs, mostly related to HDR write
|
* 6. remove unused funcs, mostly related to HDR write
|
||||||
* 7. "char fs[64];" needs to be MAXLINE to stop out of bounds write on long
|
|
||||||
* lines
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define RED 0
|
#define RED 0
|
||||||
@ -472,6 +470,7 @@ char *buf;
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define MAXLINE 2048
|
#define MAXLINE 2048
|
||||||
|
#define MAXFMTLEN 2048
|
||||||
|
|
||||||
static const char FMTSTR[] = "FORMAT="; /* format identifier */
|
static const char FMTSTR[] = "FORMAT="; /* format identifier */
|
||||||
|
|
||||||
@ -481,11 +480,12 @@ static gethfunc mycheck;
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
formatval( /* get format value (return true if format) */
|
formatval( /* get format value (return true if format) */
|
||||||
char *r,
|
char fmt[MAXFMTLEN],
|
||||||
const char *s
|
const char *s
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const char *cp = FMTSTR;
|
const char *cp = FMTSTR;
|
||||||
|
char *r = fmt;
|
||||||
|
|
||||||
while (*cp) if (*cp++ != *s++) return(0);
|
while (*cp) if (*cp++ != *s++) return(0);
|
||||||
while (isspace(*s)) s++;
|
while (isspace(*s)) s++;
|
||||||
@ -493,7 +493,7 @@ formatval( /* get format value (return true if format) */
|
|||||||
if (r == NULL) return(1);
|
if (r == NULL) return(1);
|
||||||
do
|
do
|
||||||
*r++ = *s++;
|
*r++ = *s++;
|
||||||
while (*s && !isspace(*s));
|
while (*s && !isspace(*s) && r-fmt < MAXFMTLEN-1);
|
||||||
*r = '\0';
|
*r = '\0';
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
@ -541,11 +541,7 @@ getheader( /* get header from file */
|
|||||||
|
|
||||||
struct check {
|
struct check {
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
|
char fs[MAXFMTLEN];
|
||||||
/* This was 64. Expand to MAXLINE to prevent an out of bounds write
|
|
||||||
* for very long lines.
|
|
||||||
*/
|
|
||||||
char fs[MAXLINE];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -635,7 +631,7 @@ globmatch( /* check for match of s against pattern p */
|
|||||||
static int
|
static int
|
||||||
checkheader(
|
checkheader(
|
||||||
FILE *fin,
|
FILE *fin,
|
||||||
char *fmt,
|
char fmt[MAXFMTLEN],
|
||||||
FILE *fout
|
FILE *fout
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user