summaryrefslogtreecommitdiffstats
path: root/usr.bin/hexdump/odsyntax.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove the advertising clause from UCB copyrighted files in usr.bin. Thisjoel2010-12-111-4/+0
| | | | | | | | | is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change Also add $FreeBSD$ to a few files to keep svn happy. Discussed with: imp, rwatson
* display.c:johan2004-07-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 'savech' is only used if it is set a few lines above where it is used, initialize it to silence warning. - 'length' is either -1 or greater than 0, hence it is safe to cast it to unsigned when comparing it here. odsyntax.c: - 'p' is assigned either (*argvp)[0] or (*argvp)[1] which both are char *. 'num' and 'end' are assigned values based on 'p'. Hence use char * instead of unsigned char * for these variables. '&end' as the second argument to strtoll does not need to be casted to char** any more. This solves a 'dereferencing type-punned pointer will break strict-aliasing rules' warning when compiling with -O2. parse.c: - 'prec' is only used when sokay == USEPREC and sokay = USEPREC when 'prec' is assigned. Hence 'prec' is not used uninitialized, initialize it to silence warning. - The code involving 'nextpr' is hard to follow, but I belive 'nextpr' will not be used unless it is initialized. Anyway, IF 'nextpr' is used uninitialized it is better to get a consistant error (seg fault, when dereferencing a NULL pointer) than potentially accessing some random memory. The above changes makes hexdump WARNS=6 clean even when compiled with -O2. Hence bump WARNS to keep it clean. Tested by: CFLAGS='-O2 -pipe' make universe
* ANSIify function definitions.dwmalone2002-09-041-6/+2
| | | | | | | | | Add some constness to avoid some warnings. Remove use register keyword. Deal with missing/unneeded extern/prototypes. Some minor type changes/casts to avoid warnings. Reviewed by: md5
* Consistently use FBSDIDobrien2002-06-301-2/+2
|
* Make the output tidier when multiple integer formats are requested bytjr2002-05-171-3/+3
| | | | | | attempting to line up values into columns. Obtained from: NetBSD (idea)
* Overhaul hexdump's od syntax code to handle the -s -A -j -N -t options thattjr2002-05-171-52/+234
| | | | | | SUSv3 requires and give od a proper manual page. PR: 36783
* Declare variables that were extern'd in multiple places in hexdump.h.tjr2002-05-171-3/+0
| | | | PR: 36783
* Un-deprecate od(1): rename the `deprecated' variable to `odmode', remove thetjr2002-05-171-3/+2
| | | | | | | | | deprecation warning from the utility and manual page. Since this utility is required by POSIX, it's not likely to be removed any time soon. This is leading up to the addition of the P1003.1-2001 -s -A -j -N -t options. PR: 36783
* remove __Pimp2002-03-221-2/+2
|
* File positions are off_t nowdays, not long, so:ache2001-09-011-1/+1
| | | | | | | | | | strtol -> strtoll fseek -> fseeko NOTE: that fseek not works for >long offsets files per POSIX: [EOVERFLOW] For fseek( ), the resulting file offset would be a value which cannot be represented correctly in an object of type long.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Clean up some ambiguous nested if/elses.billf1999-07-041-2/+3
|
* Localize itache1997-11-041-4/+3
|
* Use err(3) instead of local redefinition, incorporate `hd' in usage str.charnier1997-07-101-5/+8
|
* compare return value from getopt against -1 rather than EOF, per the finalimp1997-03-291-1/+1
| | | | posix standard on the topic.
* Merge from Lite2peter1997-03-111-3/+5
|
* Remove trailing whitespace.rgrimes1995-05-301-1/+1
|
* BSD 4.4 Lite Usr.bin Sourcesrgrimes1994-05-271-0/+263
OpenPOWER on IntegriCloud