summaryrefslogtreecommitdiff
path: root/src/od.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1993-03-31 03:44:09 +0000
committerJim Meyering <jim@meyering.net>1993-03-31 03:44:09 +0000
commita3dc0b45fc729852460cc4ed61f09566c1fd22dc (patch)
tree2957415f7c7f1e790a0f577a086cdf6223503c5f /src/od.c
parent6cc93340110e35bb26a376289554ea5cf599440c (diff)
downloadcoreutils-a3dc0b45fc729852460cc4ed61f09566c1fd22dc.tar.xz
(parse_old_offset): Allow `0X' as well as `0x' prefix to indicate hex.
Diffstat (limited to 'src/od.c')
-rw-r--r--src/od.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/od.c b/src/od.c
index 225771342..20476831a 100644
--- a/src/od.c
+++ b/src/od.c
@@ -1359,7 +1359,7 @@ parse_old_offset (const char *s)
radix = 10;
else
{
- if (strlen (s) >= 2 && s[0] == '0' && s[1] == 'x')
+ if (strlen (s) >= 2 && s[0] == '0' && (s[1] == 'x' || s[1] == 'X'))
radix = 16;
else
radix = 8;
@@ -1781,11 +1781,10 @@ main (argc, argv)
n_files = argc - optind;
- /* If the --compatible option was used, there may be from 0 to 3
- remaining command line arguments:
- [file] [offset [pseudo_start]]
- The offset and pseudo_start have the same syntax
- FIXME: elaborate */
+ /* If the --compatible option is used, there may be from 0 to 3
+ remaining command line arguments; handle each case separately.
+ od [file] [[+]offset[.][b] [[+]label[.][b]]]
+ The offset and pseudo_start have the same syntax. */
if (flag_compatibility)
{