Skip to content

Commit a9dc60d

Browse files
committed
1.10: added man
1 parent 1ee8834 commit a9dc60d

File tree

4 files changed

+62
-9
lines changed

4 files changed

+62
-9
lines changed

Makefile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
PROJECT := torrentcheck
22
CFLAGS := -O
3+
OBJS := src/torrentcheck.o src/sha1.o
4+
RM := rm -f
35

46
all: $(PROJECT)
57

6-
clean:
7-
rm *.o $(PROJECT)
8+
$(PROJECT): $(OBJS)
9+
$(CC) $(CFLAGS) $^ -o $@
10+
11+
%.c: %.o
12+
$(CC) -c $(CFLAGS) $^ -o $@
813

9-
$(PROJECT): torrentcheck.o sha1.o
10-
$(CC) -o $@ $^ $(CFLAGS)
14+
clean:
15+
$(RM) $(OBJS) $(PROJECT)

man/man1/torrentcheck.1

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
.TH torrentcheck "1" "1.10" "07 Jan 2023" "User Manual"
2+
3+
.SH NAME
4+
torrentcheck
5+
6+
.SH DESCRIPTION
7+
Catalog a \fI.torrent\fR file and optionally verify content hashes
8+
9+
.SH SYNOPSIS
10+
torrentcheck torrent-file [-p content-path] [-n] [-h] [-c] [-d]
11+
12+
.SH OPTIONS
13+
.TP
14+
-p content-path
15+
path of content data
16+
.TP
17+
-n
18+
suppresses progress count
19+
.TP
20+
-h
21+
shows all hash values
22+
.TP
23+
-c or -d
24+
uses comma or dot formatted byte counts.
25+
26+
Returns 0 if successful, nonzero return code if errors found.
27+
28+
.TP
29+
-sha1 [optional hash]
30+
acts as a simple SHA1 filter
31+
32+
If -sha1 is followed by a hex hash, the return code will be zero
33+
on match and nonzero otherwise.
34+
35+
.SH EXAMPLE
36+
torrentcheck my.torrent
37+
38+
.SH COPYRIGHT
39+
Mike Ingle <[email protected]>
40+
41+
.SH SEE ALSO
42+
torreadwrite(1), ctorrent(1), aria2c(1)
43+
44+
.SH CONTACTS
45+
Website: https://github.com/ximellon/torrentcheck
File renamed without changes.

torrentcheck.c renamed to src/torrentcheck.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -529,16 +529,19 @@ int main(int argc,char* argv[])
529529
if (torrentFile == NULL)
530530
{
531531
printf("torrentcheck - catalog a .torrent file and optionally verify content hashes\n");
532-
printf("Usage: torrentcheck -t torrent-file [-p content-path] [-n] [-h] [-c] [-d]\n");
533-
printf("Options: -n suppresses progress count, -h shows all hash values,\n");
534-
printf(" -c or -d uses comma or dot formatted byte counts.\n");
532+
printf("Usage: torrentcheck torrent-file [-p content-path] [-n] [-h] [-c] [-d]\n");
533+
printf("Options:\n");
534+
printf("\t-n suppresses progress count,\n");
535+
printf("\t-h shows all hash values,\n");
536+
printf("\t-c or -d uses comma or dot formatted byte counts.\n");
535537
printf("Returns 0 if successful, nonzero return code if errors found.\n");
536538
printf("\n");
537-
printf("Option: -sha1 [optional hash] acts as a simple SHA1 filter.\n");
539+
printf("Option:\n");
540+
printf("\t-sha1 [optional hash] acts as a simple SHA1 filter.\n");
538541
printf("If -sha1 is followed by a hex hash, the return code will be zero\n");
539542
printf("on match and nonzero otherwise.\n");
540543
printf("\n");
541-
printf("V1.00 2010-12-01 Mike Ingle <[email protected]>\n");
544+
printf("V1.10 2023-01-07 Mike Ingle <[email protected]>\n");
542545
return 3;
543546
}
544547

0 commit comments

Comments
 (0)