1 /*- 2 * Copyright (c) 1992 Keith Muller. 3 * Copyright (c) 1992, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * Keith Muller of the University of California, San Diego. 8 * 9 * %sccs.include.redist.c% 10 * 11 * @(#)extern.h 8.2 (Berkeley) 04/18/94 12 */ 13 14 /* 15 * External references from each source file 16 */ 17 18 #include <sys/cdefs.h> 19 20 /* 21 * ar_io.c 22 */ 23 extern char *arcname; 24 int ar_open __P((char *)); 25 void ar_close __P((void)); 26 void ar_drain __P((void)); 27 int ar_set_wr __P((void)); 28 int ar_app_ok __P((void)); 29 int ar_read __P((register char *, register int)); 30 int ar_write __P((register char *, register int)); 31 int ar_rdsync __P((void)); 32 int ar_fow __P((off_t, off_t *)); 33 int ar_rev __P((off_t )); 34 int ar_next __P((void)); 35 36 /* 37 * ar_subs.c 38 */ 39 extern u_long flcnt; 40 void list __P((void)); 41 void extract __P((void)); 42 void append __P((void)); 43 void archive __P((void)); 44 void copy __P((void)); 45 46 /* 47 * buf_subs.c 48 */ 49 extern int blksz; 50 extern int wrblksz; 51 extern int maxflt; 52 extern int rdblksz; 53 extern off_t wrlimit; 54 extern off_t rdcnt; 55 extern off_t wrcnt; 56 int wr_start __P((void)); 57 int rd_start __P((void)); 58 void cp_start __P((void)); 59 int appnd_start __P((off_t)); 60 int rd_sync __P((void)); 61 void pback __P((char *, int)); 62 int rd_skip __P((off_t)); 63 void wr_fin __P((void)); 64 int wr_rdbuf __P((register char *, register int)); 65 int rd_wrbuf __P((register char *, register int)); 66 int wr_skip __P((off_t)); 67 int wr_rdfile __P((ARCHD *, int, off_t *)); 68 int rd_wrfile __P((ARCHD *, int, off_t *)); 69 void cp_file __P((ARCHD *, int, int)); 70 int buf_fill __P((void)); 71 int buf_flush __P((register int)); 72 73 /* 74 * cache.c 75 */ 76 int uidtb_start __P((void)); 77 int gidtb_start __P((void)); 78 int usrtb_start __P((void)); 79 int grptb_start __P((void)); 80 char * name_uid __P((uid_t, int)); 81 char * name_gid __P((gid_t, int)); 82 int uid_name __P((char *, uid_t *)); 83 int gid_name __P((char *, gid_t *)); 84 85 /* 86 * cpio.c 87 */ 88 int cpio_strd __P((void)); 89 int cpio_trail __P((register ARCHD *)); 90 int cpio_endwr __P((void)); 91 int cpio_id __P((char *, int)); 92 int cpio_rd __P((register ARCHD *, register char *)); 93 off_t cpio_endrd __P((void)); 94 int cpio_stwr __P((void)); 95 int cpio_wr __P((register ARCHD *)); 96 int vcpio_id __P((char *, int)); 97 int crc_id __P((char *, int)); 98 int crc_strd __P((void)); 99 int vcpio_rd __P((register ARCHD *, register char *)); 100 off_t vcpio_endrd __P((void)); 101 int crc_stwr __P((void)); 102 int vcpio_wr __P((register ARCHD *)); 103 int bcpio_id __P((char *, int)); 104 int bcpio_rd __P((register ARCHD *, register char *)); 105 off_t bcpio_endrd __P((void)); 106 int bcpio_wr __P((register ARCHD *)); 107 108 /* 109 * file_subs.c 110 */ 111 int file_creat __P((register ARCHD *)); 112 void file_close __P((register ARCHD *, int)); 113 int lnk_creat __P((register ARCHD *)); 114 int cross_lnk __P((register ARCHD *)); 115 int chk_same __P((register ARCHD *)); 116 int node_creat __P((register ARCHD *)); 117 int unlnk_exist __P((register char *, register int)); 118 int chk_path __P((register char *, uid_t, gid_t)); 119 void set_ftime __P((char *fnm, time_t mtime, time_t atime, int frc)); 120 int set_ids __P((char *, uid_t, gid_t)); 121 void set_pmode __P((char *, mode_t)); 122 int file_write __P((int, char *, register int, int *, int *, int, char *)); 123 void file_flush __P((int, char *, int)); 124 void rdfile_close __P((register ARCHD *, register int *)); 125 int set_crc __P((register ARCHD *, register int)); 126 127 /* 128 * ftree.c 129 */ 130 int ftree_start __P((void)); 131 int ftree_add __P((register char *)); 132 void ftree_sel __P((register ARCHD *)); 133 void ftree_chk __P((void)); 134 int next_file __P((register ARCHD *)); 135 136 /* 137 * gen_subs.c 138 */ 139 void ls_list __P((register ARCHD *, time_t)); 140 void ls_tty __P((register ARCHD *)); 141 void zf_strncpy __P((register char *, register char *, int)); 142 int l_strncpy __P((register char *, register char *, int)); 143 u_long asc_ul __P((register char *, int, register int)); 144 int ul_asc __P((u_long, register char *, register int, register int)); 145 #ifndef NET2_STAT 146 u_quad_t asc_uqd __P((register char *, int, register int)); 147 int uqd_asc __P((u_quad_t, register char *, register int, register int)); 148 #endif 149 150 /* 151 * options.c 152 */ 153 extern FSUB fsub[]; 154 extern int ford[]; 155 void options __P((register int, register char **)); 156 OPLIST * opt_next __P((void)); 157 int opt_add __P((register char *)); 158 int bad_opt __P((void)); 159 160 /* 161 * pat_rep.c 162 */ 163 int rep_add __P((register char *)); 164 int pat_add __P((char *)); 165 void pat_chk __P((void)); 166 int pat_sel __P((register ARCHD *)); 167 int pat_match __P((register ARCHD *)); 168 int mod_name __P((register ARCHD *)); 169 int set_dest __P((register ARCHD *, char *, int)); 170 171 /* 172 * pax.c 173 */ 174 extern int act; 175 extern FSUB *frmt; 176 extern int cflag; 177 extern int dflag; 178 extern int iflag; 179 extern int kflag; 180 extern int lflag; 181 extern int nflag; 182 extern int tflag; 183 extern int uflag; 184 extern int vflag; 185 extern int Dflag; 186 extern int Hflag; 187 extern int Lflag; 188 extern int Xflag; 189 extern int Yflag; 190 extern int Zflag; 191 extern int vfpart; 192 extern int patime; 193 extern int pmtime; 194 extern int pmode; 195 extern int pids; 196 extern int exit_val; 197 extern int docrc; 198 extern char *dirptr; 199 extern char *ltmfrmt; 200 extern char *argv0; 201 int main __P((int, char **)); 202 void sig_cleanup __P((int)); 203 204 /* 205 * sel_subs.c 206 */ 207 int sel_chk __P((register ARCHD *)); 208 int grp_add __P((register char *)); 209 int usr_add __P((register char *)); 210 int trng_add __P((register char *)); 211 212 /* 213 * tables.c 214 */ 215 int lnk_start __P((void)); 216 int chk_lnk __P((register ARCHD *)); 217 void purg_lnk __P((register ARCHD *)); 218 void lnk_end __P((void)); 219 int ftime_start __P((void)); 220 int chk_ftime __P((register ARCHD *)); 221 int name_start __P((void)); 222 int add_name __P((register char *, int, char *)); 223 void sub_name __P((register char *, int *)); 224 int dev_start __P((void)); 225 int add_dev __P((register ARCHD *)); 226 int map_dev __P((register ARCHD *, u_long, u_long)); 227 int atdir_start __P((void)); 228 void atdir_end __P((void)); 229 void add_atdir __P((char *, dev_t, ino_t, time_t, time_t)); 230 int get_atdir __P((dev_t, ino_t, time_t *, time_t *)); 231 int dir_start __P((void)); 232 void add_dir __P((char *, int, struct stat *, int)); 233 void proc_dir __P((void)); 234 u_int st_hash __P((char *, int, int)); 235 236 /* 237 * tar.c 238 */ 239 int tar_endwr __P((void)); 240 off_t tar_endrd __P((void)); 241 int tar_trail __P((register char *, register int, register int *)); 242 int tar_id __P((register char *, int)); 243 int tar_opt __P((void)); 244 int tar_rd __P((register ARCHD *, register char *)); 245 int tar_wr __P((register ARCHD *)); 246 int ustar_strd __P((void)); 247 int ustar_stwr __P((void)); 248 int ustar_id __P((char *, int)); 249 int ustar_rd __P((register ARCHD *, register char *)); 250 int ustar_wr __P((register ARCHD *)); 251 252 /* 253 * tty_subs.c 254 */ 255 int tty_init __P((void)); 256 void tty_prnt __P((char *, ...)); 257 int tty_read __P((char *, int)); 258 void warn __P((int, char *, ...)); 259 void syswarn __P((int, int, char *, ...)); 260