version 1.46, 2008/08/20 18:28:46 |
version 1.47, 2009/04/05 13:36:00 |
|
|
main(int argc, char *argv[]) |
main(int argc, char *argv[]) |
{ |
{ |
int error = 0, hunk, failed, i, fd; |
int error = 0, hunk, failed, i, fd; |
|
bool patch_seen; |
LINENUM where = 0, newwhere, fuzz, mymaxfuzz; |
LINENUM where = 0, newwhere, fuzz, mymaxfuzz; |
const char *tmpdir; |
const char *tmpdir; |
char *v; |
char *v; |
|
|
/* make sure we clean up /tmp in case of disaster */ |
/* make sure we clean up /tmp in case of disaster */ |
set_signals(0); |
set_signals(0); |
|
|
|
patch_seen = false; |
for (open_patch_file(filearg[1]); there_is_another_patch(); |
for (open_patch_file(filearg[1]); there_is_another_patch(); |
reinitialize_almost_everything()) { |
reinitialize_almost_everything()) { |
/* for each patch in patch file */ |
/* for each patch in patch file */ |
|
|
|
patch_seen = true; |
|
|
warn_on_invalid_line = true; |
warn_on_invalid_line = true; |
|
|
|
|
} |
} |
set_signals(1); |
set_signals(1); |
} |
} |
|
|
|
if (!patch_seen) |
|
error = 2; |
|
|
my_exit(error); |
my_exit(error); |
/* NOTREACHED */ |
/* NOTREACHED */ |
} |
} |