24 static unsigned int get_2(
const unsigned char **q)
26 const unsigned char *p = *q;
27 unsigned int n = (p[0] << 0) | (p[1] << 8);
33 static unsigned int get_4(
const unsigned char **q)
35 const unsigned char *p = *q;
36 unsigned int n = (p[0] << 0) | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
42 static int read_bmp_header(
const unsigned char *p)
60 if (get_4(&p) != (
unsigned int)
ca.
width)
62 if (get_4(&p) != (
unsigned int)-
ca.
height)
91 if (fread(header,
sizeof(header), 1, input) != 1)
94 if (!read_bmp_header(header))
101 "unexpected end of file"),
103 else if (ferror(input))
void cairo_read_bmp(void)
GRASS cairo display driver - header file.
void void void void G_fatal_error(const char *,...) __attribute__((format(printf