summaryrefslogtreecommitdiffstats
path: root/libbb
diff options
context:
space:
mode:
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2010-08-17 23:39:02 (EDT)
committer graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2010-08-17 23:39:02 (EDT)
commit0a4946b3e913a2affe5fd342aa88e2533d06356e (patch)
treea53f2e977e6d39ac8356a9664fa46bec26c31c85 /libbb
parent0eb2cb22be9a69e9562fea935617864cc0e5f217 (diff)
Remove trailing whitespace. Sorry if this breaks your patches.
git-svn-id: http://opkg.googlecode.com/svn/trunk@552 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libbb')
-rw-r--r--libbb/gz_open.c4
-rw-r--r--libbb/last_char_is.c2
-rw-r--r--libbb/make_directory.c2
-rw-r--r--libbb/parse_mode.c2
-rw-r--r--libbb/safe_strncpy.c6
-rw-r--r--libbb/unarchive.c52
-rw-r--r--libbb/unzip.c12
-rw-r--r--libbb/xfuncs.c2
-rw-r--r--libbb/xreadlink.c8
9 files changed, 45 insertions, 45 deletions
diff --git a/libbb/gz_open.c b/libbb/gz_open.c
index 40f741f..3997e72 100644
--- a/libbb/gz_open.c
+++ b/libbb/gz_open.c
@@ -39,7 +39,7 @@ gz_open(FILE *compressed_file, int *pid)
return(NULL);
}
- /* If we don't flush, we end up with two copies of anything pending,
+ /* If we don't flush, we end up with two copies of anything pending,
one from the parent, one from the child */
fflush(stdout);
fflush(stderr);
@@ -71,7 +71,7 @@ gz_close(int gunzip_pid)
perror_msg("waitpid");
return -1;
}
-
+
if (WIFSIGNALED(status)) {
error_msg("Unzip process killed by signal %d.\n",
WTERMSIG(status));
diff --git a/libbb/last_char_is.c b/libbb/last_char_is.c
index 4e2ee92..26c2423 100644
--- a/libbb/last_char_is.c
+++ b/libbb/last_char_is.c
@@ -32,7 +32,7 @@ char * last_char_is(const char *s, int c)
if (!s)
return NULL;
sret = (char *)s+strlen(s)-1;
- if (sret>=s && *sret == c) {
+ if (sret>=s && *sret == c) {
return sret;
} else {
return NULL;
diff --git a/libbb/make_directory.c b/libbb/make_directory.c
index cff2e51..86ab554 100644
--- a/libbb/make_directory.c
+++ b/libbb/make_directory.c
@@ -61,7 +61,7 @@ int make_directory (const char *path, long mode, int flags)
memory of the path argument and may return
a pointer to static memory, which can then
be modified by consequtive calls to dirname */
-
+
pathcopy = xstrdup (path);
parent = dirname (pathcopy);
parentcopy = xstrdup (parent);
diff --git a/libbb/parse_mode.c b/libbb/parse_mode.c
index ba34ea9..02668c7 100644
--- a/libbb/parse_mode.c
+++ b/libbb/parse_mode.c
@@ -31,7 +31,7 @@
* correct mode described by the string. */
extern int parse_mode(const char *s, mode_t * theMode)
{
- static const mode_t group_set[] = {
+ static const mode_t group_set[] = {
S_ISUID | S_IRWXU, /* u */
S_ISGID | S_IRWXG, /* g */
S_IRWXO, /* o */
diff --git a/libbb/safe_strncpy.c b/libbb/safe_strncpy.c
index 0c5cf12..eb2dbab 100644
--- a/libbb/safe_strncpy.c
+++ b/libbb/safe_strncpy.c
@@ -24,11 +24,11 @@
-/* Like strncpy but make sure the resulting string is always 0 terminated. */
+/* Like strncpy but make sure the resulting string is always 0 terminated. */
extern char * safe_strncpy(char *dst, const char *src, size_t size)
-{
+{
dst[size-1] = '\0';
- return strncpy(dst, src, size-1);
+ return strncpy(dst, src, size-1);
}
diff --git a/libbb/unarchive.c b/libbb/unarchive.c
index b063c63..0e820c8 100644
--- a/libbb/unarchive.c
+++ b/libbb/unarchive.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2000 by Glenn McGrath
* Copyright (C) 2001 by Laurence Anderson
- *
+ *
* Based on previous work by busybox developers and others.
*
* This program is free software; you can redistribute it and/or modify
@@ -47,8 +47,8 @@ seek_by_read(FILE* fd, size_t len)
char buf[SEEK_BUF];
while (len) {
- cc = fread(buf, sizeof(buf[0]),
- len > SEEK_BUF ? SEEK_BUF : len,
+ cc = fread(buf, sizeof(buf[0]),
+ len > SEEK_BUF ? SEEK_BUF : len,
fd);
total += cc;
@@ -74,17 +74,17 @@ seek_sub_file(FILE *fd, const int count)
}
-/* Extract the data postioned at src_stream to either filesystem, stdout or
- * buffer depending on the value of 'function' which is defined in libbb.h
+/* Extract the data postioned at src_stream to either filesystem, stdout or
+ * buffer depending on the value of 'function' which is defined in libbb.h
*
* prefix doesnt have to be just a directory, it may prefix the filename as well.
*
- * e.g. '/var/lib/dpkg/info/dpkg.' will extract all files to the base bath
- * '/var/lib/dpkg/info/' and all files/dirs created in that dir will have
+ * e.g. '/var/lib/dpkg/info/dpkg.' will extract all files to the base bath
+ * '/var/lib/dpkg/info/' and all files/dirs created in that dir will have
* 'dpkg.' as their prefix
*
* For this reason if prefix does point to a dir then it must end with a
- * trailing '/' or else the last dir will be assumed to be the file prefix
+ * trailing '/' or else the last dir will be assumed to be the file prefix
*/
static char *
extract_archive(FILE *src_stream, FILE *out_stream,
@@ -100,7 +100,7 @@ extract_archive(FILE *src_stream, FILE *out_stream,
*err = 0;
- /* prefix doesnt have to be a proper path it may prepend
+ /* prefix doesnt have to be a proper path it may prepend
* the filename as well */
if (prefix != NULL) {
/* strip leading '/' in filename to extract as prefix may not be dir */
@@ -129,11 +129,11 @@ extract_archive(FILE *src_stream, FILE *out_stream,
if (function & extract_to_stream) {
if (S_ISREG(file_entry->mode)) {
- *err = copy_file_chunk(src_stream, out_stream, file_entry->size);
+ *err = copy_file_chunk(src_stream, out_stream, file_entry->size);
archive_offset += file_entry->size;
}
}
- else if (function & extract_one_to_buffer) {
+ else if (function & extract_one_to_buffer) {
if (S_ISREG(file_entry->mode)) {
buffer = (char *) xmalloc(file_entry->size + 1);
fread(buffer, 1, file_entry->size, src_stream);
@@ -189,7 +189,7 @@ extract_archive(FILE *src_stream, FILE *out_stream,
goto cleanup;
}
archive_offset += file_entry->size;
- *err = copy_file_chunk(src_stream, dst_stream, file_entry->size);
+ *err = copy_file_chunk(src_stream, dst_stream, file_entry->size);
fclose(dst_stream);
}
break;
@@ -230,7 +230,7 @@ extract_archive(FILE *src_stream, FILE *out_stream,
}
- /* Changing a symlink's properties normally changes the properties of the
+ /* Changing a symlink's properties normally changes the properties of the
* file pointed to, so dont try and change the date or mode, lchown does
* does the right thing, but isnt available in older versions of libc */
if (S_ISLNK(file_entry->mode)) {
@@ -247,7 +247,7 @@ extract_archive(FILE *src_stream, FILE *out_stream,
chmod(full_name, file_entry->mode);
}
} else {
- /* If we arent extracting data we have to skip it,
+ /* If we arent extracting data we have to skip it,
* if data size is 0 then then just do it anyway
* (saves testing for it) */
seek_sub_file(src_stream, file_entry->size);
@@ -256,7 +256,7 @@ extract_archive(FILE *src_stream, FILE *out_stream,
/* extract_list and extract_verbose_list can be used in conjunction
* with one of the above four extraction functions, so do this seperately */
if (function & extract_verbose_list) {
- fprintf(out_stream, "%s %d/%d %8d %s ", mode_string(file_entry->mode),
+ fprintf(out_stream, "%s %d/%d %8d %s ", mode_string(file_entry->mode),
file_entry->uid, file_entry->gid,
(int) file_entry->size, time_string(file_entry->mtime));
}
@@ -373,7 +373,7 @@ get_header_ar(FILE *src_stream)
/* raw_header[60] wont be '\n' as it should, but it doesnt matter */
memmove(ar.raw, &ar.raw[1], 59);
}
-
+
typed = (file_header_t *) xcalloc(1, sizeof(file_header_t));
typed->size = (size_t) atoi(ar.formated.size);
@@ -409,7 +409,7 @@ get_header_ar(FILE *src_stream)
}
typed->name[strcspn(typed->name, " /")]='\0';
- /* convert the rest of the now valid char header to its typed struct */
+ /* convert the rest of the now valid char header to its typed struct */
parse_mode(ar.formated.mode, &typed->mode);
typed->mtime = atoi(ar.formated.date);
typed->uid = atoi(ar.formated.uid);
@@ -555,7 +555,7 @@ get_header_tar(FILE *tar_stream)
# ifdef CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY
if (last_char_is(tar_entry->name, '/')) {
tar_entry->mode |= S_IFDIR;
- } else
+ } else
# endif
tar_entry->mode |= S_IFREG;
break;
@@ -623,7 +623,7 @@ free_header_tar(file_header_t *tar_entry)
}
char *
-deb_extract(const char *package_filename, FILE *out_stream,
+deb_extract(const char *package_filename, FILE *out_stream,
const int extract_function, const char *prefix,
const char *filename, int *err)
{
@@ -642,11 +642,11 @@ deb_extract(const char *package_filename, FILE *out_stream,
file_list[0] = filename;
file_list[1] = NULL;
}
-
+
if (extract_function & extract_control_tar_gz) {
ared_file = "control.tar.gz";
}
- else if (extract_function & extract_data_tar_gz) {
+ else if (extract_function & extract_data_tar_gz) {
ared_file = "data.tar.gz";
} else {
opkg_msg(ERROR, "Internal error: extract_function=%x\n",
@@ -719,7 +719,7 @@ deb_extract(const char *package_filename, FILE *out_stream,
*err = -1;
goto cleanup;
}
-
+
/* walk through outer tar file to find ared_file */
while ((tar_header = get_header_tar(unzipped_opkg_stream)) != NULL) {
int name_offset = 0;
@@ -736,12 +736,12 @@ deb_extract(const char *package_filename, FILE *out_stream,
}
archive_offset = 0;
- output_buffer = unarchive(uncompressed_stream,
- out_stream,
+ output_buffer = unarchive(uncompressed_stream,
+ out_stream,
get_header_tar,
free_header_tar,
- extract_function,
- prefix,
+ extract_function,
+ prefix,
file_list,
err);
diff --git a/libbb/unzip.c b/libbb/unzip.c
index e0a2388..472ffba 100644
--- a/libbb/unzip.c
+++ b/libbb/unzip.c
@@ -59,7 +59,7 @@ static unsigned long crc; /* shift register contents */
/*
* window size--must be a power of two, and
- * at least 32K for zip's deflate method
+ * at least 32K for zip's deflate method
*/
static const int WSIZE = 0x8000;
@@ -93,7 +93,7 @@ static const unsigned short mask_bits[] = {
/* ========================================================================
* Signal and error handler.
*/
-
+
static void abort_gzip()
{
error_msg("gzip aborted\n");
@@ -111,7 +111,7 @@ static void make_crc_table()
static int p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26};
/* initial shift register value */
- crc = 0xffffffffL;
+ crc = 0xffffffffL;
crc_table = (unsigned long *) xmalloc(256 * sizeof(unsigned long));
/* Make exclusive-or pattern from polynomial (0xedb88320) */
@@ -165,7 +165,7 @@ static void flush_window(void)
/*
* Free the malloc'ed tables built by huft_build(), which makes a linked
* list of the tables it made, with the links in a dummy first entry of
- * each table.
+ * each table.
* t: table to free
*/
static int huft_free(huft_t *t)
@@ -196,7 +196,7 @@ static int huft_free(huft_t *t)
* t: result: starting table
* m: maximum lookup bits, returns actual
*/
-static int huft_build(unsigned int *b, const unsigned int n, const unsigned int s,
+static int huft_build(unsigned int *b, const unsigned int n, const unsigned int s,
const unsigned short *d, const unsigned short *e, huft_t **t, int *m)
{
unsigned a; /* counter for codes of length k */
@@ -605,7 +605,7 @@ static int inflate_block(int *e)
bk = k_stored;
return 0;
}
- case 1: /* Inflate fixed
+ case 1: /* Inflate fixed
* decompress an inflated type 1 (fixed Huffman codes) block. We should
* either replace this with a custom decoder, or at least precompute the
* Huffman tables.
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c
index 4374048..f577315 100644
--- a/libbb/xfuncs.c
+++ b/libbb/xfuncs.c
@@ -71,7 +71,7 @@ extern char * xstrndup (const char *s, int n) {
error_msg_and_die("xstrndup bug");
t = xmalloc(++n);
-
+
return safe_strncpy(t,s,n);
}
diff --git a/libbb/xreadlink.c b/libbb/xreadlink.c
index 5b0504c..7d77a3b 100644
--- a/libbb/xreadlink.c
+++ b/libbb/xreadlink.c
@@ -14,10 +14,10 @@
#include "libbb.h"
extern char *xreadlink(const char *path)
-{
+{
static const int GROWBY = 80; /* how large we will grow strings by */
- char *buf = NULL;
+ char *buf = NULL;
int bufsize = 0, readsize = 0;
do {
@@ -27,11 +27,11 @@ extern char *xreadlink(const char *path)
perror_msg("%s", path);
return NULL;
}
- }
+ }
while (bufsize < readsize + 1);
buf[readsize] = '\0';
return buf;
-}
+}