#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: compress.c,v 1.88 2015/11/11 22:30:29 christos Exp $")
+FILE_RCSID("@(#)$File: compress.c,v 1.89 2015/11/11 22:50:12 christos Exp $")
#endif
#include "magic.h"
#define FNAME (1 << 3)
#define FCOMMENT (1 << 4)
-static int
-makeerror(unsigned char **buf, size_t *len, const char *fmt, ...)
-{
- char *msg;
- va_list ap;
- int rv;
-
- va_start(ap, fmt);
- rv = vasprintf(&msg, fmt, ap);
- va_end(ap);
- if (rv < 0) {
- *buf = NULL;
- *len = 0;
- return NODATA;
- }
- *buf = (unsigned char *)msg;
- *len = strlen(msg);
- return ERRDATA;
-}
private int
uncompressgzipped(const unsigned char *old, unsigned char **newch, size_t *n)
}
#endif
+static int
+makeerror(unsigned char **buf, size_t *len, const char *fmt, ...)
+{
+ char *msg;
+ va_list ap;
+ int rv;
+
+ va_start(ap, fmt);
+ rv = vasprintf(&msg, fmt, ap);
+ va_end(ap);
+ if (rv < 0) {
+ *buf = NULL;
+ *len = 0;
+ return NODATA;
+ }
+ *buf = (unsigned char *)msg;
+ *len = strlen(msg);
+ return ERRDATA;
+}
+
static void
closefd(int *fd, size_t i)
{