diff options
author | Denis Vlasenko | 2006-10-26 23:21:47 +0000 |
---|---|---|
committer | Denis Vlasenko | 2006-10-26 23:21:47 +0000 |
commit | f0ed376eda5d5c25d270e5100a881fb2d801bee6 (patch) | |
tree | 79166b700c497fbe798b6031e5bbff97e0933573 /coreutils/uniq.c | |
parent | 670a6626cabc1498f32b35f959591f8621d8447e (diff) | |
download | busybox-f0ed376eda5d5c25d270e5100a881fb2d801bee6.zip busybox-f0ed376eda5d5c25d270e5100a881fb2d801bee6.tar.gz |
remove bb_printf and the like
Diffstat (limited to 'coreutils/uniq.c')
-rw-r--r-- | coreutils/uniq.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/coreutils/uniq.c b/coreutils/uniq.c index a7b7a8e..100f2be 100644 --- a/coreutils/uniq.c +++ b/coreutils/uniq.c @@ -37,7 +37,7 @@ int uniq_main(int argc, char **argv) while ((opt = getopt(argc, argv, uniq_opts)) > 0) { if ((opt == 'f') || (opt == 's')) { - int t = xatoul(optarg); + unsigned long t = xatoul(optarg); if (opt == 'f') { skip_fields = t; } else { @@ -71,13 +71,13 @@ int uniq_main(int argc, char **argv) /* gnu uniq ignores newlines */ while ((s1 = xmalloc_getline(in)) != NULL) { e1 = s1; - for (i=skip_fields ; i ; i--) { + for (i = skip_fields; i; i--) { e1 = skip_whitespace(e1); while (*e1 && !isspace(*e1)) { ++e1; } } - for (i = skip_chars ; *e1 && i ; i--) { + for (i = skip_chars; *e1 && i; i--) { ++e1; } @@ -90,14 +90,14 @@ int uniq_main(int argc, char **argv) if (s0) { if (!(uniq_flags & (2 << !!dups))) { - bb_fprintf(out, "\0%d " + (uniq_flags & 1), dups + 1); - bb_fprintf(out, "%s\n", s0); + fprintf(out, "\0%d " + (uniq_flags & 1), dups + 1); + fprintf(out, "%s\n", s0); } free((void *)s0); } } while (s1); - xferror(in, input_filename); + die_if_ferror(in, input_filename); - bb_fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit(EXIT_SUCCESS); } |