X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Frmt.h;h=2155223954c3d6f6e6fe52cae48af77003384eba;hb=09f55426640cfbfff46d41aa9530d132fc15e4c9;hp=36b4f8ba0ada31d01cfe0bab3afbdbab6cd9e1b4;hpb=dc8eef4ae4db6f6b8641f554a052da8e79e177b5;p=chaz%2Ftar diff --git a/src/rmt.h b/src/rmt.h index 36b4f8b..2155223 100644 --- a/src/rmt.h +++ b/src/rmt.h @@ -1,31 +1,29 @@ -/* Remote tape drive defines for tar. - Copyright (C) 1988 Free Software Foundation +/* Definitions for communicating with a remote tape drive. + Copyright (C) 1988, 1992 Free Software Foundation, Inc. -This file is part of GNU Tar. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. -GNU Tar is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -GNU Tar is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -You should have received a copy of the GNU General Public License -along with GNU Tar; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#if defined(HAVE_UNISTD_H) +#ifdef HAVE_UNISTD_H #include -#endif /* HAVE_UNISTD_H */ +#endif #if !defined(_POSIX_VERSION) #ifdef __MSDOS__ #include #else /* !__MSDOS__ */ -extern off_t lseek(); +extern off_t lseek (); #endif /* __MSDOS__ */ #endif /* _POSIX_VERSION */ @@ -46,7 +44,7 @@ extern off_t lseek(); #define rmtfcntl fcntl #define rmtisatty isatty -#else +#else /* !NO_REMOTE */ #define __REM_BIAS 128 #define RMTIOCTL @@ -57,14 +55,16 @@ extern off_t lseek(); extern char *__rmt_path; -extern long __rmt_lseek(); - -#if !defined(USG) && !defined(STDC_HEADERS) -#define strchr index +#if defined(STDC_HEADERS) || defined(HAVE_STRING_H) +#include +#ifndef index +#define index strchr +#endif +#else +extern char *index (); #endif -extern char *strchr(); -#define _remdev(path) ((__rmt_path=strchr(path, ':')) && strncmp(__rmt_path, ":/dev/", 6)==0) +#define _remdev(path) (!f_force_local && (__rmt_path=index(path, ':'))) #define _isrmt(fd) ((fd) >= __REM_BIAS) #define rmtopen(path,oflag,mode) (_remdev(path) ? __rmt_open(path, oflag, mode, __REM_BIAS) : open(path, oflag, mode)) @@ -88,4 +88,11 @@ extern char *strchr(); #define rmtisatty(fd) (_isrmt(fd) ? 0 : isatty(fd)) #undef RMTIOCTL -#endif + +int __rmt_open (); +int __rmt_close (); +int __rmt_read (); +int __rmt_write (); +long __rmt_lseek (); +int __rmt_ioctl (); +#endif /* !NO_REMOTE */