Deleted Added
full compact
archive_read.c (328827) archive_read.c (337351)
1/*-
2 * Copyright (c) 2003-2011 Tim Kientzle
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 18 unchanged lines hidden (view full) ---

27 * This file contains the "essential" portions of the read API, that
28 * is, stuff that will probably always be used by any client that
29 * actually needs to read an archive. Optional pieces have been, as
30 * far as possible, separated out into separate files to avoid
31 * needlessly bloating statically-linked clients.
32 */
33
34#include "archive_platform.h"
1/*-
2 * Copyright (c) 2003-2011 Tim Kientzle
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 18 unchanged lines hidden (view full) ---

27 * This file contains the "essential" portions of the read API, that
28 * is, stuff that will probably always be used by any client that
29 * actually needs to read an archive. Optional pieces have been, as
30 * far as possible, separated out into separate files to avoid
31 * needlessly bloating statically-linked clients.
32 */
33
34#include "archive_platform.h"
35__FBSDID("$FreeBSD: stable/11/contrib/libarchive/libarchive/archive_read.c 328827 2018-02-03 02:17:04Z mm $");
35__FBSDID("$FreeBSD: stable/11/contrib/libarchive/libarchive/archive_read.c 337351 2018-08-05 14:35:30Z mm $");
36
37#ifdef HAVE_ERRNO_H
38#include <errno.h>
39#endif
40#include <stdio.h>
41#ifdef HAVE_STDLIB_H
42#include <stdlib.h>
43#endif

--- 772 unchanged lines hidden (view full) ---

816 * archive_read_data_block and copies the results into the client
817 * buffer, filling any gaps with zero bytes. Clients using this
818 * API can be completely ignorant of sparse-file issues; sparse files
819 * will simply be padded with nulls.
820 *
821 * DO NOT intermingle calls to this function and archive_read_data_block
822 * to read a single entry body.
823 */
36
37#ifdef HAVE_ERRNO_H
38#include <errno.h>
39#endif
40#include <stdio.h>
41#ifdef HAVE_STDLIB_H
42#include <stdlib.h>
43#endif

--- 772 unchanged lines hidden (view full) ---

816 * archive_read_data_block and copies the results into the client
817 * buffer, filling any gaps with zero bytes. Clients using this
818 * API can be completely ignorant of sparse-file issues; sparse files
819 * will simply be padded with nulls.
820 *
821 * DO NOT intermingle calls to this function and archive_read_data_block
822 * to read a single entry body.
823 */
824ssize_t
824la_ssize_t
825archive_read_data(struct archive *_a, void *buff, size_t s)
826{
827 struct archive *a = (struct archive *)_a;
828 char *dest;
829 const void *read_buf;
830 size_t bytes_read;
831 size_t len;
832 int r;

--- 909 unchanged lines hidden ---
825archive_read_data(struct archive *_a, void *buff, size_t s)
826{
827 struct archive *a = (struct archive *)_a;
828 char *dest;
829 const void *read_buf;
830 size_t bytes_read;
831 size_t len;
832 int r;

--- 909 unchanged lines hidden ---