od: provide full-blown od from coreutils if CONFIG_DESKTOP

This commit is contained in:
Denis Vlasenko 2006-10-10 23:26:05 +00:00
parent cba9ef5523
commit 1114de7219
5 changed files with 1608 additions and 6 deletions

View File

@ -3,8 +3,6 @@
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/
//#include <unistd.h>
//#include <string.h>
#include "libbb.h"
#include "unarchive.h"

View File

@ -11,12 +11,13 @@
* Original copyright notice is retained at the end of this file.
*/
// TODO: -t. busybox's own build script needs it
#include <ctype.h>
#include <string.h>
#if ENABLE_DESKTOP
/* This one provides -t (busybox's own build script needs it) */
#include "od_bloaty.c"
#else
#include <getopt.h>
#include <stdlib.h>
#include "busybox.h"
#include "dump.h"
@ -191,6 +192,7 @@ int od_main(int argc, char **argv)
return bb_dump_dump(argv);
}
#endif /* ENABLE_DESKTOP */
/*-
* Copyright (c) 1990 The Regents of the University of California.

1594
coreutils/od_bloaty.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -326,6 +326,8 @@ unsigned long xstrtoul_range_sfx(const char *numstr, int base,
unsigned long xstrtoul_range(const char *numstr, int base,
unsigned long lower,
unsigned long upper);
unsigned long xstrtoul_sfx(const char *numstr, int base,
const struct suffix_mult *suffixes);
unsigned long xstrtoul(const char *numstr, int base);
unsigned long xatoul_range_sfx(const char *numstr,
unsigned long lower,

View File

@ -98,6 +98,12 @@ unsigned long xstrtoul_range(const char *numstr, int base,
return xstrtoul_range_sfx(numstr, base, lower, upper, NULL);
}
unsigned long xstrtoul_sfx(const char *numstr, int base,
const struct suffix_mult *suffixes)
{
return xstrtoul_range_sfx(numstr, base, 0, ULONG_MAX, suffixes);
}
unsigned long xstrtoul(const char *numstr, int base)
{
return xstrtoul_range_sfx(numstr, base, 0, ULONG_MAX, NULL);