Commit Graph

93 Commits

Author SHA1 Message Date
imp
964701e22d /*- or .\"- or #- to begin license clauses. 2005-01-10 08:39:26 +00:00
ru
8c7afb43c4 Scheduled mdoc(7) sweep. 2005-01-09 19:54:23 +00:00
rwatson
8005f2ce83 Add a "fillchar" command line argument to dd(1) that permits the user
to specify an alternative padding character when using a conversion
mode, or when using noerror with sync and an input error occurs.  This
facilities reading old and error-prone media by allowing the user to
more effectively mark error blocks in the output stream.
2004-08-15 19:10:05 +00:00
pjd
e56ea7c4be Allow for capital letters as size suffixes.
Inspired by:	le
Approved by:	green (maintainer)
2004-07-31 15:13:08 +00:00
ru
338f050222 Bump document date for the latest functional change.
Minor markup tweaks.
2004-05-16 21:34:15 +00:00
njl
be3c824822 Style fixes and add gen to CLEANFILES.
Submitted by:	bde
2004-04-09 07:13:27 +00:00
markm
0336d895cd Remove clause 3 from the UCB licenses.
OK'ed by:	imp, core
2004-04-06 20:06:54 +00:00
ache
53476df080 Remove a.out at the end of 'make test' 2004-03-08 18:09:33 +00:00
bde
34eeba3054 Fixed some style bugs (mainly unsorting and tab lossage in previous commit). 2004-03-06 08:21:32 +00:00
ache
e0f31bf3b7 Add a.out to CLEANFILES 2004-03-06 06:54:58 +00:00
ache
d5644cd59d Change locale name from non-existent ASCII to en_US.US-ASCII 2004-03-06 06:10:16 +00:00
phk
ff15fdd831 Teach dd(1) about parity bits. 2004-03-05 19:35:51 +00:00
phk
8c41902c16 Add a test-target and reference vectors for the character converions. 2004-03-05 19:30:13 +00:00
markm
2f11ff8443 Get this area compiling with the highest WARNS= that it works with.
Obsolete WFORMAT= junk also removed where possible.

OK'ed by:	obrien
Tested on:	sparc64, alpha, i386
2003-06-13 07:04:02 +00:00
obrien
8fbd9bc9e9 Quiet warnings about copyright[]. 2003-05-01 16:58:57 +00:00
ru
fc74a4e596 ssize_t is not required to be the same width as size_t by the
specs, so cast to intmax_t where appropriate.

Pointed out by:	bde
2003-03-15 13:34:48 +00:00
ru
b663133427 Fixed (soon might be fatal) -Wformat warnings. 2003-03-15 07:56:59 +00:00
markm
df8d899b85 WARNS=4 fixes. This would be WARNS=9 if we were -std=99 instead of
-ansi, due to 'long long'.

Reviewed by:	green (slightly earlier version)
2003-02-27 18:04:54 +00:00
phk
33c7a3a08c Don't call DIOCWLABEL on disks, it is not implemented, and calling it
like this negated any practical value of the feature.
2003-01-26 11:13:40 +00:00
ru
d53cbf1f18 mdoc(7) police:
Revert to using the .Tn POSIX and .Tn ANSI instead of \*[Px] and \*[Ai]
strings; using these strings is unsafe in troff mode, as they include a
change in a font size.

Approved by:	re
2002-11-26 17:55:41 +00:00
obrien
6ccf658737 Consistently use __FBSDID 2002-06-30 05:13:54 +00:00
keramida
2ac2f55ed0 Replace <strings.h> with <string.h>. No functions from the former are
used in this file, and strlen() needs to be prototyped by the latter,
for this to compile without warnings.

Reviewed by:	mike
2002-06-09 04:15:40 +00:00
ru
4a272d4c41 mdoc(7) police: replace the XXX with the correct width. 2002-05-29 14:01:27 +00:00
jedgar
51ac2455e0 Add semicolon to empty default case to silence warning. 2002-05-11 03:12:02 +00:00
keramida
dff91e9d8e Various mdoc fixes, including a change that corrects spacing as
described in PR docs/36461.

PR:		docs/36461
Noticed by:	Gary W. Swearingen <swear@blarg.net>
Submitted by:	ru
2002-03-31 20:49:37 +00:00
markm
0735f3117d 1) Rev.1.35 of dd.c has a more serious regression. It backs out rev.1.31,
thus breaking systems with unpolluted <sys/stat.h>'s.

2) Back out an initialisation of a variable in BSS.

Reported by:	bde (1), many(2)
2002-03-07 14:00:33 +00:00
markm
ae5af8bf38 Fix warnings inspired by lint, a commercial lint and WARNS=4. 2002-02-22 20:51:00 +00:00
green
d50eb27cab Correct a logic bug that snuck in and broke multiplication of off_ts. 2002-02-07 02:54:30 +00:00
kris
5e9114e650 Lock down with WFORMAT=1 except those directories with unfixed warnings.
Tested on i386 and alpha.
2002-02-04 02:49:19 +00:00
imp
5725f6fe5c o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
  they already are.

Approved by: arch@, new style(9)
2002-02-02 06:24:13 +00:00
green
f4060e6048 Commit general cleanups (separate get_num() and get_off_t() functions to
debogosify some of the command-line string-number conversions into
an unsigned and signed variant.)
2002-01-25 17:44:47 +00:00
obrien
3e1e2dd6aa Default to WARNS=2. Binary builds that cannot handle this must explicitly
set WARNS=0.

Reviewed by:	mike
2001-12-04 01:57:47 +00:00
ru
e6bcd7b5b8 mdoc(7) police: utilize the new .Ex macro. 2001-08-15 09:09:47 +00:00
ru
173222b339 mdoc(7) police: s/BSD/.Bx/ where appropriate. 2001-08-14 10:01:54 +00:00
green
3673668d80 Use __unused for non-used variables.
Submitted by:	Mike Barcroft <mike@q9media.com>
2001-06-29 20:06:47 +00:00
dd
a7022452d0 Previous commit broke dd(1)'s I/O summary when it's terminated by a
signal.  Fix it by adding an explicit call to summary() in terminate()
(it was previously called implicitly by exit() because summary() was
registered with atexit()).  summary() is supposed to be signal-safe--
it handles SIGINFO almost exclusively--so this should be safe.

Submitted by:	bde
2001-06-25 06:17:02 +00:00
dd
52b3013afc Don't call exit(3) from a signal handler.
Obtained from:	OpenBSD
2001-06-24 01:55:17 +00:00
des
0628151c8f Add more headers that are required with -fno-builtin (stdlib and strings) 2001-06-19 15:41:57 +00:00
ru
c835e11eed mdoc(7) police: use the new features of the Nm macro. 2000-11-20 11:39:41 +00:00
green
c87d1fefcc Allow negative seek offsets for files that can be seeked upon. It
makes dd(1) a more complete "filter", even if this functionality is
limited to seekable streams.
2000-10-22 23:00:32 +00:00
wollman
5e8b712997 Don't depend on <sys/stat.h> bogusly including <sys/time.h> (and thereby
<time.h>).
2000-10-10 01:50:26 +00:00
green
bd2dbcfe68 Make the comment regarding ftruncate() correct. 2000-07-20 19:21:40 +00:00
green
bce0f7f785 Various cleanups are made to reduce warnings and make code prettier :)
Also, check for ftruncate() return value and die on failure, but only
try to ftruncate() when the file is a regular file.
2000-07-01 05:36:25 +00:00
obrien
e8074be4b3 Fix ``dd if=/dev/zero of=/dev/daN'' on the Alpha by allowing the label
to be overwritten.

Submitted by:	green
2000-05-24 06:47:10 +00:00
green
46bb443af0 After Bruce kindly explained the whole groff "sentence" idea to me, I've
put the whitespace in the right place.
2000-03-01 05:28:45 +00:00
green
644fd26c68 Fix style bugs I introduced in the last revision.
Brucified by:	bde
2000-02-27 16:40:39 +00:00
green
3921e6ea29 Add iseek= and oseek= aliases for the preexisting skip= and seek=
operands.  Can _YOU_ tell skip= and seek= apart with 100% accuracy
every time?

This also seems to make us option-for-option compatible with the
Solaris dd(1).

Approved by:	jkh
Suggested by:	peter
2000-02-26 21:29:44 +00:00
gsutter
575e32d8e0 Reflect that dd accepts octal and hexadecimal numbers (in addition to decimal).
PR:		16750
Submitted by:	Giorgos Keramidas <keramida@ceid.upatras.gr>
2000-02-18 04:55:40 +00:00
green
1fd819e3ea I've been Brucified! I did evil things with typedefs, but I'll do it
the correct (but less aesthetic) way, now.  New lesson: correctness
and aestheticity may be mutually exclusive at times.

Brucified by:	bde
1999-12-08 02:44:46 +00:00
green
9caf6bd1bb Do proper constification in args.c. This shuts up -Wcast-qual (thanks,
bfumerola for that pointer!) in GCC complaining about losing a const.

While I'm here, might as well mark in the Makefile that I'm the
${MAINTAINER}.  It seems like that's what everyone's doing these days.
1999-12-07 03:32:37 +00:00