diff options
author | Rob Landley | 2006-08-03 15:41:12 +0000 |
---|---|---|
committer | Rob Landley | 2006-08-03 15:41:12 +0000 |
commit | d921b2ecc0d294ad4bf8c7458fc52a60c28727d2 (patch) | |
tree | e4a2769349867c441cf2983d83097bb66701a733 /editors/patch.c | |
parent | 6dce0b6fa79f2d4bb7e9d90e1fbc0f6beb25f855 (diff) | |
download | busybox-d921b2ecc0d294ad4bf8c7458fc52a60c28727d2.zip busybox-d921b2ecc0d294ad4bf8c7458fc52a60c28727d2.tar.gz |
Remove bb_ prefixes from xfuncs.c (and a few other places), consolidate
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only
had one user), clean up lots of #includes... General cleanup pass. What I've
been doing for the last couple days.
And it conflicts! I've removed httpd.c from this checkin due to somebody else
touching that file. It builds for me. I have to catch a bus. (Now you know
why I'm looking forward to Mercurial.)
Diffstat (limited to 'editors/patch.c')
-rw-r--r-- | editors/patch.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/editors/patch.c b/editors/patch.c index 337d1bb..a710d82 100644 --- a/editors/patch.c +++ b/editors/patch.c @@ -67,7 +67,7 @@ static char *extract_filename(char *line, int patch_level) filename_start_ptr = temp + 1; } - return(bb_xstrdup(filename_start_ptr)); + return(xstrdup(filename_start_ptr)); } static int file_doesnt_exist(const char *filename) @@ -89,7 +89,7 @@ int patch_main(int argc, char **argv) if (ret & 1) patch_level = bb_xgetlarg(p, 10, -1, USHRT_MAX); if (ret & 2) { - patch_file = bb_xfopen(i, "r"); + patch_file = xfopen(i, "r"); } else { patch_file = stdin; } @@ -140,7 +140,7 @@ int patch_main(int argc, char **argv) bb_make_directory(new_filename, -1, FILEUTILS_RECUR); *line_ptr = '/'; } - dst_stream = bb_xfopen(new_filename, "w+"); + dst_stream = xfopen(new_filename, "w+"); backup_filename = NULL; } else { backup_filename = xmalloc(strlen(new_filename) + 6); @@ -150,16 +150,16 @@ int patch_main(int argc, char **argv) bb_perror_msg_and_die("Couldnt create file %s", backup_filename); } - dst_stream = bb_xfopen(new_filename, "w"); + dst_stream = xfopen(new_filename, "w"); } if ((backup_filename == NULL) || file_doesnt_exist(original_filename)) { src_stream = NULL; } else { if (strcmp(original_filename, new_filename) == 0) { - src_stream = bb_xfopen(backup_filename, "r"); + src_stream = xfopen(backup_filename, "r"); } else { - src_stream = bb_xfopen(original_filename, "r"); + src_stream = xfopen(original_filename, "r"); } } |