swab.c revision 57df14c654a968e5b85d508cbd0871632011cb0e
157df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey/* $NetBSD: extern.h,v 1.17 2012/01/04 15:58:37 christos Exp $ */ 257df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey 357df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey/*- 457df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * Copyright (c) 1991, 1993, 1994 557df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * The Regents of the University of California. All rights reserved. 657df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * 757df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * Redistribution and use in source and binary forms, with or without 857df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * modification, are permitted provided that the following conditions 957df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * are met: 1057df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * 1. Redistributions of source code must retain the above copyright 1157df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * notice, this list of conditions and the following disclaimer. 1257df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * 2. Redistributions in binary form must reproduce the above copyright 1357df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * notice, this list of conditions and the following disclaimer in the 1457df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * documentation and/or other materials provided with the distribution. 1557df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * 3. Neither the name of the University nor the names of its contributors 1657df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * may be used to endorse or promote products derived from this software 1757df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * without specific prior written permission. 1857df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * 1957df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2057df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2157df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2257df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2357df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2457df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2557df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2657df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2757df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2857df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2957df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * SUCH DAMAGE. 3057df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * 3157df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey * @(#)extern.h 8.2 (Berkeley) 4/1/94 3257df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey */ 3357df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey 3457df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey#ifndef _EXTERN_H_ 3557df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey#define _EXTERN_H_ 3657df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey 3757df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkeytypedef struct { 3857df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey char *p_end; /* pointer to NULL at end of path */ 3957df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey char *target_end; /* pointer to end of target base */ 4057df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey char p_path[MAXPATHLEN + 1]; /* pointer to the start of a path */ 4157df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey} PATH_T; 4257df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey 4357df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkeyextern PATH_T to; 4457df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkeyextern uid_t myuid; 4557df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkeyextern int Rflag, rflag, Hflag, Lflag, Pflag, fflag, iflag, lflag, pflag, Nflag; 4657df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkeyextern mode_t myumask; 4757df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkeyextern sig_atomic_t pinfo; 4857df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey 4957df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey#include <sys/cdefs.h> 5057df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey 5157df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey__BEGIN_DECLS 5257df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkeyint copy_fifo(struct stat *, int); 5357df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkeyint copy_file(FTSENT *, int); 5457df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkeyint copy_link(FTSENT *, int); 5557df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkeyint copy_special(struct stat *, int); 5657df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkeyint set_utimes(const char *, struct stat *); 5757df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkeyint setfile(struct stat *, int); 5857df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkeyvoid cp_usage(void) __attribute__((__noreturn__)); 5957df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey__END_DECLS 6057df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey 6157df14c654a968e5b85d508cbd0871632011cb0eJeff Sharkey#endif /* !_EXTERN_H_ */ 62