Classes | Macros | Enumerations | Functions | Variables
zlib/contrib/untgz/untgz.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <errno.h>
#include "zlib.h"
#include <direct.h>
#include <io.h>
#include <utime.h>
Include dependency graph for zlib/contrib/untgz/untgz.c:

Go to the source code of this file.

Classes

struct  attr_item
 
union  tar_buffer
 
struct  tar_header
 

Macros

#define AREGTYPE   '\0' /* regular file */
 
#define BLKTYPE   '4' /* block special */
 
#define BLOCKSIZE   512
 
#define CHRTYPE   '3' /* character special */
 
#define CONTTYPE   '7' /* reserved */
 
#define DIRTYPE   '5' /* directory */
 
#define FIFOTYPE   '6' /* FIFO special */
 
#define GNUTYPE_DUMPDIR   'D' /* file names from dumped directory */
 
#define GNUTYPE_LONGLINK   'K' /* long link name */
 
#define GNUTYPE_LONGNAME   'L' /* long file name */
 
#define GNUTYPE_MULTIVOL   'M' /* continuation of file from another volume */
 
#define GNUTYPE_NAMES   'N' /* file name that does not fit into main hdr */
 
#define GNUTYPE_SPARSE   'S' /* sparse file */
 
#define GNUTYPE_VOLHDR   'V' /* tape/volume header */
 
#define ISSPECIAL(c)   (((c) == '*') || ((c) == '/'))
 
#define LNKTYPE   '1' /* link */
 
#define REGTYPE   '0' /* regular file */
 
#define SHORTNAMESIZE   100
 
#define SYMTYPE   '2' /* reserved */
 

Enumerations

enum  { TGZ_EXTRACT, TGZ_LIST, TGZ_INVALID }
 

Functions

void error (const char *msg)
 
int ExprMatch (char *string, char *expr)
 
int getoct (char *p, int width)
 
void help (int exitval)
 
int main (int argc, char **argv)
 
int makedir (char *newdir)
 
int matchname (int arg, int argc, char **argv, char *fname)
 
int makedir OF ((char *))
 
int ExprMatch OF ((char *, char *))
 
int getoct OF ((char *, int))
 
int setfiletime OF ((char *, time_t))
 
char *TGZfname OF ((const char *))
 
int tar OF ((gzFile, int, int, int, char **))
 
void help OF ((int))
 
int main OF ((int, char **))
 
int matchname OF ((int, int, char **, char *))
 
void restore_attr OF ((struct attr_item **))
 
void push_attr OF ((struct attr_item **, char *, int, time_t))
 
char *strtime OF ((time_t *))
 
void push_attr (struct attr_item **list, char *fname, int mode, time_t time)
 
void restore_attr (struct attr_item **list)
 
int setfiletime (char *fname, time_t ftime)
 
char * strtime (time_t *t)
 
int tar (gzFile in, int action, int arg, int argc, char **argv)
 
char * TGZfname (const char *arcname)
 
void TGZnotfound (const char *arcname)
 

Variables

char * prog
 
const char * TGZsuffix [] = { "\0", ".tar", ".tar.gz", ".taz", ".tgz", NULL }
 

Macro Definition Documentation

◆ AREGTYPE

#define AREGTYPE   '\0' /* regular file */

Definition at line 43 of file zlib/contrib/untgz/untgz.c.

◆ BLKTYPE

#define BLKTYPE   '4' /* block special */

Definition at line 47 of file zlib/contrib/untgz/untgz.c.

◆ BLOCKSIZE

#define BLOCKSIZE   512

Definition at line 65 of file zlib/contrib/untgz/untgz.c.

◆ CHRTYPE

#define CHRTYPE   '3' /* character special */

Definition at line 46 of file zlib/contrib/untgz/untgz.c.

◆ CONTTYPE

#define CONTTYPE   '7' /* reserved */

Definition at line 50 of file zlib/contrib/untgz/untgz.c.

◆ DIRTYPE

#define DIRTYPE   '5' /* directory */

Definition at line 48 of file zlib/contrib/untgz/untgz.c.

◆ FIFOTYPE

#define FIFOTYPE   '6' /* FIFO special */

Definition at line 49 of file zlib/contrib/untgz/untgz.c.

◆ GNUTYPE_DUMPDIR

#define GNUTYPE_DUMPDIR   'D' /* file names from dumped directory */

Definition at line 54 of file zlib/contrib/untgz/untgz.c.

◆ GNUTYPE_LONGLINK

#define GNUTYPE_LONGLINK   'K' /* long link name */

Definition at line 55 of file zlib/contrib/untgz/untgz.c.

◆ GNUTYPE_LONGNAME

#define GNUTYPE_LONGNAME   'L' /* long file name */

Definition at line 56 of file zlib/contrib/untgz/untgz.c.

◆ GNUTYPE_MULTIVOL

#define GNUTYPE_MULTIVOL   'M' /* continuation of file from another volume */

Definition at line 57 of file zlib/contrib/untgz/untgz.c.

◆ GNUTYPE_NAMES

#define GNUTYPE_NAMES   'N' /* file name that does not fit into main hdr */

Definition at line 58 of file zlib/contrib/untgz/untgz.c.

◆ GNUTYPE_SPARSE

#define GNUTYPE_SPARSE   'S' /* sparse file */

Definition at line 59 of file zlib/contrib/untgz/untgz.c.

◆ GNUTYPE_VOLHDR

#define GNUTYPE_VOLHDR   'V' /* tape/volume header */

Definition at line 60 of file zlib/contrib/untgz/untgz.c.

◆ ISSPECIAL

#define ISSPECIAL (   c)    (((c) == '*') || ((c) == '/'))

Definition at line 288 of file zlib/contrib/untgz/untgz.c.

◆ LNKTYPE

#define LNKTYPE   '1' /* link */

Definition at line 44 of file zlib/contrib/untgz/untgz.c.

◆ REGTYPE

#define REGTYPE   '0' /* regular file */

Definition at line 42 of file zlib/contrib/untgz/untgz.c.

◆ SHORTNAMESIZE

#define SHORTNAMESIZE   100

Definition at line 66 of file zlib/contrib/untgz/untgz.c.

◆ SYMTYPE

#define SYMTYPE   '2' /* reserved */

Definition at line 45 of file zlib/contrib/untgz/untgz.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
TGZ_EXTRACT 
TGZ_LIST 
TGZ_INVALID 

Definition at line 103 of file zlib/contrib/untgz/untgz.c.

Function Documentation

◆ error()

void error ( const char *  msg)

Definition at line 593 of file zlib/contrib/untgz/untgz.c.

◆ ExprMatch()

int ExprMatch ( char *  string,
char *  expr 
)

Definition at line 290 of file zlib/contrib/untgz/untgz.c.

◆ getoct()

int getoct ( char *  p,
int  width 
)

Definition at line 168 of file zlib/contrib/untgz/untgz.c.

◆ help()

void help ( int  exitval)

Definition at line 581 of file zlib/contrib/untgz/untgz.c.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 606 of file zlib/contrib/untgz/untgz.c.

◆ makedir()

int makedir ( char *  newdir)

Definition at line 328 of file zlib/contrib/untgz/untgz.c.

◆ matchname()

int matchname ( int  arg,
int  argc,
char **  argv,
char *  fname 
)

Definition at line 371 of file zlib/contrib/untgz/untgz.c.

◆ OF() [1/12]

int makedir OF ( (char *)  )

◆ OF() [2/12]

int ExprMatch OF ( (char *, char *)  )

◆ OF() [3/12]

int getoct OF ( (char *, int )

◆ OF() [4/12]

int setfiletime OF ( (char *, time_t)  )

◆ OF() [5/12]

char* TGZfname OF ( (const char *)  )

◆ OF() [6/12]

int tar OF ( (gzFile, int, int, int, char **)  )

◆ OF() [7/12]

void help OF ( (int )

◆ OF() [8/12]

int main OF ( (int, char **)  )

◆ OF() [9/12]

int matchname OF ( (int, int, char **, char *)  )

◆ OF() [10/12]

void restore_attr OF ( (struct attr_item **)  )

◆ OF() [11/12]

void push_attr OF ( (struct attr_item **, char *, int, time_t)  )

◆ OF() [12/12]

char* strtime OF ( (time_t *)  )

◆ push_attr()

void push_attr ( struct attr_item **  list,
char *  fname,
int  mode,
time_t  time 
)

Definition at line 253 of file zlib/contrib/untgz/untgz.c.

◆ restore_attr()

void restore_attr ( struct attr_item **  list)

Definition at line 270 of file zlib/contrib/untgz/untgz.c.

◆ setfiletime()

int setfiletime ( char *  fname,
time_t  ftime 
)

Definition at line 206 of file zlib/contrib/untgz/untgz.c.

◆ strtime()

char* strtime ( time_t *  t)

Definition at line 191 of file zlib/contrib/untgz/untgz.c.

◆ tar()

int tar ( gzFile  in,
int  action,
int  arg,
int  argc,
char **  argv 
)

Definition at line 386 of file zlib/contrib/untgz/untgz.c.

◆ TGZfname()

char* TGZfname ( const char *  arcname)

Definition at line 132 of file zlib/contrib/untgz/untgz.c.

◆ TGZnotfound()

void TGZnotfound ( const char *  arcname)

Definition at line 152 of file zlib/contrib/untgz/untgz.c.

Variable Documentation

◆ prog

char* prog

Definition at line 125 of file zlib/contrib/untgz/untgz.c.

◆ TGZsuffix

const char* TGZsuffix[] = { "\0", ".tar", ".tar.gz", ".taz", ".tgz", NULL }

Definition at line 127 of file zlib/contrib/untgz/untgz.c.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:36