aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/hexdump/odsyntax.c
Commit message (Collapse)AuthorAgeFilesLines
* usr.bin: Automated cleanup of cdefs and other formattingWarner Losh2023-11-271-3/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* usr.bin: Remove ancient SCCS tags.Warner Losh2023-11-271-3/+0
| | | | | | | | Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script. Sponsored by: Netflix
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* Renumber copyright clause 4Warner Losh2017-02-281-1/+1
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* Remove the advertising clause from UCB copyrighted files in usr.bin. ThisJoel Dahl2010-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 Notes: svn path=/head/; revision=216370
* display.c:Johan Karlsson2004-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 Notes: svn path=/head/; revision=132541
* ANSIify function definitions.David Malone2002-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 Notes: svn path=/head/; revision=102944
* Consistently use FBSDIDDavid E. O'Brien2002-06-301-2/+2
| | | | Notes: svn path=/head/; revision=99112
* Make the output tidier when multiple integer formats are requested byTim J. Robbins2002-05-171-3/+3
| | | | | | | | | attempting to line up values into columns. Obtained from: NetBSD (idea) Notes: svn path=/head/; revision=96798
* Overhaul hexdump's od syntax code to handle the -s -A -j -N -t options thatTim J. Robbins2002-05-171-52/+234
| | | | | | | | | SUSv3 requires and give od a proper manual page. PR: 36783 Notes: svn path=/head/; revision=96795
* Declare variables that were extern'd in multiple places in hexdump.h.Tim J. Robbins2002-05-171-3/+0
| | | | | | | PR: 36783 Notes: svn path=/head/; revision=96793
* Un-deprecate od(1): rename the `deprecated' variable to `odmode', remove theTim J. Robbins2002-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 Notes: svn path=/head/; revision=96787
* remove __PWarner Losh2002-03-221-2/+2
| | | | Notes: svn path=/head/; revision=92920
* File positions are off_t nowdays, not long, so:Andrey A. Chernov2001-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. Notes: svn path=/head/; revision=82766
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Clean up some ambiguous nested if/elses.Bill Fumerola1999-07-041-2/+3
| | | | Notes: svn path=/head/; revision=48566
* Localize itAndrey A. Chernov1997-11-041-4/+3
| | | | Notes: svn path=/head/; revision=30921
* Use err(3) instead of local redefinition, incorporate `hd' in usage str.Philippe Charnier1997-07-101-5/+8
| | | | Notes: svn path=/head/; revision=27315
* compare return value from getopt against -1 rather than EOF, per the finalWarner Losh1997-03-291-1/+1
| | | | | | | posix standard on the topic. Notes: svn path=/head/; revision=24360
* Merge from Lite2Peter Wemm1997-03-111-3/+5
| | | | Notes: svn path=/head/; revision=23693
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-1/+1
| | | | Notes: svn path=/head/; revision=8874
* BSD 4.4 Lite Usr.bin SourcesRodney W. Grimes1994-05-271-0/+263
Notes: svn path=/cvs2svn/branches/CHRISTOS/; revision=1590