Lines Matching refs:newch

526 uncompressgzipped(const unsigned char *old, unsigned char **newch,  in uncompressgzipped()  argument
555 return uncompresszlib(old, newch, bytes_max, n, 0); in uncompressgzipped()
557 return makeerror(newch, n, "File too short"); in uncompressgzipped()
561 uncompresszlib(const unsigned char *old, unsigned char **newch, in uncompresszlib() argument
567 if ((*newch = CAST(unsigned char *, emalloc(bytes_max + 1))) == NULL) in uncompresszlib()
568 return makeerror(newch, n, "No buffer, %s", strerror(errno)); in uncompresszlib()
572 z.next_out = *newch; in uncompresszlib()
593 (*newch)[*n] = '\0'; in uncompresszlib()
597 strlcpy(RCAST(char *, *newch), z.msg ? z.msg : zError(rc), bytes_max); in uncompresszlib()
598 *n = strlen(RCAST(char *, *newch)); in uncompresszlib()
605 uncompressbzlib(const unsigned char *old, unsigned char **newch, in uncompressbzlib() argument
616 if ((*newch = CAST(unsigned char *, malloc(bytes_max + 1))) == NULL) in uncompressbzlib()
617 return makeerror(newch, n, "No buffer, %s", strerror(errno)); in uncompressbzlib()
621 bz.next_out = RCAST(char *, *newch); in uncompressbzlib()
636 (*newch)[*n] = '\0'; in uncompressbzlib()
640 snprintf(RCAST(char *, *newch), bytes_max, "bunzip error %d", rc); in uncompressbzlib()
641 *n = strlen(RCAST(char *, *newch)); in uncompressbzlib()
648 uncompressxzlib(const unsigned char *old, unsigned char **newch, in uncompressxzlib() argument
659 if ((*newch = CAST(unsigned char *, malloc(bytes_max + 1))) == NULL) in uncompressxzlib()
660 return makeerror(newch, n, "No buffer, %s", strerror(errno)); in uncompressxzlib()
664 xz.next_out = RCAST(uint8_t *, *newch); in uncompressxzlib()
676 (*newch)[*n] = '\0'; in uncompressxzlib()
680 snprintf(RCAST(char *, *newch), bytes_max, "unxz error %d", rc); in uncompressxzlib()
681 *n = strlen(RCAST(char *, *newch)); in uncompressxzlib()
815 unsigned char **newch, size_t* n) in uncompressbuf() argument
827 return uncompressgzipped(old, newch, bytes_max, n); in uncompressbuf()
829 return uncompresszlib(old, newch, bytes_max, n, 1); in uncompressbuf()
833 return uncompressbzlib(old, newch, bytes_max, n); in uncompressbuf()
838 return uncompressxzlib(old, newch, bytes_max, n); in uncompressbuf()
869 return makeerror(newch, n, "Cannot create pipe, %s", in uncompressbuf()
878 return makeerror(newch, n, "Cannot vfork, %s", in uncompressbuf()
929 *newch = CAST(unsigned char *, malloc(bytes_max + 1)); in uncompressbuf()
930 if (*newch == NULL) { in uncompressbuf()
931 rv = makeerror(newch, n, "No buffer, %s", in uncompressbuf()
936 r = sread(fdp[STDOUT_FILENO][0], *newch, bytes_max, 0); in uncompressbuf()
943 (r = sread(fdp[STDERR_FILENO][0], *newch, bytes_max, 0)) > 0) in uncompressbuf()
945 r = filter_error(*newch, r); in uncompressbuf()
948 free(*newch); in uncompressbuf()
950 rv = makeerror(newch, n, "Read failed, %s", in uncompressbuf()
953 rv = makeerror(newch, n, "No data"); in uncompressbuf()
959 (*newch)[*n] = '\0'; in uncompressbuf()
968 free(*newch); in uncompressbuf()
969 rv = makeerror(newch, n, "Wait failed, %s", strerror(errno)); in uncompressbuf()
987 DPRINTF("Returning %p n=%" SIZE_T_FORMAT "u rv=%d\n", *newch, *n, rv); in uncompressbuf()