no need to reimplement cat here
This commit is contained in:
parent
3019229279
commit
616aafdcb9
@ -25,9 +25,9 @@ You can navigate with the arrow keys and quit with `q`.
|
|||||||
|
|
||||||
Usage
|
Usage
|
||||||
|
|
||||||
sent FILE1 [FILE2 ...]
|
sent FILE
|
||||||
|
|
||||||
If one FILE equals `-`, stdin will be read. Produce image slides by prepending a
|
If FILE equals `-`, stdin will be read. Produce image slides by prepending a
|
||||||
`@` in front of the filename as a single paragraph. Lines starting with `#` will
|
`@` in front of the filename as a single paragraph. Lines starting with `#` will
|
||||||
be ignored. A `\` at the beginning of the line escapes `@` and `#`. A
|
be ignored. A `\` at the beginning of the line escapes `@` and `#`. A
|
||||||
presentation file could look like this:
|
presentation file could look like this:
|
||||||
|
15
sent.c
15
sent.c
@ -689,13 +689,12 @@ void
|
|||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
die("sent " VERSION " (c) 2014-2015 markus.teich@stusta.mhn.de\n" \
|
die("sent " VERSION " (c) 2014-2015 markus.teich@stusta.mhn.de\n" \
|
||||||
"usage: sent FILE1 [FILE2 ...]", argv0);
|
"usage: sent FILE", argv0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
FILE *fp = NULL;
|
FILE *fp = NULL;
|
||||||
|
|
||||||
ARGBEGIN {
|
ARGBEGIN {
|
||||||
@ -704,13 +703,11 @@ main(int argc, char *argv[])
|
|||||||
usage();
|
usage();
|
||||||
} ARGEND;
|
} ARGEND;
|
||||||
|
|
||||||
for (i = 0; i < argc; i++) {
|
if ((fp = strcmp(argv[0], "-") ? fopen(argv[0], "r") : stdin)) {
|
||||||
if ((fp = strcmp(argv[i], "-") ? fopen(argv[i], "r") : stdin)) {
|
load(fp);
|
||||||
load(fp);
|
fclose(fp);
|
||||||
fclose(fp);
|
} else {
|
||||||
} else {
|
die("Unable to open '%s' for reading:", argv[0]);
|
||||||
die("Unable to open '%s' for reading:", argv[i]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!slidecount)
|
if (!slidecount)
|
||||||
|
Loading…
Reference in New Issue
Block a user