aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-02-21 12:01:39 +0100
committerMattias Andrée <maandree@kth.se>2021-02-21 12:01:39 +0100
commit250376f60aeebbc215359e51ce003f0e104e7986 (patch)
treebce660d205538b8cba461d851421d35badd28514
parentRemove dist (diff)
downloadread-quickly-250376f60aeebbc215359e51ce003f0e104e7986.tar.gz
read-quickly-250376f60aeebbc215359e51ce003f0e104e7986.tar.bz2
read-quickly-250376f60aeebbc215359e51ce003f0e104e7986.tar.xz
Rename to read-quickly2.0
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r--.gitignore2
-rw-r--r--Makefile16
-rw-r--r--README9
-rw-r--r--config.mk4
-rw-r--r--read-quickly.1 (renamed from rq.1)10
-rw-r--r--read-quickly.c (renamed from rq.c)6
6 files changed, 23 insertions, 24 deletions
diff --git a/.gitignore b/.gitignore
index 5347c08..138741c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,4 +3,4 @@
*~
*.o
*.su
-/rq
+/read-quickly
diff --git a/Makefile b/Makefile
index eedff0a..1121ff9 100644
--- a/Makefile
+++ b/Makefile
@@ -3,26 +3,26 @@
CONFIGFILE = config.mk
include $(CONFIGFILE)
-all: rq
+all: read-quickly
-rq: rq.o
+read-quickly: read-quickly.o
$(CC) -o $@ $@.o $(LDFLAGS)
.c.o:
$(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS)
-install: rq
+install: read-quickly
mkdir -p -- "$(DESTDIR)$(PREFIX)/bin"
mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1"
- cp -- rq "$(DESTDIR)$(PREFIX)/bin/$(COMMAND)"
- cp -- rq.1 "$(DESTDIR)$(MANPREFIX)/man1/$(COMMAND).1"
+ cp -- read-quickly "$(DESTDIR)$(PREFIX)/bin/"
+ cp -- read-quickly.1 "$(DESTDIR)$(MANPREFIX)/man1/"
uninstall:
- -rm -f -- "$(DESTDIR)$(PREFIX)/$(COMMAND)"
- -rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/$(COMMAND).1"
+ -rm -f -- "$(DESTDIR)$(PREFIX)/read-quickly"
+ -rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/read-quickly.1"
clean:
- -rm -rf -- rq *.o
+ -rm -rf -- read-quickly *.o
.SUFFIXES:
.SUFFIXES: .o .c
diff --git a/README b/README
index 0208765..f164712 100644
--- a/README
+++ b/README
@@ -1,8 +1,8 @@
NAME
- rq - read quickly
+ read-quickly - read quickly
SYNOPSIS
- rq [FILE]
+ read-quickly [FILE]
DESCRIPTION
Displays a plain-text file word-by-word in the middle
@@ -18,13 +18,14 @@ DESCRIPTION
If no file is specified, or if '-' i specified, stdin
will be paged.
- rq uses a method called rapid serial visual presentation.
+ read-quickly uses a method called rapid serial visual
+ presentation.
OPTIONS
None.
ENVIRONMENT
- RQ_RATE
+ READ_QUICKLY_RATE
The rate at which the words will be printed.
Defaults to 120 words per minute.
diff --git a/config.mk b/config.mk
index 7997417..bc56b5c 100644
--- a/config.mk
+++ b/config.mk
@@ -2,7 +2,5 @@ PREFIX = /usr
MANPREFIX = $(PREFIX)/share/man
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700
-CFLAGS = -std=c99 -O2 -Wall -pedantic
+CFLAGS = -std=c99 -O2 -Wall
LDFLAGS = -s
-
-COMMAND = rq
diff --git a/rq.1 b/read-quickly.1
index 86298dc..50ccb7d 100644
--- a/rq.1
+++ b/read-quickly.1
@@ -1,8 +1,8 @@
-.TH RQ 1 RQ
+.TH READ-QUICKLY 1 READ-QUICKLY
.SH NAME
-rq \- read quickly
+read-quickly \- read quickly
.SH SYNOPSIS
-.B rq
+.B read-quickly
.RI [ file ]
.SH DESCRIPTION
Displays a plain-text file word-by-word in the middle
@@ -18,13 +18,13 @@ Escape sequences are printed as-is.
If no file is specified, or if \- i specified,
stdin will be paged.
.PP
-.B rq
+.B read-quickly
uses a method called rapid serial visual presentation.
.SH OPTIONS
None.
.SH ENVIRONMENT
.TP
-.B RQ_RATE
+.B READ_QUICKLY_RATE
The rate at which the words will be printed.
Defaults to 120 words per minute.
.br
diff --git a/rq.c b/read-quickly.c
index fbcec13..acd52a6 100644
--- a/rq.c
+++ b/read-quickly.c
@@ -131,7 +131,7 @@ get_terminal_size(void)
/**
* Get the selected word rate by reading
- * the environment variable RQ_RATE.
+ * the environment variable READ_QUICKLY_RATE.
*
* @return The rate in words per minute.
*/
@@ -142,7 +142,7 @@ get_word_rate(void)
long r;
errno = 0;
- s = getenv("RQ_RATE");
+ s = getenv("READ_QUICKLY_RATE");
if (!s || !*s || !isdigit(*s))
return DEFAULT_RATE;
@@ -389,7 +389,7 @@ main(int argc, char *argv[])
struct sigaction sa;
/* Parse arguments. */
- argv0 = argv ? (argc--, *argv++) : "rq";
+ argv0 = argv ? (argc--, *argv++) : "read-quickly";
if (argc && argv[0][0] == '-') {
if (argv[0][1] == '-' && !argv[0][2]) {
argc--;