whitespace and comment format fixes, no code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2017-10-05 14:40:24 +02:00
parent 099ef9324e
commit ebe6d9d875
129 changed files with 115 additions and 241 deletions

View File

@@ -6,12 +6,11 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* Read a line from stdin. If the first non-whitespace char is 'y' or 'Y',
* return 1. Otherwise return 0.
*/
#include "libbb.h"
int FAST_FUNC bb_ask_confirmation(void)
{
char first = 0;

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* do nothing signal handler */

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
#include "libbb.h"
void FAST_FUNC bb_do_delay(int seconds)

View File

@@ -7,7 +7,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* TODO: maybe change API to return malloced data?

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
#include "libbb.h"
int /* not FAST_FUNC! */ bb_pstrcmp(const void *a, const void *b)

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
#include <math.h> /* just for HUGE_VAL */

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* On exit: errno = 0 only if there was non-empty, '\0' terminated value

View File

@@ -6,9 +6,9 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//applet:IF_UNIT_TEST(APPLET(unit, BB_DIR_USR_BIN, BB_SUID_DROP))
//kbuild:lib-$(CONFIG_UNIT_TEST) += bbunit.o
//applet:IF_UNIT_TEST(APPLET(unit, BB_DIR_USR_BIN, BB_SUID_DROP))
//usage:#define unit_trivial_usage
//usage: ""

View File

@@ -27,7 +27,6 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include "libbb.h"
/* Become the user and group(s) specified by PW. */

View File

@@ -7,7 +7,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
void FAST_FUNC chomp(char *s)

View File

@@ -2,7 +2,6 @@
/*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/*

View File

@@ -7,6 +7,7 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* Concatenate path and filename to new allocated buffer.
* Add '/' only as needed (no duplicate // are produced).
@@ -14,8 +15,6 @@
* filename should not be NULL.
*/
#include "libbb.h"
char* FAST_FUNC concat_path_file(const char *path, const char *filename)
{
char *lc;

View File

@@ -6,6 +6,7 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/*
This function make special for recursive actions with usage
@@ -13,8 +14,6 @@
and skipping "." and ".." directory entries
*/
#include "libbb.h"
char* FAST_FUNC concat_subpath_file(const char *path, const char *f)
{
if (f && DOT_OR_DOTDOT(f))

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
#if ENABLE_FEATURE_USE_SENDFILE
# include <sys/sendfile.h>

View File

@@ -27,7 +27,6 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include "libbb.h"
#define SHADOW_BUFSIZE 256

View File

@@ -15,7 +15,6 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
#include "libbb.h"
uint32_t *global_crc32_table;

View File

@@ -4,7 +4,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
/* Seems silly to copyright a global variable. ;-) Oh well.
*
* At least one applet (cmp) returns a value different from the typical
@@ -12,7 +11,6 @@
* by the applet. I suppose we could use a wrapper function to set it, but
* that too seems silly.
*/
#include "libbb.h"
uint8_t xfunc_error_retval = EXIT_FAILURE;

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* try to open up the specified device */

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* To avoid problems, the username should consist only of

View File

@@ -10,7 +10,6 @@
*
* Original copyright notice is retained at the end of this file.
*/
#include "libbb.h"
#include "dump.h"

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* check if path points to an executable file;

View File

@@ -6,14 +6,12 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* A number of standard utilities can accept multiple command line args
* of '-' for stdin, according to SUSv3. So we encapsulate the check
* here to save a little space.
*/
#include "libbb.h"
int FAST_FUNC fclose_if_not_stdin(FILE *f)
{
/* Some more paranoid applets want ferror() check too */

View File

@@ -6,13 +6,11 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* Attempt to fflush(stdout), and exit with an error code if stdout is
* in an error state.
*/
#include "libbb.h"
void FAST_FUNC fflush_stdout_and_exit(int retval)
{
xfunc_error_retval = retval;

View File

@@ -7,7 +7,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
static char *xmalloc_fgets_internal(FILE *file, const char *terminating_string, int chop_off, size_t *maxsz_p)

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
#include <mntent.h>

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/*

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* Find block device /dev/XXX which contains specified file

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/*

View File

@@ -7,7 +7,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* From <linux/kd.h> */

View File

@@ -8,7 +8,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
char* FAST_FUNC bb_get_chunk_from_file(FILE *file, int *end)

View File

@@ -5,7 +5,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
#define DEBUG 0

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
#define NEED_SHA512 (ENABLE_SHA512SUM || ENABLE_USE_BB_CRYPT_SHA)

View File

@@ -22,7 +22,6 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
#include "libbb.h"
const char* FAST_FUNC make_human_readable_str(unsigned long long val,

View File

@@ -2,7 +2,6 @@
/*
* Utility routines.
*/
//kbuild:lib-$(CONFIG_ARP) += in_ether.o
//kbuild:lib-$(CONFIG_IFCONFIG) += in_ether.o
//kbuild:lib-$(CONFIG_IFENSLAVE) += in_ether.o

View File

@@ -7,7 +7,6 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
#include "libbb.h"
#include "inet_common.h"

View File

@@ -7,7 +7,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
typedef struct ino_dev_hash_bucket_struct {

View File

@@ -7,7 +7,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include <sys/stat.h>
#include "libbb.h"

View File

@@ -6,12 +6,10 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* After libbb.h, since it needs sys/types.h on some systems */
#include <sys/utsname.h> /* for uname(2) */
/* Returns current kernel version encoded as major*65536 + minor*256 + patch,
* so, for example, to check if the kernel is greater than 2.2.11:
*

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* Find out if the last character of a string matches the one given.

View File

@@ -9,7 +9,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* Add data to the start of the linked list. */

View File

@@ -8,7 +8,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* After libbb.h, since it needs sys/types.h on some systems */
#include <sys/utsname.h>

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
/* Mar 5, 2003 Manuel Novoa III
*
* This is the main work function for the 'mkdir' applet. As such, it
@@ -21,7 +20,6 @@
* To set specific permissions on 'path', pass the appropriate 'mode'
* val. Otherwise, pass -1 to get default permissions.
*/
#include "libbb.h"
/* This function is used from NOFORK applets. It must not allocate anything */

View File

@@ -9,7 +9,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
int FAST_FUNC fstype_matches(const char *fstype, const char *comma_list)

View File

@@ -4,7 +4,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* allow default system PATH to be extended via CFLAGS */

View File

@@ -10,8 +10,6 @@
/* Aug 13, 2003
* Fix a bug reported by junkio@cox.net involving the mode_chars index.
*/
#include <assert.h>
#include <sys/stat.h>

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include <mntent.h>
#include "libbb.h"

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
//kbuild:lib-y += nuke_str.o
#include "libbb.h"

View File

@@ -6,11 +6,10 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* http://www.opengroup.org/onlinepubs/007904975/utilities/chmod.html */
#include "libbb.h"
/* This function is used from NOFORK applets. It must not allocate anything */
#define FILEMODEBITS (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO)

View File

@@ -2,7 +2,6 @@
/*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//kbuild:lib-y += percent_decode.o
#include "libbb.h"

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
#include "libbb.h"
void FAST_FUNC fputc_printable(int ch, FILE *file)

View File

@@ -7,7 +7,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
#define WANT_HEX_ESCAPES 1

View File

@@ -8,7 +8,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"

View File

@@ -4,7 +4,6 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
#include <errno.h>
struct globals;

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* static const uint8_t ascii64[] ALIGN1 =

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
#undef DEBUG_RECURS_ACTION

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* Used from NOFORK applets. Must not allocate anything */

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//kbuild:lib-y += replace.o
#include "libbb.h"

View File

@@ -27,7 +27,6 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include "libbb.h"
#if ENABLE_SELINUX
#include <selinux/selinux.h> /* for setexeccon */

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
/*
* SUSv2 guarantees that "Host names are limited to 255 bytes"
* POSIX.1-2001 guarantees that "Host names (not including the terminating
@@ -23,7 +22,6 @@
* Host software MUST handle host names of up to 63 characters and
* SHOULD handle host names of up to 255 characters.
*/
#include "libbb.h"
#include <sys/utsname.h>

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* Wrapper which restarts poll on EINTR or ENOMEM.

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* Like strncpy but make sure the resulting string is always 0 terminated. */

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
ssize_t FAST_FUNC safe_write(int fd, const void *buf, size_t count)

View File

@@ -27,7 +27,6 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include "libbb.h"
void FAST_FUNC setup_environment(const char *shell, int flags, const struct passwd *pw)

View File

@@ -8,7 +8,6 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* All known arches use small ints for signals */

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
char* FAST_FUNC skip_whitespace(const char *s)

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
struct speed_map {

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/*

View File

@@ -7,7 +7,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
char* FAST_FUNC trim(char *s)

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* Conversion table. for base 64 */

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
FILE* FAST_FUNC fopen_or_warn(const char *path, const char *mode)

View File

@@ -6,14 +6,13 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* A number of applets need to open a file for reading, where the filename
* is a command line arg. Since often that arg is '-' (meaning stdin),
* we avoid testing everywhere by consolidating things in this routine.
*/
#include "libbb.h"
FILE* FAST_FUNC fopen_or_warn_stdin(const char *filename)
{
FILE *fp = stdin;

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* Open file and write string str to it, close file.

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
#include "libbb.h"
#define type long long

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
#include <sys/types.h>
#include <sys/socket.h> /* netinet/in.h needs it */
#include <netinet/in.h>

View File

@@ -6,12 +6,11 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* Keeping it separate allows to NOT pull in stdio for VERY small applets.
* Try building busybox with only "true" enabled... */
#include "libbb.h"
void (*die_func)(void);
void FAST_FUNC xfunc_die(void)

View File

@@ -8,7 +8,6 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
/* We need to have separate xfuncs.c and xfuncs_printf.c because
* with current linkers, even with section garbage collection,
* if *.o module references any of XXXprintf functions, you pull in
@@ -21,7 +20,6 @@
*
* TODO: move xmalloc() and xatonum() here.
*/
#include "libbb.h"
/* Turn on nonblocking I/O on a fd */

View File

@@ -8,7 +8,6 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
/* We need to have separate xfuncs.c and xfuncs_printf.c because
* with current linkers, even with section garbage collection,
* if *.o module references any of XXXprintf functions, you pull in
@@ -19,7 +18,6 @@
* which do not pull in printf, directly or indirectly.
* xfunc_printf.c contains those which do.
*/
#include "libbb.h"

View File

@@ -8,7 +8,6 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* Return the current directory, newly allocated, arbitrarily long.

View File

@@ -5,7 +5,6 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* Some systems (eg Hurd) do not have MAXSYMLINKS definition,

View File

@@ -6,7 +6,6 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
#include "libbb.h"
/* Resize (grow) malloced vector.

View File

@@ -7,7 +7,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
#include "xregex.h"