src/commands/aal/archiver.c File Reference

#include <sys/types.h>
#include <sys/stat.h>
#include <signal.h>
#include <arch.h>

Go to the source code of this file.

Defines

#define S_IREAD   S_IRUSR
#define S_IWRITE   S_IWUSR
#define S_IEXEC   S_IXUSR
#define MAGIC_NUMBER   ARMAG
#define odd(nr)   (nr & 01)
#define even(nr)   (odd(nr) ? nr + 1 : nr)
#define FALSE   0
#define TRUE   1
#define READ   0
#define APPEND   2
#define CREATE   1
#define MEMBER   struct ar_hdr
#define NIL_PTR   ((char *) 0)
#define NIL_MEM   ((MEMBER *) 0)
#define NIL_LONG   ((long *) 0)
#define IO_SIZE   (10 * 1024)
#define equal(str1, str2)   (!strncmp((str1), (str2), 14))
#define S_ISDIR(m)   (m & S_IFDIR)

Typedefs

typedef char BOOL

Functions

long lseek ()
char * mktemp ()
char * ctime ()
 usage ()
 error (BOOL quit, char *str1, char *str2, char *str3, char *str4)
char * basename (char *path)
unsigned int rd_unsigned2 ()
 open_archive (char *name, int mode)
 catch ()
 main (int argc, argv)
MEMBER * get_member ()
char * get_mode ()
 get (int argc, argv)
 add (char *name, int fd, char *mess)
 extract (MEMBER *member)
 copy_member (MEMBER *member, int from, int to, extracting)
char * get_mode (int mode)
 wr_fatal ()
 rd_fatal ()
 mwrite (int fd, char *address, int bytes)
 show (char *s, char *name)

Variables

BOOL verbose
BOOL app_fl
BOOL ex_fl
BOOL show_fl
BOOL pr_fl
BOOL rep_fl
BOOL del_fl
BOOL nocr_fl
BOOL local_fl
BOOL update_fl
int ar_fd
char io_buffer [IO_SIZE]
char * progname
char temp_buf [32]
char * temp_arch = &temp_buf[0]


Define Documentation

#define APPEND   2

Definition at line 66 of file archiver.c.

#define CREATE   1

Definition at line 67 of file archiver.c.

#define equal ( str1,
str2   )     (!strncmp((str1), (str2), 14))

Definition at line 77 of file archiver.c.

#define even ( nr   )     (odd(nr) ? nr + 1 : nr)

Definition at line 59 of file archiver.c.

#define FALSE   0

Definition at line 62 of file archiver.c.

#define IO_SIZE   (10 * 1024)

Definition at line 75 of file archiver.c.

#define MAGIC_NUMBER   ARMAG

Definition at line 54 of file archiver.c.

#define MEMBER   struct ar_hdr

Definition at line 69 of file archiver.c.

#define NIL_LONG   ((long *) 0)

Definition at line 73 of file archiver.c.

#define NIL_MEM   ((MEMBER *) 0)

Definition at line 72 of file archiver.c.

#define NIL_PTR   ((char *) 0)

Definition at line 71 of file archiver.c.

#define odd ( nr   )     (nr & 01)

Definition at line 58 of file archiver.c.

#define READ   0

Definition at line 65 of file archiver.c.

#define S_IEXEC   S_IXUSR

Definition at line 37 of file archiver.c.

#define S_IREAD   S_IRUSR

Definition at line 31 of file archiver.c.

#define S_ISDIR ( m   )     (m & S_IFDIR)

Definition at line 79 of file archiver.c.

#define S_IWRITE   S_IWUSR

Definition at line 34 of file archiver.c.

#define TRUE   1

Definition at line 63 of file archiver.c.


Typedef Documentation

typedef char BOOL

Definition at line 61 of file archiver.c.


Function Documentation

add ( char *  name,
int  fd,
char *  mess 
)

Definition at line 464 of file archiver.c.

char* basename ( char *  path  ) 

Definition at line 135 of file archiver.c.

catch (  ) 

Definition at line 191 of file archiver.c.

copy_member ( MEMBER *  member,
int  from,
int  to,
extracting   
)

Definition at line 555 of file archiver.c.

char* ctime (  ) 

error ( BOOL  quit,
char *  str1,
char *  str2,
char *  str3,
char *  str4 
)

Definition at line 121 of file archiver.c.

extract ( MEMBER *  member  ) 

Definition at line 530 of file archiver.c.

get ( int  argc,
argv   
)

Definition at line 320 of file archiver.c.

MEMBER* get_member (  ) 

Definition at line 299 of file archiver.c.

char* get_mode ( int  mode  ) 

Definition at line 593 of file archiver.c.

char* get_mode (  ) 

long lseek (  ) 

main ( int argc  ,
argv   
)

Definition at line 198 of file archiver.c.

char* mktemp (  ) 

mwrite ( int  fd,
char *  address,
int  bytes 
)

Definition at line 624 of file archiver.c.

open_archive ( char *  name,
int  mode 
)

Definition at line 157 of file archiver.c.

rd_fatal (  ) 

Definition at line 619 of file archiver.c.

unsigned int rd_unsigned2 (  ) 

show ( char *  s,
char *  name 
)

Definition at line 633 of file archiver.c.

usage ( void   ) 

Definition at line 108 of file archiver.c.

wr_fatal (  ) 

Definition at line 614 of file archiver.c.


Variable Documentation

Definition at line 83 of file archiver.c.

int ar_fd

Definition at line 97 of file archiver.c.

Definition at line 88 of file archiver.c.

Definition at line 84 of file archiver.c.

char io_buffer[IO_SIZE]

Definition at line 99 of file archiver.c.

Definition at line 90 of file archiver.c.

Definition at line 89 of file archiver.c.

Definition at line 86 of file archiver.c.

char* progname

Definition at line 101 of file archiver.c.

Definition at line 87 of file archiver.c.

Definition at line 85 of file archiver.c.

char* temp_arch = &temp_buf[0]

Definition at line 104 of file archiver.c.

char temp_buf[32]

Definition at line 103 of file archiver.c.

Definition at line 91 of file archiver.c.

BOOL verbose

Definition at line 82 of file archiver.c.


Generated on Tue Mar 9 04:36:21 2010 for Minix by  doxygen 1.5.8