ar.h (d20e9e02db3dde383c3de1ce8cec3a8c35b3eee6) | ar.h (c5bf58add0d523fc6e6546f3fc10d0c8b972e8e7) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2007 Kai Wang 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 40 unchanged lines hidden (view full) --- 49 50#define DEF_BLKSZ 10240 /* default block size */ 51 52/* 53 * Convenient wrapper for general libarchive error handling. 54 */ 55#define AC(CALL) do { \ 56 if ((CALL)) \ | 1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2007 Kai Wang 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 40 unchanged lines hidden (view full) --- 49 50#define DEF_BLKSZ 10240 /* default block size */ 51 52/* 53 * Convenient wrapper for general libarchive error handling. 54 */ 55#define AC(CALL) do { \ 56 if ((CALL)) \ |
57 bsdar_errc(bsdar, archive_errno(a), "%s", \ | 57 bsdar_errc(bsdar, EXIT_FAILURE, archive_errno(a), "%s", \ |
58 archive_error_string(a)); \ 59} while (0) 60 61/* 62 * In-memory representation of archive member(object). 63 */ 64struct ar_obj { 65 char *name; /* member name */ --- 43 unchanged lines hidden (view full) --- 109 size_t s_sn_cap; /* capacity of sn table buffer. */ 110 size_t s_sn_sz; /* current size of sn table. */ 111 /* Current member's offset (relative to the end of pseudo members.) */ 112 off_t rela_off; 113 114 TAILQ_HEAD(, ar_obj) v_obj; /* object(member) list */ 115}; 116 | 58 archive_error_string(a)); \ 59} while (0) 60 61/* 62 * In-memory representation of archive member(object). 63 */ 64struct ar_obj { 65 char *name; /* member name */ --- 43 unchanged lines hidden (view full) --- 109 size_t s_sn_cap; /* capacity of sn table buffer. */ 110 size_t s_sn_sz; /* current size of sn table. */ 111 /* Current member's offset (relative to the end of pseudo members.) */ 112 off_t rela_off; 113 114 TAILQ_HEAD(, ar_obj) v_obj; /* object(member) list */ 115}; 116 |
117void ar_mode_script(struct bsdar *ar); 118int ar_read_archive(struct bsdar *ar, int mode); 119int ar_write_archive(struct bsdar *ar, int mode); 120void bsdar_errc(struct bsdar *, int _code, const char *fmt, ...) __dead2; | 117void bsdar_errc(struct bsdar *, int _eval, int _code, 118 const char *fmt, ...) __dead2; |
121void bsdar_warnc(struct bsdar *, int _code, const char *fmt, ...); | 119void bsdar_warnc(struct bsdar *, int _code, const char *fmt, ...); |
120int ar_mode_d(struct bsdar *bsdar); 121int ar_mode_m(struct bsdar *bsdar); 122int ar_mode_p(struct bsdar *bsdar); 123int ar_mode_q(struct bsdar *bsdar); 124int ar_mode_r(struct bsdar *bsdar); 125int ar_mode_s(struct bsdar *bsdar); 126int ar_mode_t(struct bsdar *bsdar); 127int ar_mode_x(struct bsdar *bsdar); 128int ar_mode_A(struct bsdar *bsdar); 129void ar_mode_script(struct bsdar *ar); |
|