1 .TH th_read 3 "Jan 2001" "University of Illinois" "C Library Calls"
3 th_read, th_write \- read and write a file header block from a tar archive
7 .BI "int th_read(TAR *" t ");"
9 .BI "int th_write(TAR *" t ");"
11 This man page documents version 1.2 of \fBlibtar\fP.
13 The \fBth_read\fP() function reads the next block from the tar archive
14 associated with the \fITAR\fP handle \fIt\fP. It then sets the
15 current tar header associated with \fIt\fP to the contents of the block
18 The \fBth_write\fP() function writes the contents of the current
19 tar header associated with \fIt\fP to the tar archive associated
22 On successful completion, \fBth_read\fP() and \fBth_write\fP() will
23 return 0. On failure, they will return \-1 and set \fIerrno\fP to an
26 On \fIEOF\fP, \fBth_read\fP() will return 1.
28 \fBth_read\fP() and \fBth_write\fP() will fail if:
30 Less than \fBT_BLOCKSIZE\fP blocks were read or written.
33 .BR tar_block_read (3),
34 .BR tar_block_write (3)