summaryrefslogtreecommitdiff
path: root/src/od.c
AgeCommit message (Collapse)Author
2007-07-23Update all copyright notices to use the newer form.Jim Meyering
2007-07-10Change "version 2" to "version 3" in all copyright notices.Jim Meyering
2007-05-03The following commands and options now support the standard sizePaul Eggert
suffixes kB, M, MB, G, GB, and so on for T, P, Y, Z, and Y: head -c, head -n, od -j, od -N, od -S, split -b, split -C, tail -c, tail -n. * doc/coreutils.texi (od invocation, head invocation, tail invocation): Document support for new size suffixes. (head invocation, tail invocation): Document that -n uses the same suffixes as -c. (tail invocation): More-clearly document what leading "+" does. * src/head.c (usage, string_to_integer): Support new suffixes. * src/od.c (usage, main): Likewise. * src/split.c (usage, main): Likewise. * src/tail.c (usage, parse_options): Likewise. Prompted by a patch from Evan Hunt.
2007-03-28Help translators include translation team's web or email address.Jim Meyering
* src/system.h (emit_bug_reporting_address): New function. * src/base64.c: Use it rather than a literal printf. * src/basename.c, src/cat.c, src/chgrp.c, src/chmod.c: * src/chown.c, src/chroot.c, src/cksum.c, src/comm.c, src/cp.c: * src/csplit.c, src/cut.c, src/date.c, src/dd.c, src/df.c: * src/dircolors.c, src/dirname.c, src/du.c, src/echo.c, src/env.c: * src/expand.c, src/expr.c, src/factor.c, src/fmt.c, src/fold.c: * src/head.c, src/hostid.c, src/hostname.c, src/id.c, src/install.c: * src/join.c, src/kill.c, src/link.c, src/ln.c, src/logname.c: * src/ls.c, src/md5sum.c, src/mkdir.c, src/mkfifo.c, src/mknod.c: * src/mv.c, src/nice.c, src/nl.c, src/nohup.c, src/od.c: * src/paste.c, src/pathchk.c, src/pinky.c, src/pr.c, src/printenv.c: * src/printf.c, src/ptx.c, src/pwd.c, src/readlink.c, src/rm.c: * src/rmdir.c, src/seq.c, src/setuidgid.c, src/shred.c, src/shuf.c: * src/sleep.c, src/sort.c, src/split.c, src/stat.c, src/stty.c: * src/su.c, src/sum.c, src/sync.c, src/system.h, src/tac.c: * src/tail.c, src/tee.c, src/test.c, src/touch.c, src/tr.c: * src/true.c, src/tsort.c, src/tty.c, src/uname.c, src/unexpand.c: * src/uniq.c, src/unlink.c, src/uptime.c, src/users.c, src/wc.c: * src/who.c, src/whoami.c, src/yes.c: Likewise.
2006-12-12* src/system.h (SETVBUF): Remove definition, now that theJim Meyering
autoconf macro, AC_FUNC_SETVBUF_REVERSED, does nothing. * src/tee.c (tee_files): s/SETVBUF/setvbuf/. * src/od.c (open_next_file): Likewise.
2006-11-27Improve the check for departures from C89, and fix the departuresPaul Eggert
I found. * Makefile.maint (my-distcheck): Also check for C89 compatibility as best we can with GCC. * src/stat.c (PRINTF_OPTION): Omit comma before } in enum declaration; C89 doesn't allow this. * src/dcgen: Don't generate string literals longer than what C89 requires support for. * src/cut.c (usage): Don't use string literals longer than what C89 requires support for. * src/date.c (usage): Likewise. * src/dd.c (usage): Likewise. * src/du.c (usage): Likewise. * src/ls.c (usage): Likewise. * src/od.c (usage): Likewise. * src/readlink.c (usage): Likewise. * src/seq.c (usage): Likewise. * src/shred.c (usage): Likewise.
2006-11-16* bootstrap.conf (gnulib_modules): Add sys_stat, since we use it directly too.Paul Eggert
* lib/.cvsignore, lib/.gitignore: Add root-dev-ino.c, root-dev-ino.h. * m4/.cvsignore, m4/.gitignore: Add root-dev-ino.m4. * src/ls.c (DIRED_FPUTS_LITERAL, PUSH_CURRENT_DIRED_POS): Omit unnecessary parenthesization of args. * src/od.c (EQUAL_BLOCKS): Likewise. * src/system.h (STREQ, ASSIGN_STRDUPA): Likewise.
2006-10-20* src/od.c (usage): Change description of default to use "-w16",Jim Meyering
not the now-invalid "-w 16" syntax. From Dan Jacobson.
2006-08-21* src/od.c: Now that HAVE_UNSIGNED_LONG_LONG is no longer definedJim Meyering
in config.h, change the uses to HAVE_UNSIGNED_LONG_LONG_INT. Otherwise, on a system with 4-byte longs, "od -t u8" fails with this: od: invalid type string `u8'; this system doesn't provide a 8-byte integral type FIXME: add a test for this, but skip it when sizeof uintmax < 8.
2006-07-09Adjust to today's renaming changes in system.h.Paul Eggert
2006-02-02(usage): Mention that -t a ignores high order bit.Paul Eggert
2005-11-26(unsigned_long_long_int): Renamed from ulonglong_t,Paul Eggert
to avoid collision with POSIX name space. All uses changed.
2005-09-23Use `verify' to ensure that our hard-codedJim Meyering
bytes_to_*_digits arrays are long enough. Of course, 17+-byte integral types aren't on the near horizon, but just in case... (MAX_INTEGRAL_TYPE_SIZE): Move definition to precede new first use. (bytes_to_oct_digits, bytes_to_signed_dec_digits): (bytes_to_unsigned_dec_digits, bytes_to_hex_digits): Change base type from `char' to the clearer `unsigned int'.
2005-08-23Include <float.h> unconditionally.Jim Meyering
2005-08-12Cosmetic: use X2NREALLOC (only two arguments) rather than x2nrealloc (with ↵Jim Meyering
three).
2005-07-11(open_next_file): Avoid setmode; use POSIX-specified routines instead.Paul Eggert
2005-07-05Adjust to verify.h change.Paul Eggert
2005-07-04rename: s/verify_dcl/verify_decl/Jim Meyering
2005-07-04Reflect name change: s/VERIFY/verify_dcl/.Jim Meyering
2005-06-29Update sole use of VERIFY.Jim Meyering
Use X2REALLOC, rather than x2realloc.
2005-06-28(dump_strings): Use x2realloc on 1-byte base types, not x2nrealloc.Jim Meyering
2005-06-16Rather than this: error (..., "...`%s'...", arg);Jim Meyering
do this: error (..., "...%s...", quote (arg));
2005-05-14Update FSF postal mail address.Jim Meyering
2005-05-14Update FSF postal mail address.Jim Meyering
2005-04-26Remove posixver.h and its uses.Paul Eggert
(short_options): New constant, which always supports -w[num]. (COMMON_SHORT_OPTIONS): Remove.
2005-04-11(check_and_close): Don't assume fopen does not return stdin.Paul Eggert
2005-03-17Use VERIFY macro in place of an equivalent open-coded declaration.Jim Meyering
2004-09-28(format_address_paren): c is optional, so don't output it if it's '\0'.Paul Eggert
2004-09-06Several changes for POSIX and FreeBSD compatibility.Paul Eggert
(COMMON_SHORT_OPTIONS): Add -B, -D, -e, -F, -H, -I, -L, -O, -s, -X. (long_options, main): --strings is now -S, not -s. (usage): Reflect the usage changes. (parse_old_offset): Do not issue a diagnostic on failure; callers now do this as necessary. (main): Support POSIX syntax. Remove unused case 0 from getopt_long. Add support for new short options (many undocumented) for compatibility with FreeBSD. Remove FIXME for -s; it's now POSIX-compatible. Default format is now oS, not o2.
2004-08-03(FMT_BYTES_ALLOCATED): Now an enum, not a decimalPaul Eggert
constant. Do not assume PRIdMAX etc. are strings of length 3 or less. (struct tspec): Use it. fmt_string is now an array, not a pointer, as there's little point to the indirection here. (struct tspec, flag_dump_strings, traditional, flag_pseudo_start, limit_bytes_to_format, abbreviate_duplicate_blocks, have_read_stdin, simple_strtoul, decode_one_format, open_next_file, check_and_close, decode_format_string, skip, write_block, read_char, read_block, parse_old_offset, dump, dump_strings, main): Use bool for booleans. (struct tspec): Use void *, not char *, for generic pointers. (bytes_to_oct_digits, bytes_to_signed_dec_digits, bytes_to_unsigned_dec_digits, bytes_to_hex_digits): Use char, not unsigned int, since char suffices. (print_s_char, print_char, print_s_short, print_short, print_int, print_long, print_long_long, print_float, print_double, print_long_double): Rewrite to avoid casts. These now take void * arguments, instead of char *. Use the same body for all functions, except for the choice of type. Assume C89 to simplify handling of signed char. (dump_hexl_mode_trailer, print_named_ascii, print_ascii): Rewrite to avoid casts. (print_named_ascii, print_ascii): Now takes void *, not char *. (decode_one_format): Use int for printf field widths, not unsigned int. Pass void * to subsidiary printers, not char *. Simplify handling of floating-point formats by factoring out common code dealing with precision and field width. (decode_format_string): Avoid need for temporary copy of each decoded struct tspec. (get_lcm): Remove unnecessary cast. (main): Fix bug where more than INT_MAX failed decodes were ignored.
2004-06-21(main): Standardize on the diagnostics given when someone givesJim Meyering
too few operands ("missing operand after `xxx'") or too many operands ("extra operand `xxx'"). Include "quote.h" and/or "error.h" if it wasn't already being included.
2004-05-13(print_ascii, dump_strings): Use e.g. '\a' rather thanJim Meyering
'\007', for portability to EBCDIC hosts.
2004-04-15(gcd, lcm): Remove; now in system.h.Jim Meyering
2004-01-21(usage): Use EXIT_SUCCESS, not 0, for clarity.Jim Meyering
(usage): Don't bother normalizing exit status since the arg is already the correct exit status now.
2003-11-18`od -c -w9999999' could segfaultJim Meyering
(dump): Use xnmalloc/free, not alloca.
2003-11-04(decode_format_string): Remove unnecessary casts.Jim Meyering
Use more maintainable `sizeof *var'. (main): Call decode_format_string rather than decode_one_format, now that `spec' may be NULL.
2003-11-04(decode_format_string, dump_strings): Use x2nrealloc rather than xrealloc.Jim Meyering
2003-11-04(main): Use `sizeof *var' rather than `sizeof EXPLICIT_TYPE'.Jim Meyering
The former is more maintainable and usually shorter.
2003-10-18Most .c files (AUTHORS): Revert the WRITTEN_BY/AUTHORS changeJim Meyering
of 2003-09-19. Now, AUTHORS is a comma-separated list of strings. Update the call to parse_long_options so that `AUTHORS, NULL' are the last parameters. * src/true.c (main): Append NULL to version_etc argument list. * src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.
2003-09-28Remove unnecessary casts of alloca, since now it's guaranteed to be (void *).Jim Meyering
2003-09-24(check_and_close, dump, dump_strings): Don't report bogus errno valueJim Meyering
after ferror discovers an output error. We don't know the proper errno value, since it might have been caused by any of a whole bunch of calls, and it might have been trashed in the meantime. Fixing this problem will require much more extensive changes; in the meantime just say "write error". (skip): If a read fails, don't retry it later, so that we report the proper errno.
2003-09-18(WRITTEN_BY): Rename from AUTHORS.Jim Meyering
Begin each WRITTEN_BY string with `Written by ' and end it with `.'. Mark each WRITTEN_BY string as translatable.
2003-07-23Don't include headers already included by system.h:Jim Meyering
Don't include closeout.h.
2003-07-11(main): Enclose diagnostic in _(...).Jim Meyering
2003-06-17(main): Call initialize_main.Jim Meyering
2003-04-11Remove anachronistic casts of xmalloc,Jim Meyering
xrealloc, and xcalloc return values and of xrealloc's first argument.
2002-12-15Remove all uses of `PARAMS'.Jim Meyering
2002-09-21No longer include values.h.Jim Meyering
It was required solely for now-removed reference to BITSPERBYTE.
2002-09-17`od -t x8' used the wrong (`l'-prefixed) printf format.Jim Meyering
Likewise for the o8 and u8 formats. (ISPEC_TO_FORMAT): Define macro. (decode_one_format): Use PRIdMAX, PRIoMAX, etc. for LONG_LONG. Reported by Arun Sharma.
2002-09-02(skip): Add a cast to avoid warning about comparisonJim Meyering
between signed and unsigned.