projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Applied patch from I.Q. to add sort -u as a feature.
[oweals/busybox.git]
/
coreutils
/
test.c
diff --git
a/coreutils/test.c
b/coreutils/test.c
index ba6feb033e879c616af48d586d29b03ffd4ce7e0..79db8cbb62c65306c79d33b614fd6abd2fcea5e4 100644
(file)
--- a/
coreutils/test.c
+++ b/
coreutils/test.c
@@
-31,13
+31,13
@@
* "This program is in the Public Domain."
*/
* "This program is in the Public Domain."
*/
-#include "busybox.h"
#include <sys/types.h>
#include <unistd.h>
#include <ctype.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <ctype.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
+#include "busybox.h"
#define BB_DECLARE_EXTERN
#define bb_need_help
#include "messages.c"
#define BB_DECLARE_EXTERN
#define bb_need_help
#include "messages.c"
@@
-110,10
+110,10
@@
enum token_types {
PAREN
};
PAREN
};
-struct t_op {
+st
atic const st
ruct t_op {
const char *op_text;
short op_num, op_type;
const char *op_text;
short op_num, op_type;
-}
const
ops [] = {
+} ops [] = {
{"-r", FILRD, UNOP},
{"-w", FILWR, UNOP},
{"-x", FILEX, UNOP},
{"-r", FILRD, UNOP},
{"-w", FILWR, UNOP},
{"-x", FILEX, UNOP},
@@
-184,7
+184,7
@@
test_main(int argc, char** argv)
if (strcmp(applet_name, "[") == 0) {
if (strcmp(argv[--argc], "]"))
if (strcmp(applet_name, "[") == 0) {
if (strcmp(argv[--argc], "]"))
- error_msg_and_die("missing ]
\n
");
+ error_msg_and_die("missing ]");
argv[argc] = NULL;
}
/* Implement special cases from POSIX.2, section 4.62.4 */
argv[argc] = NULL;
}
/* Implement special cases from POSIX.2, section 4.62.4 */
@@
-233,9
+233,9
@@
syntax(op, msg)
char *msg;
{
if (op && *op)
char *msg;
{
if (op && *op)
- error_msg_and_die("%s: %s
\n
", op, msg);
+ error_msg_and_die("%s: %s", op, msg);
else
else
- error_msg_and_die("%s
\n
", msg);
+ error_msg_and_die("%s", msg);
}
static int
}
static int
@@
-470,13
+470,13
@@
getn(s)
r = strtol(s, &p, 10);
if (errno != 0)
r = strtol(s, &p, 10);
if (errno != 0)
- error_msg_and_die("%s: out of range
\n
", s);
+ error_msg_and_die("%s: out of range", s);
while (isspace(*p))
p++;
if (*p)
while (isspace(*p))
p++;
if (*p)
- error_msg_and_die("%s: bad number
\n
", s);
+ error_msg_and_die("%s: bad number", s);
return (int) r;
}
return (int) r;
}