Fix 'e' feature of 2015/burton + formatting

The program is supposed to echo stdin to stdout if the program name
starts with 'e'. This was only possible if one do something like:

    PATH=$PATH:.
    echo '5*5+17' | eprog

because otherwise the first char would be '.' not 'e'.

This was done by using basename(3) and -include libgen.h (in the
Makefile so as to not modify the code more than is necessary).

The Makefile now copies 'prog' to 'eprog' and 'prog' to 'calc'. It also
copies 'prog.alt' to 'eprog.alt' and 'ecalc.alt' as this is what the
program is documented as.

Format fix the calc.1 man page and remove calc.man. This is so that the
formatting is correct and also so as to not have to maintain more than
one copy of the same text (which was almost certainly already out of
sync as I did not update calc.man when I added calc.1 exactly for the
reason that I deleted calc.man).

The try.sh script has been updated and so has the try.this.txt file that
try.sh uses.

This should complete the review of 2015/burton if I'm not very much
mistaken.
This commit is contained in:
Cody Boone Ferguson committed 2023-12-10 05:09:26 -08:00
1 parent 0ce39fe068
commit 0335c04e15
10 files changed
+107 -110

No files matched your search

+6
View File
@@ -1,6 +1,12 @@
#
# sort with: sort -d -u
*.dSYM
calc
calc.alt
ecalc
ecalc.alt
eprog
eprog.alt
indent
indent.c
indent.o