dpkg 1.21.11
Data Structures | Macros | Functions
tarfn.c File Reference

(bb7a54bfb)

#include <config.h>
#include <compat.h>
#include <sys/stat.h>
#include <errno.h>
#include <string.h>
#include <pwd.h>
#include <grp.h>
#include <unistd.h>
#include <inttypes.h>
#include <stdlib.h>
#include <stdio.h>
#include <dpkg/macros.h>
#include <dpkg/dpkg.h>
#include <dpkg/i18n.h>
#include <dpkg/error.h>
#include <dpkg/tarfn.h>
Include dependency graph for tarfn.c:

Data Structures

struct  tar_header
 
struct  tar_symlink_entry
 

Macros

#define TAR_MAGIC_USTAR   "ustar\0" "00"
 
#define TAR_MAGIC_GNU   "ustar " " \0"
 
#define TAR_TYPE_SIGNED(t)   (!((t)0 < (t)-1))
 
#define TAR_TYPE_MIN(t)
 
#define TAR_TYPE_MAX(t)
 
#define TAR_ATOUL(str, type)    (type)tar_atoul(str, sizeof(str), TAR_TYPE_MAX(type))
 
#define TAR_ATOSL(str, type)    (type)tar_atosl(str, sizeof(str), TAR_TYPE_MIN(type), TAR_TYPE_MAX(type))
 

Functions

uintmax_t tar_atoul (const char *s, size_t size, uintmax_t max)
 
intmax_t tar_atosl (const char *s, size_t size, intmax_t min, intmax_t max)
 
void tar_entry_update_from_system (struct tar_entry *te)
 Update the tar entry from system information. More...
 
int tar_extractor (struct tar_archive *tar)
 

Macro Definition Documentation

◆ TAR_ATOSL

#define TAR_ATOSL (   str,
  type 
)     (type)tar_atosl(str, sizeof(str), TAR_TYPE_MIN(type), TAR_TYPE_MAX(type))

◆ TAR_ATOUL

#define TAR_ATOUL (   str,
  type 
)     (type)tar_atoul(str, sizeof(str), TAR_TYPE_MAX(type))

◆ TAR_MAGIC_GNU

#define TAR_MAGIC_GNU   "ustar " " \0"

◆ TAR_MAGIC_USTAR

#define TAR_MAGIC_USTAR   "ustar\0" "00"

◆ TAR_TYPE_MAX

#define TAR_TYPE_MAX (   t)
Value:
((((t)1 << (sizeof(t) * 8 - 2)) - 1) * 2 + 1) : \
~(t)0)
#define TAR_TYPE_SIGNED(t)
Definition: tarfn.c:48

◆ TAR_TYPE_MIN

#define TAR_TYPE_MIN (   t)
Value:
~(t)TAR_TYPE_MAX(t) : \
(t)0)
#define TAR_TYPE_MAX(t)
Definition: tarfn.c:54

◆ TAR_TYPE_SIGNED

#define TAR_TYPE_SIGNED (   t)    (!((t)0 < (t)-1))