blob: 2cfef42a42de44fe19186c4c78d5d1cfb1f6bf54 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
/* See LICENSE file for copyright and license details. */
#include "common.h"
#ifndef TEST
int
rtgrpblib_reset_raster(RASTER *raster, size_t width, size_t height)
{
if (!width || !height || width > raster->width * raster->height / height) {
errno = EINVAL;
return -1;
}
raster->width = width;
raster->height = height;
memset(raster->cells, 0, width * height * sizeof(*raster->cells));
return 0;
}
#else
int
main(void)
{
return 0; /* TODO add test */
}
#endif
|