/* BB_AUDIT SUSv3 compliant */
/* http://www.opengroup.org/onlinepubs/007904975/utilities/uniq.html */
-#include "busybox.h"
+#include "libbb.h"
-static const char uniq_opts[] = "cdu" "f:s:" "cdu\0\1\2\4";
+static const char uniq_opts[] ALIGN1 = "cdu" "f:s:" "cdu\0\1\2\4";
static FILE *xgetoptfile_uniq_s(char **argv, int read0write2)
{
skip_fields = skip_chars = 0;
- opt = getopt32(argc, argv, "cduf:s:", &s0, &s1);
+ opt = getopt32(argv, "cduf:s:", &s0, &s1);
if (opt & OPT_f)
skip_fields = xatoul(s0);
if (opt & OPT_s)
e1 = s1;
for (i = skip_fields; i; i--) {
e1 = skip_whitespace(e1);
- while (*e1 && !isspace(*e1)) {
- ++e1;
- }
+ e1 = skip_non_whitespace(e1);
}
for (i = skip_chars; *e1 && i; i--) {
++e1;