aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile10
-rw-r--r--README16
-rw-r--r--TODO4
-rw-r--r--config.mk4
-rw-r--r--read-quickly.118
-rw-r--r--read-quickly.c8
6 files changed, 31 insertions, 29 deletions
diff --git a/Makefile b/Makefile
index 1121ff9..cb32e47 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-.PHONY:
+.POSIX:
CONFIGFILE = config.mk
include $(CONFIGFILE)
@@ -12,17 +12,17 @@ read-quickly: read-quickly.o
$(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS)
install: read-quickly
- mkdir -p -- "$(DESTDIR)$(PREFIX)/bin"
- mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1"
+ mkdir -p -- "$(DESTDIR)$(PREFIX)/bin/"
+ mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1/"
cp -- read-quickly "$(DESTDIR)$(PREFIX)/bin/"
cp -- read-quickly.1 "$(DESTDIR)$(MANPREFIX)/man1/"
uninstall:
- -rm -f -- "$(DESTDIR)$(PREFIX)/read-quickly"
+ -rm -f -- "$(DESTDIR)$(PREFIX)/bin/read-quickly"
-rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/read-quickly.1"
clean:
- -rm -rf -- read-quickly *.o
+ -rm -f -- *.o *.su read-quickly
.SUFFIXES:
.SUFFIXES: .o .c
diff --git a/README b/README
index f164712..96cb753 100644
--- a/README
+++ b/README
@@ -6,16 +6,16 @@ SYNOPSIS
DESCRIPTION
Displays a plain-text file word-by-word in the middle
- of the terminal. Words are automatically paged in a
+ of the terminal. Words are automatically paged at a
specifiable rate, by default 2 words per second.
- This is a bit slow, you should turn it up when
- gradually until your performance has been optimised.
- Repeated words will be indicated by alternating reverse
- video highlighting.
+ This is a bit slow; you should gradually turn it up
+ until your performance has been optimised. Repeated
+ words will be indicated by alternating reverse video
+ highlighting.
Escape sequences are printed as-is.
- If no file is specified, or if '-' i specified, stdin
+ If no file is specified, or if '-' is specified, stdin
will be paged.
read-quickly uses a method called rapid serial visual
@@ -56,8 +56,8 @@ COMMANDS
q Exit.
left Go to the previous word.
up Go to the previous word.
- right Go to next previous word.
- down Go to next previous word.
+ right Go to the next word.
+ down Go to the next word.
RATIONALE
This should be obvious.
diff --git a/TODO b/TODO
index c50c828..57029ee 100644
--- a/TODO
+++ b/TODO
@@ -1,5 +1,5 @@
The text shall not be centred. Rather, the position that is
-to be centred is the position where it reader is most likely
-to recognised the word quickest when focusing there. This
+to be centred is the position where the reader is most likely
+to recognise the word quickest when focusing there. This
point should be highlighted. Determining this position
requires a dictionary to be processed.
diff --git a/config.mk b/config.mk
index bc56b5c..4a538a4 100644
--- a/config.mk
+++ b/config.mk
@@ -1,6 +1,8 @@
PREFIX = /usr
MANPREFIX = $(PREFIX)/share/man
+CC = c99
+
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700
-CFLAGS = -std=c99 -O2 -Wall
+CFLAGS =
LDFLAGS = -s
diff --git a/read-quickly.1 b/read-quickly.1
index 50ccb7d..5a1a952 100644
--- a/read-quickly.1
+++ b/read-quickly.1
@@ -1,21 +1,21 @@
.TH READ-QUICKLY 1 READ-QUICKLY
.SH NAME
-read-quickly \- read quickly
+read-quickly \- Read quickly
.SH SYNOPSIS
.B read-quickly
.RI [ file ]
.SH DESCRIPTION
Displays a plain-text file word-by-word in the middle
-of the terminal. Words are automatically paged in a
+of the terminal. Words are automatically paged at a
specifiable rate, by default 2 words per second.
-This is a bit slow, you should turn it up when
-gradually until your performance has been optimised.
+This is a bit slow; you should gradually turn it up
+until your performance has been optimised.
Repeated words will be indicated by alternating reverse
video highlighting.
.PP
Escape sequences are printed as-is.
.PP
-If no file is specified, or if \- i specified,
+If no file is specified, or if \- is specified,
stdin will be paged.
.PP
.B read-quickly
@@ -29,7 +29,7 @@ The rate at which the words will be printed.
Defaults to 120 words per minute.
.br
.br
-This should a positive integer, optionally
+This should be a positive integer, optionally
followed by a unit. If no unit is specified,
words per minute will be used. Valid units
are (case-insensitive):
@@ -39,7 +39,7 @@ are (case-insensitive):
.TQ
.B w/m
.TQ
-.B m
+.B /m
.TQ
.B wpmin
.TQ
@@ -53,7 +53,7 @@ Words per minute.
.TQ
.B w/sec
.TQ
-.B sec
+.B /sec
.TQ
.B wps
.TQ
@@ -83,7 +83,7 @@ Exit.
Go to the previous word.
.TP
.BR right ,\ down
-Go to next previous word.
+Go to the next word.
.SH RATIONALE
This should be obvious.
.SH SEE ALSO
diff --git a/read-quickly.c b/read-quickly.c
index acd52a6..b235160 100644
--- a/read-quickly.c
+++ b/read-quickly.c
@@ -35,7 +35,7 @@
/**
- * The a word.
+ * A word.
*/
struct word {
/**
@@ -55,7 +55,7 @@ struct word {
static const char *argv0;
/**
- * Have the terminal been resized?
+ * Has the terminal been resized?
*/
static volatile sig_atomic_t caught_sigwinch = 1;
@@ -174,7 +174,7 @@ get_word_rate(void)
/**
- * Count the number of character in a string.
+ * Count the number of characters in a string.
*
* @param s The string.
* @return The number of characters in `s`.
@@ -450,7 +450,7 @@ main(int argc, char *argv[])
if (display_file(ttyfd, rate))
goto fail;
- /* Restore terminal configurations. */
+ /* Restore terminal configuration. */
tcsetattr(ttyfd, TCSAFLUSH, &saved_stty);
fprintf(stdout, "\033[?25h\033[?1049l");
fflush(stdout);