#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <ctype.h> /* for isdigit() */
#include "libbb.h"
#include "dump.h"
pr->cchar = pr->fmt + (p1 - fmtp);
/* DBU:[dave@cray.com] w/o this, trailing fmt text, space is lost.
- * Skip subsequent text and up to the next % sign and tack the
- * additional text onto fmt: eg. if fmt is "%x is a HEX number",
+ * Skip subsequent text and up to the next % sign and tack the
+ * additional text onto fmt: eg. if fmt is "%x is a HEX number",
* we lose the " is a HEX number" part of fmt.
*/
for (p3 = p2; *p3 && *p3 != '%'; p3++);
struct stat sbuf;
if (statok) {
- if (fstat(fileno(stdin), &sbuf)) {
+ if (fstat(STDIN_FILENO, &sbuf)) {
bb_perror_msg_and_die("%s", fname);
}
if ((!(S_ISCHR(sbuf.st_mode) ||
/* od used nl, not lf */
if (*p <= 0x1f) {
*pr->cchar = 's';
- printf(pr->fmt, list[4 * (int)(*p)]);
+ printf(pr->fmt, list + (4 * (int)*p));
} else if (*p == 0x7f) {
*pr->cchar = 's';
printf(pr->fmt, "del");
/* PRINT; */
switch (pr->flags) {
case F_ADDRESS:
- printf(pr->fmt, address);
+ printf(pr->fmt, (unsigned int) address);
break;
case F_BPAD:
printf(pr->fmt, "");
for (pr = endfu->nextpr; pr; pr = pr->nextpr) {
switch (pr->flags) {
case F_ADDRESS:
- (void) printf(pr->fmt, eaddress);
+ (void) printf(pr->fmt, (unsigned int) eaddress);
break;
case F_TEXT:
(void) printf(pr->fmt);