mirror of
https://github.com/sheumann/hush.git
synced 2024-12-21 23:29:34 +00:00
od: provide full-blown od from coreutils if CONFIG_DESKTOP
This commit is contained in:
parent
cba9ef5523
commit
1114de7219
@ -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"
|
||||
|
||||
|
@ -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
1594
coreutils/od_bloaty.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -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,
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user