Skip to content

Commit 9a136bd

Browse files
committed
Added version 1.3-RC2
1 parent 34795d8 commit 9a136bd

19 files changed

+339
-126
lines changed

argmatch.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
/* Written by David MacKenzie <djm@ai.mit.edu>
1919
Modified by Akim Demaille <demaille@inf.enst.fr> */
2020

21+
#include "dcfldd.h"
2122
#include "argmatch.h"
23+
#include "log.h"
2224

2325
#include <stdio.h>
2426
#ifdef STDC_HEADERS
@@ -156,7 +158,7 @@ argmatch_invalid (const char *context, const char *value, int problem)
156158
? "invalid argument %s for `%s'"
157159
: "ambiguous argument %s for `%s'");
158160

159-
fprintf(stderr, format, value, context);
161+
log_info(format, value, context);
160162
}
161163

162164
/* List the valid arguments for argmatch.
@@ -177,12 +179,12 @@ argmatch_valid (const char *const *arglist,
177179
if ((i == 0)
178180
|| memcmp (last_val, vallist + valsize * i, valsize))
179181
{
180-
fprintf (stderr, "\n - `%s'", arglist[i]);
182+
log_info("\n - `%s'", arglist[i]);
181183
last_val = vallist + valsize * i;
182184
}
183185
else
184186
{
185-
fprintf (stderr, ", `%s'", arglist[i]);
187+
log_info(", `%s'", arglist[i]);
186188
}
187189
putc ('\n', stderr);
188190
}
@@ -283,7 +285,7 @@ main (int argc, const char *const *argv)
283285

284286
if (argc > 2)
285287
{
286-
fprintf (stderr, "Usage: %s [VERSION_CONTROL]\n", program_name);
288+
fprintf(stderr, "Usage: %s [VERSION_CONTROL]\n", program_name);
287289
exit (1);
288290
}
289291

configure

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1663,7 +1663,7 @@ fi
16631663
16641664
# Define the identity of the package.
16651665
PACKAGE=dcfldd
1666-
VERSION=1.2.4
1666+
VERSION=1.3-RC2
16671667
16681668
16691669
cat >>confdefs.h <<_ACEOF
@@ -4087,6 +4087,76 @@ else
40874087
_ACEOF
40884088
40894089
4090+
fi
4091+
echo "$as_me:$LINENO: checking whether strndup is declared" >&5
4092+
echo $ECHO_N "checking whether strndup is declared... $ECHO_C" >&6
4093+
if test "${ac_cv_have_decl_strndup+set}" = set; then
4094+
echo $ECHO_N "(cached) $ECHO_C" >&6
4095+
else
4096+
cat >conftest.$ac_ext <<_ACEOF
4097+
/* confdefs.h. */
4098+
_ACEOF
4099+
cat confdefs.h >>conftest.$ac_ext
4100+
cat >>conftest.$ac_ext <<_ACEOF
4101+
/* end confdefs.h. */
4102+
$ac_includes_default
4103+
int
4104+
main ()
4105+
{
4106+
#ifndef strndup
4107+
char *p = (char *) strndup;
4108+
#endif
4109+
4110+
;
4111+
return 0;
4112+
}
4113+
_ACEOF
4114+
rm -f conftest.$ac_objext
4115+
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4116+
(eval $ac_compile) 2>conftest.er1
4117+
ac_status=$?
4118+
grep -v '^ *+' conftest.er1 >conftest.err
4119+
rm -f conftest.er1
4120+
cat conftest.err >&5
4121+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
4122+
(exit $ac_status); } &&
4123+
{ ac_try='test -z "$ac_c_werror_flag"
4124+
|| test ! -s conftest.err'
4125+
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4126+
(eval $ac_try) 2>&5
4127+
ac_status=$?
4128+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
4129+
(exit $ac_status); }; } &&
4130+
{ ac_try='test -s conftest.$ac_objext'
4131+
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4132+
(eval $ac_try) 2>&5
4133+
ac_status=$?
4134+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
4135+
(exit $ac_status); }; }; then
4136+
ac_cv_have_decl_strndup=yes
4137+
else
4138+
echo "$as_me: failed program was:" >&5
4139+
sed 's/^/| /' conftest.$ac_ext >&5
4140+
4141+
ac_cv_have_decl_strndup=no
4142+
fi
4143+
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4144+
fi
4145+
echo "$as_me:$LINENO: result: $ac_cv_have_decl_strndup" >&5
4146+
echo "${ECHO_T}$ac_cv_have_decl_strndup" >&6
4147+
if test $ac_cv_have_decl_strndup = yes; then
4148+
4149+
cat >>confdefs.h <<_ACEOF
4150+
#define HAVE_DECL_STRNDUP 1
4151+
_ACEOF
4152+
4153+
4154+
else
4155+
cat >>confdefs.h <<_ACEOF
4156+
#define HAVE_DECL_STRNDUP 0
4157+
_ACEOF
4158+
4159+
40904160
fi
40914161
40924162

configure.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ AC_INIT(dcfldd.c)
33
AM_CONFIG_HEADER(config.h)
44
AC_CANONICAL_HOST
55

6-
AM_INIT_AUTOMAKE([dcfldd], [1.2.4])
6+
AM_INIT_AUTOMAKE([dcfldd], [1.3-RC2])
77

88
AC_PROG_CC
99
AC_PROG_CPP
@@ -19,6 +19,6 @@ AC_C_CONST
1919
AC_TYPE_OFF_T
2020
AC_TYPE_SIZE_T
2121

22-
AC_CHECK_DECLS([strtol, strtoul, strtoumax])
22+
AC_CHECK_DECLS([strtol, strtoul, strtoumax, strndup])
2323

2424
AC_OUTPUT(Makefile)

copy.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Id: copy.c,v 1.3 2005/05/13 18:52:06 harbourn Exp $
1+
/* $Id: copy.c,v 1.6 2005/05/19 20:59:12 harbourn Exp $
22
* dcfldd - The Enhanced Forensic DD
33
* By Nicholas Harbour
44
*/
@@ -20,10 +20,10 @@
2020
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
2121

2222
/* GNU dd originally written by Paul Rubin, David MacKenzie, and Stuart Kemp. */
23-
23+
#include "dcfldd.h"
24+
#include <sys/types.h>
2425
#include <stdlib.h>
2526
#include <time.h>
26-
#include "dcfldd.h"
2727
#include "hash.h"
2828
#include "getpagesize.h"
2929
#include "safe-read.h"
@@ -278,7 +278,7 @@ int dd_copy(void)
278278
}
279279
n_bytes_read = nread;
280280

281-
if (do_hash)
281+
if (do_hash && hashconv == HASHCONV_BEFORE)
282282
hash_update(ihashlist, ibuf, n_bytes_read);
283283

284284
if (n_bytes_read < input_blocksize) {
@@ -326,7 +326,11 @@ int dd_copy(void)
326326
copy_simple(bufstart, n_bytes_read);
327327

328328
}
329+
329330

331+
if (do_hash && hashconv == HASHCONV_AFTER)
332+
hash_update(ihashlist, ibuf, n_bytes_read);
333+
330334
/* If we have a char left as a result of conv=swab, output it. */
331335
if (char_is_saved) {
332336
if (conversions_mask & C_BLOCK)

dcfldd.1

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35.
2-
.TH DCFLDD "1" "May 2005" "dcfldd (dcfldd) 1.2.4" "User Commands"
2+
.TH DCFLDD "1" "May 2005" "dcfldd (dcfldd) 1.3-RC1" "User Commands"
33
.SH NAME
4-
dcfldd \- manual page for dcfldd (dcfldd) 1.2.4
4+
dcfldd \- manual page for dcfldd (dcfldd) 1.3-RC1
55
.SH SYNOPSIS
66
.B dcfldd
77
[\fIOPTION\fR]...
@@ -36,6 +36,9 @@ NOTE: of=FILE may be used several times to write
3636
.IP
3737
output to multiple files simultaneously
3838
.TP
39+
of:=COMMAND
40+
exec and write output to process COMMAND
41+
.TP
3942
seek=BLOCKS
4043
skip BLOCKS obs\-sized blocks at start of output
4144
.TP
@@ -48,6 +51,9 @@ use the specified binary pattern as input
4851
textpattern=TEXT
4952
use repeating TEXT as input
5053
.TP
54+
errlog=FILE
55+
send error messages to FILE as well as stderr
56+
.TP
5157
hashwindow=BYTES
5258
perform a hash on every BYTES amount of data
5359
.TP
@@ -66,8 +72,13 @@ can send each to a seperate file using the
6672
convention ALGORITHMlog=FILE, for example
6773
md5log=FILE1, sha1log=FILE2, etc.
6874
.TP
69-
hashformat=FORMAT
70-
display each hashwindow according to FORMAT
75+
hashlog:=COMMAND
76+
exec and write hashlog to process COMMAND
77+
.IP
78+
ALGORITHMlog:=COMMAND also works in the same fashion
79+
.IP
80+
hashconv=[before|after] perform the hashing before or after the conversions
81+
hashformat=FORMAT display each hashwindow according to FORMAT
7182
.IP
7283
the hash format mini\-language is described below
7384
.IP
@@ -117,6 +128,9 @@ verify that FILE matches the specified input
117128
verifylog=FILE
118129
send verify results to FILE instead of stderr
119130
.TP
131+
verifylog:=COMMAND
132+
exec and write verify results to process COMMAND
133+
.TP
120134
\fB\-\-help\fR
121135
display this help and exit
122136
.TP

0 commit comments

Comments
 (0)