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 /archival/libunarchive/get_header_ar.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 'archival/libunarchive/get_header_ar.c')
-rw-r--r-- | archival/libunarchive/get_header_ar.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/archival/libunarchive/get_header_ar.c b/archival/libunarchive/get_header_ar.c index 4627695..cabb410 100644 --- a/archival/libunarchive/get_header_ar.c +++ b/archival/libunarchive/get_header_ar.c @@ -4,12 +4,8 @@ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#include "unarchive.h" #include "libbb.h" +#include "unarchive.h" char get_header_ar(archive_handle_t *archive_handle) { @@ -31,7 +27,7 @@ char get_header_ar(archive_handle_t *archive_handle) static unsigned int ar_long_name_size; #endif - /* dont use bb_xread as we want to handle the error ourself */ + /* dont use xread as we want to handle the error ourself */ if (read(archive_handle->src_fd, ar.raw, 60) != 60) { /* End Of File */ return(EXIT_FAILURE); @@ -85,14 +81,14 @@ char get_header_ar(archive_handle_t *archive_handle) if (long_offset >= ar_long_name_size) { bb_error_msg_and_die("Cant resolve long filename"); } - typed->name = bb_xstrdup(ar_long_names + long_offset); + typed->name = xstrdup(ar_long_names + long_offset); } #else bb_error_msg_and_die("long filenames not supported"); #endif } else { /* short filenames */ - typed->name = bb_xstrndup(ar.formatted.name, 16); + typed->name = xstrndup(ar.formatted.name, 16); } typed->name[strcspn(typed->name, " /")] = '\0'; |