summaryrefslogtreecommitdiffstats
path: root/text-utils/hexdump.c
diff options
context:
space:
mode:
authorKarel Zak2006-12-07 00:25:43 +0100
committerKarel Zak2006-12-07 00:25:43 +0100
commit22853e4a82c6ef7b336527529acb94b14a0b0fd8 (patch)
treeee28e4598c8c449d7e811711d8ce8eb17caecfb6 /text-utils/hexdump.c
parentImported from util-linux-2.10f tarball. (diff)
downloadkernel-qcow2-util-linux-22853e4a82c6ef7b336527529acb94b14a0b0fd8.tar.gz
kernel-qcow2-util-linux-22853e4a82c6ef7b336527529acb94b14a0b0fd8.tar.xz
kernel-qcow2-util-linux-22853e4a82c6ef7b336527529acb94b14a0b0fd8.zip
Imported from util-linux-2.10m tarball.
Diffstat (limited to 'text-utils/hexdump.c')
-rw-r--r--text-utils/hexdump.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/text-utils/hexdump.c b/text-utils/hexdump.c
index a2be19038..c18c61505 100644
--- a/text-utils/hexdump.c
+++ b/text-utils/hexdump.c
@@ -37,6 +37,7 @@
#include <sys/types.h>
#include <stdio.h>
+#include <string.h>
#include "hexdump.h"
#include "nls.h"
@@ -45,18 +46,16 @@ int blocksize; /* data block size */
int exitval; /* final exit value */
int length = -1; /* max bytes to read */
-int main(argc, argv)
- int argc;
- char **argv;
+int main(int argc, char **argv)
{
register FS *tfs;
- char *p, *rindex();
+ char *p;
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
- if (!(p = rindex(argv[0], 'o')) || strcmp(p, "od"))
+ if (!(p = strrchr(argv[0], 'o')) || strcmp(p, "od"))
newsyntax(argc, &argv);
else
oldsyntax(argc, &argv);