Commit Graph

27 Commits

Author SHA1 Message Date
apb 53ee7761e4 Integer values, no matter what their width, are cast to int64_t or
uint64_t for printing.  Because of this, parse.c:rewrite() should use
PRI[diouxX]64 as the printf format; the previous revision which used
"lld" and friends was a temporary measure.  We assume that PRId64 ends
with 'd', PRIx64 ends with 'x', etc.

In display.c:display(), change some u_intNN_t types to C99 standard
uintNN_t types, and consistently cast to [u]int64_t when printing
integer values (even in two cases where it's not really necessary but it
makes the code look more consistent).
2009-01-18 21:34:32 +00:00
hans ec644bbf21 Use ll instead of non-standard q as length modifier in format strings.
Makes this work on Solaris. OK by apb.
2009-01-17 23:24:30 +00:00
christos be4d21eeca use ecalloc in previous 2006-10-09 14:27:06 +00:00
dsl 861fc6431d Fix core dump caused by non-zerod memory.
From Auster in current_users.
2006-10-09 11:37:31 +00:00
elad a01c1f4782 PR/28157: KAMADA Ken'ichi: escape sequence of hexdump(1) is broken
(SIGSEGV at worst)
Applied patch, thanks for the report!
2006-09-23 21:19:34 +00:00
hira fadb259b4d Fix uninitialized variables. 2006-09-05 12:11:27 +00:00
christos cdab3a7a06 More programs using efun. 2006-08-26 18:17:41 +00:00
dsl e4573e12e3 Simplify the way the end of a singly linked list is followed (for adding
items) so it is more obvious that we aren't going to indirect through
a null pointer.
Fixes coverty SID:101
2006-03-30 19:53:58 +00:00
perry d310ebb16a de-__P, ANSIfy prototypes 2006-01-04 01:30:21 +00:00
lukem 171d653219 Overhaul how `build.sh tools' are used:
*	Rename "config.h" to "nbtool_config.h" and
	HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
	This makes in more obvious in the source when we're using
	tools/compat/config.h versus "standard autoconf" config.h

    *	Consistently move the inclusion of nbtool_config.h to before
    	<sys/cdefs.h> so that the former can provide __RCSID() (et al),
    	and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
	#if HAVE_NBTOOL_CONFIG_H
	#include "nbtool_config.h"
	#endif
to the top of the source files (for the general case).
2003-10-27 00:12:41 +00:00
dmcmahill 188fcee35a add
#if HAVE_CONFIG_H
#include "config.h"
#endif
to get this to build under solaris-2.6/sparc with gcc-2.95.1 as part of
the NetBSD cross toolchain build.  Fixes PR23211.  Patch approved by
Alistair Crooks.
2003-10-22 12:30:39 +00:00
agc 89aaa1bb64 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
2003-08-07 11:13:06 +00:00
augustss c8e6437c5e More tests if __RCSID is defined. 2003-03-12 18:26:32 +00:00
itojun f51456c273 err/errx/warn/warnx do not need \n at the end 2002-06-11 06:06:18 +00:00
bjh21 84f98450e5 Enable support for printing 8-byte integers. For some reason, most of the
code for this was present, but disabled.
This is required for POSIX compliance on platforms with 8-byte longs.
2001-12-07 13:37:39 +00:00
christos d88f58cb84 constify 2001-02-07 18:32:07 +00:00
bjh21 1897a4fb7f Don't core dump with an empty format string. Fixes PR#11218.
Patch supplied by Launey Thomas.
2000-10-14 17:41:55 +00:00
itojun 81d0adc881 string length computation bug. PR 8676. 2000-10-11 16:47:22 +00:00
christos 9794a7e065 char -> unsigned char 1998-12-19 16:37:28 +00:00
lukem c6810a0286 WARNSify, fix .Nm usage, deprecate register 1997-10-19 02:34:02 +00:00
mrg 7397398466 merge lite-2. 1997-10-18 13:53:56 +00:00
mikel 769693f903 add explicit return types to many functions
pull global variable declarations and function prototypes into hexdump.h
add #includes where necessary for prototypes
replace index() with strchr(), const-poison static string vars, etc.
1997-07-11 06:28:26 +00:00
tls 9d225a1783 RCS ID police 1997-01-09 20:18:21 +00:00
pk 07ca972a0c Display addresses -- which are off_t's -- with proper format string. 1994-05-20 15:57:26 +00:00
mycroft e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
mrg c78c6a22ab 4.4BSD-Lite2 1993-06-06 20:58:02 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00