read.h

mail@pastecode.io avatar
unknown
plain_text
2 months ago
558 B
2
Indexable
Never
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "header.h"
#include "options.h"
#include "list.h"

#ifndef RH
#define RH

#define MODE_OFF 100
#define UID_OFF 108
#define GID_OFF 116
#define SIZE_OFF 124
#define MTIME_OFF 136
#define CHKSUM_OFF 148
#define TYPEFLAG_OFF 156
#define LINKNAME_OFF 157
#define MAGIC_OFF 257
#define VERSION_OFF 263
#define UNAME_OFF 265
#define GNAME_OFF 297
#define PREFIX_OFF 345
#define BLOCK_SIZE 512

int read_file(int tar_fd);

header *populate_header(char block[]);

int is_null(char block[]);

#endif
Leave a Comment