- Timestamp:
- Jan 15, 2010, 10:14:48 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
zzuf/trunk/doc/zzcat.1.in
r4255 r4274 1 1 .TH zzcat 1 "2010-01-07" "zzcat @PACKAGE_VERSION@" 2 2 .SH NAME 3 zzcat \- debugging tool for zzuf3 zzcat \- concatenate files using different instruction sequences 4 4 .SH SYNOPSIS 5 5 \fBzzcat\fR [\fB\-AbeEntTv\fR] [\fB\-x\fR \fIsequence\fR] [\fIFILE\fR]... … … 16 16 used to seek and read data. 17 17 18 \fBzzcat\fR is primarily used as a debugging tool for \fBzzuf\fR. 19 .SH USAGE 20 .PP 21 \fB zzcat -x "fread(1,10000)" /dev/zero\fR 18 \fBzzcat\fR is primarily used as a debugging tool for \fBzzuf\fR, because 19 it can emulate different programs' ways to read files. 22 20 .SH OPTIONS 23 21 .TP … … 50 48 \fIsequence\fR. 51 49 50 Instructions are executed sequentially until the end of the program. 51 End-of-file is not an exit condition, except where the \fBfeof\fR keyword is 52 used: 53 54 \fB fread(1,10); feof(1); fread(1,10)\fR 55 56 Loops are permitted using the \fBrepeat\fR keyword. Again, \fBfeof\fR can be 57 used to prematurely break out of a loop: 58 59 \fB repeat(10000, fgetc() feof(1))\fR 60 61 Instructions can be separated by spaces, commas or semicolons. 62 A list of all available instructions and control keywords can be obtained 63 using this command: 64 65 \fB zzcat \-l\fR 66 52 67 If no sequence is specified, the following default sequence is used: 53 68 54 \fB repeat(\-1, fread(1,32768), feof(1)) 69 \fB repeat(\-1, fread(1,32768), feof(1))\fR 70 55 71 .TP 56 72 \fB\-l\fR, \fB\-\-list\fR … … 64 80 .SH EXAMPLES 65 81 .PP 66 To do. 82 Read the first 1000 bytes of f, then exit: 83 .PP 84 \fB zzcat \-x \(aqfread(1,1000)\(aq f\fR 85 .PP 86 Read the first four bytes of f, using four different instructions: 87 .PP 88 \fB zzcat \-x \(aqgetc(),fgetc(),getc_unlocked(),_IO_getc()\(aq f\fR 89 .PP 90 Read f entirely, by calling \fBgetc()\fR repeatedly until end-of-file is 91 reached: 92 .PP 93 \fB zzcat \-x \(aqrepeat(\-1, getc(), feof(1))\(aq \fRf 94 .PP 95 Read f entirely, in chunks of 32768 bytes until end-of-file is reached: 96 .PP 97 \fB zzcat \-x \(aqrepeat(\-1, fread(1,32768), feof(1))\(aq \fRf 98 .\" .PP 99 .\" Read only odd bytes, rewind file, then read all even bytes: 100 .\" .PP 101 .\" \fB zzcat \-x \(aqrepeat(\-1, getc(), feof(1), fseek(1,SEEK_CUR)), 102 .\" \fB rewind(), 103 .\" \fB repeat(\-1, fseek(1,SEEK_CUR), getc(), feof(1))\(aq 67 104 .SH SEE ALSO 68 105 .PP
Note: See TracChangeset
for help on using the changeset viewer.