whitespace cleanup

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
This commit is contained in:
Denys Vlasenko 2010-10-29 11:46:52 +02:00
parent 66cb7bed33
commit fb132e4737
69 changed files with 231 additions and 268 deletions

View File

@ -179,17 +179,17 @@ static void FAST_FUNC header_verbose_list_ar(const file_header_t *file_header)
);
}
#define AR_OPT_VERBOSE (1 << 0)
#define AR_OPT_PRESERVE_DATE (1 << 1)
#define AR_OPT_VERBOSE (1 << 0)
#define AR_OPT_PRESERVE_DATE (1 << 1)
/* "ar r" implies create, but warns about it. c suppresses warning.
* bbox accepts but ignores it: */
#define AR_OPT_CREATE (1 << 2)
#define AR_OPT_CREATE (1 << 2)
#define AR_CMD_PRINT (1 << 3)
#define FIRST_CMD AR_CMD_PRINT
#define AR_CMD_LIST (1 << 4)
#define AR_CMD_EXTRACT (1 << 5)
#define AR_CMD_INSERT (1 << 6)
#define AR_CMD_PRINT (1 << 3)
#define FIRST_CMD AR_CMD_PRINT
#define AR_CMD_LIST (1 << 4)
#define AR_CMD_EXTRACT (1 << 5)
#define AR_CMD_INSERT (1 << 6)
int ar_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ar_main(int argc UNUSED_PARAM, char **argv)

View File

@ -28,7 +28,7 @@ in the file LICENSE.
* 0.9.0a/b -- no changes in this file.
* 0.9.0c -- made zero-length BZ_FLUSH work correctly in bzCompress().
* fixed bzWrite/bzRead to ignore zero-length requests.
* fixed bzread to correctly handle read requests after EOF.
* fixed bzread to correctly handle read requests after EOF.
* wrong parameter order in call to bzDecompressInit in
* bzBuffToBuffDecompress. Fixed.
*/

View File

@ -134,15 +134,14 @@ void generateMTFValues(EState* s)
* holds the original block data.
*
* The first thing to do is generate the MTF values,
* and put them in
* ((uint16_t*)s->arr1)[0 .. s->nblock-1].
* and put them in ((uint16_t*)s->arr1)[0 .. s->nblock-1].
*
* Because there are strictly fewer or equal MTF values
* than block values, ptr values in this area are overwritten
* with MTF values only when they are no longer needed.
*
* The final compressed bitstream is generated into the
* area starting at
* &((uint8_t*)s->arr2)[s->nblock]
* area starting at &((uint8_t*)s->arr2)[s->nblock]
*
* These storage aliases are set up in bzCompressInit(),
* except for the last one, which is arranged in
@ -459,7 +458,7 @@ void sendMTFValues(EState* s)
}
AssertH(nGroups < 8, 3002);
AssertH(nSelectors < 32768 && nSelectors <= (2 + (900000 / BZ_G_SIZE)), 3003);
AssertH(nSelectors < 32768 && nSelectors <= (2 + (900000 / BZ_G_SIZE)), 3003);
/*--- Compute MTF values for the selectors. ---*/
{

View File

@ -939,8 +939,8 @@ static int package_satisfies_dependency(int package, int depend_type)
return 0;
switch (depend_type) {
case EDGE_PRE_DEPENDS: return get_status(status_num, 3) == search_name_hashtable("installed");
case EDGE_DEPENDS: return get_status(status_num, 1) == search_name_hashtable("install");
case EDGE_PRE_DEPENDS: return get_status(status_num, 3) == search_name_hashtable("installed");
case EDGE_DEPENDS: return get_status(status_num, 1) == search_name_hashtable("install");
}
return 0;
}
@ -967,7 +967,7 @@ static int check_deps(deb_file_t **deb_file, int deb_start /*, int dep_max_count
conflicts[conflicts_num] = package_num;
conflicts_num++;
/* add provides to conflicts list */
for (j = 0; j < package_hashtable[package_num]->num_of_edges; j++) {
for (j = 0; j < package_hashtable[package_num]->num_of_edges; j++) {
if (package_hashtable[package_num]->edge[j]->type == EDGE_PROVIDES) {
const int conflicts_package_num = search_package_hashtable(
package_hashtable[package_num]->edge[j]->name,
@ -1067,12 +1067,13 @@ static int check_deps(deb_file_t **deb_file, int deb_start /*, int dep_max_count
if (package_edge->type == EDGE_OR_PRE_DEPENDS
|| package_edge->type == EDGE_OR_DEPENDS
) { /* start an EDGE_OR_ list */
) {
/* start an EDGE_OR_ list */
number_of_alternatives = package_edge->version;
root_of_alternatives = package_edge;
continue;
}
if (number_of_alternatives == 0) { /* not in the middle of an EDGE_OR_ list */
if (number_of_alternatives == 0) { /* not in the middle of an EDGE_OR_ list */
number_of_alternatives = 1;
root_of_alternatives = NULL;
}

View File

@ -7,11 +7,11 @@
#include "libbb.h"
#include "unarchive.h"
#define DPKG_DEB_OPT_CONTENTS 1
#define DPKG_DEB_OPT_CONTROL 2
#define DPKG_DEB_OPT_FIELD 4
#define DPKG_DEB_OPT_EXTRACT 8
#define DPKG_DEB_OPT_EXTRACT_VERBOSE 16
#define DPKG_DEB_OPT_CONTENTS 1
#define DPKG_DEB_OPT_CONTROL 2
#define DPKG_DEB_OPT_FIELD 4
#define DPKG_DEB_OPT_EXTRACT 8
#define DPKG_DEB_OPT_EXTRACT_VERBOSE 16
int dpkg_deb_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int dpkg_deb_main(int argc, char **argv)

View File

@ -86,8 +86,8 @@ struct bunzip_data {
/* Big things go last (register-relative addressing can be larger for big offsets) */
uint32_t crc32Table[256];
unsigned char selectors[32768]; /* nSelectors=15 bits */
struct group_data groups[MAX_GROUPS]; /* Huffman coding tables */
unsigned char selectors[32768]; /* nSelectors=15 bits */
struct group_data groups[MAX_GROUPS]; /* Huffman coding tables */
};
/* typedef struct bunzip_data bunzip_data; -- done in .h file */

View File

@ -16,9 +16,9 @@ int kbd_mode_main(int argc UNUSED_PARAM, char **argv)
{
enum {
SCANCODE = (1 << 0),
ASCII = (1 << 1),
ASCII = (1 << 1),
MEDIUMRAW = (1 << 2),
UNICODE = (1 << 3),
UNICODE = (1 << 3),
};
int fd;
unsigned opt;

View File

@ -136,7 +136,7 @@ static void do_loadfont(int fd, unsigned char *inbuf, int height, int width, int
* Example:
* At the font position for a capital A-ring glyph, we
* may have:
* 00C5,212B,FFFE,0041,030A,FFFF
* 00C5,212B,FFFE,0041,030A,FFFF
* Some font positions may be described by sequences only,
* namely when there is no precomposed Unicode value for the glyph.
*/
@ -159,7 +159,7 @@ static void do_loadtable(int fd, unsigned char *inbuf, int tailsz, int fontsize,
int glyph;
uint16_t unicode;
maxct = tailsz; /* more than enough */
maxct = tailsz; /* more than enough */
up = xmalloc(maxct * sizeof(*up));
for (glyph = 0; glyph < fontsize; glyph++) {
@ -255,10 +255,10 @@ static void do_load(int fd, unsigned char *buffer, size_t len)
} else
#endif
#if ENABLE_FEATURE_LOADFONT_RAW
if (len == 9780) { /* file with three code pages? */
if (len == 9780) { /* file with three code pages? */
charsize = height = 16;
font += 40;
} else if ((len & 0377) == 0) { /* bare font */
} else if ((len & 0377) == 0) { /* bare font */
charsize = height = len / 256;
} else
#endif

View File

@ -16,9 +16,9 @@ struct globals {
struct termios tio, tio0;
};
#define G (*ptr_to_globals)
#define kbmode (G.kbmode)
#define tio (G.tio)
#define tio0 (G.tio0)
#define kbmode (G.kbmode)
#define tio (G.tio)
#define tio0 (G.tio0)
#define INIT_G() do { \
SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
} while (0)
@ -46,9 +46,9 @@ int showkey_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int showkey_main(int argc UNUSED_PARAM, char **argv)
{
enum {
OPT_a = (1<<0), // display the decimal/octal/hex values of the keys
OPT_k = (1<<1), // display only the interpreted keycodes (default)
OPT_s = (1<<2), // display only the raw scan-codes
OPT_a = (1<<0), // display the decimal/octal/hex values of the keys
OPT_k = (1<<1), // display only the interpreted keycodes (default)
OPT_s = (1<<2), // display only the raw scan-codes
};
INIT_G();

View File

@ -278,7 +278,7 @@ int date_main(int argc UNUSED_PARAM, char **argv)
}
/* Correct any day of week and day of year etc. fields */
tm_time.tm_isdst = -1; /* Be sure to recheck dst */
tm_time.tm_isdst = -1; /* Be sure to recheck dst */
ts.tv_sec = validate_tm_time(date_str, &tm_time);
maybe_set_utc(opt);

View File

@ -24,7 +24,7 @@ static const struct suffix_mult dd_suffixes[] = {
{ "b", 512 },
{ "kD", 1000 },
{ "k", 1024 },
{ "K", 1024 }, /* compat with coreutils dd */
{ "K", 1024 }, /* compat with coreutils dd */
{ "MD", 1000000 },
{ "M", 1048576 },
{ "GD", 1000000000 },

View File

@ -92,7 +92,7 @@ int mv_main(int argc, char **argv)
|| (flags & OPT_FILEUTILS_INTERACTIVE))
) {
if (fprintf(stderr, "mv: overwrite '%s'? ", dest) < 0) {
goto RET_1; /* Ouch! fprintf failed! */
goto RET_1; /* Ouch! fprintf failed! */
}
if (!bb_ask_confirmation()) {
goto RET_0;

View File

@ -17,12 +17,12 @@ int nice_main(int argc, char **argv)
old_priority = getpriority(PRIO_PROCESS, 0);
if (!*++argv) { /* No args, so (GNU) output current nice value. */
if (!*++argv) { /* No args, so (GNU) output current nice value. */
printf("%d\n", old_priority);
fflush_stdout_and_exit(EXIT_SUCCESS);
}
adjustment = 10; /* Set default adjustment. */
adjustment = 10; /* Set default adjustment. */
if (argv[0][0] == '-') {
if (argv[0][1] == 'n') { /* -n */
@ -32,7 +32,7 @@ int nice_main(int argc, char **argv)
} else { /* -NNN (NNN may be negative) == -n NNN */
argv[0] += 1; argv--; argc++;
}
if (argc < 4) { /* Missing priority and/or utility! */
if (argc < 4) { /* Missing priority and/or utility! */
bb_show_usage();
}
adjustment = xatoi_range(argv[1], INT_MIN/2, INT_MAX/2);

View File

@ -4,7 +4,7 @@
* Based on code from util-linux v 2.11l
*
* Copyright (c) 1990
* The Regents of the University of California. All rights reserved.
* The Regents of the University of California. All rights reserved.
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*
@ -174,7 +174,7 @@ int od_main(int argc, char **argv)
bb_dump_add(dumper, "\" \"");
}
bb_dump_add(dumper, add_strings[(int)od_o2si[(p - od_opts)]]);
} else { /* P, p, s, w, or other unhandled */
} else { /* P, p, s, w, or other unhandled */
bb_show_usage();
}
}

View File

@ -52,8 +52,8 @@ enum {
static char key_separator;
static struct sort_key {
struct sort_key *next_key; /* linked list */
unsigned range[4]; /* start word, start char, end word, end char */
struct sort_key *next_key; /* linked list */
unsigned range[4]; /* start word, start char, end word, end char */
unsigned flags;
} *key_list;

View File

@ -49,9 +49,9 @@
* state. */
/* test(1) accepts the following grammar:
oexpr ::= aexpr | aexpr "-o" oexpr ;
aexpr ::= nexpr | nexpr "-a" aexpr ;
nexpr ::= primary | "!" primary
oexpr ::= aexpr | aexpr "-o" oexpr ;
aexpr ::= nexpr | nexpr "-a" aexpr ;
nexpr ::= primary | "!" primary
primary ::= unary-operator operand
| operand binary-operator operand
| operand

View File

@ -203,7 +203,7 @@ static unsigned expand(const char *arg, char **buffer_p)
buffer[pos++] = *arg; /* copy CHAR */
if (!arg[0] || arg[1] != '=' || arg[2] != ']')
bb_show_usage();
arg += 3; /* skip CHAR=] */
arg += 3; /* skip CHAR=] */
continue;
}
/* The rest of "[xyz..." cases is treated as normal
@ -258,9 +258,9 @@ int tr_main(int argc UNUSED_PARAM, char **argv)
char *invec = vector + ASCII;
char *outvec = vector + ASCII * 2;
#define TR_OPT_complement (3 << 0)
#define TR_OPT_delete (1 << 2)
#define TR_OPT_squeeze_reps (1 << 3)
#define TR_OPT_complement (3 << 0)
#define TR_OPT_delete (1 << 2)
#define TR_OPT_squeeze_reps (1 << 3)
for (i = 0; i < ASCII; i++) {
vector[i] = i;

View File

@ -153,7 +153,7 @@ int wc_main(int argc UNUSED_PARAM, char **argv)
bb_simple_perror_msg(arg);
status = EXIT_FAILURE;
}
goto DO_EOF; /* Treat an EOF as '\r'. */
goto DO_EOF; /* Treat an EOF as '\r'. */
}
/* Cater for -c and -m */
@ -179,7 +179,7 @@ int wc_main(int argc UNUSED_PARAM, char **argv)
*/
if (c == '\t') {
linepos = (linepos | 7) + 1;
} else { /* '\n', '\r', '\f', or '\v' */
} else { /* '\n', '\r', '\f', or '\v' */
DO_EOF:
if (linepos > counts[WC_LENGTH]) {
counts[WC_LENGTH] = linepos;
@ -230,7 +230,7 @@ int wc_main(int argc UNUSED_PARAM, char **argv)
* effect of trashing the totals array after outputting it, but that's
* irrelavent since we no longer need it. */
if (num_files > 1) {
num_files = 0; /* Make sure we don't get here again. */
num_files = 0; /* Make sure we don't get here again. */
arg = "total";
pcounts = totals;
--argv;

View File

@ -629,7 +629,7 @@ struct e2fsck_struct {
};
#define tid_gt(x, y) ((x - y) > 0)
#define tid_gt(x, y) ((x - y) > 0)
static inline int tid_geq(tid_t x, tid_t y)
{

View File

@ -277,10 +277,10 @@ enum {
/* tokens and their corresponding info values */
#define NTC "\377" /* switch to next token class (tc<<1) */
#define NTCC '\377'
#define NTC "\377" /* switch to next token class (tc<<1) */
#define NTCC '\377'
#define OC_B OC_BUILTIN
#define OC_B OC_BUILTIN
static const char tokenlist[] ALIGN1 =
"\1(" NTC
@ -368,7 +368,7 @@ static const uint32_t tokeninfo[] = {
OC_B|B_ss|P(0x8f), OC_FBLTIN|F_ti, OC_B|B_ti|P(0x0b), OC_B|B_mt|P(0x0b),
OC_B|B_lo|P(0x49), OC_B|B_up|P(0x49),
OC_GETLINE|SV|P(0),
0, 0,
0, 0,
0,
0 /* END */
};
@ -380,7 +380,7 @@ enum {
ORS, RS, RT, FILENAME,
SUBSEP, F0, ARGIND, ARGC,
ARGV, ERRNO, FNR, NR,
NF, IGNORECASE, ENVIRON, NUM_INTERNAL_VARS
NF, IGNORECASE, ENVIRON, NUM_INTERNAL_VARS
};
static const char vNames[] ALIGN1 =
@ -2335,7 +2335,7 @@ static var *evaluate(node *op, var *res)
#define fnargs (G.evaluate__fnargs)
/* seed is initialized to 1 */
#define seed (G.evaluate__seed)
#define sreg (G.evaluate__sreg)
#define sreg (G.evaluate__sreg)
var *v1;
@ -2611,7 +2611,7 @@ static var *evaluate(node *op, var *res)
rsm->F = popen(L.s, "r");
rsm->is_pipe = TRUE;
} else {
rsm->F = fopen_for_read(L.s); /* not xfopen! */
rsm->F = fopen_for_read(L.s); /* not xfopen! */
}
}
} else {

View File

@ -230,7 +230,7 @@ static int search(const int *c, int k, int y, const struct cand *list)
{
int i, j;
if (list[c[k]].y < y) /* quick look for typical case */
if (list[c[k]].y < y) /* quick look for typical case */
return k + 1;
for (i = 0, j = k + 1;;) {

View File

@ -117,9 +117,9 @@ struct globals {
char *add_cmd_line;
struct pipeline {
char *buf; /* Space to hold string */
int idx; /* Space used */
int len; /* Space allocated */
char *buf; /* Space to hold string */
int idx; /* Space used */
int len; /* Space allocated */
} pipeline;
} FIX_ALIASING;
#define G (*(struct globals*)&bb_common_bufsiz1)

View File

@ -18,7 +18,7 @@
02111-1307 USA.
*/
/*
* POSIX Standard: 9.2.1 Group Database Access <grp.h>
* POSIX Standard: 9.2.1 Group Database Access <grp.h>
*/
#ifndef BB_GRP_H
#define BB_GRP_H 1

View File

@ -155,7 +155,7 @@
# include <sex.h>
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) \
|| defined(__APPLE__)
# include <sys/resource.h> /* rlimit */
# include <sys/resource.h> /* rlimit */
# include <machine/endian.h>
# define bswap_64 __bswap64
# define bswap_32 __bswap32

View File

@ -18,7 +18,7 @@
02111-1307 USA. */
/*
* POSIX Standard: 9.2.2 User Database Access <pwd.h>
* POSIX Standard: 9.2.2 User Database Access <pwd.h>
*/
#ifndef BB_PWD_H

View File

@ -35,9 +35,9 @@ struct linux_rtc_time {
};
struct linux_rtc_wkalrm {
unsigned char enabled; /* 0 = alarm disabled, 1 = alarm enabled */
unsigned char enabled; /* 0 = alarm disabled, 1 = alarm enabled */
unsigned char pending; /* 0 = alarm not pending, 1 = alarm pending */
struct linux_rtc_time time; /* time the alarm is set to */
struct linux_rtc_time time; /* time the alarm is set to */
};
/*

View File

@ -158,11 +158,11 @@ static void FAST_FUNC md5_process_block64(md5_ctx_t *ctx)
};
static const char P_array[] ALIGN1 = {
# if MD5_SIZE_VS_SPEED > 1
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, /* 1 */
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, /* 1 */
# endif
1, 6, 11, 0, 5, 10, 15, 4, 9, 14, 3, 8, 13, 2, 7, 12, /* 2 */
5, 8, 11, 14, 1, 4, 7, 10, 13, 0, 3, 6, 9, 12, 15, 2, /* 3 */
0, 7, 14, 5, 12, 3, 10, 1, 8, 15, 6, 13, 4, 11, 2, 9 /* 4 */
1, 6, 11, 0, 5, 10, 15, 4, 9, 14, 3, 8, 13, 2, 7, 12, /* 2 */
5, 8, 11, 14, 1, 4, 7, 10, 13, 0, 3, 6, 9, 12, 15, 2, /* 3 */
0, 7, 14, 5, 12, 3, 10, 1, 8, 15, 6, 13, 4, 11, 2, 9 /* 4 */
};
#endif
uint32_t *words = (void*) ctx->wbuffer;

View File

@ -196,9 +196,9 @@ sha_crypt(/*const*/ char *key_data, /*const*/ char *salt_data)
//TODO: replace with something like
// bb_uuencode(cp, src, length, bb_uuenc_tbl_XXXbase64);
#define b64_from_24bit(B2, B1, B0, N) \
do { \
unsigned w = ((B2) << 16) | ((B1) << 8) | (B0); \
resptr = to64(resptr, w, N); \
do { \
unsigned w = ((B2) << 16) | ((B1) << 8) | (B0); \
resptr = to64(resptr, w, N); \
} while (0)
if (is_sha512 == '5') {
unsigned i = 0;

View File

@ -15,17 +15,17 @@ char* FAST_FUNC bb_simplify_abs_path_inplace(char *start)
p = s = start;
do {
if (*p == '/') {
if (*s == '/') { /* skip duplicate (or initial) slash */
if (*s == '/') { /* skip duplicate (or initial) slash */
continue;
}
if (*s == '.') {
if (s[1] == '/' || !s[1]) { /* remove extra '.' */
if (s[1] == '/' || !s[1]) { /* remove extra '.' */
continue;
}
if ((s[1] == '.') && (s[2] == '/' || !s[2])) {
++s;
if (p > start) {
while (*--p != '/') /* omit previous dir */
while (*--p != '/') /* omit previous dir */
continue;
}
continue;
@ -35,8 +35,8 @@ char* FAST_FUNC bb_simplify_abs_path_inplace(char *start)
*++p = *s;
} while (*++s);
if ((p == start) || (*p != '/')) { /* not a trailing slash */
++p; /* so keep last character */
if ((p == start) || (*p != '/')) { /* not a trailing slash */
++p; /* so keep last character */
}
*p = '\0';
return p;

View File

@ -37,12 +37,12 @@ int GETXXKEY_R_FUNC(GETXXKEY_R_KEYTYPE key,
while (1) {
rv = bb__pgsreader(GETXXKEY_R_PARSER, resultbuf, buffer, buflen, stream);
if (!rv) {
if (GETXXKEY_R_TEST(resultbuf)) { /* Found key? */
if (GETXXKEY_R_TEST(resultbuf)) { /* found key? */
*result = resultbuf;
break;
}
} else {
if (rv == ENOENT) { /* end-of-file encountered. */
if (rv == ENOENT) { /* EOF encountered */
rv = 0;
}
break;

View File

@ -420,19 +420,19 @@ int conspy_main(int argc UNUSED_PARAM, char **argv)
if (G.remote.cursor_x < G.x) {
G.x = G.remote.cursor_x;
i = 0; // force refresh
i = 0; // force refresh
}
if (nx > G.x) {
G.x = nx;
i = 0; // force refresh
i = 0; // force refresh
}
if (G.remote.cursor_y < G.y) {
G.y = G.remote.cursor_y;
i = 0; // force refresh
i = 0; // force refresh
}
if (ny > G.y) {
G.y = ny;
i = 0; // force refresh
i = 0; // force refresh
}
}

View File

@ -26,8 +26,8 @@
#include "libbb.h"
#include <mtd/ubi-user.h>
#define OPTION_M (1 << 0)
#define OPTION_D (1 << 1)
#define OPTION_M (1 << 0)
#define OPTION_D (1 << 1)
#define do_attach (ENABLE_UBIATTACH && \
(!ENABLE_UBIDETACH || (applet_name[3] == 'a')))

View File

@ -35,9 +35,9 @@ int rmmod_main(int argc UNUSED_PARAM, char **argv)
/* Parse command line. */
n = getopt32(argv, "wfas"); // -s ignored
argv += optind;
if (n & 1) // --wait
if (n & 1) // --wait
flags &= ~O_NONBLOCK;
if (n & 2) // --force
if (n & 2) // --force
flags |= O_TRUNC;
if (n & 4) {
/* Unload _all_ unused modules via NULL delete_module() call */

View File

@ -231,7 +231,7 @@ struct globals {
int verbose; /* must be int (used by getopt32) */
smallint flg_deny_all;
unsigned rmt_ip; /* used for IP-based allow/deny rules */
unsigned rmt_ip; /* used for IP-based allow/deny rules */
time_t last_mod;
char *rmt_ip_str; /* for $REMOTE_ADDR and $REMOTE_PORT */
const char *bind_addr_or_port;
@ -267,7 +267,7 @@ struct globals {
#if ENABLE_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR
Htaccess *script_i; /* config script interpreters */
#endif
char *iobuf; /* [IOBUF_SIZE] */
char *iobuf; /* [IOBUF_SIZE] */
#define hdr_buf bb_common_bufsiz1
char *hdr_ptr;
int hdr_cnt;

View File

@ -295,7 +295,7 @@ struct globals {
struct rlimit rlim_ofile;
servtab_t *serv_list;
int global_queuelen;
int maxsock; /* max fd# in allsock, -1: unknown */
int maxsock; /* max fd# in allsock, -1: unknown */
/* whenever maxsock grows, prev_maxsock is set to new maxsock,
* but if maxsock is set to -1, prev_maxsock is not changed */
int prev_maxsock;

View File

@ -1,13 +1,11 @@
/* vi: set sw=4 ts=4: */
/*
* "ip" utility frontend.
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*
* Changes:
* Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
* Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
* Bernhard Reutner-Fischer rewrote to use index_in_substr_array
*/

View File

@ -15,9 +15,9 @@
/* After libbb.h, because on some systems it needs other includes */
#include <arpa/inet.h>
#define CLASS_A_NETMASK ntohl(0xFF000000)
#define CLASS_B_NETMASK ntohl(0xFFFF0000)
#define CLASS_C_NETMASK ntohl(0xFFFFFF00)
#define CLASS_A_NETMASK ntohl(0xFF000000)
#define CLASS_B_NETMASK ntohl(0xFFFF0000)
#define CLASS_C_NETMASK ntohl(0xFFFFFF00)
static unsigned long get_netmask(unsigned long ipaddr)
{

View File

@ -1,18 +1,15 @@
/* vi: set sw=4 ts=4: */
/*
* ip.c "ip" utility frontend.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*
* Changes:
*
* Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
* Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
*/
#include "ip_common.h" /* #include "libbb.h" is inside */

View File

@ -1,13 +1,11 @@
/* vi: set sw=4 ts=4: */
/*
* ipaddress.c "ip address".
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*
* Changes:
* Laszlo Valko <valko@linux.karinthy.hu> 990223: address label must be zero terminated
* Laszlo Valko <valko@linux.karinthy.hu> 990223: address label must be zero terminated
*/
#include <fnmatch.h>
@ -20,7 +18,7 @@
#ifndef IFF_LOWER_UP
/* from linux/if.h */
#define IFF_LOWER_UP 0x10000 /* driver signals L1 up*/
#define IFF_LOWER_UP 0x10000 /* driver signals L1 up */
#endif
struct filter_t {
@ -365,7 +363,7 @@ static int FAST_FUNC print_addrinfo(const struct sockaddr_nl *who UNUSED_PARAM,
struct nlmsg_list {
struct nlmsg_list *next;
struct nlmsghdr h;
struct nlmsghdr h;
};
static int print_selected_addrinfo(int ifindex, struct nlmsg_list *ainfo)

View File

@ -296,9 +296,9 @@ static int do_change(char **argv, const unsigned rtm)
};
struct rtnl_handle rth;
struct {
struct nlmsghdr n;
struct ifinfomsg i;
char buf[1024];
struct nlmsghdr n;
struct ifinfomsg i;
char buf[1024];
} req;
smalluint arg;
char *name_str = NULL, *link_str = NULL, *type_str = NULL, *dev_str = NULL;

View File

@ -1,19 +1,16 @@
/* vi: set sw=4 ts=4: */
/*
* iproute.c "ip route".
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*
* Changes:
*
* Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
* Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
* Kunihiro Ishiguro <kunihiro@zebra.org> 001102: rtnh_ifindex was not initialized
*/
#include "ip_common.h" /* #include "libbb.h" is inside */
#include "ip_common.h" /* #include "libbb.h" is inside */
#include "rt_names.h"
#include "utils.h"
@ -327,9 +324,9 @@ IF_FEATURE_IP_RULE(ARG_table,)
};
struct rtnl_handle rth;
struct {
struct nlmsghdr n;
struct rtmsg r;
char buf[1024];
struct nlmsghdr n;
struct rtmsg r;
char buf[1024];
} req;
char mxbuf[256];
struct rtattr * mxrta = (void*)mxbuf;

View File

@ -1,18 +1,15 @@
/* vi: set sw=4 ts=4: */
/*
* iprule.c "ip rule".
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*
* Changes:
*
* Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
* Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
* initially integrated into busybox by Bernhard Reutner-Fischer
*/
@ -191,9 +188,9 @@ static int iprule_modify(int cmd, char **argv)
bool table_ok = 0;
struct rtnl_handle rth;
struct {
struct nlmsghdr n;
struct rtmsg r;
char buf[1024];
struct nlmsghdr n;
struct rtmsg r;
char buf[1024];
} req;
smalluint key;

View File

@ -1,16 +1,14 @@
/* vi: set sw=4 ts=4: */
/*
* iptunnel.c "ip tunnel"
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*
* Changes:
*
* Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
* Rani Assaf <rani@magic.metawire.com> 980930: do not allow key for ipip/sit
* Phil Karn <karn@ka9q.ampr.org> 990408: "pmtudisc" flag
* Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
* Rani Assaf <rani@magic.metawire.com> 980930: do not allow key for ipip/sit
* Phil Karn <karn@ka9q.ampr.org> 990408: "pmtudisc" flag
*/
#include <netinet/ip.h>

View File

@ -74,8 +74,8 @@ int FAST_FUNC rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, in
struct iovec iov[2] = { { &nlh, sizeof(nlh) }, { req, len } };
struct msghdr msg = {
(void*)&nladdr, sizeof(nladdr),
iov, 2,
NULL, 0,
iov, 2,
NULL, 0,
0
};
@ -108,8 +108,8 @@ static int rtnl_dump_filter(struct rtnl_handle *rth,
struct msghdr msg = {
(void*)&nladdr, sizeof(nladdr),
&iov, 1,
NULL, 0,
&iov, 1,
NULL, 0,
0
};
@ -214,8 +214,8 @@ int FAST_FUNC rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n,
char *buf = xmalloc(8*1024); /* avoid big stack buffer */
struct msghdr msg = {
(void*)&nladdr, sizeof(nladdr),
&iov, 1,
NULL, 0,
&iov, 1,
NULL, 0,
0
};

View File

@ -11,11 +11,11 @@
PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
struct rtnl_handle {
int fd;
struct sockaddr_nl local;
struct sockaddr_nl peer;
uint32_t seq;
uint32_t dump;
int fd;
struct sockaddr_nl local;
struct sockaddr_nl peer;
uint32_t seq;
uint32_t dump;
};
extern void xrtnl_open(struct rtnl_handle *rth) FAST_FUNC;

View File

@ -1,13 +1,11 @@
/* vi: set sw=4 ts=4: */
/*
* ll_addr.c
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*/
#include <net/if_arp.h>

View File

@ -1,17 +1,14 @@
/* vi: set sw=4 ts=4: */
/*
* ll_map.c
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*/
#include <net/if.h> /* struct ifreq and co. */
#include <net/if.h> /* struct ifreq and co. */
#include "libbb.h"
#include "libnetlink.h"

View File

@ -1,13 +1,11 @@
/* vi: set sw=4 ts=4: */
/*
* ll_proto.c
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*/
#include "libbb.h"

View File

@ -1,13 +1,11 @@
/* vi: set sw=4 ts=4: */
/*
* ll_types.c
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*/
#include <arpa/inet.h>
#include <linux/if_arp.h>

View File

@ -1,13 +1,11 @@
/* vi: set sw=4 ts=4: */
/*
* rt_names.c rtnetlink names DB.
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*/
#include "libbb.h"
#include "rt_names.h"

View File

@ -1,14 +1,11 @@
/* vi: set sw=4 ts=4: */
/*
* rtm_map.c
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*/
#include "libbb.h"

View File

@ -4,11 +4,11 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*
* Changes:
*
* Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
* Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
*/
#include "libbb.h"

View File

@ -17,14 +17,14 @@ extern smallint oneline;
extern char _SL_;
#ifndef IPPROTO_ESP
#define IPPROTO_ESP 50
#define IPPROTO_ESP 50
#endif
#ifndef IPPROTO_AH
#define IPPROTO_AH 51
#define IPPROTO_AH 51
#endif
#define SPRINT_BSIZE 64
#define SPRINT_BUF(x) char x[SPRINT_BSIZE]
#define SPRINT_BUF(x) char x[SPRINT_BSIZE]
extern void incomplete_command(void) NORETURN;

View File

@ -21,10 +21,10 @@
#endif
/* Taken from linux/sockios.h */
#define SIOCSIFNAME 0x8923 /* set interface name */
#define SIOCSIFNAME 0x8923 /* set interface name */
/* Octets in one Ethernet addr, from <linux/if_ether.h> */
#define ETH_ALEN 6
#define ETH_ALEN 6
#ifndef ifr_newname
#define ifr_newname ifr_ifru.ifru_slave

View File

@ -699,7 +699,7 @@ int netstat_main(int argc UNUSED_PARAM, char **argv)
flags |= opt;
}
if (flags & (NETSTAT_TCP|NETSTAT_UDP|NETSTAT_RAW)) {
printf("Active Internet connections "); /* xxx */
printf("Active Internet connections "); /* xxx */
if ((flags & (NETSTAT_LISTENING|NETSTAT_CONNECTED)) == (NETSTAT_LISTENING|NETSTAT_CONNECTED))
printf("(servers and established)");

View File

@ -89,7 +89,7 @@
//UNUSED: #define PANIC_THRESHOLD 1000 /* panic threshold (sec) */
#define FREQ_TOLERANCE 0.000015 /* frequency tolerance (15 PPM) */
#define BURSTPOLL 0 /* initial poll */
#define BURSTPOLL 0 /* initial poll */
#define MINPOLL 5 /* minimum poll interval. std ntpd uses 6 (6: 64 sec) */
#define BIGPOLL 10 /* drop to lower poll at any trouble (10: 17 min) */
#define MAXPOLL 12 /* maximum poll interval (12: 1.1h, 17: 36.4h). std ntpd uses 17 */
@ -865,7 +865,7 @@ fit(peer_t *p, double rd)
VERB3 bb_error_msg("peer %s unfit for selection: unreachable", p->p_dotted);
return 0;
}
#if 0 /* we filter out such packets earlier */
#if 0 /* we filter out such packets earlier */
if ((p->lastpkt_status & LI_ALARM) == LI_ALARM
|| p->lastpkt_stratum >= MAXSTRAT
) {
@ -2110,7 +2110,7 @@ direct_freq(double fp_offset)
}
static void
set_freq(double freq) /* frequency update */
set_freq(double freq) /* frequency update */
{
char tbuf[80];

View File

@ -870,7 +870,7 @@ static NOINLINE void ntp_init(char **argv)
int prec = 0;
int b;
# if 0
struct timespec tp;
struct timespec tp;
/* We can use sys_clock_getres but assuming 10ms tick should be fine */
clock_getres(CLOCK_REALTIME, &tp);
tp.tv_sec = 0;

View File

@ -134,9 +134,9 @@ int slattach_main(int argc UNUSED_PARAM, char **argv)
int i, encap, opt;
struct termios state;
const char *proto = "cslip";
const char *extcmd; /* Command to execute after hangup */
const char *extcmd; /* Command to execute after hangup */
const char *baud_str;
int baud_code = -1; /* Line baud rate (system code) */
int baud_code = -1; /* Line baud rate (system code) */
enum {
OPT_p_proto = 1 << 0,

View File

@ -141,7 +141,7 @@ remove_iacs(struct tsession *ts, int *pnum_totty)
if (ptr[1] == SB && ptr[2] == TELOPT_NAWS) {
struct winsize ws;
if ((ptr+8) >= end)
break; /* incomplete, can't process */
break; /* incomplete, can't process */
ws.ws_col = (ptr[3] << 8) | ptr[4];
ws.ws_row = (ptr[5] << 8) | ptr[6];
ioctl(ts->ptyfd, TIOCSWINSZ, (char *)&ws);
@ -273,8 +273,8 @@ make_new_session(
static const char iacs_to_send[] ALIGN1 = {
IAC, DO, TELOPT_ECHO,
IAC, DO, TELOPT_NAWS,
/* This requires telnetd.ctrlSQ.patch (incomplete) */
/* IAC, DO, TELOPT_LFLOW, */
/* This requires telnetd.ctrlSQ.patch (incomplete) */
/*IAC, DO, TELOPT_LFLOW,*/
IAC, WILL, TELOPT_ECHO,
IAC, WILL, TELOPT_SGA
};

View File

@ -47,8 +47,8 @@ struct vlan_ioctl_args {
short vlan_qos;
};
#define VLAN_GROUP_ARRAY_LEN 4096
#define SIOCSIFVLAN 0x8983 /* Set 802.1Q VLAN options */
#define VLAN_GROUP_ARRAY_LEN 4096
#define SIOCSIFVLAN 0x8983 /* Set 802.1Q VLAN options */
/* On entry, table points to the length of the current string
* plus NUL terminator plus data length for the subsequent entry.

View File

@ -6,7 +6,7 @@
* Licensed under GPLv2, see file LICENSE in this source tree.
*
* Copyright (C) 2010 Bradley M. Kuhn <bkuhn@ebb.org>
* Kuhn's copyrights are licensed GPLv2-or-later. File as a whole remains GPLv2.
* Kuhn's copyrights are licensed GPLv2-or-later. File as a whole remains GPLv2.
*/
#include "libbb.h"
@ -48,7 +48,7 @@ struct BUG_G_too_big {
/* Must match option string! */
enum {
WGET_OPT_CONTINUE = (1 << 0),
WGET_OPT_SPIDER = (1 << 1),
WGET_OPT_SPIDER = (1 << 1),
WGET_OPT_QUIET = (1 << 2),
WGET_OPT_OUTNAME = (1 << 3),
WGET_OPT_PREFIX = (1 << 4),
@ -785,7 +785,7 @@ However, in real world it was observed that some web servers
*/
case 204:
break;
case 300: /* redirection */
case 300: /* redirection */
case 301:
case 302:
case 303:

View File

@ -18,14 +18,14 @@
//config: Report CPU and I/O statistics
#include "libbb.h"
#include <sys/utsname.h> /* Need struct utsname */
#include <sys/utsname.h> /* Need struct utsname */
//#define debug(fmt, ...) fprintf(stderr, fmt, ## __VA_ARGS__)
#define debug(fmt, ...) ((void)0)
#define MAX_DEVICE_NAME 12
#define CURRENT 0
#define LAST 1
#define MAX_DEVICE_NAME 12
#define CURRENT 0
#define LAST 1
#if 1
typedef unsigned long long cputime_t;
@ -327,7 +327,7 @@ static void do_disk_statistics(cputime_t itv)
int i = 0;
char buf[128];
unsigned major, minor;
unsigned long wr_ops, dummy; /* %*lu for suppres the conversion wouldn't work */
unsigned long wr_ops, dummy; /* %*lu for suppress the conversion wouldn't work */
unsigned long long rd_sec_or_wr_ops;
unsigned long long rd_sec_or_dummy, wr_sec_or_dummy, wr_sec;
struct stats_dev sd;

View File

@ -18,7 +18,7 @@
//config: Per-processor statistics
#include "libbb.h"
#include <sys/utsname.h> /* struct utsname */
#include <sys/utsname.h> /* struct utsname */
//#define debug(fmt, ...) fprintf(stderr, fmt, ## __VA_ARGS__)
#define debug(fmt, ...) ((void)0)
@ -634,7 +634,7 @@ static void get_irqs_from_interrupts(const char *fname,
while (irq < irqs_per_cpu) {
/* Number of interrupts per CPU has changed */
ic = &per_cpu_stats[current][irq];
ic->irq_name[0] = '\0'; /* False interrupt */
ic->irq_name[0] = '\0'; /* False interrupt */
irq++;
}
}
@ -820,7 +820,7 @@ static int get_irqcpu_nr(const char *f, int max_irqs)
unsigned irq;
fp = fopen_for_read(f);
if (!fp) /* No interrupts file */
if (!fp) /* No interrupts file */
return 0;
linelen = INTERRUPTS_LINE + 16 * G.cpu_nr;
@ -858,10 +858,10 @@ int mpstat_main(int UNUSED_PARAM argc, char **argv)
char *opt_set_cpu;
int i, opt;
enum {
OPT_ALL = 1 << 0, /* -A */
OPT_INTS = 1 << 1, /* -I */
OPT_SETCPU = 1 << 2, /* -P */
OPT_UTIL = 1 << 3, /* -u */
OPT_ALL = 1 << 0, /* -A */
OPT_INTS = 1 << 1, /* -I */
OPT_SETCPU = 1 << 2, /* -P */
OPT_UTIL = 1 << 3, /* -u */
};
/* Dont buffer data if redirected to a pipe */

View File

@ -91,7 +91,7 @@ static int sysctl_act_on_setting(char *setting)
retval = EXIT_FAILURE;
goto end;
}
value = cptr + 1; /* point to the value in name=value */
value = cptr + 1; /* point to the value in name=value */
if (setting == cptr || !*value) {
bb_error_msg("error: malformed setting '%s'", outname);
retval = EXIT_FAILURE;

View File

@ -12,10 +12,10 @@
extern char *selinux_mnt;
#define OPT_VERBOSE (1 << 0)
#define OPT_BOOLEAN (1 << 1)
#define OPT_VERBOSE (1 << 0)
#define OPT_BOOLEAN (1 << 1)
#define COL_FMT "%-31s "
#define COL_FMT "%-31s "
static void display_boolean(void)
{
@ -151,7 +151,7 @@ int sestatus_main(int argc UNUSED_PARAM, char **argv)
const char *pol_path;
int rc;
opt_complementary = "?0"; /* no arguments are required. */
opt_complementary = "?0"; /* no arguments are required. */
opts = getopt32(argv, "vb");
/* SELinux status: line */

View File

@ -29,12 +29,9 @@
void strprint();
int
main(argc, argv)
int argc;
char **argv;
int main(int argc, char **argv)
{
register int i;
int i;
for (i = 1; i < argc; i++) {
printf("argv[%d] = <", i);
@ -44,11 +41,9 @@ char **argv;
exit(EXIT_SUCCESS);
}
void
strprint(str)
char *str;
void strprint(char *str)
{
register unsigned char *s;
unsigned char *s;
for (s = (unsigned char *)str; s && *s; s++) {
if (*s < ' ') {

View File

@ -21,10 +21,7 @@
#include <stdio.h>
#include <stdlib.h>
int
main(argc, argv)
int argc;
char **argv;
int main(int argc, char **argv)
{
argv++;

View File

@ -26,7 +26,7 @@ enum {
struct fb_bitfield {
uint32_t offset; /* beginning of bitfield */
uint32_t length; /* length of bitfield */
uint32_t length; /* length of bitfield */
uint32_t msb_right; /* !=0: Most significant bit is right */
};
struct fb_var_screeninfo {
@ -52,7 +52,7 @@ struct fb_var_screeninfo {
uint32_t height; /* height of picture in mm */
uint32_t width; /* width of picture in mm */
uint32_t accel_flags; /* acceleration flags (hints) */
uint32_t accel_flags; /* acceleration flags (hints) */
/* Timing: All values in pixclocks, except pixclock (of course) */
uint32_t pixclock; /* pixel clock in ps (pico seconds) */
@ -317,7 +317,7 @@ static int read_mode_db(struct fb_var_screeninfo *base, const char *fn,
}
case 4:
case 5:
case 6: {
case 6: {
static const uint32_t syncs[] = {FB_SYNC_VERT_HIGH_ACT, FB_SYNC_HOR_HIGH_ACT, FB_SYNC_COMP_HIGH_ACT};
ss(&base->sync, syncs[i-4], p, "low");
//bb_info_msg("SYNC[%s]", p);

View File

@ -4,7 +4,7 @@
* Based on code from util-linux v 2.11l
*
* Copyright (c) 1989
* The Regents of the University of California. All rights reserved.
* The Regents of the University of California. All rights reserved.
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
@ -32,11 +32,11 @@ static void bb_dump_addfile(dumper_t *dumper, char *name)
}
static const char *const add_strings[] = {
"\"%07.7_ax \" 16/1 \"%03o \" \"\\n\"", /* b */
"\"%07.7_ax \" 16/1 \"%3_c \" \"\\n\"", /* c */
"\"%07.7_ax \" 8/2 \" %05u \" \"\\n\"", /* d */
"\"%07.7_ax \" 8/2 \" %06o \" \"\\n\"", /* o */
"\"%07.7_ax \" 8/2 \" %04x \" \"\\n\"", /* x */
"\"%07.7_ax \" 16/1 \"%03o \" \"\\n\"", /* b */
"\"%07.7_ax \" 16/1 \"%3_c \" \"\\n\"", /* c */
"\"%07.7_ax \" 8/2 \" %05u \" \"\\n\"", /* d */
"\"%07.7_ax \" 8/2 \" %06o \" \"\\n\"", /* o */
"\"%07.7_ax \" 8/2 \" %04x \" \"\\n\"", /* x */
};
static const char add_first[] ALIGN1 = "\"%07.7_Ax\n\"";