Sophie

Sophie

distrib > CentOS > 5 > i386 > media > os > by-pkgid > 608068f228165b6e5a4f2c11fda54521 > files > 896

rpm-apidocs-4.4.2.3-34.el5.i386.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>rpm: file/src/tar.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li id="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="files.html"><span>File&nbsp;List</span></a></li>
    <li><a href="globals.html"><span>Globals</span></a></li>
  </ul></div>
<h1>file/src/tar.h</h1><a href="tar_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * Copyright (c) Ian F. Darwin 1986-1995.</span>
<a name="l00003"></a>00003 <span class="comment"> * Software written by Ian F. Darwin and others;</span>
<a name="l00004"></a>00004 <span class="comment"> * maintained 1995-present by Christos Zoulas and others.</span>
<a name="l00005"></a>00005 <span class="comment"> * </span>
<a name="l00006"></a>00006 <span class="comment"> * Redistribution and use in source and binary forms, with or without</span>
<a name="l00007"></a>00007 <span class="comment"> * modification, are permitted provided that the following conditions</span>
<a name="l00008"></a>00008 <span class="comment"> * are met:</span>
<a name="l00009"></a>00009 <span class="comment"> * 1. Redistributions of source code must retain the above copyright</span>
<a name="l00010"></a>00010 <span class="comment"> *    notice immediately at the beginning of the file, without modification,</span>
<a name="l00011"></a>00011 <span class="comment"> *    this list of conditions, and the following disclaimer.</span>
<a name="l00012"></a>00012 <span class="comment"> * 2. Redistributions in binary form must reproduce the above copyright</span>
<a name="l00013"></a>00013 <span class="comment"> *    notice, this list of conditions and the following disclaimer in the</span>
<a name="l00014"></a>00014 <span class="comment"> *    documentation and/or other materials provided with the distribution.</span>
<a name="l00015"></a>00015 <span class="comment"> *  </span>
<a name="l00016"></a>00016 <span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND</span>
<a name="l00017"></a>00017 <span class="comment"> * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span>
<a name="l00018"></a>00018 <span class="comment"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span>
<a name="l00019"></a>00019 <span class="comment"> * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR</span>
<a name="l00020"></a>00020 <span class="comment"> * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL</span>
<a name="l00021"></a>00021 <span class="comment"> * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS</span>
<a name="l00022"></a>00022 <span class="comment"> * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)</span>
<a name="l00023"></a>00023 <span class="comment"> * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT</span>
<a name="l00024"></a>00024 <span class="comment"> * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY</span>
<a name="l00025"></a>00025 <span class="comment"> * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</span>
<a name="l00026"></a>00026 <span class="comment"> * SUCH DAMAGE.</span>
<a name="l00027"></a>00027 <span class="comment"> */</span>
<a name="l00028"></a>00028 <span class="comment">/*</span>
<a name="l00029"></a>00029 <span class="comment"> * Header file for public domain tar (tape archive) program.</span>
<a name="l00030"></a>00030 <span class="comment"> *</span>
<a name="l00031"></a>00031 <span class="comment"> * @(#)tar.h 1.20 86/10/29      Public Domain.</span>
<a name="l00032"></a>00032 <span class="comment"> *</span>
<a name="l00033"></a>00033 <span class="comment"> * Created 25 August 1985 by John Gilmore, ihnp4!hoptoad!gnu.</span>
<a name="l00034"></a>00034 <span class="comment"> *</span>
<a name="l00035"></a>00035 <span class="comment"> * $Id: tar.h,v 1.8 2004/09/11 19:15:58 christos Exp $ # checkin only</span>
<a name="l00036"></a>00036 <span class="comment"> */</span>
<a name="l00037"></a>00037 
<a name="l00038"></a>00038 <span class="comment">/*</span>
<a name="l00039"></a>00039 <span class="comment"> * Kludge for handling systems that cannot cope with multiple</span>
<a name="l00040"></a>00040 <span class="comment"> * external definitions of a variable.  In ONE routine (tar.c),</span>
<a name="l00041"></a>00041 <span class="comment"> * we #define TAR_EXTERN to null; here, we set it to "extern" if</span>
<a name="l00042"></a>00042 <span class="comment"> * it is not already set.</span>
<a name="l00043"></a>00043 <span class="comment"> */</span>
<a name="l00044"></a>00044 <span class="preprocessor">#ifndef TAR_EXTERN</span>
<a name="l00045"></a><a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">00045</a> <span class="preprocessor"></span><span class="preprocessor">#define TAR_EXTERN extern</span>
<a name="l00046"></a>00046 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span>
<a name="l00048"></a>00048 <span class="comment">/*</span>
<a name="l00049"></a>00049 <span class="comment"> * Header block on tape.</span>
<a name="l00050"></a>00050 <span class="comment"> *</span>
<a name="l00051"></a>00051 <span class="comment"> * I'm going to use traditional DP naming conventions here.</span>
<a name="l00052"></a>00052 <span class="comment"> * A "block" is a big chunk of stuff that we do I/O on.</span>
<a name="l00053"></a>00053 <span class="comment"> * A "record" is a piece of info that we care about.</span>
<a name="l00054"></a>00054 <span class="comment"> * Typically many "record"s fit into a "block".</span>
<a name="l00055"></a>00055 <span class="comment"> */</span>
<a name="l00056"></a><a class="code" href="tar_8h.html#142eb20bd755ff0a9dbf6328ea0a380e">00056</a> <span class="preprocessor">#define RECORDSIZE      512</span>
<a name="l00057"></a><a class="code" href="tar_8h.html#c6201487e61283a3b0e4246ceac9a6a5">00057</a> <span class="preprocessor"></span><span class="preprocessor">#define NAMSIZ  100</span>
<a name="l00058"></a><a class="code" href="tar_8h.html#9de3571f1e3cf04a66c9cda2a93b6b17">00058</a> <span class="preprocessor"></span><span class="preprocessor">#define TUNMLEN 32</span>
<a name="l00059"></a><a class="code" href="tar_8h.html#a0c246aa61b8c8be82021a61abbeca80">00059</a> <span class="preprocessor"></span><span class="preprocessor">#define TGNMLEN 32</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span>
<a name="l00061"></a><a class="code" href="unionrecord.html">00061</a> <span class="keyword">union </span><a class="code" href="unionrecord.html">record</a> {
<a name="l00062"></a><a class="code" href="unionrecord.html#795b1676aa1e77bdafa968f1c19d43d3">00062</a>         <span class="keywordtype">char</span>            <a class="code" href="unionrecord.html#795b1676aa1e77bdafa968f1c19d43d3">charptr</a>[<a class="code" href="tar_8h.html#142eb20bd755ff0a9dbf6328ea0a380e">RECORDSIZE</a>];
<a name="l00063"></a><a class="code" href="structrecord_1_1header.html">00063</a>         <span class="keyword">struct </span><a class="code" href="structrecord_1_1header.html">header</a> {
<a name="l00064"></a><a class="code" href="structrecord_1_1header.html#690770733849ad7ea7043d675dd372dc">00064</a>                 <span class="keywordtype">char</span>    <a class="code" href="structname.html">name</a>[<a class="code" href="tar_8h.html#c6201487e61283a3b0e4246ceac9a6a5">NAMSIZ</a>];
<a name="l00065"></a><a class="code" href="structrecord_1_1header.html#e0e81f7e78bc89eb51e9c7973581854b">00065</a>                 <span class="keywordtype">char</span>    <a class="code" href="structrecord_1_1header.html#e0e81f7e78bc89eb51e9c7973581854b">mode</a>[8];
<a name="l00066"></a><a class="code" href="structrecord_1_1header.html#0ad15e1e942ab808e0f89496101bdf66">00066</a>                 <span class="keywordtype">char</span>    <a class="code" href="structrecord_1_1header.html#0ad15e1e942ab808e0f89496101bdf66">uid</a>[8];
<a name="l00067"></a><a class="code" href="structrecord_1_1header.html#5252bee0fa5cf1e25a703c01720160ea">00067</a>                 <span class="keywordtype">char</span>    <a class="code" href="structrecord_1_1header.html#5252bee0fa5cf1e25a703c01720160ea">gid</a>[8];
<a name="l00068"></a><a class="code" href="structrecord_1_1header.html#0f456cc2ddc79396e2d5b5e7bd63f54a">00068</a>                 <span class="keywordtype">char</span>    <a class="code" href="structrecord_1_1header.html#0f456cc2ddc79396e2d5b5e7bd63f54a">size</a>[12];
<a name="l00069"></a><a class="code" href="structrecord_1_1header.html#fccb6dfedf03b79872d4776789c32dd1">00069</a>                 <span class="keywordtype">char</span>    <a class="code" href="structrecord_1_1header.html#fccb6dfedf03b79872d4776789c32dd1">mtime</a>[12];
<a name="l00070"></a><a class="code" href="structrecord_1_1header.html#049b652c8fdd28274b2362f2e8332956">00070</a>                 <span class="keywordtype">char</span>    <a class="code" href="structrecord_1_1header.html#049b652c8fdd28274b2362f2e8332956">chksum</a>[8];
<a name="l00071"></a><a class="code" href="structrecord_1_1header.html#b1c870ab1cb3bc4efff62b750e7e81e3">00071</a>                 <span class="keywordtype">char</span>    <a class="code" href="structrecord_1_1header.html#b1c870ab1cb3bc4efff62b750e7e81e3">linkflag</a>;
<a name="l00072"></a><a class="code" href="structrecord_1_1header.html#d017dfc9fe2a74cd2173ac4e96c73956">00072</a>                 <span class="keywordtype">char</span>    <a class="code" href="structrecord_1_1header.html#d017dfc9fe2a74cd2173ac4e96c73956">linkname</a>[<a class="code" href="tar_8h.html#c6201487e61283a3b0e4246ceac9a6a5">NAMSIZ</a>];
<a name="l00073"></a><a class="code" href="structrecord_1_1header.html#0d7bd5bcc35f84adcc34cf301ebccc61">00073</a>                 <span class="keywordtype">char</span>    <a class="code" href="structmagic.html">magic</a>[8];
<a name="l00074"></a><a class="code" href="structrecord_1_1header.html#ec911da9e1f51ba0422e94b242d739b0">00074</a>                 <span class="keywordtype">char</span>    <a class="code" href="structrecord_1_1header.html#ec911da9e1f51ba0422e94b242d739b0">uname</a>[<a class="code" href="tar_8h.html#9de3571f1e3cf04a66c9cda2a93b6b17">TUNMLEN</a>];
<a name="l00075"></a><a class="code" href="structrecord_1_1header.html#6a36943c069294a21a560d9e883fdb55">00075</a>                 <span class="keywordtype">char</span>    <a class="code" href="structrecord_1_1header.html#6a36943c069294a21a560d9e883fdb55">gname</a>[<a class="code" href="tar_8h.html#a0c246aa61b8c8be82021a61abbeca80">TGNMLEN</a>];
<a name="l00076"></a><a class="code" href="structrecord_1_1header.html#80daf75006f3a519d075dbf2303ed72b">00076</a>                 <span class="keywordtype">char</span>    <a class="code" href="structrecord_1_1header.html#80daf75006f3a519d075dbf2303ed72b">devmajor</a>[8];
<a name="l00077"></a><a class="code" href="structrecord_1_1header.html#acd637907fc75e1719b69f7effb95725">00077</a>                 <span class="keywordtype">char</span>    <a class="code" href="structrecord_1_1header.html#acd637907fc75e1719b69f7effb95725">devminor</a>[8];
<a name="l00078"></a>00078         } <a class="code" href="structrecord_1_1header.html">header</a>;
<a name="l00079"></a>00079 };
<a name="l00080"></a>00080 
<a name="l00081"></a>00081 <span class="comment">/* The checksum field is filled with this while the checksum is computed. */</span>
<a name="l00082"></a><a class="code" href="tar_8h.html#dfcf16ebba05204a318b4d0203cc8a52">00082</a> <span class="preprocessor">#define CHKBLANKS       "        "      </span><span class="comment">/* 8 blanks, no null */</span>
<a name="l00083"></a>00083 
<a name="l00084"></a>00084 <span class="comment">/* The magic field is filled with this if uname and gname are valid. */</span>
<a name="l00085"></a><a class="code" href="tar_8h.html#59ed567b74e97bf17f583a82b9f5930f">00085</a> <span class="preprocessor">#define TMAGIC          "ustar  "       </span><span class="comment">/* 7 chars and a null */</span>
<a name="l00086"></a>00086 
<a name="l00087"></a>00087 <span class="comment">/* The linkflag defines the type of file */</span>
<a name="l00088"></a><a class="code" href="tar_8h.html#177a87d52686f3c8d1e71e3a65fc36a6">00088</a> <span class="preprocessor">#define LF_OLDNORMAL    '\0'            </span><span class="comment">/* Normal disk file, Unix compat */</span>
<a name="l00089"></a><a class="code" href="tar_8h.html#8c9e306e02e8df07e29b16e41e900f56">00089</a> <span class="preprocessor">#define LF_NORMAL       '0'             </span><span class="comment">/* Normal disk file */</span>
<a name="l00090"></a><a class="code" href="tar_8h.html#69ce888437ad3970437e6150a5d21ae6">00090</a> <span class="preprocessor">#define LF_LINK         '1'             </span><span class="comment">/* Link to previously dumped file */</span>
<a name="l00091"></a><a class="code" href="tar_8h.html#ab1965dbff65e8a835d99527dcc58ec2">00091</a> <span class="preprocessor">#define LF_SYMLINK      '2'             </span><span class="comment">/* Symbolic link */</span>
<a name="l00092"></a><a class="code" href="tar_8h.html#d606f70546b2a39da323fb71391e2045">00092</a> <span class="preprocessor">#define LF_CHR          '3'             </span><span class="comment">/* Character special file */</span>
<a name="l00093"></a><a class="code" href="tar_8h.html#3a3f31c8f593f43379b50f0cc4f7c261">00093</a> <span class="preprocessor">#define LF_BLK          '4'             </span><span class="comment">/* Block special file */</span>
<a name="l00094"></a><a class="code" href="tar_8h.html#0ac18add284994be76aca1ea5c500c2d">00094</a> <span class="preprocessor">#define LF_DIR          '5'             </span><span class="comment">/* Directory */</span>
<a name="l00095"></a><a class="code" href="tar_8h.html#11cecc70d4431ff7da77611bede53930">00095</a> <span class="preprocessor">#define LF_FIFO         '6'             </span><span class="comment">/* FIFO special file */</span>
<a name="l00096"></a><a class="code" href="tar_8h.html#dcc3a4ac8c3e7d8fba9b84eab7847f95">00096</a> <span class="preprocessor">#define LF_CONTIG       '7'             </span><span class="comment">/* Contiguous file */</span>
<a name="l00097"></a>00097 <span class="comment">/* Further link types may be defined later. */</span>
<a name="l00098"></a>00098 
<a name="l00099"></a>00099 <span class="comment">/*</span>
<a name="l00100"></a>00100 <span class="comment"> * Exit codes from the "tar" program</span>
<a name="l00101"></a>00101 <span class="comment"> */</span>
<a name="l00102"></a><a class="code" href="tar_8h.html#5456b45d374af3c38bc2217b952d17bc">00102</a> <span class="preprocessor">#define EX_SUCCESS      0               </span><span class="comment">/* success! */</span>
<a name="l00103"></a><a class="code" href="tar_8h.html#3d5945bcbc56eb47fc3ae76c708c0681">00103</a> <span class="preprocessor">#define EX_ARGSBAD      1               </span><span class="comment">/* invalid args */</span>
<a name="l00104"></a><a class="code" href="tar_8h.html#6a58f3ed140c16ec41d95b08afcdf740">00104</a> <span class="preprocessor">#define EX_BADFILE      2               </span><span class="comment">/* invalid filename */</span>
<a name="l00105"></a><a class="code" href="tar_8h.html#0601009f80b6963cb1878a40e45a8313">00105</a> <span class="preprocessor">#define EX_BADARCH      3               </span><span class="comment">/* bad archive */</span>
<a name="l00106"></a><a class="code" href="tar_8h.html#88f4945628c90dbb3dfda4362142463f">00106</a> <span class="preprocessor">#define EX_SYSTEM       4               </span><span class="comment">/* system gave unexpected error */</span>
<a name="l00107"></a>00107 
<a name="l00108"></a>00108 
<a name="l00109"></a>00109 <span class="comment">/*</span>
<a name="l00110"></a>00110 <span class="comment"> * Global variables</span>
<a name="l00111"></a>00111 <span class="comment"> */</span>
<a name="l00112"></a>00112 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keyword">union </span><a class="code" href="unionrecord.html">record</a> *<a class="code" href="tar_8h.html#e872d1d31f59a3ffe8785103abe24461">ar_block</a>;      <span class="comment">/* Start of block of archive */</span>
<a name="l00113"></a>00113 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keyword">union </span><a class="code" href="unionrecord.html">record</a> *<a class="code" href="tar_8h.html#8c26277f1b042dd949032b3118caccff">ar_record</a>;     <span class="comment">/* Current record of archive */</span>
<a name="l00114"></a>00114 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keyword">union </span><a class="code" href="unionrecord.html">record</a> *<a class="code" href="tar_8h.html#7c64c481ee73029c487a76f0a0625784">ar_last</a>;       <span class="comment">/* Last+1 record of archive block */</span>
<a name="l00115"></a>00115 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keywordtype">char</span>         <a class="code" href="tar_8h.html#4474a2ea58a5858f54aa900f178a98de">ar_reading</a>;     <span class="comment">/* 0 writing, !0 reading archive */</span>
<a name="l00116"></a>00116 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keywordtype">int</span>          <a class="code" href="tar_8h.html#505192f89416f345f3c31e1adbd28336">blocking</a>;       <span class="comment">/* Size of each block, in records */</span>
<a name="l00117"></a>00117 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keywordtype">int</span>          <a class="code" href="tar_8h.html#75e9073defcedf91712de41e4ac14800">blocksize</a>;      <span class="comment">/* Size of each block, in bytes */</span>
<a name="l00118"></a>00118 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keywordtype">char</span>         *<a class="code" href="tar_8h.html#6934d3a1dfba66405d49f6f53218533d">ar_file</a>;       <span class="comment">/* File containing archive */</span>
<a name="l00119"></a>00119 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keywordtype">char</span>         *<a class="code" href="tar_8h.html#3224ee39791675b51b0f76b1598af6f5">name_file</a>;     <span class="comment">/* File containing names to work on */</span>
<a name="l00120"></a>00120 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keywordtype">char</span>         *<a class="code" href="tar_8h.html#d5f09c4c1886b9697226451ca5d1f11e">tar</a>;           <span class="comment">/* Name of this program */</span>
<a name="l00121"></a>00121 
<a name="l00122"></a>00122 <span class="comment">/*</span>
<a name="l00123"></a>00123 <span class="comment"> * Flags from the command line</span>
<a name="l00124"></a>00124 <span class="comment"> */</span>
<a name="l00125"></a>00125 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keywordtype">char</span> <a class="code" href="tar_8h.html#eb5004bc75b87a1734b18c3d7e4a9ef5">f_reblock</a>;              <span class="comment">/* -B */</span>
<a name="l00126"></a>00126 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keywordtype">char</span> <a class="code" href="tar_8h.html#3bc9ff0bb6515a13bf1817d7dc8d889c">f_create</a>;               <span class="comment">/* -c */</span>
<a name="l00127"></a>00127 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keywordtype">char</span> <a class="code" href="tar_8h.html#18157565397cadc41095fc5058738345">f_debug</a>;                <span class="comment">/* -d */</span>
<a name="l00128"></a>00128 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keywordtype">char</span> <a class="code" href="tar_8h.html#deb4e18761a868869a3458c6559ad1d3">f_sayblock</a>;             <span class="comment">/* -D */</span>
<a name="l00129"></a>00129 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keywordtype">char</span> <a class="code" href="tar_8h.html#8418e26124237690af44dba374d0ba62">f_follow_links</a>;         <span class="comment">/* -h */</span>
<a name="l00130"></a>00130 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keywordtype">char</span> <a class="code" href="tar_8h.html#f142a4bd7f7aaf569d4bfef1d90d11fa">f_ignorez</a>;              <span class="comment">/* -i */</span>
<a name="l00131"></a>00131 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keywordtype">char</span> <a class="code" href="tar_8h.html#a7f8a9b4347ec54d0add466329330278">f_keep</a>;                 <span class="comment">/* -k */</span>
<a name="l00132"></a>00132 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keywordtype">char</span> <a class="code" href="tar_8h.html#f81d494db0f44e1375b11de376aa096d">f_modified</a>;             <span class="comment">/* -m */</span>
<a name="l00133"></a>00133 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keywordtype">char</span> <a class="code" href="tar_8h.html#d237c0416f8bf5a8f69d513e06eb0e6c">f_oldarch</a>;              <span class="comment">/* -o */</span>
<a name="l00134"></a>00134 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keywordtype">char</span> <a class="code" href="tar_8h.html#3953af81152d9490fca7dbfc1b255d94">f_use_protection</a>;       <span class="comment">/* -p */</span>
<a name="l00135"></a>00135 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keywordtype">char</span> <a class="code" href="tar_8h.html#c9352aa2fd7d984fc808df25870be373">f_sorted_names</a>;         <span class="comment">/* -s */</span>
<a name="l00136"></a>00136 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keywordtype">char</span> <a class="code" href="tar_8h.html#76eaa00ff2d5ee0c0aeebea9367254bf">f_list</a>;                 <span class="comment">/* -t */</span>
<a name="l00137"></a>00137 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keywordtype">char</span> <a class="code" href="tar_8h.html#ec335805918c6efb363a95d5de5ef9a2">f_namefile</a>;             <span class="comment">/* -T */</span>
<a name="l00138"></a>00138 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keywordtype">char</span> <a class="code" href="tar_8h.html#af7468d30f1378f2cfaec43c2e610353">f_verbose</a>;              <span class="comment">/* -v */</span>
<a name="l00139"></a>00139 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keywordtype">char</span> <a class="code" href="tar_8h.html#f35b24bc7be79d753b70a6acb65e778a">f_extract</a>;              <span class="comment">/* -x */</span>
<a name="l00140"></a>00140 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keywordtype">char</span> <a class="code" href="tar_8h.html#04d4185588058aeb8310ed14c93f4e3f">f_compress</a>;             <span class="comment">/* -z */</span>
<a name="l00141"></a>00141 
<a name="l00142"></a>00142 <span class="comment">/*</span>
<a name="l00143"></a>00143 <span class="comment"> * We now default to Unix Standard format rather than 4.2BSD tar format.</span>
<a name="l00144"></a>00144 <span class="comment"> * The code can actually produce all three:</span>
<a name="l00145"></a>00145 <span class="comment"> *      f_standard      ANSI standard</span>
<a name="l00146"></a>00146 <span class="comment"> *      f_oldarch       V7</span>
<a name="l00147"></a>00147 <span class="comment"> *      neither         4.2BSD</span>
<a name="l00148"></a>00148 <span class="comment"> * but we don't bother, since 4.2BSD can read ANSI standard format anyway.</span>
<a name="l00149"></a>00149 <span class="comment"> * The only advantage to the "neither" option is that we can cmp(1) our</span>
<a name="l00150"></a>00150 <span class="comment"> * output to the output of 4.2BSD tar, for debugging.</span>
<a name="l00151"></a>00151 <span class="comment"> */</span>
<a name="l00152"></a><a class="code" href="tar_8h.html#b00ef3b31ea19b204fcad74b1881716c">00152</a> <span class="preprocessor">#define         f_standard              (!f_oldarch)</span>
<a name="l00153"></a>00153 <span class="preprocessor"></span>
<a name="l00154"></a>00154 <span class="comment">/*</span>
<a name="l00155"></a>00155 <span class="comment"> * Structure for keeping track of filenames and lists thereof.</span>
<a name="l00156"></a>00156 <span class="comment"> */</span>
<a name="l00157"></a><a class="code" href="structname.html">00157</a> <span class="keyword">struct </span><a class="code" href="structname.html">name</a> {
<a name="l00158"></a><a class="code" href="structname.html#89cd3402fad311890a5584ea708d6d47">00158</a>         <span class="keyword">struct </span><a class="code" href="structname.html">name</a>     *<a class="code" href="structname.html#89cd3402fad311890a5584ea708d6d47">next</a>;
<a name="l00159"></a><a class="code" href="structname.html#80da7069eaf9c9f18f5caddf4ce8e2fa">00159</a>         <span class="keywordtype">short</span>           <a class="code" href="structname.html#80da7069eaf9c9f18f5caddf4ce8e2fa">length</a>;
<a name="l00160"></a><a class="code" href="structname.html#892f937055da3e9316c9ad40c813308f">00160</a>         <span class="keywordtype">char</span>            <a class="code" href="structname.html#892f937055da3e9316c9ad40c813308f">found</a>;
<a name="l00161"></a><a class="code" href="structname.html#b6fee77031bd952a22aa2b47331cf533">00161</a>         <span class="keywordtype">char</span>            <a class="code" href="structname.html">name</a>[<a class="code" href="tar_8h.html#c6201487e61283a3b0e4246ceac9a6a5">NAMSIZ</a>+1];
<a name="l00162"></a>00162 };
<a name="l00163"></a>00163 
<a name="l00164"></a>00164 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keyword">struct </span><a class="code" href="structname.html">name</a>  *<a class="code" href="tar_8h.html#2179828c53d99d60494ab0c7ea26e860">namelist</a>;      <span class="comment">/* Points to first name in list */</span>
<a name="l00165"></a>00165 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keyword">struct </span><a class="code" href="structname.html">name</a>  *<a class="code" href="tar_8h.html#2bf990ad4d7b82a2471107ca49226add">namelast</a>;      <span class="comment">/* Points to last name in list */</span>
<a name="l00166"></a>00166 
<a name="l00167"></a>00167 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keywordtype">int</span>          <a class="code" href="tar_8h.html#94fe476fb576ee144142cf5cefe4bfd6">archive</a>;        <span class="comment">/* File descriptor for archive file */</span>
<a name="l00168"></a>00168 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keywordtype">int</span>          <a class="code" href="tar_8h.html#433c7fadd13f3a906e01c9d9f5c8fb09">errors</a>;         <span class="comment">/* # of files in error */</span>
<a name="l00169"></a>00169 
<a name="l00170"></a>00170 <span class="comment">/*</span>
<a name="l00171"></a>00171 <span class="comment"> *</span>
<a name="l00172"></a>00172 <span class="comment"> * Due to the next struct declaration, each routine that includes</span>
<a name="l00173"></a>00173 <span class="comment"> * "tar.h" must also include &lt;sys/types.h&gt;.  I tried to make it automatic,</span>
<a name="l00174"></a>00174 <span class="comment"> * but System V has no defines in &lt;sys/types.h&gt;, so there is no way of</span>
<a name="l00175"></a>00175 <span class="comment"> * knowing when it has been included.  In addition, it cannot be included</span>
<a name="l00176"></a>00176 <span class="comment"> * twice, but must be included exactly once.  Argghh!</span>
<a name="l00177"></a>00177 <span class="comment"> *</span>
<a name="l00178"></a>00178 <span class="comment"> * Thanks, typedef.  Thanks, USG.</span>
<a name="l00179"></a>00179 <span class="comment"> */</span>
<a name="l00180"></a><a class="code" href="structlink.html">00180</a> <span class="keyword">struct </span><a class="code" href="structlink.html">link</a> {
<a name="l00181"></a><a class="code" href="structlink.html#7d3b312c211d4e29a3a7df6c5219b923">00181</a>         <span class="keyword">struct </span><a class="code" href="structlink.html">link</a>     *<a class="code" href="structlink.html#7d3b312c211d4e29a3a7df6c5219b923">next</a>;
<a name="l00182"></a><a class="code" href="structlink.html#d52c29e19b97c0780f9d8977ee8f5138">00182</a>         dev_t           <a class="code" href="structlink.html#d52c29e19b97c0780f9d8977ee8f5138">dev</a>;
<a name="l00183"></a><a class="code" href="structlink.html#52036554ef10a617162a7da832397052">00183</a>         ino_t           <a class="code" href="structlink.html#52036554ef10a617162a7da832397052">ino</a>;
<a name="l00184"></a><a class="code" href="structlink.html#e0831d6e47b858d047da9ae1f15fd181">00184</a>         <span class="keywordtype">short</span>           <a class="code" href="structlink.html#e0831d6e47b858d047da9ae1f15fd181">linkcount</a>;
<a name="l00185"></a><a class="code" href="structlink.html#0273754b7d5fed5296a4da38f73e63a0">00185</a>         <span class="keywordtype">char</span>            <a class="code" href="structname.html">name</a>[<a class="code" href="tar_8h.html#c6201487e61283a3b0e4246ceac9a6a5">NAMSIZ</a>+1];
<a name="l00186"></a>00186 };
<a name="l00187"></a>00187 
<a name="l00188"></a>00188 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keyword">struct </span><a class="code" href="structlink.html">link</a>  *<a class="code" href="tar_8h.html#bf0eb9b8480fdd00b7c72cdcce908f49">linklist</a>;      <span class="comment">/* Points to first link in list */</span>
<a name="l00189"></a>00189 
<a name="l00190"></a>00190 
<a name="l00191"></a>00191 <span class="comment">/*</span>
<a name="l00192"></a>00192 <span class="comment"> * Error recovery stuff</span>
<a name="l00193"></a>00193 <span class="comment"> */</span>
<a name="l00194"></a>00194 <a class="code" href="tar_8h.html#f2aa25b6c0b25f3b3bf8eb0c0a8476cb">TAR_EXTERN</a> <span class="keywordtype">char</span>         <a class="code" href="tar_8h.html#6f9ae8b5b458d0d9ef75384c0eba73fc">read_error_flag</a>;
<a name="l00195"></a>00195 
<a name="l00196"></a>00196 
<a name="l00197"></a>00197 <span class="preprocessor">#if 0</span>
<a name="l00198"></a>00198 <span class="preprocessor"></span><span class="comment">/*</span>
<a name="l00199"></a>00199 <span class="comment"> * Declarations of functions available to the world.</span>
<a name="l00200"></a>00200 <span class="comment"> */</span>
<a name="l00201"></a>00201 <span class="comment">/*LINTLIBRARY*/</span>
<a name="l00202"></a>00202 <span class="preprocessor">#define  annorec(stream, msg)   anno(stream, msg, 0)    </span><span class="comment">/* Cur rec */</span>
<a name="l00203"></a>00203 <span class="preprocessor">#define annofile(stream, msg)   anno(stream, msg, 1)    </span><span class="comment">/* Saved rec */</span>
<a name="l00204"></a>00204 <span class="preprocessor">#endif</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on 1 Oct 2013 for rpm by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>