• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asus-wl-520gu-7.0.1.45/src/router/busybox/libbb/

Lines Matching refs:src_stream

30 extern void seek_sub_file(FILE *src_stream, const int count);
31 extern char *extract_archive(FILE *src_stream, FILE *out_stream, const file_header_t *file_entry,
42 void seek_sub_file(FILE *src_stream, const int count)
47 if (fseek(src_stream, count, SEEK_CUR) != 0 && errno == ESPIPE) {
49 fgetc(src_stream);
59 /* Extract the data postioned at src_stream to either filesystem, stdout or
71 char *extract_archive(FILE *src_stream, FILE *out_stream, const file_header_t *file_entry,
99 copy_file_chunk(src_stream, out_stream, file_entry->size);
106 fread(buffer, 1, file_entry->size, src_stream);
125 seek_sub_file(src_stream, file_entry->size);
149 seek_sub_file(src_stream, file_entry->size);
153 copy_file_chunk(src_stream, dst_stream, file_entry->size);
207 seek_sub_file(src_stream, file_entry->size);
229 char *unarchive(FILE *src_stream, FILE *out_stream, file_header_t *(*get_headers)(FILE *),
238 while ((file_entry = get_headers(src_stream)) != NULL) {
251 buffer = extract_archive(src_stream, out_stream, file_entry, extract_function, prefix);
254 seek_sub_file(src_stream, file_entry->size);
262 file_header_t *get_header_ar(FILE *src_stream)
279 if (fread(ar.raw, 1, 60, src_stream) != 60) {
294 if (fgetc(src_stream) != '\n') {
313 fread(ar_long_names, 1, typed->size, src_stream);
317 return (get_header_ar(src_stream)); /* Return next header */
320 seek_sub_file(src_stream, typed->size);
321 return (get_header_ar(src_stream)); /* Return next header */
355 file_header_t *get_header_cpio(FILE *src_stream)
382 seek_sub_file(src_stream, (4 - (archive_offset % 4)) % 4);
383 if (fread(cpio_header, 1, 110, src_stream) == 110) {
401 fread(cpio_entry->name, 1, namesize, src_stream); /* Read in filename */
404 seek_sub_file(src_stream, (4 - (archive_offset % 4)) % 4);
425 fread(cpio_entry->link_name, 1, cpio_entry->size, src_stream);
436 return(get_header_cpio(src_stream)); /* Recurse to next file */
456 if (ferror(src_stream) || feof(src_stream)) {