Improve make fullscreen in 2019/duble + formatting
The Makefile now uses the script fullscreen.sh which should also be
slightly more portable in that it doesn't rely on both stty(1) and
sed(1). Instead it relies on tput(1). Like the Makefile did for stty(1),
the script checks for tput(1). But rather than suggesting that the user
manually update the Makefile (without instructions) it now gives a
command that one can use to do the equivalent. This is assuming that the
environmental variables LINES and COLUMNS exist. Unfortunately these
variables are not available to scripts so it can't be done
automatically. This script also (if tput(1) cannot be found) shows a
more general way of how to change the size of the editor (the README.md
also does this). One can do something like
make clobber LINES=20 COLUMNS=20 all
to get a 20 x 20 editor.
The fullscreen.sh script was added to simplify the above procedure.
The README.md file was format/typo checked.
I updated the bugs.md as well: I noticed another condition where the
program can become locked, forcing one to have to kill it. At the same
time I improved the way to find sockets that are left by the program
(the way before had the problem that other dot files with all cap
letters could be found) and also an improved way to delete them (which
there is no Makefile rule to do). Now bugs.md discusses both the locking
and the sockets being left in the directory.
This commit is contained in:
1 parent
eb529e9eeb
commit
88e8d6a83d
5 files changed
+125
-68
No files matched your search
@@ -3348,9 +3348,16 @@ ideal if this was not the case.
|
||||
### Source code: [2019/duble/prog.c](2019/duble/prog.c)
|
||||
### Information: [2019/duble/README.md](2019/duble/README.md)
|
||||
|
||||
This program will very likely leave sockets lying about in the current working
|
||||
directory. For instance [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson)
|
||||
showed us this:
|
||||
There are two things to be aware of with this entry.
|
||||
|
||||
If the file being used (to draw) is deleted it might lock any session still in
|
||||
use. These will have to be killed from another shell session or by closing the
|
||||
terminal tab. This will also happen if the file cannot be opened in the
|
||||
beginning.
|
||||
|
||||
This program will also very likely leave sockets lying about in the current
|
||||
working directory. For instance [Cody Boone
|
||||
Ferguson](/winners.html#Cody_Boone_Ferguson) showed us this:
|
||||
|
||||
```sh
|
||||
$ ls -al |grep '^s'
|
||||
@@ -3365,22 +3372,22 @@ This is NOT a bug and you'll have to (at least at this time?) delete the files
|
||||
manually. You shouldn't have to worry about these being added to git: it seems
|
||||
to ignore sockets (it did at least in macOS).
|
||||
|
||||
NOTE: to get a list of files with this glob try:
|
||||
He provides the following tips on this situation. A simpler way to find sockets
|
||||
in the directory:
|
||||
|
||||
```sh
|
||||
ls -al |awk '{print $NF}' | grep -E '^\.[A-Z]+'
|
||||
file .*|grep socket|cut -f1 -d:
|
||||
```
|
||||
|
||||
To delete them you can do:
|
||||
|
||||
```sh
|
||||
find . -name '.[A-Z]*' -delete
|
||||
find . -exec file '{}' \;|grep socket|cut -f 1 -d: | xargs rm -f
|
||||
```
|
||||
|
||||
though one might want to check that the program is not currently running. :-)
|
||||
|
||||
|
||||
|
||||
## 2019 endoh
|
||||
|
||||
### STATUS: INABIAF - please **DO NOT** fix
|
||||
|
||||
Reference in new issue
Block a user