mirror of
https://github.com/sheumann/hush.git
synced 2025-01-13 21:31:51 +00:00
clean up accumulated whitespace damage
This commit is contained in:
parent
41cca2b4f5
commit
8e858e2700
@ -542,7 +542,7 @@ check_and_close(void)
|
|||||||
fmt = SIGNED_DECIMAL;
|
fmt = SIGNED_DECIMAL;
|
||||||
size = INT or LONG; (whichever integral_type_size[4] resolves to)
|
size = INT or LONG; (whichever integral_type_size[4] resolves to)
|
||||||
print_function = print_int; (assuming size == INT)
|
print_function = print_int; (assuming size == INT)
|
||||||
fmt_string = "%011d%c";
|
fmt_string = "%011d%c";
|
||||||
}
|
}
|
||||||
S_ORIG is solely for reporting errors. It should be the full format
|
S_ORIG is solely for reporting errors. It should be the full format
|
||||||
string argument. */
|
string argument. */
|
||||||
@ -823,7 +823,7 @@ skip(off_t n_skip)
|
|||||||
n_bytes_read = fread(buf, 1, n_bytes_to_read, in_stream);
|
n_bytes_read = fread(buf, 1, n_bytes_to_read, in_stream);
|
||||||
n_skip -= n_bytes_read;
|
n_skip -= n_bytes_read;
|
||||||
if (n_bytes_read != n_bytes_to_read)
|
if (n_bytes_read != n_bytes_to_read)
|
||||||
break; /* EOF on this file or error */
|
break; /* EOF on this file or error */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (n_skip == 0)
|
if (n_skip == 0)
|
||||||
@ -1334,7 +1334,7 @@ int od_main(int argc, char **argv)
|
|||||||
/* If the --traditional option is used, there may be from
|
/* If the --traditional option is used, there may be from
|
||||||
* 0 to 3 remaining command line arguments; handle each case
|
* 0 to 3 remaining command line arguments; handle each case
|
||||||
* separately.
|
* separately.
|
||||||
* od [file] [[+]offset[.][b] [[+]label[.][b]]]
|
* od [file] [[+]offset[.][b] [[+]label[.][b]]]
|
||||||
* The offset and pseudo_start have the same syntax.
|
* The offset and pseudo_start have the same syntax.
|
||||||
*
|
*
|
||||||
* FIXME: POSIX 1003.1-2001 with XSI requires support for the
|
* FIXME: POSIX 1003.1-2001 with XSI requires support for the
|
||||||
|
@ -896,7 +896,7 @@ restart:
|
|||||||
/* or does this line matches our last address regex */
|
/* or does this line matches our last address regex */
|
||||||
|| (sed_cmd->end_match && old_matched
|
|| (sed_cmd->end_match && old_matched
|
||||||
&& (regexec(sed_cmd->end_match,
|
&& (regexec(sed_cmd->end_match,
|
||||||
pattern_space, 0, NULL, 0) == 0))
|
pattern_space, 0, NULL, 0) == 0))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ enum {
|
|||||||
S_TO_WS = 2, // used in skip_thing() for moving "dot"
|
S_TO_WS = 2, // used in skip_thing() for moving "dot"
|
||||||
S_OVER_WS = 3, // used in skip_thing() for moving "dot"
|
S_OVER_WS = 3, // used in skip_thing() for moving "dot"
|
||||||
S_END_PUNCT = 4, // used in skip_thing() for moving "dot"
|
S_END_PUNCT = 4, // used in skip_thing() for moving "dot"
|
||||||
S_END_ALNUM = 5 // used in skip_thing() for moving "dot"
|
S_END_ALNUM = 5, // used in skip_thing() for moving "dot"
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef unsigned char Byte;
|
typedef unsigned char Byte;
|
||||||
|
@ -575,7 +575,7 @@ int bb_execvp(const char *file, char *const argv[]);
|
|||||||
cmd, __VA_ARGS__)
|
cmd, __VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
#define BB_EXECVP(prog,cmd) execvp(prog,cmd)
|
#define BB_EXECVP(prog,cmd) execvp(prog,cmd)
|
||||||
#define BB_EXECLP(prog,cmd,...) execlp(prog,cmd, __VA_ARGS__)
|
#define BB_EXECLP(prog,cmd,...) execlp(prog,cmd, __VA_ARGS__)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
USE_DESKTOP(long long) int uncompress(int fd_in, int fd_out);
|
USE_DESKTOP(long long) int uncompress(int fd_in, int fd_out);
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
"[-vn] [-H type] [-i if] -a [hostname]\n" \
|
"[-vn] [-H type] [-i if] -a [hostname]\n" \
|
||||||
"[-v] [-i if] -d hostname [pub]\n" \
|
"[-v] [-i if] -d hostname [pub]\n" \
|
||||||
"[-v] [-H type] [-i if] -s hostname hw_addr [temp]\n" \
|
"[-v] [-H type] [-i if] -s hostname hw_addr [temp]\n" \
|
||||||
"[-v] [-H type] [-i if] -s hostname hw_addr [netmask nm] pub\n" \
|
"[-v] [-H type] [-i if] -s hostname hw_addr [netmask nm] pub\n" \
|
||||||
"[-v] [-H type] [-i if] -Ds hostname ifa [netmask nm] pub\n"
|
"[-v] [-H type] [-i if] -Ds hostname ifa [netmask nm] pub\n"
|
||||||
#define arp_full_usage \
|
#define arp_full_usage \
|
||||||
"Manipulate the system ARP cache" \
|
"Manipulate the system ARP cache" \
|
||||||
@ -269,7 +269,7 @@
|
|||||||
"Change the process state and run specified program" \
|
"Change the process state and run specified program" \
|
||||||
"\n\nOptions:\n" \
|
"\n\nOptions:\n" \
|
||||||
" -u user[:grp] Set uid and gid\n" \
|
" -u user[:grp] Set uid and gid\n" \
|
||||||
" -U user[:grp] Set environment variables UID and GID\n" \
|
" -U user[:grp] Set environment variables UID and GID\n" \
|
||||||
" -e dir Set environment variables as specified by files\n" \
|
" -e dir Set environment variables as specified by files\n" \
|
||||||
" in the directory: file=1st_line_of_file\n" \
|
" in the directory: file=1st_line_of_file\n" \
|
||||||
" -/ dir Chroot to dir\n" \
|
" -/ dir Chroot to dir\n" \
|
||||||
@ -1776,7 +1776,7 @@
|
|||||||
|
|
||||||
#define ls_trivial_usage \
|
#define ls_trivial_usage \
|
||||||
"[-1Aa" USE_FEATURE_LS_TIMESTAMPS("c") "Cd" \
|
"[-1Aa" USE_FEATURE_LS_TIMESTAMPS("c") "Cd" \
|
||||||
USE_FEATURE_LS_TIMESTAMPS("e") USE_FEATURE_LS_FILETYPES("F") "iln" \
|
USE_FEATURE_LS_TIMESTAMPS("e") USE_FEATURE_LS_FILETYPES("F") "iln" \
|
||||||
USE_FEATURE_LS_FILETYPES("p") USE_FEATURE_LS_FOLLOWLINKS("L") \
|
USE_FEATURE_LS_FILETYPES("p") USE_FEATURE_LS_FOLLOWLINKS("L") \
|
||||||
USE_FEATURE_LS_RECURSIVE("R") USE_FEATURE_LS_SORTFILES("rS") "s" \
|
USE_FEATURE_LS_RECURSIVE("R") USE_FEATURE_LS_SORTFILES("rS") "s" \
|
||||||
USE_FEATURE_AUTOWIDTH("T") USE_FEATURE_LS_TIMESTAMPS("tu") \
|
USE_FEATURE_AUTOWIDTH("T") USE_FEATURE_LS_TIMESTAMPS("tu") \
|
||||||
|
@ -22,7 +22,7 @@ int create_icmp_socket(void)
|
|||||||
* proto->p_proto to have the correct value for "icmp" */
|
* proto->p_proto to have the correct value for "icmp" */
|
||||||
sock = socket(AF_INET, SOCK_RAW,
|
sock = socket(AF_INET, SOCK_RAW,
|
||||||
(proto ? proto->p_proto : 1)); /* 1 == ICMP */
|
(proto ? proto->p_proto : 1)); /* 1 == ICMP */
|
||||||
if (sock < 0) {
|
if (sock < 0) {
|
||||||
if (errno == EPERM)
|
if (errno == EPERM)
|
||||||
bb_error_msg_and_die(bb_msg_perm_denied_are_you_root);
|
bb_error_msg_and_die(bb_msg_perm_denied_are_you_root);
|
||||||
bb_perror_msg_and_die(bb_msg_can_not_create_raw_socket);
|
bb_perror_msg_and_die(bb_msg_can_not_create_raw_socket);
|
||||||
|
@ -79,9 +79,9 @@ const struct option *applet_long_options
|
|||||||
(see getopt(3))
|
(see getopt(3))
|
||||||
|
|
||||||
static const struct option applet_long_options[] = {
|
static const struct option applet_long_options[] = {
|
||||||
//name,has_arg,flag,val
|
//name,has_arg,flag,val
|
||||||
{ "verbose", 0, 0, 'v' },
|
{ "verbose", 0, 0, 'v' },
|
||||||
{ 0, 0, 0, 0 }
|
{ 0, 0, 0, 0 }
|
||||||
};
|
};
|
||||||
applet_long_options = applet_long_options;
|
applet_long_options = applet_long_options;
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ void *xmalloc_open_read_close(const char *filename, size_t *sizep)
|
|||||||
buf = xmalloc(size + 1);
|
buf = xmalloc(size + 1);
|
||||||
size = read_close(fd, buf, size);
|
size = read_close(fd, buf, size);
|
||||||
if ((ssize_t)size < 0)
|
if ((ssize_t)size < 0)
|
||||||
bb_perror_msg_and_die("'%s'", filename);
|
bb_perror_msg_and_die("'%s'", filename);
|
||||||
xrealloc(buf, size + 1);
|
xrealloc(buf, size + 1);
|
||||||
buf[size] = '\0';
|
buf[size] = '\0';
|
||||||
if (sizep) *sizep = size;
|
if (sizep) *sizep = size;
|
||||||
|
@ -522,7 +522,7 @@ void bb_sanitize_stdio_maybe_daemonize(int daemonize)
|
|||||||
bb_perror_msg_and_die("fork");
|
bb_perror_msg_and_die("fork");
|
||||||
if (pid) /* parent */
|
if (pid) /* parent */
|
||||||
exit(0);
|
exit(0);
|
||||||
/* child */
|
/* child */
|
||||||
/* if daemonizing, make sure we detach from stdio */
|
/* if daemonizing, make sure we detach from stdio */
|
||||||
setsid();
|
setsid();
|
||||||
dup2(fd, 0);
|
dup2(fd, 0);
|
||||||
|
@ -101,7 +101,7 @@ static int adduser(struct passwd *p, unsigned long flags)
|
|||||||
bb_error_msg_and_die("illegal uid or no uids left");
|
bb_error_msg_and_die("illegal uid or no uids left");
|
||||||
case 3:
|
case 3:
|
||||||
bb_error_msg_and_die("%s: group name already in use", p->pw_name);
|
bb_error_msg_and_die("%s: group name already in use", p->pw_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* add to passwd */
|
/* add to passwd */
|
||||||
if (putpwent(p, file) == -1) {
|
if (putpwent(p, file) == -1) {
|
||||||
|
@ -883,13 +883,13 @@ static void number_process(int first_digit)
|
|||||||
break;
|
break;
|
||||||
case 'g': case '<': case 'G': case '>':
|
case 'g': case '<': case 'G': case '>':
|
||||||
cur_fline = num + max_displayed_line;
|
cur_fline = num + max_displayed_line;
|
||||||
read_lines();
|
read_lines();
|
||||||
buffer_line(num - 1);
|
buffer_line(num - 1);
|
||||||
break;
|
break;
|
||||||
case 'p': case '%':
|
case 'p': case '%':
|
||||||
num = num * (max_fline / 100); /* + max_fline / 2; */
|
num = num * (max_fline / 100); /* + max_fline / 2; */
|
||||||
cur_fline = num + max_displayed_line;
|
cur_fline = num + max_displayed_line;
|
||||||
read_lines();
|
read_lines();
|
||||||
buffer_line(num);
|
buffer_line(num);
|
||||||
break;
|
break;
|
||||||
#if ENABLE_FEATURE_LESS_REGEXP
|
#if ENABLE_FEATURE_LESS_REGEXP
|
||||||
|
@ -873,8 +873,9 @@ static int sendHeaders(HttpResponseNum responseNum)
|
|||||||
|
|
||||||
#if ENABLE_FEATURE_HTTPD_BASIC_AUTH
|
#if ENABLE_FEATURE_HTTPD_BASIC_AUTH
|
||||||
if (responseNum == HTTP_UNAUTHORIZED) {
|
if (responseNum == HTTP_UNAUTHORIZED) {
|
||||||
len += sprintf(buf+len, "WWW-Authenticate: Basic realm=\"%s\"\r\n",
|
len += sprintf(buf+len,
|
||||||
config->realm);
|
"WWW-Authenticate: Basic realm=\"%s\"\r\n",
|
||||||
|
config->realm);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (responseNum == HTTP_MOVED_TEMPORARILY) {
|
if (responseNum == HTTP_MOVED_TEMPORARILY) {
|
||||||
@ -2000,7 +2001,7 @@ int httpd_main(int argc, char *argv[])
|
|||||||
if (opt & OPT_SETUID) {
|
if (opt & OPT_SETUID) {
|
||||||
if (ugid.gid != (gid_t)-1) {
|
if (ugid.gid != (gid_t)-1) {
|
||||||
if (setgroups(1, &ugid.gid) == -1)
|
if (setgroups(1, &ugid.gid) == -1)
|
||||||
bb_perror_msg_and_die("setgroups");
|
bb_perror_msg_and_die("setgroups");
|
||||||
xsetgid(ugid.gid);
|
xsetgid(ugid.gid);
|
||||||
}
|
}
|
||||||
xsetuid(ugid.uid);
|
xsetuid(ugid.uid);
|
||||||
|
@ -421,7 +421,7 @@ static int static_up(struct interface_defn_t *ifd, execfn *exec)
|
|||||||
result += execute("ifconfig %iface% %address% netmask %netmask%"
|
result += execute("ifconfig %iface% %address% netmask %netmask%"
|
||||||
"[[ broadcast %broadcast%]][[ pointopoint %pointopoint%]] ",
|
"[[ broadcast %broadcast%]][[ pointopoint %pointopoint%]] ",
|
||||||
ifd, exec);
|
ifd, exec);
|
||||||
result += execute("[[route add default gw %gateway% %iface%]]", ifd, exec);
|
result += execute("[[route add default gw %gateway% %iface%]]", ifd, exec);
|
||||||
return ((result == 3) ? 3 : 0);
|
return ((result == 3) ? 3 : 0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -200,6 +200,6 @@ uint8_t *dname_enc(const uint8_t *cstr, int clen, const char *src, int *retlen)
|
|||||||
|
|
||||||
*retlen = d - dname + 1;
|
*retlen = d - dname + 1;
|
||||||
return dname;
|
return dname;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* ENABLE_FEATURE_RFC3397 */
|
#endif /* ENABLE_FEATURE_RFC3397 */
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* selinuxenabled
|
* selinuxenabled
|
||||||
*
|
*
|
||||||
* Based on libselinux 1.33.1
|
* Based on libselinux 1.33.1
|
||||||
* Port to BusyBox Hiroshi Shinji <shiroshi@my.email.ne.jp>
|
* Port to BusyBox Hiroshi Shinji <shiroshi@my.email.ne.jp>
|
||||||
*
|
*
|
||||||
|
@ -11197,7 +11197,7 @@ find_command(char *name, struct cmdentry *entry, int act, const char *path)
|
|||||||
goto builtin_success;
|
goto builtin_success;
|
||||||
} else if (builtinloc <= 0) {
|
} else if (builtinloc <= 0) {
|
||||||
goto builtin_success;
|
goto builtin_success;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We have to search path. */
|
/* We have to search path. */
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
extern char **environ;
|
extern char **environ;
|
||||||
|
|
||||||
int
|
int
|
||||||
main (argc, argv)
|
main (argc, argv)
|
||||||
int argc;
|
int argc;
|
||||||
char **argv;
|
char **argv;
|
||||||
{
|
{
|
||||||
|
@ -3723,7 +3723,7 @@ static char *evalstr(char *cp, int f)
|
|||||||
if (wb == NULL || wb->w_nword == 0
|
if (wb == NULL || wb->w_nword == 0
|
||||||
|| (cp = wb->w_words[0]) == NULL
|
|| (cp = wb->w_words[0]) == NULL
|
||||||
) {
|
) {
|
||||||
// TODO: I suspect that
|
// TODO: I suspect that
|
||||||
// char *evalstr(char *cp, int f) is actually
|
// char *evalstr(char *cp, int f) is actually
|
||||||
// const char *evalstr(const char *cp, int f)!
|
// const char *evalstr(const char *cp, int f)!
|
||||||
cp = (char*)"";
|
cp = (char*)"";
|
||||||
|
@ -356,9 +356,9 @@ sgi_set_swappartition(int i)
|
|||||||
static int
|
static int
|
||||||
sgi_check_bootfile(const char* aFile)
|
sgi_check_bootfile(const char* aFile)
|
||||||
{
|
{
|
||||||
if (strlen(aFile) < 3) /* "/a\n" is minimum */ {
|
if (strlen(aFile) < 3) /* "/a\n" is minimum */ {
|
||||||
printf(_("\nInvalid Bootfile!\n"
|
printf(_("\nInvalid Bootfile!\n"
|
||||||
"\tThe bootfile must be an absolute non-zero pathname,\n"
|
"\tThe bootfile must be an absolute non-zero pathname,\n"
|
||||||
"\te.g. \"/unix\" or \"/unix.save\".\n"));
|
"\te.g. \"/unix\" or \"/unix.save\".\n"));
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user