version 1.3, 2003/06/25 03:02:33 |
version 1.4, 2003/06/25 03:25:29 |
|
|
static void calldiff(char *); |
static void calldiff(char *); |
static void setfile(char **fpp, char **epp, char *file); |
static void setfile(char **fpp, char **epp, char *file); |
static int useless(char *); |
static int useless(char *); |
static void only(struct dir * dp, int which); |
static void only(struct dir *dp, int which); |
static void scanpr(struct dir *, int, char *, char *, char *, char *, char *); |
static void scanpr(struct dir *, int, char *, char *, char *, char *, char *); |
|
|
void |
void |
|
|
} |
} |
|
|
static void |
static void |
scanpr(struct dir * dp, int test, char *title, char *file1, char *efile1, |
scanpr(struct dir *dp, int test, char *title, char *file1, char *efile1, |
char *file2, char *efile2) |
char *file2, char *efile2) |
{ |
{ |
int titled = 0; |
int titled = 0; |
|
|
} |
} |
|
|
void |
void |
only(struct dir * dp, int which) |
only(struct dir *dp, int which) |
{ |
{ |
char *file = which == 1 ? file1 : file2; |
char *file = which == 1 ? file1 : file2; |
char *efile = which == 1 ? efile1 : efile2; |
char *efile = which == 1 ? efile1 : efile2; |
|
|
ep->d_entry = talloc(ep->d_namlen + 1); |
ep->d_entry = talloc(ep->d_namlen + 1); |
strcpy(ep->d_entry, rp->d_name); |
strcpy(ep->d_entry, rp->d_name); |
} |
} |
dp = realloc((char *) dp, |
dp = ralloc(dp, (nitems + 1) * sizeof(struct dir)); |
(nitems + 1) * sizeof(struct dir)); |
|
if (dp == 0) { |
|
fprintf(stderr, "diff: ran out of memory\n"); |
|
done(); |
|
} |
|
} |
} |
dp[nitems].d_entry = 0; /* delimiter */ |
dp[nitems].d_entry = 0; /* delimiter */ |
closedir(dirp); |
closedir(dirp); |
|
|
} |
} |
|
|
int |
int |
entcmp(struct dir * d1, struct dir * d2) |
entcmp(struct dir *d1, struct dir *d2) |
{ |
{ |
return (strcmp(d1->d_entry, d2->d_entry)); |
return (strcmp(d1->d_entry, d2->d_entry)); |
} |
} |
|
|
static void |
static void |
compare(struct dir * dp) |
compare(struct dir *dp) |
{ |
{ |
int i, j; |
int i, j; |
int f1, f2, fmt1, fmt2; |
int f1, f2, fmt1, fmt2; |