version 1.6, 2005/10/08 20:30:39 |
version 1.7, 2005/10/09 20:55:27 |
|
|
int |
int |
rcsdiff_main(int argc, char **argv) |
rcsdiff_main(int argc, char **argv) |
{ |
{ |
int i, ch; |
int i, ch, status; |
RCSNUM *rev, *rev2, *frev; |
RCSNUM *rev, *rev2, *frev; |
RCSFILE *file; |
RCSFILE *file; |
char fpath[MAXPATHLEN]; |
char fpath[MAXPATHLEN]; |
|
|
rev = RCS_HEAD_REV; |
rev = RCS_HEAD_REV; |
rev2 = NULL; |
rev2 = NULL; |
|
status = 0; |
|
|
while ((ch = getopt(argc, argv, "cnqr:uV")) != -1) { |
while ((ch = getopt(argc, argv, "cnqr:uV")) != -1) { |
switch (ch) { |
switch (ch) { |
|
|
if (rcsdiff_file(file, frev, argv[i]) < 0) { |
if (rcsdiff_file(file, frev, argv[i]) < 0) { |
cvs_log(LP_ERR, "failed to rcsdiff"); |
cvs_log(LP_ERR, "failed to rcsdiff"); |
rcs_close(file); |
rcs_close(file); |
|
status = 2; |
continue; |
continue; |
} |
} |
} else { |
} else { |
if (rcsdiff_rev(file, rev, rev2) < 0) { |
if (rcsdiff_rev(file, rev, rev2) < 0) { |
cvs_log(LP_ERR, "failed to rcsdiff"); |
cvs_log(LP_ERR, "failed to rcsdiff"); |
rcs_close(file); |
rcs_close(file); |
|
status = 2; |
continue; |
continue; |
} |
} |
} |
} |
|
|
rcs_close(file); |
rcs_close(file); |
} |
} |
|
|
return (0); |
exit(status); |
} |
} |
|
|
void |
void |