treecmp.c File Reference

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>

Include dependency graph for treecmp.c:

Go to the source code of this file.

Data Structures

struct  dirstruct

Defines

#define BUFSIZE   4096
#define MAXPATH   128
#define DIRENTLEN   14

Functions

 _PROTOTYPE (int main,(int argc, char **argv))
 _PROTOTYPE (void compare,(char *old, char *new))
 _PROTOTYPE (void check,(char *s, struct dirstruct *dp1, int ent1, char *new))
 _PROTOTYPE (void usage,(void))
int main (int argc, argv)
void compare (char *old, char *new)
void regular (char *old, char *new)
void directory (char *old, char *new)
void check (char *s, struct dirstruct *dp1, int ent1, char *new)
void usage ()

Variables

stat stat1 stat2
char buf1 [BUFSIZE]
char buf2 [BUFSIZE]
int changes
int verbose


Define Documentation

#define BUFSIZE   4096
 

Definition at line 27 of file treecmp.c.

#define DIRENTLEN   14
 

Definition at line 29 of file treecmp.c.

Referenced by check().

#define MAXPATH   128
 

Definition at line 28 of file treecmp.c.

Referenced by directory().


Function Documentation

_PROTOTYPE void  usage,
(void) 
 

_PROTOTYPE void  check,
(char *s, struct dirstruct *dp1, int ent1, char *new) 
 

_PROTOTYPE void  compare,
(char *old, char *new) 
 

_PROTOTYPE int  main,
(int argc, char **argv) 
 

void check char *  s,
struct dirstruct dp1,
int  ent1,
char *  new
 

Definition at line 301 of file treecmp.c.

References DIRENTLEN, dirstruct::fname, i, and strncmp().

void compare char *  old,
char *  new
 

Definition at line 78 of file treecmp.c.

References changes, directory(), fprintf(), printf, regular(), S_IFBLK, S_IFCHR, S_IFDIR, S_IFMT, S_IFREG, stat::st_mode, stat, stat2, and stderr.

void directory char *  old,
char *  new
 

Definition at line 183 of file treecmp.c.

References close, fd1, fd2, fprintf(), free, i, dirstruct::inum, malloc(), MAXPATH, O_RDONLY, open, read, stat::st_size, stat2, and stderr.

int main int  argc,
argv 
 

Definition at line 51 of file treecmp.c.

References changes, compare, p, usage, and verbose.

void regular char *  old,
char *  new
 

Definition at line 124 of file treecmp.c.

References buf1, buf2, BUFSIZE, bytes, changes, close, count, fd1, fd2, fprintf(), L, memcmp(), O_RDONLY, open, printf, read, stat::st_size, stat2, and stderr.

Referenced by compare(), and read_write().

void usage void   ) 
 

Definition at line 323 of file treecmp.c.

References exit(), and printf.


Variable Documentation

char buf1[BUFSIZE]
 

Definition at line 38 of file treecmp.c.

Referenced by cmp(), regular(), rep_name(), and test21a().

char buf2[BUFSIZE]
 

Definition at line 39 of file treecmp.c.

Referenced by cmp(), regular(), test19g(), test21a(), test38b(), test39d(), test7a(), and test7b().

int changes
 

Definition at line 41 of file treecmp.c.

struct stat stat1 stat2
 

Definition at line 36 of file treecmp.c.

Referenced by analyse_input_files(), compare(), directory(), regular(), test21a(), and test7c().

int verbose
 

Definition at line 42 of file treecmp.c.


Generated on Fri Apr 14 23:07:46 2006 for minix by  doxygen 1.4.6