mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-15 00:12:00 +02:00
--raw output is the most composable format, and also is a robust way to discard the file name without parsing (escaped) output. Examples: $ cksum --raw -a crc "$afile" | basenc --base16 4ACFC4F0 $ cksum --raw -a crc "$afile" | basenc --base2msbf 01001010110011111100010011110000 $ cksum --raw -a sha256 "$bfile" | basenc --base32 AAAAAAAADHLGRHAILLQWLAY6SNH7OY5OI2RKNQLSWPY3MCUM4JXQ==== * doc/coreutils.texi (cksum invocation): Describe the new feature. * src/digest.c (output_file): Inspect the new RAW_DIGEST global, and output the bytes directly if set. * src/cksum.c (output_crc): Likewise. * src/sum.c (output_bsd, output_sysv): Likewise. * tests/misc/cksum-raw.sh: A new test. * tests/local.mk: Reference the new test. * NEWS: Mention the new feature.
19 lines
570 B
C
19 lines
570 B
C
extern int
|
|
bsd_sum_stream (FILE *stream, void *resstream, uintmax_t *length);
|
|
|
|
extern int
|
|
sysv_sum_stream (FILE *stream, void *resstream, uintmax_t *length);
|
|
|
|
typedef int (*sumfn)(FILE *, void *, uintmax_t *);
|
|
|
|
|
|
extern void
|
|
output_bsd (char const *file, int binary_file, void const *digest,
|
|
bool raw, bool tagged, unsigned char delim, bool args,
|
|
uintmax_t length);
|
|
|
|
extern void
|
|
output_sysv (char const *file, int binary_file, void const *digest,
|
|
bool raw, bool tagged, unsigned char delim, bool args,
|
|
uintmax_t length);
|