andvar
f465408163
s/totaled/totalled/
2021-12-31 12:42:24 +00:00
andvar
1cb7819f04
fix various typos in comments.
2021-12-12 22:20:52 +00:00
snj
758ded1782
fix typo, pointed out by Andras Farkas
2021-12-08 23:38:51 +00:00
rillig
9164d1568c
dab: fix typo in comment
2021-12-05 09:53:15 +00:00
rillig
ed0ae49597
dab.6: fix URL reference to the book
2021-12-05 09:46:05 +00:00
rillig
2824f61734
dab: clean up introductory comments
...
The filenames in these comments were redundant, half of them were wrong.
2021-12-05 09:22:45 +00:00
nia
82d379c3ac
describe screenblank(1)
2021-11-26 17:38:07 +00:00
rillig
dfa14757fe
games/caesar: fix error handling for I/O
...
The '!= 0' is needed for an upcoming fix to lint's strict bool mode.
The additional text in the error messages is necessary because errx only
outputs the given string, with no details from errno. Since ferror does
not set errno, no such details are available, so just output a generic
message, which is still better than just "caesar: <stdout>".
2021-11-16 20:42:47 +00:00
nat
3377e30f0d
Better display in monochrome.
2021-11-13 20:59:13 +00:00
andvar
369abe069b
fix various typos, mainly s/prefered/preferred/
2021-11-07 20:31:09 +00:00
nia
7a33def692
cgram(6): realloc(x * y) -> reallocarr
2021-10-29 11:45:39 +00:00
nia
5a55ecfc78
atc(6): simplify reallocation logic
2021-10-29 11:44:22 +00:00
nia
a373ad5865
sail(6): convert realloc(x * y) to reallocarr
2021-10-29 11:42:34 +00:00
nia
dc9fa81fa1
huntd(6): convert malloc(x * y) and realloc(x * y) to reallocarr
2021-10-29 11:40:23 +00:00
andvar
a136e22ab6
fix various typos in comments, messages and documentation.
2021-09-19 10:34:06 +00:00
uwe
8632485623
Ken Thompson on the i960.
2021-09-18 14:24:04 +00:00
nia
4e696e9839
person on internet is confused by how to list disks because there's
...
so much in /dev
2021-09-07 13:29:41 +00:00
nia
793842aae0
moar tips
2021-08-19 14:03:43 +00:00
nia
7134f2b9de
Capitalization police.
2021-08-15 08:57:01 +00:00
dholland
06bcde7934
Flush input to EOL correctly in games/fish.
...
PR 54885 from Mouse, with a somewhat different patch.
2021-07-25 02:00:42 +00:00
dholland
a9613397e7
add something
2021-07-11 00:35:05 +00:00
nia
d9c389ef8f
SIGINFO is a useful tip
2021-06-04 11:18:31 +00:00
nia
629bf65377
add some tips
2021-06-04 10:56:55 +00:00
dholland
cfcbafc507
I don't see any code I wrote left in here.
2021-05-28 03:55:45 +00:00
dholland
de73752569
Restore return value of main, arbitrarily thrown away in -r1.4.
2021-05-28 03:55:08 +00:00
kre
dabfbe63eb
Adapt to recent change to ../snake/pathnames.h
2021-05-12 15:26:44 +00:00
nia
7570066346
snake: Avoid creating definitions prefixed with _ inside a program
2021-05-12 11:08:31 +00:00
rillig
2caa24ffff
countmail: remove outdated comments
...
Using the shell builtin 'read' command was necessarily slow because it
is specified to read a single byte at a time.
2021-05-02 13:10:36 +00:00
rillig
1182a44c59
games: remove trailing whitespace in *.c and *.h
2021-05-02 12:50:43 +00:00
rillig
0527d6d12b
fish: remove trailing whitespace
2021-05-02 12:25:55 +00:00
rillig
4dbccc6d68
fish: use arc4random_uniform for drawing random numbers
...
Thanks nia@ for the hint.
2021-05-02 12:24:59 +00:00
rillig
ac598ab1cf
fish: remove modulo bias from random number generation
...
It probably doesn't matter in practice, but omitting this piece of code
always looks like an oversight.
2021-05-01 21:10:57 +00:00
rillig
6a70979a86
cgram: rename local functions
...
The word 'cleanup' should have been named clean_up all along, but 'done'
is even shorter.
No functional change.
2021-05-01 20:29:23 +00:00
rillig
c6b805dbac
caesar: WARNS=6, strict bool mode
...
The rotation is validated to be nonnegative, therefore use unsigned int
for it.
2021-05-01 20:21:25 +00:00
rillig
c9b39ce704
cgram: in hinting mode, show all correct characters in bold face
...
For almost solved cryptograms, this makes the punctuation stand out
less, helping to focus on the missing letters.
2021-04-29 20:17:20 +00:00
rillig
3e4a0edf9f
cgram: use ASCII-only implementation of <ctype.h> functions
...
The function 'encode' already assumes that all letter characters are
contiguous and that there are only 26 letters of each case. At the
moment, cgram cannot handle UTF-8 anyway since it reads the input
byte-wise, assuming that each byte is exacty one character.
2021-04-25 20:38:03 +00:00
rillig
0721cc8d68
cgram: provide usage on incorrect invocation
2021-04-25 20:19:19 +00:00
rillig
1f36a02f91
cgram: conform to lint's strict bool mode, KNF
2021-04-25 20:14:29 +00:00
wiz
69305a0d1c
cgram: allow providing an input file instead of the random fortune
2021-04-22 14:57:36 +00:00
mrg
e6d9bbbe8f
one port complains about string overflow here that i can't see.
2021-04-15 01:55:21 +00:00
mrg
4caf7d9e65
avoid duplicating symbols in libterminfo.
2021-04-13 08:06:38 +00:00
mrg
af0a9e8c91
no longer need -Wno-error=implicit-fallthrough.
...
don't provide common symbols that are in libterminfo now days.
2021-04-13 02:11:39 +00:00
mrg
4c266a5438
properly terminate after using strncpy().
2021-04-13 01:50:46 +00:00
mrg
18bae9314b
avoid leaving off the trailing nul in a literal string.
2021-04-12 09:12:28 +00:00
mrg
84bbce3d17
include bsd.own.mk to be sure NETBSDSRCDIR is set.
2021-04-12 04:19:32 +00:00
mrg
a2d1542565
add some new uses of existing GCC_NO_* variables for warning issues.
...
remove an no longer relevant for gcc7 workaround (works fine in both
gcc9 and gcc 10.)
2021-04-12 02:54:07 +00:00
rillig
32eb951e74
cgram: don't beep if the window is resized
2021-02-26 15:18:40 +00:00
rillig
550a2d894f
cgram: place the 'solved' marker nearer to the text
...
This way, it cannot be overlooked as easily as before. It also doesn't
change the position of the keyboard help text anymore. Only if there is
not enough space, the 'solved' marker is put into the bottom line.
2021-02-26 15:15:34 +00:00
rillig
531f30a38a
cgram: make the 'solved' stand out more
...
Suggested by Weitian LI via [1].
[1] https://github.com/NetBSD/src/commit/efec6410b2b5a736
2021-02-26 14:55:37 +00:00
rillig
6ec38e5b23
cgram: fix assertion when substituting at the end of the longest line
...
Reported by Weitian LI via GitHub.
Contrary to the patch suggested in [1], still allow the cursor to be
placed to the very right of the text in a line since that is the usual
behavior of text editors.
Split the function substitute() into two parts: one that handles the
curses-specific part of checking whether a substitution is possible at
the current cursor position, and one that performs the actual
substitution. Only the latter is kept in the code section for the
string manipulation functions, the other is moved to the section for
curses code. Having all the curses code in one place reduces the places
that call beep(). Previously, as well as now, there is a single beep
per invalid key before, but that was not obvious from the previous code.
[1]: https://github.com/DragonFlyBSD/DragonFlyBSD/commit/18d09f18cf4c
2021-02-22 19:34:07 +00:00