Re: [hackers] [sent] Support farbfeld as an intermediate format || sin
> +Image *ffopen(char *filename)
> {
> - FILE *f;
> - unsigned char buf[8];
> + unsigned char hdr[16];
> + char *bin;
> + regex_t regex;
> Image *img;
> + size_t i;
> + int tmpfd, fd;
> +
> + for (bin = NULL, i = 0; i < LEN(filters); i++) {
> + if (regcomp(®ex, filters[i].regex,
> + REG_NOSUB | REG_EXTENDED | REG_ICASE))
> + continue;
> + if (!regexec(®ex, filename, 0, NULL, 0)) {
> + bin = filters[i].bin;
> + break;
> + }
> + }
I forgot an if (!bin) return NULL sort of thing here.
Received on Tue Dec 08 2015 - 22:23:40 CET
This archive was generated by hypermail 2.3.0
: Tue Dec 08 2015 - 22:24:13 CET