/* Decode the modern od format string S. Append the decoded
representation to the global array SPEC, reallocating SPEC if
- necessary. Return zero if S is valid, nonzero otherwise. */
+ necessary. */
static void
decode_format_string(const char *s)
as large as the size of the current file, we can
decrement n_skip and go on to the next file. */
if (fstat(fileno(in_stream), &file_stats) == 0
- && S_ISREG(file_stats.st_mode) && file_stats.st_size >= 0
+ && S_ISREG(file_stats.st_mode) && file_stats.st_size > 0
) {
if (file_stats.st_size < n_skip) {
n_skip -= file_stats.st_size;
- /* take check&close / open_next route */
+ /* take "check & close / open_next" route */
} else {
if (fseeko(in_stream, n_skip, SEEK_CUR) != 0)
ioerror = 1;
return;
}
} else {
- /* If it's not a regular file with nonnegative size,
+ /* If it's not a regular file with positive size,
position the file pointer by reading. */
char buf[1024];
size_t n_bytes_to_read = 1024;
spec, extend the input block with zero bytes until its length is a
multiple of all format spec sizes. Write the final block. Finally,
write on a line by itself the offset of the byte after the last byte
- read. Accumulate return values from calls to read_block and
- check_and_close, and if any was nonzero, return nonzero.
- Otherwise, return zero. */
+ read. */
static void
dump(off_t current_offset, off_t end_offset)
and INPUT_FILENAME so they correspond to the next file in the list.
Then try to read a byte from the newly opened file. Repeat if
necessary until EOF is reached for the last file in FILE_LIST, then
- set *C to EOF and return. Subsequent calls do likewise. The return
- value is nonzero if any errors occured, zero otherwise. */
+ set *C to EOF and return. Subsequent calls do likewise. */
static void
read_char(int *c)
A string constant is a run of at least 'string_min' ASCII
graphic (or formatting) characters terminated by a null.
Based on a function written by Richard Stallman for a
- traditional version of od. Return nonzero if an error
- occurs. Otherwise, return zero. */
+ traditional version of od. */
static void
dump_strings(off_t address, off_t end_offset)
if (str_w)
bytes_per_block = xatou(str_w);
if (!bytes_per_block || bytes_per_block % l_c_m != 0) {
- bb_error_msg("warning: invalid width %zu; using %d instead",
- bytes_per_block, l_c_m);
+ bb_error_msg("warning: invalid width %u; using %d instead",
+ (unsigned)bytes_per_block, l_c_m);
bytes_per_block = l_c_m;
}
} else {
"Address: 127.0.0.1\n"
#define od_trivial_usage \
- "[-aBbcDdeFfHhIiLlOovXx] [FILE]"
+ "[-aBbcDdeFfHhIiLlOovXx] " USE_DESKTOP("[-t TYPE] ") "[FILE]"
#define od_full_usage \
"Write an unambiguous representation, octal bytes by default, of FILE\n" \
- "to standard output. With no FILE, or when FILE is -, read standard input."
+ "to standard output. With no FILE or when FILE is -, read standard input."
#define openvt_trivial_usage \
"VTNUM COMMAND [ARGS...]"