diff options
author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-03-15 08:29:22 +0000 |
---|---|---|
committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-03-15 08:29:22 +0000 |
commit | b16674f3c1a961e0b5d6a57745f5f749d95c641e (patch) | |
tree | 4c6d2217f4d8306c59cf1096f8664e1cfd167213 /libbb | |
parent | e7135df4a650f9197b633784472f45602524855b (diff) | |
download | busybox-w32-b16674f3c1a961e0b5d6a57745f5f749d95c641e.tar.gz busybox-w32-b16674f3c1a961e0b5d6a57745f5f749d95c641e.tar.bz2 busybox-w32-b16674f3c1a961e0b5d6a57745f5f749d95c641e.zip |
Remove trailing whitespace. Update copyright to include 2004.
git-svn-id: svn://busybox.net/trunk/busybox@8630 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'libbb')
70 files changed, 135 insertions, 135 deletions
diff --git a/libbb/Makefile b/libbb/Makefile index 774cc75ed..fbcb12330 100644 --- a/libbb/Makefile +++ b/libbb/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | # Makefile for busybox | 1 | # Makefile for busybox |
2 | # | 2 | # |
3 | # Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 3 | # Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
4 | # | 4 | # |
5 | # This program is free software; you can redistribute it and/or modify | 5 | # This program is free software; you can redistribute it and/or modify |
6 | # it under the terms of the GNU General Public License as published by | 6 | # it under the terms of the GNU General Public License as published by |
diff --git a/libbb/README b/libbb/README index b92910055..4f28f7e34 100644 --- a/libbb/README +++ b/libbb/README | |||
@@ -1,11 +1,11 @@ | |||
1 | Please see the LICENSE file for copyright information (GPLv2) | 1 | Please see the LICENSE file for copyright information (GPLv2) |
2 | 2 | ||
3 | libbb is BusyBox's utility library. All of this stuff used to be stuffed into | 3 | libbb is BusyBox's utility library. All of this stuff used to be stuffed into |
4 | a single file named utility.c. When I split utility.c to create libbb, some of | 4 | a single file named utility.c. When I split utility.c to create libbb, some of |
5 | the very oldest stuff ended up without their original copyright and licensing | 5 | the very oldest stuff ended up without their original copyright and licensing |
6 | information (which is now lost in the mists of time). If you see something | 6 | information (which is now lost in the mists of time). If you see something |
7 | that you wrote that is mis-attributed, do let me know so we can fix that up. | 7 | that you wrote that is mis-attributed, do let me know so we can fix that up. |
8 | 8 | ||
9 | Erik Andersen | 9 | Erik Andersen |
10 | <andersen@codepoet.org> | 10 | <andersen@codepoet.org> |
11 | 11 | ||
diff --git a/libbb/bb_asprintf.c b/libbb/bb_asprintf.c index 7075b46de..a3ba42454 100644 --- a/libbb/bb_asprintf.c +++ b/libbb/bb_asprintf.c | |||
@@ -11,7 +11,7 @@ void bb_xasprintf(char **string_ptr, const char *format, ...) | |||
11 | { | 11 | { |
12 | va_list p; | 12 | va_list p; |
13 | int r; | 13 | int r; |
14 | 14 | ||
15 | va_start(p, format); | 15 | va_start(p, format); |
16 | r = vasprintf(string_ptr, format, p); | 16 | r = vasprintf(string_ptr, format, p); |
17 | va_end(p); | 17 | va_end(p); |
diff --git a/libbb/chomp.c b/libbb/chomp.c index 4fcbb263d..774e533d4 100644 --- a/libbb/chomp.c +++ b/libbb/chomp.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) many different people. | 5 | * Copyright (C) many different people. |
6 | * If you wrote this, please acknowledge your work. | 6 | * If you wrote this, please acknowledge your work. |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
@@ -29,7 +29,7 @@ | |||
29 | void chomp(char *s) | 29 | void chomp(char *s) |
30 | { | 30 | { |
31 | char *lc = last_char_is(s, '\n'); | 31 | char *lc = last_char_is(s, '\n'); |
32 | 32 | ||
33 | if(lc) | 33 | if(lc) |
34 | *lc = 0; | 34 | *lc = 0; |
35 | } | 35 | } |
diff --git a/libbb/concat_path_file.c b/libbb/concat_path_file.c index f0ce3d91c..77c054530 100644 --- a/libbb/concat_path_file.c +++ b/libbb/concat_path_file.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) many different people. | 5 | * Copyright (C) many different people. |
6 | * If you wrote this, please acknowledge your work. | 6 | * If you wrote this, please acknowledge your work. |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
diff --git a/libbb/copyfd.c b/libbb/copyfd.c index 00115e2c9..bf0a390a3 100644 --- a/libbb/copyfd.c +++ b/libbb/copyfd.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/correct_password.c b/libbb/correct_password.c index 396253614..1da83c441 100644 --- a/libbb/correct_password.c +++ b/libbb/correct_password.c | |||
@@ -49,14 +49,14 @@ | |||
49 | int correct_password ( const struct passwd *pw ) | 49 | int correct_password ( const struct passwd *pw ) |
50 | { | 50 | { |
51 | char *unencrypted, *encrypted, *correct; | 51 | char *unencrypted, *encrypted, *correct; |
52 | 52 | ||
53 | #ifdef CONFIG_FEATURE_SHADOWPASSWDS | 53 | #ifdef CONFIG_FEATURE_SHADOWPASSWDS |
54 | if (( strcmp ( pw-> pw_passwd, "x" ) == 0 ) || ( strcmp ( pw-> pw_passwd, "*" ) == 0 )) { | 54 | if (( strcmp ( pw-> pw_passwd, "x" ) == 0 ) || ( strcmp ( pw-> pw_passwd, "*" ) == 0 )) { |
55 | struct spwd *sp = getspnam ( pw-> pw_name ); | 55 | struct spwd *sp = getspnam ( pw-> pw_name ); |
56 | 56 | ||
57 | if ( !sp ) | 57 | if ( !sp ) |
58 | bb_error_msg_and_die ( "no valid shadow password" ); | 58 | bb_error_msg_and_die ( "no valid shadow password" ); |
59 | 59 | ||
60 | correct = sp-> sp_pwdp; | 60 | correct = sp-> sp_pwdp; |
61 | } | 61 | } |
62 | else | 62 | else |
diff --git a/libbb/device_open.c b/libbb/device_open.c index abfe2318a..61f954f46 100644 --- a/libbb/device_open.c +++ b/libbb/device_open.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/dump.c b/libbb/dump.c index 5046b926b..f169da677 100644 --- a/libbb/dump.c +++ b/libbb/dump.c | |||
@@ -248,8 +248,8 @@ static void rewrite(FS * fs) | |||
248 | pr->cchar = pr->fmt + (p1 - fmtp); | 248 | pr->cchar = pr->fmt + (p1 - fmtp); |
249 | 249 | ||
250 | /* DBU:[dave@cray.com] w/o this, trailing fmt text, space is lost. | 250 | /* DBU:[dave@cray.com] w/o this, trailing fmt text, space is lost. |
251 | * Skip subsequent text and up to the next % sign and tack the | 251 | * Skip subsequent text and up to the next % sign and tack the |
252 | * additional text onto fmt: eg. if fmt is "%x is a HEX number", | 252 | * additional text onto fmt: eg. if fmt is "%x is a HEX number", |
253 | * we lose the " is a HEX number" part of fmt. | 253 | * we lose the " is a HEX number" part of fmt. |
254 | */ | 254 | */ |
255 | for (p3 = p2; *p3 && *p3 != '%'; p3++); | 255 | for (p3 = p2; *p3 && *p3 != '%'; p3++); |
diff --git a/libbb/error_msg.c b/libbb/error_msg.c index dbb25b7c9..18811b8d1 100644 --- a/libbb/error_msg.c +++ b/libbb/error_msg.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/error_msg_and_die.c b/libbb/error_msg_and_die.c index 433f29d0f..0937658a3 100644 --- a/libbb/error_msg_and_die.c +++ b/libbb/error_msg_and_die.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/fgets_str.c b/libbb/fgets_str.c index 72fde58d1..bf828be95 100644 --- a/libbb/fgets_str.c +++ b/libbb/fgets_str.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) many different people. | 5 | * Copyright (C) many different people. |
6 | * If you wrote this, please acknowledge your work. | 6 | * If you wrote this, please acknowledge your work. |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
diff --git a/libbb/find_mount_point.c b/libbb/find_mount_point.c index b63203852..83824de9e 100644 --- a/libbb/find_mount_point.c +++ b/libbb/find_mount_point.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/find_pid_by_name.c b/libbb/find_pid_by_name.c index 77fa0179e..930710f32 100644 --- a/libbb/find_pid_by_name.c +++ b/libbb/find_pid_by_name.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
@@ -25,15 +25,15 @@ | |||
25 | #include <stdlib.h> | 25 | #include <stdlib.h> |
26 | #include "libbb.h" | 26 | #include "libbb.h" |
27 | 27 | ||
28 | #define COMM_LEN 16 /* synchronize with size of comm in struct task_struct | 28 | #define COMM_LEN 16 /* synchronize with size of comm in struct task_struct |
29 | in /usr/include/linux/sched.h */ | 29 | in /usr/include/linux/sched.h */ |
30 | 30 | ||
31 | 31 | ||
32 | /* find_pid_by_name() | 32 | /* find_pid_by_name() |
33 | * | 33 | * |
34 | * Modified by Vladimir Oleynik for use with libbb/procps.c | 34 | * Modified by Vladimir Oleynik for use with libbb/procps.c |
35 | * This finds the pid of the specified process. | 35 | * This finds the pid of the specified process. |
36 | * Currently, it's implemented by rummaging through | 36 | * Currently, it's implemented by rummaging through |
37 | * the proc filesystem. | 37 | * the proc filesystem. |
38 | * | 38 | * |
39 | * Returns a list of all matching PIDs | 39 | * Returns a list of all matching PIDs |
diff --git a/libbb/find_root_device.c b/libbb/find_root_device.c index 836ce44d5..81824a216 100644 --- a/libbb/find_root_device.c +++ b/libbb/find_root_device.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
@@ -35,7 +35,7 @@ extern char *find_real_root_device_name(const char* name) | |||
35 | char *fileName = NULL; | 35 | char *fileName = NULL; |
36 | dev_t dev; | 36 | dev_t dev; |
37 | 37 | ||
38 | if (stat("/", &rootStat) != 0) | 38 | if (stat("/", &rootStat) != 0) |
39 | bb_perror_msg("could not stat '/'"); | 39 | bb_perror_msg("could not stat '/'"); |
40 | else { | 40 | else { |
41 | /* This check is here in case they pass in /dev name */ | 41 | /* This check is here in case they pass in /dev name */ |
@@ -45,7 +45,7 @@ extern char *find_real_root_device_name(const char* name) | |||
45 | dev = rootStat.st_dev; | 45 | dev = rootStat.st_dev; |
46 | 46 | ||
47 | dir = opendir("/dev"); | 47 | dir = opendir("/dev"); |
48 | if (!dir) | 48 | if (!dir) |
49 | bb_perror_msg("could not open '/dev'"); | 49 | bb_perror_msg("could not open '/dev'"); |
50 | else { | 50 | else { |
51 | while((entry = readdir(dir)) != NULL) { | 51 | while((entry = readdir(dir)) != NULL) { |
@@ -59,9 +59,9 @@ extern char *find_real_root_device_name(const char* name) | |||
59 | 59 | ||
60 | /* Some char devices have the same dev_t as block | 60 | /* Some char devices have the same dev_t as block |
61 | * devices, so make sure this is a block device */ | 61 | * devices, so make sure this is a block device */ |
62 | if (stat(fileName, &statBuf) == 0 && | 62 | if (stat(fileName, &statBuf) == 0 && |
63 | S_ISBLK(statBuf.st_mode)!=0 && | 63 | S_ISBLK(statBuf.st_mode)!=0 && |
64 | statBuf.st_rdev == dev) | 64 | statBuf.st_rdev == dev) |
65 | break; | 65 | break; |
66 | free(fileName); | 66 | free(fileName); |
67 | fileName=NULL; | 67 | fileName=NULL; |
diff --git a/libbb/full_read.c b/libbb/full_read.c index f4b332dca..221fc947b 100644 --- a/libbb/full_read.c +++ b/libbb/full_read.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/full_write.c b/libbb/full_write.c index 30c7a5079..30de4078a 100644 --- a/libbb/full_write.c +++ b/libbb/full_write.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/get_console.c b/libbb/get_console.c index 0dc24cb78..bfb7468a8 100644 --- a/libbb/get_console.c +++ b/libbb/get_console.c | |||
@@ -29,7 +29,7 @@ | |||
29 | 29 | ||
30 | 30 | ||
31 | 31 | ||
32 | /* From <linux/kd.h> */ | 32 | /* From <linux/kd.h> */ |
33 | static const int KDGKBTYPE = 0x4B33; /* get keyboard type */ | 33 | static const int KDGKBTYPE = 0x4B33; /* get keyboard type */ |
34 | 34 | ||
35 | 35 | ||
diff --git a/libbb/get_line_from_file.c b/libbb/get_line_from_file.c index 9a831f184..6d12b21c4 100644 --- a/libbb/get_line_from_file.c +++ b/libbb/get_line_from_file.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) many different people. | 5 | * Copyright (C) many different people. |
6 | * If you wrote this, please acknowledge your work. | 6 | * If you wrote this, please acknowledge your work. |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
diff --git a/libbb/get_terminal_width_height.c b/libbb/get_terminal_width_height.c index 69f6a17e5..ef90463fb 100644 --- a/libbb/get_terminal_width_height.c +++ b/libbb/get_terminal_width_height.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Determine the width and height of the terminal. | 3 | * Determine the width and height of the terminal. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | /* It is perfectly ok to pass in a NULL for either width or for | 31 | /* It is perfectly ok to pass in a NULL for either width or for |
32 | * height, in which case that value will not be set. It is also | 32 | * height, in which case that value will not be set. It is also |
33 | * perfectly ok to have CONFIG_FEATURE_AUTOWIDTH disabled, in | 33 | * perfectly ok to have CONFIG_FEATURE_AUTOWIDTH disabled, in |
34 | * which case you will always get 80x24 */ | 34 | * which case you will always get 80x24 */ |
35 | void get_terminal_width_height(int fd, int *width, int *height) | 35 | void get_terminal_width_height(int fd, int *width, int *height) |
36 | { | 36 | { |
diff --git a/libbb/hash_fd.c b/libbb/hash_fd.c index e79d6d6f6..e37ac549a 100644 --- a/libbb/hash_fd.c +++ b/libbb/hash_fd.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (C) 2003 Glenn L. McGrath | 5 | * Copyright (C) 2003 Glenn L. McGrath |
6 | * Copyright (C) 2003 Erik Andersen | 6 | * Copyright (C) 2003 Erik Andersen |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
10 | * the Free Software Foundation; either version 2 of the License, or | 10 | * the Free Software Foundation; either version 2 of the License, or |
@@ -47,27 +47,27 @@ | |||
47 | 47 | ||
48 | LICENSE TERMS | 48 | LICENSE TERMS |
49 | 49 | ||
50 | The free distribution and use of this software in both source and binary | 50 | The free distribution and use of this software in both source and binary |
51 | form is allowed (with or without changes) provided that: | 51 | form is allowed (with or without changes) provided that: |
52 | 52 | ||
53 | 1. distributions of this source code include the above copyright | 53 | 1. distributions of this source code include the above copyright |
54 | notice, this list of conditions and the following disclaimer; | 54 | notice, this list of conditions and the following disclaimer; |
55 | 55 | ||
56 | 2. distributions in binary form include the above copyright | 56 | 2. distributions in binary form include the above copyright |
57 | notice, this list of conditions and the following disclaimer | 57 | notice, this list of conditions and the following disclaimer |
58 | in the documentation and/or other associated materials; | 58 | in the documentation and/or other associated materials; |
59 | 59 | ||
60 | 3. the copyright holder's name is not used to endorse products | 60 | 3. the copyright holder's name is not used to endorse products |
61 | built using this software without specific written permission. | 61 | built using this software without specific written permission. |
62 | 62 | ||
63 | ALTERNATIVELY, provided that this notice is retained in full, this product | 63 | ALTERNATIVELY, provided that this notice is retained in full, this product |
64 | may be distributed under the terms of the GNU General Public License (GPL), | 64 | may be distributed under the terms of the GNU General Public License (GPL), |
65 | in which case the provisions of the GPL apply INSTEAD OF those given above. | 65 | in which case the provisions of the GPL apply INSTEAD OF those given above. |
66 | 66 | ||
67 | DISCLAIMER | 67 | DISCLAIMER |
68 | 68 | ||
69 | This software is provided 'as is' with no explicit or implied warranties | 69 | This software is provided 'as is' with no explicit or implied warranties |
70 | in respect of its properties, including, but not limited to, correctness | 70 | in respect of its properties, including, but not limited to, correctness |
71 | and/or fitness for purpose. | 71 | and/or fitness for purpose. |
72 | --------------------------------------------------------------------------- | 72 | --------------------------------------------------------------------------- |
73 | Issue Date: 10/11/2002 | 73 | Issue Date: 10/11/2002 |
@@ -805,7 +805,7 @@ extern int hash_fd(int src_fd, const size_t size, const uint8_t hash_algo, | |||
805 | cx = &md5_cx; | 805 | cx = &md5_cx; |
806 | } | 806 | } |
807 | #endif | 807 | #endif |
808 | 808 | ||
809 | /* Initialize the computation context. */ | 809 | /* Initialize the computation context. */ |
810 | #ifdef CONFIG_SHA1SUM | 810 | #ifdef CONFIG_SHA1SUM |
811 | if (hash_algo == HASH_SHA1) { | 811 | if (hash_algo == HASH_SHA1) { |
diff --git a/libbb/herror_msg.c b/libbb/herror_msg.c index fb2a17b73..87ec15acc 100644 --- a/libbb/herror_msg.c +++ b/libbb/herror_msg.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/herror_msg_and_die.c b/libbb/herror_msg_and_die.c index b53a56de8..5c765f1be 100644 --- a/libbb/herror_msg_and_die.c +++ b/libbb/herror_msg_and_die.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/human_readable.c b/libbb/human_readable.c index 656889150..ad9025c08 100644 --- a/libbb/human_readable.c +++ b/libbb/human_readable.c | |||
@@ -13,8 +13,8 @@ | |||
13 | * representations (say, powers of 1024) and manipulating coefficients. | 13 | * representations (say, powers of 1024) and manipulating coefficients. |
14 | * The base ten "bytes" output could be handled similarly. | 14 | * The base ten "bytes" output could be handled similarly. |
15 | * | 15 | * |
16 | * 2) This routine always outputs a decimal point and a tenths digit when | 16 | * 2) This routine always outputs a decimal point and a tenths digit when |
17 | * display_unit != 0. Hence, it isn't uncommon for the returned string | 17 | * display_unit != 0. Hence, it isn't uncommon for the returned string |
18 | * to have a length of 5 or 6. | 18 | * to have a length of 5 or 6. |
19 | * | 19 | * |
20 | * It might be nice to add a flag to indicate no decimal digits in | 20 | * It might be nice to add a flag to indicate no decimal digits in |
@@ -28,7 +28,7 @@ | |||
28 | #include <stdio.h> | 28 | #include <stdio.h> |
29 | #include "libbb.h" | 29 | #include "libbb.h" |
30 | 30 | ||
31 | const char *make_human_readable_str(unsigned long long size, | 31 | const char *make_human_readable_str(unsigned long long size, |
32 | unsigned long block_size, unsigned long display_unit) | 32 | unsigned long block_size, unsigned long display_unit) |
33 | { | 33 | { |
34 | /* The code will adjust for additional (appended) units. */ | 34 | /* The code will adjust for additional (appended) units. */ |
@@ -37,7 +37,7 @@ const char *make_human_readable_str(unsigned long long size, | |||
37 | static const char fmt_tenths[] = "%Lu.%d%c"; | 37 | static const char fmt_tenths[] = "%Lu.%d%c"; |
38 | 38 | ||
39 | static char str[21]; /* Sufficient for 64 bit unsigned integers. */ | 39 | static char str[21]; /* Sufficient for 64 bit unsigned integers. */ |
40 | 40 | ||
41 | unsigned long long val; | 41 | unsigned long long val; |
42 | int frac; | 42 | int frac; |
43 | const char *u; | 43 | const char *u; |
diff --git a/libbb/inode_hash.c b/libbb/inode_hash.c index ea82e8ce6..fbcd81327 100644 --- a/libbb/inode_hash.c +++ b/libbb/inode_hash.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) many different people. | 5 | * Copyright (C) many different people. |
6 | * If you wrote this, please acknowledge your work. | 6 | * If you wrote this, please acknowledge your work. |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
@@ -69,7 +69,7 @@ void add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name) | |||
69 | int i; | 69 | int i; |
70 | size_t s; | 70 | size_t s; |
71 | ino_dev_hashtable_bucket_t *bucket; | 71 | ino_dev_hashtable_bucket_t *bucket; |
72 | 72 | ||
73 | i = hash_inode(statbuf->st_ino); | 73 | i = hash_inode(statbuf->st_ino); |
74 | s = name ? strlen(name) : 0; | 74 | s = name ? strlen(name) : 0; |
75 | bucket = xmalloc(sizeof(ino_dev_hashtable_bucket_t) + s); | 75 | bucket = xmalloc(sizeof(ino_dev_hashtable_bucket_t) + s); |
diff --git a/libbb/interface.c b/libbb/interface.c index 28007f443..f44e866df 100644 --- a/libbb/interface.c +++ b/libbb/interface.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * stolen from net-tools-1.59 and stripped down for busybox by | 2 | * stolen from net-tools-1.59 and stripped down for busybox by |
3 | * Erik Andersen <andersen@codepoet.org> | 3 | * Erik Andersen <andersen@codepoet.org> |
4 | * | 4 | * |
5 | * Heavily modified by Manuel Novoa III Mar 12, 2001 | 5 | * Heavily modified by Manuel Novoa III Mar 12, 2001 |
@@ -15,7 +15,7 @@ | |||
15 | * that either displays or sets the characteristics of | 15 | * that either displays or sets the characteristics of |
16 | * one or more of the system's networking interfaces. | 16 | * one or more of the system's networking interfaces. |
17 | * | 17 | * |
18 | * Version: $Id: interface.c,v 1.20 2003/08/29 11:34:08 bug1 Exp $ | 18 | * Version: $Id: interface.c,v 1.21 2004/03/15 08:28:42 andersen Exp $ |
19 | * | 19 | * |
20 | * Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> | 20 | * Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> |
21 | * and others. Copyright 1993 MicroWalt Corporation | 21 | * and others. Copyright 1993 MicroWalt Corporation |
@@ -31,17 +31,17 @@ | |||
31 | * | 31 | * |
32 | * {1.34} - 19980630 - Arnaldo Carvalho de Melo <acme@conectiva.com.br> | 32 | * {1.34} - 19980630 - Arnaldo Carvalho de Melo <acme@conectiva.com.br> |
33 | * - gettext instead of catgets for i18n | 33 | * - gettext instead of catgets for i18n |
34 | * 10/1998 - Andi Kleen. Use interface list primitives. | 34 | * 10/1998 - Andi Kleen. Use interface list primitives. |
35 | * 20001008 - Bernd Eckenfels, Patch from RH for setting mtu | 35 | * 20001008 - Bernd Eckenfels, Patch from RH for setting mtu |
36 | * (default AF was wrong) | 36 | * (default AF was wrong) |
37 | */ | 37 | */ |
38 | 38 | ||
39 | /* #define KEEP_UNUSED */ | 39 | /* #define KEEP_UNUSED */ |
40 | 40 | ||
41 | /* | 41 | /* |
42 | * | 42 | * |
43 | * Protocol Families. | 43 | * Protocol Families. |
44 | * | 44 | * |
45 | */ | 45 | */ |
46 | #define HAVE_AFINET 1 | 46 | #define HAVE_AFINET 1 |
47 | #undef HAVE_AFIPX | 47 | #undef HAVE_AFIPX |
@@ -51,10 +51,10 @@ | |||
51 | #undef HAVE_AFECONET | 51 | #undef HAVE_AFECONET |
52 | #undef HAVE_AFASH | 52 | #undef HAVE_AFASH |
53 | 53 | ||
54 | /* | 54 | /* |
55 | * | 55 | * |
56 | * Device Hardware types. | 56 | * Device Hardware types. |
57 | * | 57 | * |
58 | */ | 58 | */ |
59 | #define HAVE_HWETHER 1 | 59 | #define HAVE_HWETHER 1 |
60 | #define HAVE_HWPPP 1 | 60 | #define HAVE_HWPPP 1 |
@@ -1822,7 +1822,7 @@ static void ife_print(struct interface *ptr) | |||
1822 | hw = get_hwntype(-1); | 1822 | hw = get_hwntype(-1); |
1823 | 1823 | ||
1824 | printf(_("%-9.9s Link encap:%s "), ptr->name, _(hw->title)); | 1824 | printf(_("%-9.9s Link encap:%s "), ptr->name, _(hw->title)); |
1825 | /* For some hardware types (eg Ash, ATM) we don't print the | 1825 | /* For some hardware types (eg Ash, ATM) we don't print the |
1826 | hardware address if it's null. */ | 1826 | hardware address if it's null. */ |
1827 | if (hw->print != NULL && (!(hw_null_address(hw, ptr->hwaddr) && | 1827 | if (hw->print != NULL && (!(hw_null_address(hw, ptr->hwaddr) && |
1828 | hw->suppress_null_addr))) | 1828 | hw->suppress_null_addr))) |
@@ -2011,7 +2011,7 @@ static void ife_print(struct interface *ptr) | |||
2011 | printf(" "); | 2011 | printf(" "); |
2012 | if (ptr->map.irq) | 2012 | if (ptr->map.irq) |
2013 | printf(_("Interrupt:%d "), ptr->map.irq); | 2013 | printf(_("Interrupt:%d "), ptr->map.irq); |
2014 | if (ptr->map.base_addr >= 0x100) /* Only print devices using it for | 2014 | if (ptr->map.base_addr >= 0x100) /* Only print devices using it for |
2015 | I/O maps */ | 2015 | I/O maps */ |
2016 | printf(_("Base address:0x%lx "), | 2016 | printf(_("Base address:0x%lx "), |
2017 | (unsigned long) ptr->map.base_addr); | 2017 | (unsigned long) ptr->map.base_addr); |
diff --git a/libbb/isdirectory.c b/libbb/isdirectory.c index e9b106aa3..f3caaf178 100644 --- a/libbb/isdirectory.c +++ b/libbb/isdirectory.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Based in part on code from sash, Copyright (c) 1999 by David I. Bell | 5 | * Based in part on code from sash, Copyright (c) 1999 by David I. Bell |
6 | * Permission has been granted to redistribute this code under the GPL. | 6 | * Permission has been granted to redistribute this code under the GPL. |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
diff --git a/libbb/kernel_version.c b/libbb/kernel_version.c index 740ac523c..e01aafa25 100644 --- a/libbb/kernel_version.c +++ b/libbb/kernel_version.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/loop.c b/libbb/loop.c index 4d73dc4cc..81d1f0ab6 100644 --- a/libbb/loop.c +++ b/libbb/loop.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/messages.c b/libbb/messages.c index adfd1ffcc..671c452d2 100644 --- a/libbb/messages.c +++ b/libbb/messages.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | /* | 2 | /* |
3 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 3 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/module_syscalls.c b/libbb/module_syscalls.c index 81fb8f255..a2ff5284a 100644 --- a/libbb/module_syscalls.c +++ b/libbb/module_syscalls.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * some system calls possibly missing from libc | 3 | * some system calls possibly missing from libc |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/mtab.c b/libbb/mtab.c index a62169a26..528422567 100644 --- a/libbb/mtab.c +++ b/libbb/mtab.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/mtab_file.c b/libbb/mtab_file.c index 58b0f66e2..42504e81f 100644 --- a/libbb/mtab_file.c +++ b/libbb/mtab_file.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
@@ -23,8 +23,8 @@ | |||
23 | #include "libbb.h" | 23 | #include "libbb.h" |
24 | 24 | ||
25 | 25 | ||
26 | /* Busybox mount uses either /proc/mounts or /etc/mtab to | 26 | /* Busybox mount uses either /proc/mounts or /etc/mtab to |
27 | * get the list of currently mounted filesystems */ | 27 | * get the list of currently mounted filesystems */ |
28 | #if defined CONFIG_FEATURE_MTAB_SUPPORT | 28 | #if defined CONFIG_FEATURE_MTAB_SUPPORT |
29 | const char bb_path_mtab_file[] = CONFIG_FEATURE_MTAB_FILENAME; | 29 | const char bb_path_mtab_file[] = CONFIG_FEATURE_MTAB_FILENAME; |
30 | #else | 30 | #else |
diff --git a/libbb/my_getgrgid.c b/libbb/my_getgrgid.c index 5a36c890d..907a47486 100644 --- a/libbb/my_getgrgid.c +++ b/libbb/my_getgrgid.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/my_getgrnam.c b/libbb/my_getgrnam.c index 906727b76..22a617cc8 100644 --- a/libbb/my_getgrnam.c +++ b/libbb/my_getgrnam.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/my_getpwnam.c b/libbb/my_getpwnam.c index 57c2a01ec..a9fd0cd09 100644 --- a/libbb/my_getpwnam.c +++ b/libbb/my_getpwnam.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/my_getpwnamegid.c b/libbb/my_getpwnamegid.c index 1dd5674ec..d1457900e 100644 --- a/libbb/my_getpwnamegid.c +++ b/libbb/my_getpwnamegid.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/my_getpwuid.c b/libbb/my_getpwuid.c index ec2fcce74..21a037f75 100644 --- a/libbb/my_getpwuid.c +++ b/libbb/my_getpwuid.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/parse_mode.c b/libbb/parse_mode.c index 7132c76ef..185957bc3 100644 --- a/libbb/parse_mode.c +++ b/libbb/parse_mode.c | |||
@@ -31,7 +31,7 @@ | |||
31 | 31 | ||
32 | extern int bb_parse_mode(const char *s, mode_t *current_mode) | 32 | extern int bb_parse_mode(const char *s, mode_t *current_mode) |
33 | { | 33 | { |
34 | static const mode_t who_mask[] = { | 34 | static const mode_t who_mask[] = { |
35 | S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO, /* a */ | 35 | S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO, /* a */ |
36 | S_ISUID | S_IRWXU, /* u */ | 36 | S_ISUID | S_IRWXU, /* u */ |
37 | S_ISGID | S_IRWXG, /* g */ | 37 | S_ISGID | S_IRWXG, /* g */ |
diff --git a/libbb/parse_number.c b/libbb/parse_number.c index 92ad6a216..5262239ff 100644 --- a/libbb/parse_number.c +++ b/libbb/parse_number.c | |||
@@ -34,7 +34,7 @@ unsigned long bb_xparse_number(const char *numstr, | |||
34 | unsigned long int r; | 34 | unsigned long int r; |
35 | char *e; | 35 | char *e; |
36 | int old_errno; | 36 | int old_errno; |
37 | 37 | ||
38 | /* Since this is a lib function, we're not allowed to reset errno to 0. | 38 | /* Since this is a lib function, we're not allowed to reset errno to 0. |
39 | * Doing so could break an app that is deferring checking of errno. | 39 | * Doing so could break an app that is deferring checking of errno. |
40 | * So, save the old value so that we can restore it if successful. */ | 40 | * So, save the old value so that we can restore it if successful. */ |
diff --git a/libbb/perror_msg.c b/libbb/perror_msg.c index 0928e4371..8ba053188 100644 --- a/libbb/perror_msg.c +++ b/libbb/perror_msg.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/perror_msg_and_die.c b/libbb/perror_msg_and_die.c index 122f3972b..15bf0421e 100644 --- a/libbb/perror_msg_and_die.c +++ b/libbb/perror_msg_and_die.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/print_file.c b/libbb/print_file.c index 161b398fa..bd7108d2f 100644 --- a/libbb/print_file.c +++ b/libbb/print_file.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/printf.c b/libbb/printf.c index 3e69331c5..3c438b2c9 100644 --- a/libbb/printf.c +++ b/libbb/printf.c | |||
@@ -46,7 +46,7 @@ | |||
46 | #include <stdarg.h> | 46 | #include <stdarg.h> |
47 | #include "libbb.h" | 47 | #include "libbb.h" |
48 | 48 | ||
49 | #if defined(__UCLIBC__) | 49 | #if defined(__UCLIBC__) |
50 | 50 | ||
51 | # if defined(__FLAG_ERROR) | 51 | # if defined(__FLAG_ERROR) |
52 | /* Using my newer stdio implementation. Unlocked macros are: | 52 | /* Using my newer stdio implementation. Unlocked macros are: |
diff --git a/libbb/process_escape_sequence.c b/libbb/process_escape_sequence.c index ef2717bdd..f5ac500fa 100644 --- a/libbb/process_escape_sequence.c +++ b/libbb/process_escape_sequence.c | |||
@@ -19,7 +19,7 @@ | |||
19 | * along with this program; if not, write to the Free Software | 19 | * along with this program; if not, write to the Free Software |
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 | * | 21 | * |
22 | * | 22 | * |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <stdio.h> | 25 | #include <stdio.h> |
@@ -37,7 +37,7 @@ char bb_process_escape_sequence(const char **ptr) | |||
37 | unsigned int num_digits; | 37 | unsigned int num_digits; |
38 | unsigned int r; | 38 | unsigned int r; |
39 | unsigned int n; | 39 | unsigned int n; |
40 | 40 | ||
41 | n = 0; | 41 | n = 0; |
42 | q = *ptr; | 42 | q = *ptr; |
43 | 43 | ||
diff --git a/libbb/pw_encrypt.c b/libbb/pw_encrypt.c index ce6078539..727149d0c 100644 --- a/libbb/pw_encrypt.c +++ b/libbb/pw_encrypt.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routine. | 3 | * Utility routine. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/read_package_field.c b/libbb/read_package_field.c index abe8e06fd..4292689ca 100644 --- a/libbb/read_package_field.c +++ b/libbb/read_package_field.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) many different people. | 5 | * Copyright (C) many different people. |
6 | * If you wrote this, please acknowledge your work. | 6 | * If you wrote this, please acknowledge your work. |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
diff --git a/libbb/recursive_action.c b/libbb/recursive_action.c index 6ee59e8f1..d27629829 100644 --- a/libbb/recursive_action.c +++ b/libbb/recursive_action.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
@@ -30,12 +30,12 @@ | |||
30 | 30 | ||
31 | 31 | ||
32 | /* | 32 | /* |
33 | * Walk down all the directories under the specified | 33 | * Walk down all the directories under the specified |
34 | * location, and do something (something specified | 34 | * location, and do something (something specified |
35 | * by the fileAction and dirAction function pointers). | 35 | * by the fileAction and dirAction function pointers). |
36 | * | 36 | * |
37 | * Unfortunately, while nftw(3) could replace this and reduce | 37 | * Unfortunately, while nftw(3) could replace this and reduce |
38 | * code size a bit, nftw() wasn't supported before GNU libc 2.1, | 38 | * code size a bit, nftw() wasn't supported before GNU libc 2.1, |
39 | * and so isn't sufficiently portable to take over since glibc2.1 | 39 | * and so isn't sufficiently portable to take over since glibc2.1 |
40 | * is so stinking huge. | 40 | * is so stinking huge. |
41 | */ | 41 | */ |
diff --git a/libbb/run_parts.c b/libbb/run_parts.c index 0eb766086..607b84190 100644 --- a/libbb/run_parts.c +++ b/libbb/run_parts.c | |||
@@ -111,7 +111,7 @@ extern int run_parts(char **args, const unsigned char test_mode, char **env) | |||
111 | exitstatus = 1; | 111 | exitstatus = 1; |
112 | } | 112 | } |
113 | } | 113 | } |
114 | } | 114 | } |
115 | else if (!S_ISDIR(st.st_mode)) { | 115 | else if (!S_ISDIR(st.st_mode)) { |
116 | bb_error_msg("component %s is not an executable plain file", filename); | 116 | bb_error_msg("component %s is not an executable plain file", filename); |
117 | exitstatus = 1; | 117 | exitstatus = 1; |
@@ -121,6 +121,6 @@ extern int run_parts(char **args, const unsigned char test_mode, char **env) | |||
121 | free(filename); | 121 | free(filename); |
122 | } | 122 | } |
123 | free(namelist); | 123 | free(namelist); |
124 | 124 | ||
125 | return(exitstatus); | 125 | return(exitstatus); |
126 | } | 126 | } |
diff --git a/libbb/run_shell.c b/libbb/run_shell.c index 4855d763e..993b4e711 100644 --- a/libbb/run_shell.c +++ b/libbb/run_shell.c | |||
@@ -54,20 +54,20 @@ void run_shell ( const char *shell, int loginshell, const char *command, const c | |||
54 | const char **args; | 54 | const char **args; |
55 | int argno = 1; | 55 | int argno = 1; |
56 | int additional_args_cnt = 0; | 56 | int additional_args_cnt = 0; |
57 | 57 | ||
58 | for ( args = additional_args; args && *args; args++ ) | 58 | for ( args = additional_args; args && *args; args++ ) |
59 | additional_args_cnt++; | 59 | additional_args_cnt++; |
60 | 60 | ||
61 | args = (const char **) xmalloc (sizeof (char *) * ( 4 + additional_args_cnt )); | 61 | args = (const char **) xmalloc (sizeof (char *) * ( 4 + additional_args_cnt )); |
62 | 62 | ||
63 | args [0] = bb_get_last_path_component ( bb_xstrdup ( shell )); | 63 | args [0] = bb_get_last_path_component ( bb_xstrdup ( shell )); |
64 | 64 | ||
65 | if ( loginshell ) { | 65 | if ( loginshell ) { |
66 | char *args0; | 66 | char *args0; |
67 | bb_xasprintf ( &args0, "-%s", args [0] ); | 67 | bb_xasprintf ( &args0, "-%s", args [0] ); |
68 | args [0] = args0; | 68 | args [0] = args0; |
69 | } | 69 | } |
70 | 70 | ||
71 | if ( command ) { | 71 | if ( command ) { |
72 | args [argno++] = "-c"; | 72 | args [argno++] = "-c"; |
73 | args [argno++] = command; | 73 | args [argno++] = command; |
diff --git a/libbb/safe_read.c b/libbb/safe_read.c index 67f3268c5..92e1d8a4b 100644 --- a/libbb/safe_read.c +++ b/libbb/safe_read.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/safe_strncpy.c b/libbb/safe_strncpy.c index 08a2a0d9c..2016e6b52 100644 --- a/libbb/safe_strncpy.c +++ b/libbb/safe_strncpy.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
@@ -24,11 +24,11 @@ | |||
24 | 24 | ||
25 | 25 | ||
26 | 26 | ||
27 | /* Like strncpy but make sure the resulting string is always 0 terminated. */ | 27 | /* Like strncpy but make sure the resulting string is always 0 terminated. */ |
28 | extern char * safe_strncpy(char *dst, const char *src, size_t size) | 28 | extern char * safe_strncpy(char *dst, const char *src, size_t size) |
29 | { | 29 | { |
30 | dst[size-1] = '\0'; | 30 | dst[size-1] = '\0'; |
31 | return strncpy(dst, src, size-1); | 31 | return strncpy(dst, src, size-1); |
32 | } | 32 | } |
33 | 33 | ||
34 | 34 | ||
diff --git a/libbb/safe_write.c b/libbb/safe_write.c index 0ac6c2d96..201ea1cd3 100644 --- a/libbb/safe_write.c +++ b/libbb/safe_write.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/setup_environment.c b/libbb/setup_environment.c index b18f8967e..aeb285a53 100644 --- a/libbb/setup_environment.c +++ b/libbb/setup_environment.c | |||
@@ -52,13 +52,13 @@ void setup_environment ( const char *shell, int loginshell, int changeenv, const | |||
52 | { | 52 | { |
53 | if ( loginshell ) { | 53 | if ( loginshell ) { |
54 | const char *term; | 54 | const char *term; |
55 | 55 | ||
56 | /* Change the current working directory to be the home directory | 56 | /* Change the current working directory to be the home directory |
57 | * of the user. It is a fatal error for this process to be unable | 57 | * of the user. It is a fatal error for this process to be unable |
58 | * to change to that directory. There is no "default" home | 58 | * to change to that directory. There is no "default" home |
59 | * directory. | 59 | * directory. |
60 | * Some systems default to HOME=/ | 60 | * Some systems default to HOME=/ |
61 | */ | 61 | */ |
62 | if ( chdir ( pw-> pw_dir )) { | 62 | if ( chdir ( pw-> pw_dir )) { |
63 | if ( chdir ( "/" )) { | 63 | if ( chdir ( "/" )) { |
64 | syslog ( LOG_WARNING, "unable to cd to %s' for user %s'\n", pw-> pw_dir, pw-> pw_name ); | 64 | syslog ( LOG_WARNING, "unable to cd to %s' for user %s'\n", pw-> pw_dir, pw-> pw_name ); |
diff --git a/libbb/syscalls.c b/libbb/syscalls.c index 8ceb35695..9e89dbd39 100644 --- a/libbb/syscalls.c +++ b/libbb/syscalls.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * some system calls possibly missing from libc | 3 | * some system calls possibly missing from libc |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/syslog_msg_with_name.c b/libbb/syslog_msg_with_name.c index 4b530416a..ac472dbda 100644 --- a/libbb/syslog_msg_with_name.c +++ b/libbb/syslog_msg_with_name.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/trim.c b/libbb/trim.c index 75e7c2d43..38aa28231 100644 --- a/libbb/trim.c +++ b/libbb/trim.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) many different people. | 5 | * Copyright (C) many different people. |
6 | * If you wrote this, please acknowledge your work. | 6 | * If you wrote this, please acknowledge your work. |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
diff --git a/libbb/u_signal_names.c b/libbb/u_signal_names.c index 681358414..be444a97b 100644 --- a/libbb/u_signal_names.c +++ b/libbb/u_signal_names.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) many different people. | 5 | * Copyright (C) many different people. |
6 | * If you wrote this, please acknowledge your work. | 6 | * If you wrote this, please acknowledge your work. |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
diff --git a/libbb/vdprintf.c b/libbb/vdprintf.c index 2a19dd182..53fdbd37a 100644 --- a/libbb/vdprintf.c +++ b/libbb/vdprintf.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/verror_msg.c b/libbb/verror_msg.c index 9270290cd..07b37e4ad 100644 --- a/libbb/verror_msg.c +++ b/libbb/verror_msg.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/vfork_daemon_rexec.c b/libbb/vfork_daemon_rexec.c index 2fd70ba1a..0601121ad 100644 --- a/libbb/vfork_daemon_rexec.c +++ b/libbb/vfork_daemon_rexec.c | |||
@@ -40,9 +40,9 @@ void vfork_daemon_rexec(int nochdir, int noclose, | |||
40 | int fd; | 40 | int fd; |
41 | char **vfork_args; | 41 | char **vfork_args; |
42 | int a = 0; | 42 | int a = 0; |
43 | 43 | ||
44 | setsid(); | 44 | setsid(); |
45 | 45 | ||
46 | if (!nochdir) | 46 | if (!nochdir) |
47 | chdir("/"); | 47 | chdir("/"); |
48 | 48 | ||
@@ -73,6 +73,6 @@ void vfork_daemon_rexec(int nochdir, int noclose, | |||
73 | bb_perror_msg_and_die("vfork"); | 73 | bb_perror_msg_and_die("vfork"); |
74 | default: /* parent */ | 74 | default: /* parent */ |
75 | exit(0); | 75 | exit(0); |
76 | } | 76 | } |
77 | } | 77 | } |
78 | #endif /* uClinux */ | 78 | #endif /* uClinux */ |
diff --git a/libbb/vherror_msg.c b/libbb/vherror_msg.c index ffdfd5283..1560eb595 100644 --- a/libbb/vherror_msg.c +++ b/libbb/vherror_msg.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/vperror_msg.c b/libbb/vperror_msg.c index cd48af259..5c446967a 100644 --- a/libbb/vperror_msg.c +++ b/libbb/vperror_msg.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/wfopen.c b/libbb/wfopen.c index 368451c52..ab77cb19e 100644 --- a/libbb/wfopen.c +++ b/libbb/wfopen.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/libbb/xconnect.c b/libbb/xconnect.c index 2443bb299..4cd22c74f 100644 --- a/libbb/xconnect.c +++ b/libbb/xconnect.c | |||
@@ -64,7 +64,7 @@ int xconnect(struct sockaddr_in *s_addr) | |||
64 | int s = socket(AF_INET, SOCK_STREAM, 0); | 64 | int s = socket(AF_INET, SOCK_STREAM, 0); |
65 | if (connect(s, (struct sockaddr_in *)s_addr, sizeof(struct sockaddr_in)) < 0) | 65 | if (connect(s, (struct sockaddr_in *)s_addr, sizeof(struct sockaddr_in)) < 0) |
66 | { | 66 | { |
67 | bb_perror_msg_and_die("Unable to connect to remote host (%s)", | 67 | bb_perror_msg_and_die("Unable to connect to remote host (%s)", |
68 | inet_ntoa(s_addr->sin_addr)); | 68 | inet_ntoa(s_addr->sin_addr)); |
69 | } | 69 | } |
70 | return s; | 70 | return s; |
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c index da3775a59..01b2f87bc 100644 --- a/libbb/xfuncs.c +++ b/libbb/xfuncs.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
@@ -85,7 +85,7 @@ extern char * bb_xstrndup (const char *s, int n) { | |||
85 | bb_error_msg_and_die("bb_xstrndup bug"); | 85 | bb_error_msg_and_die("bb_xstrndup bug"); |
86 | 86 | ||
87 | t = xmalloc(++n); | 87 | t = xmalloc(++n); |
88 | 88 | ||
89 | return safe_strncpy(t,s,n); | 89 | return safe_strncpy(t,s,n); |
90 | } | 90 | } |
91 | #endif | 91 | #endif |
@@ -104,7 +104,7 @@ FILE *bb_xfopen(const char *path, const char *mode) | |||
104 | extern int bb_xopen(const char *pathname, int flags) | 104 | extern int bb_xopen(const char *pathname, int flags) |
105 | { | 105 | { |
106 | int ret; | 106 | int ret; |
107 | 107 | ||
108 | ret = open(pathname, flags, 0777); | 108 | ret = open(pathname, flags, 0777); |
109 | if (ret == -1) { | 109 | if (ret == -1) { |
110 | bb_perror_msg_and_die("%s", pathname); | 110 | bb_perror_msg_and_die("%s", pathname); |
@@ -146,10 +146,10 @@ extern void bb_xread_all(int fd, void *buf, size_t count) | |||
146 | extern unsigned char bb_xread_char(int fd) | 146 | extern unsigned char bb_xread_char(int fd) |
147 | { | 147 | { |
148 | char tmp; | 148 | char tmp; |
149 | 149 | ||
150 | bb_xread_all(fd, &tmp, 1); | 150 | bb_xread_all(fd, &tmp, 1); |
151 | 151 | ||
152 | return(tmp); | 152 | return(tmp); |
153 | } | 153 | } |
154 | #endif | 154 | #endif |
155 | 155 | ||
diff --git a/libbb/xgetlarg.c b/libbb/xgetlarg.c index ed5d3eb4f..56fb60e82 100644 --- a/libbb/xgetlarg.c +++ b/libbb/xgetlarg.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | /* | 2 | /* |
3 | * Copyright (C) 2003 Erik Andersen <andersen@codepoet.org> | 3 | * Copyright (C) 2003-2004 Erik Andersen <andersen@codepoet.org> |
4 | */ | 4 | */ |
5 | 5 | ||
6 | 6 | ||
diff --git a/libbb/xgetularg.c b/libbb/xgetularg.c index d743520c3..e90085446 100644 --- a/libbb/xgetularg.c +++ b/libbb/xgetularg.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include "libbb.h" | 29 | #include "libbb.h" |
30 | 30 | ||
31 | #ifdef L_xgetularg_bnd_sfx | 31 | #ifdef L_xgetularg_bnd_sfx |
32 | extern | 32 | extern |
33 | unsigned long bb_xgetularg_bnd_sfx(const char *arg, int base, | 33 | unsigned long bb_xgetularg_bnd_sfx(const char *arg, int base, |
34 | unsigned long lower, | 34 | unsigned long lower, |
35 | unsigned long upper, | 35 | unsigned long upper, |
@@ -61,7 +61,7 @@ unsigned long bb_xgetularg_bnd_sfx(const char *arg, int base, | |||
61 | bb_show_usage(); | 61 | bb_show_usage(); |
62 | } | 62 | } |
63 | errno = old_errno; /* Ok. So restore errno. */ | 63 | errno = old_errno; /* Ok. So restore errno. */ |
64 | 64 | ||
65 | /* Do optional suffix parsing. Allow 'empty' suffix tables. | 65 | /* Do optional suffix parsing. Allow 'empty' suffix tables. |
66 | * Note that we also all nul suffixes with associated multipliers, | 66 | * Note that we also all nul suffixes with associated multipliers, |
67 | * to allow for scaling of the arg by some default multiplier. */ | 67 | * to allow for scaling of the arg by some default multiplier. */ |
@@ -78,7 +78,7 @@ unsigned long bb_xgetularg_bnd_sfx(const char *arg, int base, | |||
78 | } | 78 | } |
79 | ++suffixes; | 79 | ++suffixes; |
80 | } | 80 | } |
81 | } | 81 | } |
82 | 82 | ||
83 | /* Finally, check for illegal trailing chars and range limits. */ | 83 | /* Finally, check for illegal trailing chars and range limits. */ |
84 | /* Note: although we allow leading space (via stroul), trailing space | 84 | /* Note: although we allow leading space (via stroul), trailing space |
@@ -92,7 +92,7 @@ unsigned long bb_xgetularg_bnd_sfx(const char *arg, int base, | |||
92 | #endif | 92 | #endif |
93 | 93 | ||
94 | #ifdef L_xgetlarg_bnd_sfx | 94 | #ifdef L_xgetlarg_bnd_sfx |
95 | extern | 95 | extern |
96 | long bb_xgetlarg_bnd_sfx(const char *arg, int base, | 96 | long bb_xgetlarg_bnd_sfx(const char *arg, int base, |
97 | long lower, | 97 | long lower, |
98 | long upper, | 98 | long upper, |
@@ -124,7 +124,7 @@ long bb_xgetlarg_bnd_sfx(const char *arg, int base, | |||
124 | #endif | 124 | #endif |
125 | 125 | ||
126 | #ifdef L_getlarg10_sfx | 126 | #ifdef L_getlarg10_sfx |
127 | extern | 127 | extern |
128 | long bb_xgetlarg10_sfx(const char *arg, const struct suffix_mult *suffixes) | 128 | long bb_xgetlarg10_sfx(const char *arg, const struct suffix_mult *suffixes) |
129 | { | 129 | { |
130 | return bb_xgetlarg_bnd_sfx(arg, 10, LONG_MIN, LONG_MAX, suffixes); | 130 | return bb_xgetlarg_bnd_sfx(arg, 10, LONG_MIN, LONG_MAX, suffixes); |
@@ -132,7 +132,7 @@ long bb_xgetlarg10_sfx(const char *arg, const struct suffix_mult *suffixes) | |||
132 | #endif | 132 | #endif |
133 | 133 | ||
134 | #ifdef L_xgetularg_bnd | 134 | #ifdef L_xgetularg_bnd |
135 | extern | 135 | extern |
136 | unsigned long bb_xgetularg_bnd(const char *arg, int base, | 136 | unsigned long bb_xgetularg_bnd(const char *arg, int base, |
137 | unsigned long lower, | 137 | unsigned long lower, |
138 | unsigned long upper) | 138 | unsigned long upper) |
@@ -142,7 +142,7 @@ unsigned long bb_xgetularg_bnd(const char *arg, int base, | |||
142 | #endif | 142 | #endif |
143 | 143 | ||
144 | #ifdef L_xgetularg10_bnd | 144 | #ifdef L_xgetularg10_bnd |
145 | extern | 145 | extern |
146 | unsigned long bb_xgetularg10_bnd(const char *arg, | 146 | unsigned long bb_xgetularg10_bnd(const char *arg, |
147 | unsigned long lower, | 147 | unsigned long lower, |
148 | unsigned long upper) | 148 | unsigned long upper) |
@@ -152,7 +152,7 @@ unsigned long bb_xgetularg10_bnd(const char *arg, | |||
152 | #endif | 152 | #endif |
153 | 153 | ||
154 | #ifdef L_xgetularg10 | 154 | #ifdef L_xgetularg10 |
155 | extern | 155 | extern |
156 | unsigned long bb_xgetularg10(const char *arg) | 156 | unsigned long bb_xgetularg10(const char *arg) |
157 | { | 157 | { |
158 | return bb_xgetularg10_bnd(arg, 0, ULONG_MAX); | 158 | return bb_xgetularg10_bnd(arg, 0, ULONG_MAX); |
diff --git a/libbb/xreadlink.c b/libbb/xreadlink.c index b8cfe617a..21a657dfc 100644 --- a/libbb/xreadlink.c +++ b/libbb/xreadlink.c | |||
@@ -14,10 +14,10 @@ | |||
14 | #include "libbb.h" | 14 | #include "libbb.h" |
15 | 15 | ||
16 | extern char *xreadlink(const char *path) | 16 | extern char *xreadlink(const char *path) |
17 | { | 17 | { |
18 | static const int GROWBY = 80; /* how large we will grow strings by */ | 18 | static const int GROWBY = 80; /* how large we will grow strings by */ |
19 | 19 | ||
20 | char *buf = NULL; | 20 | char *buf = NULL; |
21 | int bufsize = 0, readsize = 0; | 21 | int bufsize = 0, readsize = 0; |
22 | 22 | ||
23 | do { | 23 | do { |
@@ -27,10 +27,10 @@ extern char *xreadlink(const char *path) | |||
27 | bb_perror_msg("%s", path); | 27 | bb_perror_msg("%s", path); |
28 | return NULL; | 28 | return NULL; |
29 | } | 29 | } |
30 | } | 30 | } |
31 | while (bufsize < readsize + 1); | 31 | while (bufsize < readsize + 1); |
32 | 32 | ||
33 | buf[readsize] = '\0'; | 33 | buf[readsize] = '\0'; |
34 | 34 | ||
35 | return buf; | 35 | return buf; |
36 | } | 36 | } |
diff --git a/libbb/xregcomp.c b/libbb/xregcomp.c index bfccfec69..fa6c0fa2b 100644 --- a/libbb/xregcomp.c +++ b/libbb/xregcomp.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Utility routines. | 3 | * Utility routines. |
4 | * | 4 | * |
5 | * Copyright (C) many different people. | 5 | * Copyright (C) many different people. |
6 | * If you wrote this, please acknowledge your work. | 6 | * If you wrote this, please acknowledge your work. |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |