%!PS-Adobe-3.0 %%Creator: groff version 1.19.2 %%CreationDate: Wed Jun 30 11:55:52 2010 %%DocumentNeededResources: font Times-Roman %%DocumentSuppliedResources: procset grops 1.19 2 %%Pages: 118 %%PageOrder: Ascend %%DocumentMedia: Default 612 792 0 () () %%Orientation: Portrait %%EndComments %%BeginDefaults %%PageMedia: Default %%EndDefaults %%BeginProlog %%BeginResource: procset grops 1.19 2 %!PS-Adobe-3.0 Resource-ProcSet /setpacking where{ pop currentpacking true setpacking }if /grops 120 dict dup begin /SC 32 def /A/show load def /B{0 SC 3 -1 roll widthshow}bind def /C{0 exch ashow}bind def /D{0 exch 0 SC 5 2 roll awidthshow}bind def /E{0 rmoveto show}bind def /F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def /G{0 rmoveto 0 exch ashow}bind def /H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /I{0 exch rmoveto show}bind def /J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def /K{0 exch rmoveto 0 exch ashow}bind def /L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /M{rmoveto show}bind def /N{rmoveto 0 SC 3 -1 roll widthshow}bind def /O{rmoveto 0 exch ashow}bind def /P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /Q{moveto show}bind def /R{moveto 0 SC 3 -1 roll widthshow}bind def /S{moveto 0 exch ashow}bind def /T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def /SF{ findfont exch [exch dup 0 exch 0 exch neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /MF{ findfont [5 2 roll 0 3 1 roll neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /level0 0 def /RES 0 def /PL 0 def /LS 0 def /MANUAL{ statusdict begin/manualfeed true store end }bind def /PLG{ gsave newpath clippath pathbbox grestore exch pop add exch pop }bind def /BP{ /level0 save def 1 setlinecap 1 setlinejoin 72 RES div dup scale LS{ 90 rotate }{ 0 PL translate }ifelse 1 -1 scale }bind def /EP{ level0 restore showpage }def /DA{ newpath arcn stroke }bind def /SN{ transform .25 sub exch .25 sub exch round .25 add exch round .25 add exch itransform }bind def /DL{ SN moveto SN lineto stroke }bind def /DC{ newpath 0 360 arc closepath }bind def /TM matrix def /DE{ TM currentmatrix pop translate scale newpath 0 0 .5 0 360 arc closepath TM setmatrix }bind def /RC/rcurveto load def /RL/rlineto load def /ST/stroke load def /MT/moveto load def /CL/closepath load def /Fr{ setrgbcolor fill }bind def /setcmykcolor where{ pop /Fk{ setcmykcolor fill }bind def }if /Fg{ setgray fill }bind def /FL/fill load def /LW/setlinewidth load def /Cr/setrgbcolor load def /setcmykcolor where{ pop /Ck/setcmykcolor load def }if /Cg/setgray load def /RE{ findfont dup maxlength 1 index/FontName known not{1 add}if dict begin { 1 index/FID ne{def}{pop pop}ifelse }forall /Encoding exch def dup/FontName exch def currentdict end definefont pop }bind def /DEFS 0 def /EBEGIN{ moveto DEFS begin }bind def /EEND/end load def /CNT 0 def /level1 0 def /PBEGIN{ /level1 save def translate div 3 1 roll div exch scale neg exch neg exch translate 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit []0 setdash /setstrokeadjust where{ pop false setstrokeadjust }if /setoverprint where{ pop false setoverprint }if newpath /CNT countdictstack def userdict begin /showpage{}def /setpagedevice{}def }bind def /PEND{ countdictstack CNT sub{end}repeat level1 restore }bind def end def /setpacking where{ pop setpacking }if %%EndResource %%EndProlog %%BeginSetup %%BeginFeature: *PageSize Default << /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice %%EndFeature %%IncludeResource: font Times-Roman grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron /scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent /ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen /period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon /semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O /P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex /underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y /z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft /guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl /endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut /dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash /quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen /brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft /logicalnot/minus/registered/macron/degree/plusminus/twosuperior /threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior /ordmasculine/guilsinglright/onequarter/onehalf/threequarters /questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE /Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn /germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla /egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis /eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash /ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def /Times-Roman@0 ENC0/Times-Roman RE %%EndSetup %%Page: 1 1 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF()0 12 Q(
)0 24 Q(
struct
archi)0 72 Q -.15(ve)
-.25 G(
*
).15 E 0 Cg EP
%%Page: 12 12
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(archi)0 12 Q -.15(ve)-.25 G(_read_ne).15 E
(w\(
v)-.25 E(oid
\))-.2 E
(
int
)0 24 Q(archi)0 36 Q -.15(ve)
-.25 G
(_read_support_compression_all\(
struct archi).15
E .3 -.15(ve *)-.25 H(
\)).15 E
(
int
)0 48 Q(archi)0 60 Q -.15(ve)
-.25 G
(_read_support_compression_bzip2\(
struct archi)
.15 E .3 -.15(ve *)-.25 H(
\)).15 E
(
int
)0 72 Q 0 Cg EP
%%Page: 13 13
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(archi)0 12 Q -.15(ve)-.25 G(_read_support_co\
mpression_compress\(
struct archi).15 E .3 -.15
(ve *)-.25 H(
\)).15 E(
int
)0 24
Q(archi)0 36 Q -.15(ve)-.25 G
(_read_support_compression_gzip\(
struct archi).15
E .3 -.15(ve *)-.25 H(
\)).15 E
(
int
)0 48 Q(archi)0 60 Q -.15(ve)
-.25 G
(_read_support_compression_lzma\(
struct archi).15
E .3 -.15(ve *)-.25 H(
\)).15 E
(
int
)0 72 Q 0 Cg EP
%%Page: 14 14
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(archi)0 12 Q -.15(ve)-.25 G
(_read_support_compression_none\(
struct archi).15
E .3 -.15(ve *)-.25 H(
\)).15 E
(
int
)0 24 Q(archi)0 36 Q -.15(ve)
-.25 G
(_read_support_compression_xz\(
struct archi).15 E
.3 -.15(ve *)-.25 H(
\)).15 E
(
int
)0 48 Q(archi)0 60 Q -.15(ve)
-.25 G(_read_support_compression_program\(
).15 E
(
struct archi)0 72 Q .3 -.15(ve *)-.25 H(
).15
E 0 Cg EP
%%Page: 15 15
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(
const char *cmd
)0 12 Q
(\))0 24 Q(
int
)0 36 Q(archi)0 48 Q
-.15(ve)-.25 G
(_read_support_compression_program_signature\(
).15 E
(
struct archi)0 60 Q .3 -.15(ve *)-.25 H(
).15
E(
const char *cmd
)0 72 Q 0 Cg EP
%%Page: 16 16
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(
const v)0 12 Q
(oid *signature
)-.2 E
(
size_t signature_length
)0 24 Q(\))0 36 Q
(
int
)0 48 Q(archi)0 60 Q -.15(ve)
-.25 G(_read_support_format_all\(
struct archi).15
E .3 -.15(ve *)-.25 H(
\)).15 E
(
int
)0 72 Q 0 Cg EP
%%Page: 17 17
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(archi)0 12 Q -.15(ve)-.25 G
(_read_support_format_ar\(
struct archi).15 E .3
-.15(ve *)-.25 H(
\)).15 E(
int
)0
24 Q(archi)0 36 Q -.15(ve)-.25 G
(_read_support_format_cpio\(
struct archi).15 E .3
-.15(ve *)-.25 H(
\)).15 E(
int
)0
48 Q(archi)0 60 Q -.15(ve)-.25 G
(_read_support_format_empty\(
struct archi).15 E
.3 -.15(ve *)-.25 H(
\)).15 E
(
int
)0 72 Q 0 Cg EP
%%Page: 18 18
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(archi)0 12 Q -.15(ve)-.25 G
(_read_support_format_iso9660\(
struct archi).15 E
.3 -.15(ve *)-.25 H(
\)).15 E
(
int
)0 24 Q(archi)0 36 Q -.15(ve)
-.25 G(_read_support_format_mtree\(
struct archi)
.15 E .3 -.15(ve *)-.25 H(
\)).15 E
(
int
)0 48 Q(archi)0 60 Q -.15(ve)
-.25 G(_read_support_format_ra).15 E
(w\(
struct archi)-.15 E .3 -.15(ve *)-.25 H
(
\)).15 E(
int
)0 72 Q 0 Cg EP
%%Page: 19 19
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(archi)0 12 Q -.15(ve)-.25 G
(_read_support_format_tar\(
struct archi).15 E .3
-.15(ve *)-.25 H(
\)).15 E(
int
)0
24 Q(archi)0 36 Q -.15(ve)-.25 G
(_read_support_format_zip\(
struct archi).15 E .3
-.15(ve *)-.25 H(
\)).15 E(
int
)0
48 Q(archi)0 60 Q -.15(ve)-.25 G
(_read_set_\214lter_options\(
struct archi).15 E
.3 -.15(ve *)-.25 H(
, const char *
\)).15 E
(
int
)0 72 Q 0 Cg EP
%%Page: 20 20
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(archi)0 12 Q -.15(ve)-.25 G
(_read_set_format_options\(
struct archi).15 E .3
-.15(ve *)-.25 H(
, const char *
\)).15 E
(
int
)0 24 Q(archi)0 36 Q -.15(ve)
-.25 G(_read_set_options\(
struct archi).15 E .3
-.15(ve *)-.25 H(
, const char *
\)).15 E
(
int
)0 48 Q(archi)0 60 Q -.15(ve)
-.25 G(_read_open\(
).15 E
(
struct archi)0 72 Q .3 -.15(ve *)-.25 H(
).15
E 0 Cg EP
%%Page: 21 21
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(
v)0 12 Q
(oid *client_data
)-.2 E(
archi)0 24 Q -.15(ve)
-.25 G(_open_callback *
).15 E(
archi)0 36 Q
-.15(ve)-.25 G(_read_callback *
).15 E(
archi)0
48 Q -.15(ve)-.25 G(_close_callback *
).15 E(\))0 60 Q
(
int
)0 72 Q 0 Cg EP
%%Page: 22 22
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(archi)0 12 Q -.15(ve)-.25 G
(_read_open2\(
).15 E(
struct archi)0
24 Q .3 -.15(ve *)-.25 H(
).15 E(
v)0 36 Q
(oid *client_data
)-.2 E(
archi)0 48 Q -.15(ve)
-.25 G(_open_callback *
).15 E(
archi)0 60 Q
-.15(ve)-.25 G(_read_callback *
).15 E(
archi)0
72 Q -.15(ve)-.25 G(_skip_callback *
).15 E 0 Cg EP
%%Page: 23 23
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(
archi)0 12 Q -.15(ve)-.25 G
(_close_callback *
).15 E(\))0 24 Q
(
int
)0 36 Q(archi)0 48 Q -.15(ve)
-.25 G(_read_open_FILE\(
struct archi).15 E .3
-.15(ve *)-.25 H(
, FILE *\214le
\)).15 E
(
int
)0 60 Q(archi)0 72 Q -.15(ve)
-.25 G(_read_open_fd\(
struct archi).15 E .3 -.15
(ve *)-.25 H
(
, int fd
, size_t block_size
\)).15 E 0
Cg EP
%%Page: 24 24
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(
int
)0 12 Q
(archi)0 24 Q -.15(ve)-.25 G
(_read_open_\214lename\(
).15 E
(
struct archi)0 36 Q .3 -.15(ve *)-.25 H(
).15
E(
const char *\214lename
)0 48 Q
(
size_t block_size
)0 60 Q(\))0 72 Q 0 Cg EP
%%Page: 25 25
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(
int
)0 12 Q
(archi)0 24 Q -.15(ve)-.25 G
(_read_open_memory\(
struct archi).15 E .3 -.15
(ve *)-.25 H(
, v).15 E(oid *b)-.2 E(uf)-.2 E
(f
, size_t size
\))-.25 E
(
int
)0 36 Q(archi)0 48 Q -.15(ve)
-.25 G(_read_ne).15 E(xt_header\(
struct archi)
-.15 E .3 -.15(ve *)-.25 H(
, struct archi).15 E -.15(ve)
-.25 G(_entry **
\)).15 E(
int
)0
60 Q(archi)0 72 Q -.15(ve)-.25 G(_read_ne).15 E
(xt_header2\(
struct archi)-.15 E .3 -.15(ve *)
-.25 H(
, struct archi).15 E -.15(ve)-.25 G
(_entry *
\)).15 E 0 Cg EP
%%Page: 26 26
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(
ssize_t
)0 12 Q
(archi)0 24 Q -.15(ve)-.25 G
(_read_data\(
struct archi).15 E .3 -.15(ve *)-.25
H(
, v).15 E(oid *b)-.2 E(uf)-.2 E
(f
, size_t len
\))-.25 E
(
int
)0 36 Q(archi)0 48 Q -.15(ve)
-.25 G(_read_data_block\(
).15 E
(
struct archi)0 60 Q .3 -.15(ve *)-.25 H(
).15
E(
const v)0 72 Q(oid **b)-.2 E(uf)-.2 E(f
)-.25
E 0 Cg EP
%%Page: 27 27
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(
size_t *len
)0 12 Q
(
of)0 24 Q(f_t *of)-.25 E(fset
)-.25 E(\))0 36
Q(
int
)0 48 Q(archi)0 60 Q -.15(ve)
-.25 G(_read_data_skip\(
struct archi).15 E .3
-.15(ve *)-.25 H(
\)).15 E(
int
)0
72 Q 0 Cg EP
%%Page: 28 28
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(archi)0 12 Q -.15(ve)-.25 G
(_read_data_into_b).15 E(uf)-.2 E
(fer\(
struct archi)-.25 E .3 -.15(ve *)-.25 H
(
, v).15 E(oid *
, ssize_t len
\))-.2 E
(
int
)0 24 Q(archi)0 36 Q -.15(ve)
-.25 G(_read_data_into_fd\(
struct archi).15 E .3
-.15(ve *)-.25 H(
, int fd
\)).15 E
(
int
)0 48 Q(archi)0 60 Q -.15(ve)
-.25 G(_read_e).15 E(xtract\(
)-.15 E
(
struct archi)0 72 Q .3 -.15(ve *)-.25 H(
).15
E 0 Cg EP
%%Page: 29 29
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(
struct archi)0 12 Q -.15(ve)
-.25 G(_entry *
).15 E(
int \215ags
)0 24
Q(\))0 36 Q(
int
)0 48 Q(archi)0 60 Q
-.15(ve)-.25 G(_read_e).15 E(xtract2\(
)-.15 E
(
struct archi)0 72 Q .3 -.15(ve *)-.25 H(src
)
.15 E 0 Cg EP
%%Page: 30 30
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(
struct archi)0 12 Q -.15(ve)
-.25 G(_entry *
).15 E(
struct archi)0 24 Q .3
-.15(ve *)-.25 H(dest
).15 E(\))0 36 Q
(
v)0 48 Q(oid
)-.2 E(archi)0 60 Q
-.15(ve)-.25 G(_read_e).15 E
(xtract_set_progress_callback\(
)-.15 E
(
struct archi)0 72 Q .3 -.15(ve *)-.25 H(
).15
E 0 Cg EP
%%Page: 31 31
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(
v)0 12 Q(oid \(*func\)\(v)-.2
E(oid *\)
)-.2 E(
v)0 24 Q
(oid *user_data
)-.2 E(\))0 36 Q
(
int
)0 48 Q(archi)0 60 Q -.15(ve)
-.25 G(_read_close\(
struct archi).15 E .3 -.15
(ve *)-.25 H(
\)).15 E(
int
)0 72
Q 0 Cg EP
%%Page: 32 32
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(archi)0 12 Q -.15(ve)-.25 G
(_read_\214nish\(
struct archi).15 E .3 -.15(ve *)
-.25 H(
\)).15 E(
\)
\),).15 E(archi)0
24 Q -.15(ve)-.25 G
(_read_support_compression_compress\(
\),).15 E
(archi)0 36 Q -.15(ve)-.25 G
(_read_support_compression_gzip\(
\),).15 E(archi)0
48 Q -.15(ve)-.25 G
(_read_support_compression_lzma\(
\),).15 E(archi)0
60 Q -.15(ve)-.25 G
(_read_support_compression_none\(
\),).15 E(archi)0
72 Q -.15(ve)-.25 G(_read_support_compression_xz\(
\))
.15 E 0 Cg EP
%%Page: 36 36
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF
(Enables auto-detection code and decompression support for the)0 12 Q
(speci\214ed compression.)0 24 Q(Returns)0 36 Q
(ARCHIVE_OK)0 48 Q
(if the compression is fully supported, or)0 60 Q(ARCHIVE_W)0
72 Q(ARN)-1.2 E 0 Cg EP
%%Page: 37 37
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF
(if the compression is supported only through an e)0 12 Q
(xternal program.)-.15 E(Note that decompression using an e)0 24 Q
(xternal program is usually slo)-.15 E(wer than)-.25 E
(decompression through b)0 36 Q(uilt-in libraries.)-.2 E(Note that)0 48
Q -.74(``)0 60 S(none').74 E(')-.74 E(is al)0 72 Q -.1(wa)-.1 G
(ys enabled by def).1 E(ault.)-.1 E 0 Cg EP
%%Page: 38 38
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(
\)
\)
\)
\),).15 E(archi)0 24 Q
-.15(ve)-.25 G(_read_support_format_ar\(
\),).15 E
(archi)0 36 Q -.15(ve)-.25 G
(_read_support_format_cpio\(
\),).15 E(archi)0 48 Q
-.15(ve)-.25 G(_read_support_format_empty\(
\),).15 E
(archi)0 60 Q -.15(ve)-.25 G
(_read_support_format_iso9660\(
\),).15 E(archi)0 72
Q -.15(ve)-.25 G(_read_support_format_mtree\(
\),).15 E
0 Cg EP
%%Page: 41 41
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(archi)0 12 Q -.15(ve)-.25 G
(_read_support_format_tar\(
\),).15 E(archi)0 24 Q
-.15(ve)-.25 G(_read_support_format_zip\(
\)).15 E
(Enables support---including auto-detection code---for the)0 36 Q
(speci\214ed archi)0 48 Q .3 -.15(ve f)-.25 H(ormat.).15 E -.15(Fo)0 60
S 2.5(re).15 G(xample,)-2.65 E(archi)0 72 Q -.15(ve)-.25 G
(_read_support_format_tar\(
\)).15 E 0 Cg EP
%%Page: 42 42
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(enables support for a v)0 12 Q
(ariety of standard tar formats, old-style tar)-.25 E(,)-.4 E(ustar)0 24
Q 2.5(,p)-.4 G(ax interchange format, and man)-2.5 E 2.5(yc)-.15 G
(ommon v)-2.5 E(ariants.)-.25 E -.15(Fo)0 36 S 2.5(rc).15 G(on)-2.5 E
-.15(ve)-.4 G(nience,).15 E(archi)0 48 Q -.15(ve)-.25 G
(_read_support_format_all\(
\)).15 E
(enables support for all a)0 60 Q -.25(va)-.2 G(ilable formats.).25 E
(Only empty archi)0 72 Q -.15(ve)-.25 G 2.5(sa).15 G
(re supported by def)-2.5 E(ault.)-.1 E 0 Cg EP
%%Page: 43 43
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(
\)
\)).15 E(in order to a)0 60
Q -.2(vo)-.2 G(id erroneous handling of damaged archi).2 E -.15(ve)-.25
G(s.).15 E(
\),).15 E(archi)0 24 Q
-.15(ve)-.25 G(_read_set_format_options\(
\),).15 E
(archi)0 36 Q -.15(ve)-.25 G(_read_set_options\(
\))
.15 E(Speci\214es options that will be passed to currently-re)0 48 Q
(gistered)-.15 E
(\214lters \(including decompression \214lters\) and/or format readers.)
0 60 Q(The ar)0 72 Q(gument is a comma-separated list of indi)-.18 E
(vidual options.)-.25 E 0 Cg EP
%%Page: 46 46
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(Indi)0 12 Q(vidual options ha)-.25 E .3 -.15
(ve o)-.2 H(ne of the follo).15 E(wing forms:)-.25 E()36 60 Q (The currently supported options are:)0 72 Q 0 Cg EP %%Page: 50 50 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(
\)
\),).15 E -.15(ex)0 24 S
(cept that the skip callback is assumed to be).15 E
(
NULL
.)0 36 Q(
\)
\),).15 E(archi)0 48 Q
-.15(ve)-.25 G(_read_open_FILE\(
\),).15 E(archi)0 60
Q -.15(ve)-.25 G(_read_open_fd\(
\),).15 E(or)0 72 Q 0
Cg EP
%%Page: 54 54
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(archi)0 12 Q -.15(ve)-.25 G
(_read_open_memory\(
\)).15 E(instead.)0 24 Q
(The library in)0 36 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(st).1 G
(he client-pro)-2.5 E(vided functions to obtain)-.15 E(ra)0 48 Q 2.5(wb)
-.15 G(ytes from the archi)-2.5 E -.15(ve)-.25 G(.).15 E(
\)
\),).15 E -.15(ex)0 24 S
(cept that it accepts a).15 E(
FILE *
)0
36 Q(pointer)0 48 Q(.)-.55 E
(This function should not be used with tape dri)0 60 Q -.15(ve)-.25 G
2.5(so).15 G 2.5(ro)-2.5 G(ther de)-2.5 E(vices)-.25 E
(that require strict I/O blocking.)0 72 Q 0 Cg EP
%%Page: 56 56
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(
\)
\),).15 E
-.15(ex)0 48 S
(cept that it accepts a \214le descriptor and block size rather than).15
E 2.5(as)0 60 S(et of function pointers.)-2.5 E
(Note that the \214le descriptor will not be automatically closed at)0
72 Q 0 Cg EP
%%Page: 57 57
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(end-of-archi)0 12 Q -.15(ve)-.25 G(.).15 E
(This function is safe for use with tape dri)0 24 Q -.15(ve)-.25 G 2.5
(so).15 G 2.5(ro)-2.5 G(ther block)-2.5 E(ed de)-.1 E(vices.)-.25 E
(
\)
\).).15 E
(
\)
\),).15 E -.15(ex)0 36 S
(cept that it accepts a simple \214lename and a block size.).15 E 2.5
(AN)0 48 S(ULL \214lename represents standard input.)-2.5 E
(This function is safe for use with tape dri)0 60 Q -.15(ve)-.25 G 2.5
(so).15 G 2.5(ro)-2.5 G(ther block)-2.5 E(ed de)-.1 E(vices.)-.25 E
(
\)
\),).15 E -.15(ex)0 36 S
(cept that it accepts a pointer and size of a block of).15 E
(memory containing the archi)0 48 Q .3 -.15(ve d)-.25 H(ata.).15 E
(
\)
\))-.15 E(that reuses an internal)0 60 Q
(struct a\
rchi)0 72 Q -.15(ve)-.25 G(_entry).15 E 0 Cg EP
%%Page: 61 61
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(object for each request.)0 12 Q(
\)
\)
\)).15 E
(and \214lls an)0 36 Q 2.5(yg)-.15 G
(aps with nulls so that callers see a single)-2.55 E
(continuous stream of data.)0 48 Q(
\)
\),).15 E(the)0 36 Q(archi)0 48 Q
-.15(ve)-.25 G(_read_data_block\(
\)).15 E(function a)0
60 Q -.2(vo)-.2 G(ids cop).2 E(ying data and allo)-.1 E
(ws you to correctly handle)-.25 E
(sparse \214les, as supported by some archi)0 72 Q .3 -.15(ve f)-.25 H
(ormats.).15 E 0 Cg EP
%%Page: 64 64
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(The library guarantees that of)0 12 Q
(fsets will increase and that blocks)-.25 E(will not o)0 24 Q -.15(ve)
-.15 G(rlap.).15 E
(Note that the blocks returned from this function can be much lar)0 36 Q
(ger)-.18 E(than the block size read from disk, due to compression)0 48
Q(and internal b)0 60 Q(uf)-.2 E(fer optimizations.)-.25 E(
\)
\)).15 E
(to skip all of the data for this archi)0 36 Q .3 -.15(ve e)-.25 H(ntry)
.15 E(.)-.65 E(
\)
\)).15 E(instead.)0 24 Q(
\)
\)).15 E(to cop)0 72 Q 2.5(yt)
-.1 G(he entire entry to the pro)-2.5 E(vided \214le descriptor)-.15 E
(.)-.55 E 0 Cg EP
%%Page: 67 67
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(
archi)-.15 E -.15(ve)-.25 G(_read_e).15 E
(xtract_set_skip_\214le\(
\)\)
\))-.15 E 0 Cg EP
%%Page: 68 68
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(creates a restore object using)0 12 Q
(archi).65 E -.15(ve)-.25 G(_write_disk_ne).15 E
(w\(3\))-.25 E(and)0 36 Q(archi).15 E -.15(ve)-.25 G
(_write_disk_set_standard_lookup\(3\),).15 E(then transparently in)0
60 Q -.2(vo)-.4 G -.1(ke).2 G(s).1 E(archi).15 E -.15(ve)-.25 G
(_write_disk_set_options\(3\),).15 E 0 Cg EP
%%Page: 69 69
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(archi)-.55 E -.15(ve)-.25 G
(_write_header\(3\),).15 E(archi).15 E -.15(ve)-.25 G
(_write_data\(3\),).15 E(and)0 36 Q(archi)-.65 E -.15(ve)
-.25 G(_write_\214nish_entry\(3\)).15 E
(to create the entry on disk and cop)0 60 Q 2.5(yd)-.1 G(ata into it.)
-2.5 E(The)0 72 Q 0 Cg EP
%%Page: 70 70
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(\215ags)0 12 Q(ar)0 24 Q
(gument is passed unmodi\214ed to)-.18 E(archi).15 E -.15(ve)-.25 G
(_write_disk_set_options\(3\).).15 E(
\)
\))-.15 E 0 Cg EP
%%Page: 71 71
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(that allo)0 12 Q(ws you to pro)-.25 E
(vide your o)-.15 E(wn restore object.)-.25 E(In particular)0 24 Q 2.5
(,t)-.4 G(his allo)-2.5 E(ws you to o)-.25 E -.15(ve)-.15 G
(rride the standard lookup functions).15 E(using)0 36 Q
(archi).15 E -.15(ve)-.25 G
(_write_disk_set_group_lookup\(3\),).15 E(and)0 60 Q
(archi).15 E -.15(ve)-.25 G
(_write_disk_set_user_lookup\(3\).).15 E 0 Cg EP
%%Page: 72 72
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(Note that)0 12 Q(archi)0 24 Q -.15(ve)-.25 G
(_read_e).15 E(xtract2\(
\))-.15 E(does not accept a)0
36 Q(\215ags)0 48 Q(ar)0 60 Q(gument; you should use)-.18
E(archi)0 72 Q -.15(ve)-.25 G
(_write_disk_set_options\(
\)).15 E 0 Cg EP
%%Page: 73 73
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(to set the restore options yourself.)0 12 Q
(
\)
\)
\)
\)).15 E(if it w)0 48 Q(as not in)-.1 E
-.2(vo)-.4 G -.1(ke).2 G 2.5(dm).1 G(anually)-2.5 E 2.5(,t)-.65 G
(hen release all resources.)-2.5 E(Note: In libarchi)0 60 Q .3 -.15
(ve 1)-.25 H(.x, this function w).15 E(as declared to return)-.1 E
(
v)0 72 Q(oid
,)-.2 E 0 Cg EP
%%Page: 76 76
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF
(which made it impossible to detect certain errors when)0 12 Q(archi)
0 24 Q -.15(ve)-.25 G(_read_close\(
\)).15 E -.1(wa)0 36
S 2.5(si).1 G -1.9 -.4(nv o)-2.5 H -.1(ke).4 G 2.5(di).1 G
(mplicitly from this function.)-2.5 E(The declaration is corrected be)0
48 Q(ginning with libarchi)-.15 E .3 -.15(ve 2)-.25 H(.0.).15 E()36 72 Q 0 Cg EP %%Page: 77 77 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF (Note that the library determines most of the rele)0 12 Q -.25(va)-.25 G (nt information about).25 E(the archi)0 24 Q .3 -.15(ve b)-.25 H 2.5(yi) .15 G(nspection.)-2.5 E(In particular)0 36 Q 2.5(,i)-.4 G 2.5(ta)-2.5 G (utomatically detects)-2.5 E(gzip\(1\)) 0 48 Q(or)0 60 Q(bzip2\(1\))0 72 Q 0 Cg EP %%Page: 78 78 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF (compression and transparently performs the appropriate decompression.)0 12 Q(It also automatically detects the archi)0 24 Q .3 -.15(ve f)-.25 H (ormat.).15 E(
)36 36 Q 2.5(Ac)0 48 S(omplete description of the)-2.5
E(struct \
archi)0 60 Q -.15(ve)-.25 G().15 E(and)0 72 Q 0 Cg EP
%%Page: 79 79
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(struct\
font> archi)0 12 Q -.15(ve)-.25 G(_entry).15 E
(objects can be found in the o)0 24 Q -.15(ve)-.15 G(rvie).15 E 2.5(wm)
-.25 G(anual page for)-2.5 E(libarchi).15 E -.15(ve)-.25 G(\(3\).).15 E
( )36 72 Q 0 Cg EP
%%Page: 84 84
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(The open callback is in)0 12 Q -.2(vo)-.4 G -.1
(ke).2 G 2.5(db).1 G(y)-2.5 E(archi)0 24 Q -.15(ve)-.25 G
(_open\( )36
60 Q(The read callback is in)0 72 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(dw).1 G
(hene)-2.5 E -.15(ve)-.25 G 2.5(rt).15 G(he library)-2.5 E 0 Cg EP
%%Page: 86 86
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(requires ra)0 12 Q 2.5(wb)-.15 G
(ytes from the archi)-2.5 E -.15(ve)-.25 G(.).15 E
(The read callback should read data into a b)0 24 Q(uf)-.2 E(fer)-.25 E
(,)-.4 E(set the)0 36 Q( )36 60
Q(The skip callback is in)0 72 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(dw).1 G
(hen the)-2.5 E 0 Cg EP
%%Page: 89 89
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(library w)0 12 Q
(ants to ignore a block of data.)-.1 E(The return v)0 24 Q
(alue is the number of bytes actually)-.25 E(skipped, which may dif)0 36
Q(fer from the request.)-.25 E
(If the callback cannot skip data, it should return)0 48 Q(zero.)0 60 Q
(If the skip callback is not pro)0 72 Q(vided \(the)-.15 E 0 Cg EP
%%Page: 90 90
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(function pointer is)0 12 Q
( )36 36 Q(The close callback is in)0 48 Q -.2(vo)-.4 G -.1(ke).2 G
2.5(db).1 G 2.5(ya)-2.5 G(rchi)-2.5 E -.15(ve)-.25 G(_close when).15 E
(the archi)0 60 Q .3 -.15(ve p)-.25 H(rocessing is complete.).15 E
(The callback should return)0 72 Q 0 Cg EP
%%Page: 92 92
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(ARCHIVE_OK)0 12 Q(on success.)0 24
Q(On f)0 36 Q(ailure, the callback should in)-.1 E -.2(vo)-.4 G -.1(ke)
.2 G(archi)0 48 Q -.15(ve)-.25 G(_set_error\( )36 48 Q
(mydata = malloc\(sizeof\(struct mydata\)\);)5 60 Q 2.5(a=a)5 72 S(rchi)
-2.5 E -.15(ve)-.25 G(_read_ne).15 E(w\(\);)-.25 E 0 Cg EP
%%Page: 97 97
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(mydata->name = name;)5 12 Q(archi)5 24 Q -.15
(ve)-.25 G(_read_support_compression_all\(a\);).15 E(archi)5 36 Q -.15
(ve)-.25 G(_read_support_format_all\(a\);).15 E(archi)5 48 Q -.15(ve)
-.25 G(_read_open\(a, mydata, myopen, myread, myclose\);).15 E
(while \(archi)5 60 Q -.15(ve)-.25 G(_read_ne).15 E
(xt_header\(a, &entry\) == ARCHIVE_OK\) {)-.15 E(printf\("%s\\n",archi)
10 72 Q -.15(ve)-.25 G(_entry_pathname\(entry\)\);).15 E 0 Cg EP
%%Page: 98 98
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(archi)10 12 Q -.15(ve)-.25 G
(_read_data_skip\(a\);).15 E(})5 24 Q(archi)5 36 Q -.15(ve)-.25 G
(_read_\214nish\(a\);).15 E(free\(mydata\);)5 48 Q(})0 60 Q( )36 72 Q
0 Cg EP
%%Page: 99 99
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(ssize_t)0 12 Q(myread\(struct archi)0 24 Q .3
-.15(ve *)-.25 H(a, v).15 E(oid *client_data, const v)-.2 E(oid **b)-.2
E(uf)-.2 E(f\))-.25 E({)0 36 Q(struct mydata *mydata = client_data;)5 48
Q( )36 60 Q(*b)5 72 Q(uf)-.2 E 2.5(f=m)-.25 G(ydata->b)-2.5 E(uf)-.2 E
(f;)-.25 E 0 Cg EP
%%Page: 100 100
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(return \(read\(mydata->fd, mydata->b)5 12 Q(uf)
-.2 E(f, 10240\)\);)-.25 E(})0 24 Q( )36 36 Q(int)0 48 Q
(myopen\(struct archi)0 60 Q .3 -.15(ve *)-.25 H(a, v).15 E
(oid *client_data\))-.2 E({)0 72 Q 0 Cg EP
%%Page: 101 101
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(struct mydata *mydata = client_data;)5 12 Q( )
36 24 Q(mydata->fd = open\(mydata->name, O_RDONL)5 36 Q(Y\);)-1 E
(return \(mydata->fd >= 0 ? ARCHIVE_OK : ARCHIVE_F)5 48 Q -1.21 -1.11
(AT A)-.74 H(L\);)1.11 E(})0 60 Q( )36 72 Q 0 Cg EP
%%Page: 102 102
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(int)0 12 Q(myclose\(struct archi)0 24 Q .3 -.15
(ve *)-.25 H(a, v).15 E(oid *client_data\))-.2 E({)0 36 Q
(struct mydata *mydata = client_data;)5 48 Q( )36 60 Q
(if \(mydata->fd > 0\))5 72 Q 0 Cg EP
%%Page: 103 103
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(close\(mydata->fd\);)10 12 Q
(return \(ARCHIVE_OK\);)5 24 Q(})0 36 Q( )36 48 Q
(archi)0 60 Q -.15(ve)-.25 G(_read_ne).15 E(w\( )36 72 Q 0 Cg EP
%%Page: 109 109
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(archi)0 12 Q -.15(ve)-.25 G
(_read_data\( )36 12 Q(The library e)0 24 Q
(xpects the client callbacks to beha)-.15 E .3 -.15(ve s)-.2 H(imilarly)
.15 E(.)-.65 E(If there is an error)0 36 Q 2.5(,y)-.4 G(ou can use)-2.5
E(archi)0 48 Q -.15(ve)-.25 G(_set_error\( )36 72 Q 0 Cg EP
%%Page: 116 116
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(The)0 12 Q(libarchi)0 24 Q -.15(ve)-.25 G
().15 E(library w)0 36 Q(as written by)-.1 E -.35(Ti)0 48 S 2.5(mK)
.35 G(ientzle <kientzle@acm.or)-2.5 E(g>.)-.18 E().4 E(CLIENT CALLB)36 60
Q -.4(AC)-.35 G(KS).4 E(
)36 72 Q 0 Cg EP
%%Page: 80 80
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(The callback functions must match the follo)0 12
Q(wing prototypes:)-.25 E()0 24 Q(
)0 60 Q(typedef
ssize_t
)0 48 Q
(archi)0 60 Q -.15(ve)-.25 G(_read_callback\().15 E
(
struct archi)0 72 Q .3 -.15(ve *)-.25 H(
).15
E 0 Cg EP
%%Page: 81 81
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(v)0 12 Q
(oid *client_data
)-.2 E(const v)0 24 Q
(oid **b)-.2 E(uf)-.2 E(fer
)-.25 E(\))0 36 Q(typedef
int
)0 60 Q
(archi)0 72 Q -.15(ve)-.25 G(_skip_callback\().15 E
0 Cg EP
%%Page: 82 82
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(
struct archi)0 12 Q .3 -.15
(ve *)-.25 H(
).15 E(v)0 24 Q
(oid *client_data
)-.2 E(size_t request
)
0 36 Q(\))0 48 Q(typedef
int
)0 72 Q 0 Cg
EP
%%Page: 83 83
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(archi)0 12 Q -.15(ve)-.25 G
(_open_callback\(struct archi).15 E .3 -.15(ve *)
-.25 H(
, v).15 E(oid *client_data
\))-.2 E(typedef
int
)0 36 Q
(archi)0 48 Q -.15(ve)-.25 G
(_close_callback\(struct archi).15 E .3 -.15
(ve *)-.25 H(
, v).15 E(oid *client_data
\))-.2 E
(\).).15 E(It should return)0 36 Q
(ARCHIVE_OK)0 48 Q
(if the underlying \214le or data source is successfully)0 60 Q(opened.)
0 72 Q 0 Cg EP
%%Page: 85 85
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(If the open f)0 12 Q(ails, it should call)-.1 E
(archi)0 24 Q -.15(ve)-.25 G(_set_error\(
\)).15 E
(to re)0 36 Q(gister an error code and message and return)-.15 E
(ARCHIVE_F)0 48 Q -1.21 -1.11(AT A)-.74 H(L.)1.11 E(
const
v)0 48 Q
(oid
**b)-.2 E(uf)-.2 E(fer
)-.25 E(ar)0 60 Q
(gument to point to the a)-.18 E -.25(va)-.2 G(ilable data, and).25 E
(return a count of the number of bytes a)0 72 Q -.25(va)-.2 G(ilable.)
.25 E 0 Cg EP
%%Page: 87 87
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(The library will in)0 12 Q -.2(vo)-.4 G .2 -.1
(ke t).2 H(he read callback ag).1 E(ain)-.05 E
(only after it has consumed this data.)0 24 Q
(The library imposes no constraints on the size)0 36 Q
(of the data blocks returned.)0 48 Q
(On end-of-\214le, the read callback should)0 60 Q(return zero.)0 72 Q 0
Cg EP
%%Page: 88 88
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(On error)0 12 Q 2.5(,t)-.4 G
(he read callback should in)-2.5 E -.2(vo)-.4 G -.1(ke).2 G(archi)0
24 Q -.15(ve)-.25 G(_set_error\(\)).15 E(to re)0 36 Q
(gister an error code and message and)-.15 E(return -1.)0 48 Q(
NULL
\),
)0 24 Q
(the library will in)0 36 Q -.2(vo)-.4 G .2 -.1(ke t).2 H
(he read function).1 E(instead and simply discard the result.)0 48 Q 2.5
(As)0 60 S(kip callback can pro)-2.5 E(vide signi\214cant)-.15 E
(performance g)0 72 Q(ains when reading uncompressed)-.05 E 0 Cg EP
%%Page: 91 91
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(archi)0 12 Q -.15(ve)-.25 G 2.5(sf).15 G
(rom slo)-2.5 E 2.5(wd)-.25 G(isk dri)-2.5 E -.15(ve)-.25 G 2.5(so).15 G
2.5(ro)-2.5 G(ther media)-2.5 E(that can skip quickly)0 24 Q(.)-.65 E
(\)).15
E(to re)0 60 Q(gister an error code and message and)-.15 E(return)0 72 Q
0 Cg EP
%%Page: 93 93
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(ARCHIVE_F)0 12 Q -1.21 -1.11(AT A)-.74
H(L.)1.11 E(
)36 24 Q(EXAMPLE)36 36 Q(
)36 48 Q
(The follo)0 60 Q(wing illustrates basic usage of the library)-.25 E(.)
-.65 E(In this e)0 72 Q(xample,)-.15 E 0 Cg EP
%%Page: 94 94
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF
(the callback functions are simply wrappers around the standard)0 12 Q
(open\(2\),)0 24 Q
(read\(2\),)0 36 Q(and)0 48 Q
(close\(2\))0 60 Q(system calls.)0 72
Q 0 Cg EP
%%Page: 95 95
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(
)0 72 Q 0 Cg EP
%%Page: 104 104
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF()0 24 Q(
)0 60 Q
()
0 36 Q -.2(vo)0 48 S(id).2 E(list_archi)0 60 Q -.15(ve)-.25 G
(\(const char *name\)).15 E({)0 72 Q 0 Cg EP
%%Page: 96 96
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(struct mydata *mydata;)5 12 Q(struct archi)5 24
Q .3 -.15(ve *)-.25 H(a;).15 E(struct archi)5 36 Q -.15(ve)-.25 G
(_entry *entry;).15 E(
)0 48 Q()-1.35 E
(RETURN V)36 24 Q(ALUES)-1.35 E(
)36 36 Q
(Most functions return zero on success, non-zero on error)0 48 Q(.)-.55
E(The possible return codes include:)0 60 Q(ARCHIVE_OK)0
72 Q 0 Cg EP
%%Page: 105 105
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(\(the operation succeeded\),)0 12 Q
(ARCHIVE_W)0 24 Q(ARN)-1.2 E(\(the operation succeeded b)0
36 Q(ut a non-critical error w)-.2 E(as encountered\),)-.1 E
(ARCHIVE_EOF)0 48 Q(\(end-of-archi)0 60 Q .3 -.15(ve w)
-.25 H(as encountered\),).05 E(ARCHIVE_RETR)0 72 Q(Y)-.65
E 0 Cg EP
%%Page: 106 106
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(\(the operation f)0 12 Q(ailed b)-.1 E
(ut can be retried\),)-.2 E(and)0 24 Q(ARCHIVE_F)0 36 Q -1.21
-1.11(AT A)-.74 H(L)1.11 E(\(there w)0 48 Q(as a f)-.1 E
(atal error; the archi)-.1 E .3 -.15(ve s)-.25 H
(hould be closed immediately\).).15 E(Detailed error codes and te)0 60 Q
(xtual descriptions are a)-.15 E -.25(va)-.2 G(ilable from the).25 E
(archi)0 72 Q -.15(ve)-.25 G(_errno\(\)).15 E 0 Cg
EP
%%Page: 107 107
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(and)0 12 Q(archi)0 24 Q -.15(ve)-.25 G
(_error_string\(
\)).15 E(functions.)0 36 Q(
\))
-.25 E(returns a pointer to a freshly allocated)0 72 Q 0 Cg EP
%%Page: 108 108
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(struct\
font> archi)0 12 Q -.15(ve)-.25 G().15 E(object.)
0 24 Q(It returns)0 36 Q(
NULL
)0 48 Q(on error)
0 60 Q(.)-.55 E(\)).15 E
(returns a count of bytes actually read or zero at the end of the entry)
0 24 Q(.)-.65 E(On error)0 36 Q 2.5(,av)-.4 G(alue of)-2.75 E
(ARCHIVE_F)0 48 Q -1.21 -1.11(AT A)-.74 H(L,)1.11 E
(ARCHIVE_W)0 60 Q(ARN,)-1.2 E(or)0 72 Q 0 Cg EP
%%Page: 110 110
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(ARCHIVE_RETR)0 12 Q(Y)-.65 E
(is returned and an error code and te)0 24 Q
(xtual description can be retrie)-.15 E -.15(ve)-.25 G 2.5(df).15 G
(rom the)-2.5 E(archi)0 36 Q -.15(ve)-.25 G
(_errno\(
\)).15 E(and)0 48 Q(archi)0 60 Q -.15(ve)
-.25 G(_error_string\(
\)).15 E(functions.)0 72 Q 0 Cg
EP
%%Page: 111 111
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(
\)).15 E
(to set an appropriate error code and description,)0 60 Q
(then return one of the non-zero v)0 72 Q(alues abo)-.25 E -.15(ve)-.15
G(.).15 E 0 Cg EP
%%Page: 112 112
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(\(Note that the v)0 12 Q(alue e)-.25 E -.15(ve)
-.25 G(ntually returned to the client may).15 E(not be the same; man)0
24 Q 2.5(ye)-.15 G(rrors that are not critical at the le)-2.5 E -.15(ve)
-.25 G(l).15 E(of basic I/O can pre)0 36 Q -.15(ve)-.25 G(nt the archi)
.15 E .3 -.15(ve f)-.25 H(rom being properly read,).15 E
(thus most I/O errors e)0 48 Q -.15(ve)-.25 G(ntually cause).15 E
(ARCHIVE_F)0 60 Q -1.21 -1.11(AT A)-.74 H(L)1.11 E
(to be returned.\))0 72 Q 0 Cg EP
%%Page: 113 113
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(
)36 12 Q(SEE ALSO)36 24 Q
(
)36 36 Q(tar\(1\),)-.55 E
(archi).15 E -.15
(ve)-.25 G(\(3\),).15 E(archi).15 E -.15(ve)-.25 G(_util\(3\),).15 E 0 Cg EP
%%Page: 114 114
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(tar\(5\))-.55 E()-.65 E
(HIST)36 36 Q(OR)-.18 E(Y)-.65 E(
)36 48 Q(The)0 60 Q(libarchi)0
72 Q -.15(ve)-.25 G().15 E 0 Cg EP
%%Page: 115 115
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(library \214rst appeared in)0 12 Q(FreeBSD5.3.)0
24 Q()-.55 E -.55(AU)36 48 S(THORS).55 E
(
)36 60 Q()-.1 E -.1(BU)36 72 S(GS).1 E 0 Cg EP
%%Page: 117 117
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(
)36 12 Q(Man)0 24 Q 2.5(yt)-.15 G
(raditional archi)-2.5 E -.15(ve)-.25 G 2.5(rp).15 G(rograms treat)-2.5
E(empty \214les as v)0 36 Q(alid empty archi)-.25 E -.15(ve)-.25 G(s.)
.15 E -.15(Fo)0 48 S 2.5(re).15 G(xample, man)-2.65 E 2.5(yi)-.15 G
(mplementations of)-2.5 E(tar\(1\))-.55 E(allo)0 72 Q 2.5(wy)-.25 G
(ou to append entries to an empty \214le.)-2.5 E 0 Cg EP
%%Page: 118 118
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF
(Of course, it is impossible to determine the format of an empty \214le)
0 12 Q
(by inspecting the contents, so this library treats empty \214les as)0
24 Q(ha)0 36 Q(ving a special)-.2 E -.74(``)0 48 S(empty').74 E(')-.74 E
(format.)0 60 Q()0 72 Q 0 Cg EP
%%Trailer
end
%%EOF