extern.h revision 1.10
11.10Smycroft/*	$NetBSD: extern.h,v 1.10 1998/07/26 19:43:14 mycroft 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.10Smycroftconst char * name_uid __P((uid_t, int));
1101.10Smycroftconst char * 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.8Smrgextern int cpio_swp_head;
1181.1Sjtcint cpio_strd __P((void));
1191.7Slukemint cpio_subtrail __P((ARCHD *));
1201.1Sjtcint cpio_endwr __P((void));
1211.1Sjtcint cpio_id __P((char *, int));
1221.7Slukemint cpio_rd __P((ARCHD *, char *));
1231.1Sjtcoff_t cpio_endrd __P((void));
1241.1Sjtcint cpio_stwr __P((void));
1251.7Slukemint cpio_wr __P((ARCHD *));
1261.1Sjtcint vcpio_id __P((char *, int));
1271.1Sjtcint crc_id __P((char *, int));
1281.1Sjtcint crc_strd __P((void));
1291.7Slukemint vcpio_rd __P((ARCHD *, char *));
1301.1Sjtcoff_t vcpio_endrd __P((void));
1311.1Sjtcint crc_stwr __P((void));
1321.7Slukemint vcpio_wr __P((ARCHD *));
1331.1Sjtcint bcpio_id __P((char *, int));
1341.7Slukemint bcpio_rd __P((ARCHD *, char *));
1351.1Sjtcoff_t bcpio_endrd __P((void));
1361.7Slukemint bcpio_wr __P((ARCHD *));
1371.1Sjtc
1381.1Sjtc/*
1391.1Sjtc * file_subs.c
1401.1Sjtc */
1411.7Slukemint file_creat __P((ARCHD *));
1421.7Slukemvoid file_close __P((ARCHD *, int));
1431.7Slukemint lnk_creat __P((ARCHD *));
1441.7Slukemint cross_lnk __P((ARCHD *));
1451.7Slukemint chk_same __P((ARCHD *));
1461.7Slukemint node_creat __P((ARCHD *));
1471.7Slukemint unlnk_exist __P((char *, int));
1481.7Slukemint chk_path __P((char *, uid_t, gid_t));
1491.1Sjtcvoid set_ftime __P((char *fnm, time_t mtime, time_t atime, int frc));
1501.1Sjtcint set_ids __P((char *, uid_t, gid_t));
1511.1Sjtcvoid set_pmode __P((char *, mode_t));
1521.7Slukemint file_write __P((int, char *, int, int *, int *, int, char *));
1531.1Sjtcvoid file_flush __P((int, char *, int));
1541.7Slukemvoid rdfile_close __P((ARCHD *, int *));
1551.7Slukemint set_crc __P((ARCHD *, int));
1561.1Sjtc
1571.1Sjtc/*
1581.1Sjtc * ftree.c
1591.1Sjtc */
1601.1Sjtcint ftree_start __P((void));
1611.7Slukemint ftree_add __P((char *));
1621.7Slukemvoid ftree_sel __P((ARCHD *));
1631.1Sjtcvoid ftree_chk __P((void));
1641.7Slukemint next_file __P((ARCHD *));
1651.1Sjtc
1661.1Sjtc/*
1671.1Sjtc * gen_subs.c
1681.1Sjtc */
1691.7Slukemvoid ls_list __P((ARCHD *, time_t));
1701.7Slukemvoid ls_tty __P((ARCHD *));
1711.10Smycroftvoid zf_strncpy __P((char *, const char *, int));
1721.10Smycroftint l_strncpy __P((char *, const char *, int));
1731.7Slukemu_long asc_ul __P((char *, int, int));
1741.7Slukemint ul_asc __P((u_long, char *, int, int));
1751.1Sjtc#ifndef NET2_STAT
1761.7Slukemu_quad_t asc_uqd __P((char *, int, int));
1771.7Slukemint uqd_asc __P((u_quad_t, char *, int, int));
1781.1Sjtc#endif
1791.3Scgd
1801.3Scgd/*
1811.3Scgd * getoldopt.c
1821.3Scgd */
1831.3Scgdint getoldopt __P((int, char **, char *));
1841.1Sjtc
1851.1Sjtc/*
1861.1Sjtc * options.c
1871.1Sjtc */
1881.1Sjtcextern FSUB fsub[];
1891.1Sjtcextern int ford[];
1901.9Smrgextern int cpio_mode;
1911.9Smrgextern char *chdir_dir;
1921.7Slukemvoid options __P((int, char **));
1931.1SjtcOPLIST * opt_next __P((void));
1941.7Slukemint opt_add __P((char *));
1951.1Sjtcint bad_opt __P((void));
1961.1Sjtc
1971.1Sjtc/*
1981.1Sjtc * pat_rep.c
1991.1Sjtc */
2001.7Slukemint rep_add __P((char *));
2011.1Sjtcint pat_add __P((char *));
2021.1Sjtcvoid pat_chk __P((void));
2031.7Slukemint pat_sel __P((ARCHD *));
2041.7Slukemint pat_match __P((ARCHD *));
2051.7Slukemint mod_name __P((ARCHD *));
2061.7Slukemint set_dest __P((ARCHD *, char *, int));
2071.1Sjtc
2081.1Sjtc/*
2091.1Sjtc * pax.c
2101.1Sjtc */
2111.1Sjtcextern int act;
2121.1Sjtcextern FSUB *frmt;
2131.1Sjtcextern int cflag;
2141.1Sjtcextern int dflag;
2151.1Sjtcextern int iflag;
2161.1Sjtcextern int kflag;
2171.1Sjtcextern int lflag;
2181.1Sjtcextern int nflag;
2191.1Sjtcextern int tflag;
2201.1Sjtcextern int uflag;
2211.1Sjtcextern int vflag;
2221.5Smrgextern int zflag;
2231.1Sjtcextern int Dflag;
2241.1Sjtcextern int Hflag;
2251.1Sjtcextern int Lflag;
2261.1Sjtcextern int Xflag;
2271.1Sjtcextern int Yflag;
2281.1Sjtcextern int Zflag;
2291.1Sjtcextern int vfpart;
2301.1Sjtcextern int patime;
2311.1Sjtcextern int pmtime;
2321.1Sjtcextern int pmode;
2331.1Sjtcextern int pids;
2341.1Sjtcextern int exit_val;
2351.1Sjtcextern int docrc;
2361.1Sjtcextern char *dirptr;
2371.1Sjtcextern char *ltmfrmt;
2381.1Sjtcextern char *argv0;
2391.1Sjtcint main __P((int, char **));
2401.1Sjtcvoid sig_cleanup __P((int));
2411.1Sjtc
2421.1Sjtc/*
2431.1Sjtc * sel_subs.c
2441.1Sjtc */
2451.7Slukemint sel_chk __P((ARCHD *));
2461.7Slukemint grp_add __P((char *));
2471.7Slukemint usr_add __P((char *));
2481.7Slukemint trng_add __P((char *));
2491.1Sjtc
2501.1Sjtc/*
2511.1Sjtc * tables.c
2521.1Sjtc */
2531.1Sjtcint lnk_start __P((void));
2541.7Slukemint chk_lnk __P((ARCHD *));
2551.7Slukemvoid purg_lnk __P((ARCHD *));
2561.1Sjtcvoid lnk_end __P((void));
2571.1Sjtcint ftime_start __P((void));
2581.7Slukemint chk_ftime __P((ARCHD *));
2591.1Sjtcint name_start __P((void));
2601.7Slukemint add_name __P((char *, int, char *));
2611.7Slukemvoid sub_name __P((char *, int *));
2621.1Sjtcint dev_start __P((void));
2631.7Slukemint add_dev __P((ARCHD *));
2641.7Slukemint map_dev __P((ARCHD *, u_long, u_long));
2651.1Sjtcint atdir_start __P((void));
2661.1Sjtcvoid atdir_end __P((void));
2671.1Sjtcvoid add_atdir __P((char *, dev_t, ino_t, time_t, time_t));
2681.1Sjtcint get_atdir __P((dev_t, ino_t, time_t *, time_t *));
2691.1Sjtcint dir_start __P((void));
2701.1Sjtcvoid add_dir __P((char *, int, struct stat *, int));
2711.1Sjtcvoid proc_dir __P((void));
2721.1Sjtcu_int st_hash __P((char *, int, int));
2731.1Sjtc
2741.1Sjtc/*
2751.1Sjtc * tar.c
2761.1Sjtc */
2771.1Sjtcint tar_endwr __P((void));
2781.1Sjtcoff_t tar_endrd __P((void));
2791.7Slukemint tar_trail __P((char *, int, int *));
2801.7Slukemint tar_id __P((char *, int));
2811.1Sjtcint tar_opt __P((void));
2821.7Slukemint tar_rd __P((ARCHD *, char *));
2831.7Slukemint tar_wr __P((ARCHD *));
2841.1Sjtcint ustar_strd __P((void));
2851.1Sjtcint ustar_stwr __P((void));
2861.1Sjtcint ustar_id __P((char *, int));
2871.7Slukemint ustar_rd __P((ARCHD *, char *));
2881.7Slukemint ustar_wr __P((ARCHD *));
2891.1Sjtc
2901.1Sjtc/*
2911.1Sjtc * tty_subs.c
2921.1Sjtc */
2931.1Sjtcint tty_init __P((void));
2941.6Schristosvoid tty_prnt __P((char *, ...))
2951.6Schristos    __attribute__((format (printf, 1, 2)));
2961.1Sjtcint tty_read __P((char *, int));
2971.6Schristosvoid tty_warn __P((int, char *, ...))
2981.6Schristos    __attribute__((format (printf, 2, 3)));
2991.6Schristosvoid syswarn __P((int, int, char *, ...))
3001.6Schristos    __attribute__((format (printf, 3, 4)));
301