extern.h revision 1.7
11.7Slukem/* $NetBSD: extern.h,v 1.7 1997/09/14 14:54:32 lukem Exp $ */ 21.4Scgd 31.1Sjtc/*- 41.1Sjtc * Copyright (c) 1992 Keith Muller. 51.1Sjtc * Copyright (c) 1992, 1993 61.1Sjtc * The Regents of the University of California. All rights reserved. 71.1Sjtc * 81.1Sjtc * This code is derived from software contributed to Berkeley by 91.1Sjtc * Keith Muller of the University of California, San Diego. 101.1Sjtc * 111.1Sjtc * Redistribution and use in source and binary forms, with or without 121.1Sjtc * modification, are permitted provided that the following conditions 131.1Sjtc * are met: 141.1Sjtc * 1. Redistributions of source code must retain the above copyright 151.1Sjtc * notice, this list of conditions and the following disclaimer. 161.1Sjtc * 2. Redistributions in binary form must reproduce the above copyright 171.1Sjtc * notice, this list of conditions and the following disclaimer in the 181.1Sjtc * documentation and/or other materials provided with the distribution. 191.1Sjtc * 3. All advertising materials mentioning features or use of this software 201.1Sjtc * must display the following acknowledgement: 211.1Sjtc * This product includes software developed by the University of 221.1Sjtc * California, Berkeley and its contributors. 231.1Sjtc * 4. Neither the name of the University nor the names of its contributors 241.1Sjtc * may be used to endorse or promote products derived from this software 251.1Sjtc * without specific prior written permission. 261.1Sjtc * 271.1Sjtc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 281.1Sjtc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 291.1Sjtc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 301.1Sjtc * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 311.1Sjtc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 321.1Sjtc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 331.1Sjtc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 341.1Sjtc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 351.1Sjtc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 361.1Sjtc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 371.1Sjtc * SUCH DAMAGE. 381.1Sjtc * 391.4Scgd * @(#)extern.h 8.2 (Berkeley) 4/18/94 401.1Sjtc */ 411.1Sjtc 421.1Sjtc/* 431.1Sjtc * External references from each source file 441.1Sjtc */ 451.1Sjtc 461.1Sjtc#include <sys/cdefs.h> 471.1Sjtc 481.1Sjtc/* 491.1Sjtc * ar_io.c 501.1Sjtc */ 511.1Sjtcextern char *arcname; 521.5Smrgextern char *gzip_program; 531.1Sjtcint ar_open __P((char *)); 541.1Sjtcvoid ar_close __P((void)); 551.1Sjtcvoid ar_drain __P((void)); 561.1Sjtcint ar_set_wr __P((void)); 571.1Sjtcint ar_app_ok __P((void)); 581.7Slukemint ar_read __P((char *, int)); 591.7Slukemint ar_write __P((char *, int)); 601.1Sjtcint ar_rdsync __P((void)); 611.1Sjtcint ar_fow __P((off_t, off_t *)); 621.1Sjtcint ar_rev __P((off_t )); 631.1Sjtcint ar_next __P((void)); 641.1Sjtc 651.1Sjtc/* 661.1Sjtc * ar_subs.c 671.1Sjtc */ 681.1Sjtcextern u_long flcnt; 691.1Sjtcvoid list __P((void)); 701.1Sjtcvoid extract __P((void)); 711.1Sjtcvoid append __P((void)); 721.1Sjtcvoid archive __P((void)); 731.1Sjtcvoid copy __P((void)); 741.1Sjtc 751.1Sjtc/* 761.1Sjtc * buf_subs.c 771.1Sjtc */ 781.1Sjtcextern int blksz; 791.1Sjtcextern int wrblksz; 801.1Sjtcextern int maxflt; 811.1Sjtcextern int rdblksz; 821.1Sjtcextern off_t wrlimit; 831.1Sjtcextern off_t rdcnt; 841.1Sjtcextern off_t wrcnt; 851.1Sjtcint wr_start __P((void)); 861.1Sjtcint rd_start __P((void)); 871.1Sjtcvoid cp_start __P((void)); 881.1Sjtcint appnd_start __P((off_t)); 891.1Sjtcint rd_sync __P((void)); 901.1Sjtcvoid pback __P((char *, int)); 911.1Sjtcint rd_skip __P((off_t)); 921.1Sjtcvoid wr_fin __P((void)); 931.7Slukemint wr_rdbuf __P((char *, int)); 941.7Slukemint rd_wrbuf __P((char *, int)); 951.1Sjtcint wr_skip __P((off_t)); 961.1Sjtcint wr_rdfile __P((ARCHD *, int, off_t *)); 971.1Sjtcint rd_wrfile __P((ARCHD *, int, off_t *)); 981.1Sjtcvoid cp_file __P((ARCHD *, int, int)); 991.1Sjtcint buf_fill __P((void)); 1001.7Slukemint buf_flush __P((int)); 1011.1Sjtc 1021.1Sjtc/* 1031.1Sjtc * cache.c 1041.1Sjtc */ 1051.1Sjtcint uidtb_start __P((void)); 1061.1Sjtcint gidtb_start __P((void)); 1071.1Sjtcint usrtb_start __P((void)); 1081.1Sjtcint grptb_start __P((void)); 1091.1Sjtcchar * name_uid __P((uid_t, int)); 1101.1Sjtcchar * name_gid __P((gid_t, int)); 1111.1Sjtcint uid_name __P((char *, uid_t *)); 1121.1Sjtcint gid_name __P((char *, gid_t *)); 1131.1Sjtc 1141.1Sjtc/* 1151.1Sjtc * cpio.c 1161.1Sjtc */ 1171.1Sjtcint cpio_strd __P((void)); 1181.7Slukemint cpio_subtrail __P((ARCHD *)); 1191.1Sjtcint cpio_endwr __P((void)); 1201.1Sjtcint cpio_id __P((char *, int)); 1211.7Slukemint cpio_rd __P((ARCHD *, char *)); 1221.1Sjtcoff_t cpio_endrd __P((void)); 1231.1Sjtcint cpio_stwr __P((void)); 1241.7Slukemint cpio_wr __P((ARCHD *)); 1251.1Sjtcint vcpio_id __P((char *, int)); 1261.1Sjtcint crc_id __P((char *, int)); 1271.1Sjtcint crc_strd __P((void)); 1281.7Slukemint vcpio_rd __P((ARCHD *, char *)); 1291.1Sjtcoff_t vcpio_endrd __P((void)); 1301.1Sjtcint crc_stwr __P((void)); 1311.7Slukemint vcpio_wr __P((ARCHD *)); 1321.1Sjtcint bcpio_id __P((char *, int)); 1331.7Slukemint bcpio_rd __P((ARCHD *, char *)); 1341.1Sjtcoff_t bcpio_endrd __P((void)); 1351.7Slukemint bcpio_wr __P((ARCHD *)); 1361.1Sjtc 1371.1Sjtc/* 1381.1Sjtc * file_subs.c 1391.1Sjtc */ 1401.7Slukemint file_creat __P((ARCHD *)); 1411.7Slukemvoid file_close __P((ARCHD *, int)); 1421.7Slukemint lnk_creat __P((ARCHD *)); 1431.7Slukemint cross_lnk __P((ARCHD *)); 1441.7Slukemint chk_same __P((ARCHD *)); 1451.7Slukemint node_creat __P((ARCHD *)); 1461.7Slukemint unlnk_exist __P((char *, int)); 1471.7Slukemint chk_path __P((char *, uid_t, gid_t)); 1481.1Sjtcvoid set_ftime __P((char *fnm, time_t mtime, time_t atime, int frc)); 1491.1Sjtcint set_ids __P((char *, uid_t, gid_t)); 1501.1Sjtcvoid set_pmode __P((char *, mode_t)); 1511.7Slukemint file_write __P((int, char *, int, int *, int *, int, char *)); 1521.1Sjtcvoid file_flush __P((int, char *, int)); 1531.7Slukemvoid rdfile_close __P((ARCHD *, int *)); 1541.7Slukemint set_crc __P((ARCHD *, int)); 1551.1Sjtc 1561.1Sjtc/* 1571.1Sjtc * ftree.c 1581.1Sjtc */ 1591.1Sjtcint ftree_start __P((void)); 1601.7Slukemint ftree_add __P((char *)); 1611.7Slukemvoid ftree_sel __P((ARCHD *)); 1621.1Sjtcvoid ftree_chk __P((void)); 1631.7Slukemint next_file __P((ARCHD *)); 1641.1Sjtc 1651.1Sjtc/* 1661.1Sjtc * gen_subs.c 1671.1Sjtc */ 1681.7Slukemvoid ls_list __P((ARCHD *, time_t)); 1691.7Slukemvoid ls_tty __P((ARCHD *)); 1701.7Slukemvoid zf_strncpy __P((char *, char *, int)); 1711.7Slukemint l_strncpy __P((char *, char *, int)); 1721.7Slukemu_long asc_ul __P((char *, int, int)); 1731.7Slukemint ul_asc __P((u_long, char *, int, int)); 1741.1Sjtc#ifndef NET2_STAT 1751.7Slukemu_quad_t asc_uqd __P((char *, int, int)); 1761.7Slukemint uqd_asc __P((u_quad_t, char *, int, int)); 1771.1Sjtc#endif 1781.3Scgd 1791.3Scgd/* 1801.3Scgd * getoldopt.c 1811.3Scgd */ 1821.3Scgdint getoldopt __P((int, char **, char *)); 1831.1Sjtc 1841.1Sjtc/* 1851.1Sjtc * options.c 1861.1Sjtc */ 1871.1Sjtcextern FSUB fsub[]; 1881.1Sjtcextern int ford[]; 1891.7Slukemvoid options __P((int, char **)); 1901.1SjtcOPLIST * opt_next __P((void)); 1911.7Slukemint opt_add __P((char *)); 1921.1Sjtcint bad_opt __P((void)); 1931.1Sjtc 1941.1Sjtc/* 1951.1Sjtc * pat_rep.c 1961.1Sjtc */ 1971.7Slukemint rep_add __P((char *)); 1981.1Sjtcint pat_add __P((char *)); 1991.1Sjtcvoid pat_chk __P((void)); 2001.7Slukemint pat_sel __P((ARCHD *)); 2011.7Slukemint pat_match __P((ARCHD *)); 2021.7Slukemint mod_name __P((ARCHD *)); 2031.7Slukemint set_dest __P((ARCHD *, char *, int)); 2041.1Sjtc 2051.1Sjtc/* 2061.1Sjtc * pax.c 2071.1Sjtc */ 2081.1Sjtcextern int act; 2091.1Sjtcextern FSUB *frmt; 2101.1Sjtcextern int cflag; 2111.1Sjtcextern int dflag; 2121.1Sjtcextern int iflag; 2131.1Sjtcextern int kflag; 2141.1Sjtcextern int lflag; 2151.1Sjtcextern int nflag; 2161.1Sjtcextern int tflag; 2171.1Sjtcextern int uflag; 2181.1Sjtcextern int vflag; 2191.5Smrgextern int zflag; 2201.1Sjtcextern int Dflag; 2211.1Sjtcextern int Hflag; 2221.1Sjtcextern int Lflag; 2231.1Sjtcextern int Xflag; 2241.1Sjtcextern int Yflag; 2251.1Sjtcextern int Zflag; 2261.1Sjtcextern int vfpart; 2271.1Sjtcextern int patime; 2281.1Sjtcextern int pmtime; 2291.1Sjtcextern int pmode; 2301.1Sjtcextern int pids; 2311.1Sjtcextern int exit_val; 2321.1Sjtcextern int docrc; 2331.1Sjtcextern char *dirptr; 2341.1Sjtcextern char *ltmfrmt; 2351.1Sjtcextern char *argv0; 2361.1Sjtcint main __P((int, char **)); 2371.1Sjtcvoid sig_cleanup __P((int)); 2381.1Sjtc 2391.1Sjtc/* 2401.1Sjtc * sel_subs.c 2411.1Sjtc */ 2421.7Slukemint sel_chk __P((ARCHD *)); 2431.7Slukemint grp_add __P((char *)); 2441.7Slukemint usr_add __P((char *)); 2451.7Slukemint trng_add __P((char *)); 2461.1Sjtc 2471.1Sjtc/* 2481.1Sjtc * tables.c 2491.1Sjtc */ 2501.1Sjtcint lnk_start __P((void)); 2511.7Slukemint chk_lnk __P((ARCHD *)); 2521.7Slukemvoid purg_lnk __P((ARCHD *)); 2531.1Sjtcvoid lnk_end __P((void)); 2541.1Sjtcint ftime_start __P((void)); 2551.7Slukemint chk_ftime __P((ARCHD *)); 2561.1Sjtcint name_start __P((void)); 2571.7Slukemint add_name __P((char *, int, char *)); 2581.7Slukemvoid sub_name __P((char *, int *)); 2591.1Sjtcint dev_start __P((void)); 2601.7Slukemint add_dev __P((ARCHD *)); 2611.7Slukemint map_dev __P((ARCHD *, u_long, u_long)); 2621.1Sjtcint atdir_start __P((void)); 2631.1Sjtcvoid atdir_end __P((void)); 2641.1Sjtcvoid add_atdir __P((char *, dev_t, ino_t, time_t, time_t)); 2651.1Sjtcint get_atdir __P((dev_t, ino_t, time_t *, time_t *)); 2661.1Sjtcint dir_start __P((void)); 2671.1Sjtcvoid add_dir __P((char *, int, struct stat *, int)); 2681.1Sjtcvoid proc_dir __P((void)); 2691.1Sjtcu_int st_hash __P((char *, int, int)); 2701.1Sjtc 2711.1Sjtc/* 2721.1Sjtc * tar.c 2731.1Sjtc */ 2741.1Sjtcint tar_endwr __P((void)); 2751.1Sjtcoff_t tar_endrd __P((void)); 2761.7Slukemint tar_trail __P((char *, int, int *)); 2771.7Slukemint tar_id __P((char *, int)); 2781.1Sjtcint tar_opt __P((void)); 2791.7Slukemint tar_rd __P((ARCHD *, char *)); 2801.7Slukemint tar_wr __P((ARCHD *)); 2811.1Sjtcint ustar_strd __P((void)); 2821.1Sjtcint ustar_stwr __P((void)); 2831.1Sjtcint ustar_id __P((char *, int)); 2841.7Slukemint ustar_rd __P((ARCHD *, char *)); 2851.7Slukemint ustar_wr __P((ARCHD *)); 2861.1Sjtc 2871.1Sjtc/* 2881.1Sjtc * tty_subs.c 2891.1Sjtc */ 2901.1Sjtcint tty_init __P((void)); 2911.6Schristosvoid tty_prnt __P((char *, ...)) 2921.6Schristos __attribute__((format (printf, 1, 2))); 2931.1Sjtcint tty_read __P((char *, int)); 2941.6Schristosvoid tty_warn __P((int, char *, ...)) 2951.6Schristos __attribute__((format (printf, 2, 3))); 2961.6Schristosvoid syswarn __P((int, int, char *, ...)) 2971.6Schristos __attribute__((format (printf, 3, 4))); 298