-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathtar.h
34 lines (27 loc) · 937 Bytes
/
tar.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef __tar_h
#define __tar_h
#include <time.h>
struct tar_stream {
unsigned char block[512];
unsigned int cksum;
unsigned int needpad;
int tptr;
int hold;
int fd;
};
/* tar outputing code */
int tarout_addch(struct tar_stream *t, int ch);
int tarout_nullpad(struct tar_stream *t, const char *in, int inlen, int pad);
int tarout_octal(struct tar_stream *t, unsigned long long o, int digits, int size);
int tarout_heading(struct tar_stream *t, int type,
const char *filename, int mode, int uid, int gid,
unsigned long long size, time_t mtime,
const char *linkname, const char *username);
int tarout_init(struct tar_stream *t, int fd);
int tarout_dir(struct tar_stream *t, const char *filename,
int mode, int uid, int gid, time_t mtime);
int tarout_file(struct tar_stream *t, const char *filename,
int mode, int uid, int gid, time_t mtime,
unsigned long long size);
int tarout_tail(struct tar_stream *t);
#endif