document prompt in shell script mode, fix man formatting, legacy awk

Documented unexpected behavior when calc is running in
"shell script mode" and the prompt builtin function is used
without the -p flag.  Updated help/prompt, help/unexpected
and the calc man page accordingly.

Unless calc is given the -p command line option, calc will reopen
stdin as /dev/null instead of just closing stdin.  This prevents
subsequent opens grabbing the 1st file descriptor.

Disable regress tests 4709, 4710, and 7763 because they print
multi-byte sequences, which are just fine for calc, the awk
used to evaluate the regression suite output in some legacy
systems report a "multibyte conversion failure".

Added a number of missing Makefile variables to the "make env" rule.

The man command is used to format the calc.1 man page into calc.usage.

The "help calc" command now prints the formatted calc man page (calc.usage).
The "help man" command now prints the formatted calc man page (calc.usage).
The "help usage" command now prints the formatted calc man page (calc.usage).

The file, calc.cat1, is formed by gzipping the calc.usage
formatted man page.  The calc.cat1 is installed as the calc
cat section 1 man page.

Updated the Copyright string in version.c to refer to
the COPYING file and the "help copying" command.

Added calc.cat1 to .gitignore.  Using "sort -d -u" to sort .gitignore content.

Avoiding use of modern [[ and ]] in Makefile for those legacy systems
whose shell do not support them.  *sigh*

Fixed the order of "help full" to match the order of topics listed
buy the "help help" command.

Sorted the halias[] help topics table in help.c using sort -d -u.
This commit is contained in:
Landon Curt Noll
2023-12-19 00:40:10 -08:00
parent d91e966f19
commit 54dd89dcf7
13 changed files with 372 additions and 205 deletions

43
.gitignore vendored
View File

@@ -1,17 +1,17 @@
# generic excluded patterns
#
# We sort the list below via: sort -u -f
# We sort the list below via: sort -d -u
#
*,v
*.BAK
*.dSYM/
*.exe
*.o.tmp
*.[oa]
*~
.*.swp
*.BAK
.DS_Store
core*
*.dSYM/
*.exe
*.[oa]
*.o.tmp
.*.swp
*,v
# files and directories created during the building of calc and other Makefile actions
#
@@ -19,50 +19,51 @@ core*
# not consider development source. Some other file(s) and/or programs
# generate these files.
#
# We sort the list below via: sort -u -f
# We sort the list below via: sort -d -u
#
.dynamic
.hsrc
.static
Makefile.our
NOTES
align32
align32.h
align32_tmp
arc4random_tmp
args.h
cal/.all
cal/test082.cal
calc
calc-static
calc.1
calc.cat1
calc.spec
calc-static
calc.usage
cal/test082.cal
charbit.h
chatbit
chk_c
conf.h
const_tmp
cscript/.all
cscript/4dsphere
cscript/README
cscript/.all
cscript/fproduct
cscript/mersenne
cscript/piforever
cscript/plus
cscript/powerterm
cscript/README
cscript/simple
cscript/square
custom/.all
custom/libcustcalc*
debug.out
.dynamic
endian
endian_calc.h
environ_tmp
errcode
errsym.h
fpos_tmp
fposval
fposval.h
fposval_tmp
fpos_tmp
func.show
func.sort
getpgid_tmp
@@ -127,6 +128,8 @@ have_urandom.h
have_ustat
have_ustat.h
have_varvs
help/COPYING
help/COPYING-LGPL
help/.all
help/binding
help/bindings
@@ -137,8 +140,6 @@ help/change
help/changes
help/contrib
help/copy
help/COPYING
help/COPYING-LGPL
help/cscript
help/custom_cal
help/errorcode
@@ -156,15 +157,14 @@ help/releases
help/resource
help/type
help/usage
.hsrc
libcalc.*
libcustcalc.*
ll_tmp
longbits
longbits.h
Makefile.our
memmv_tmp
newstr_tmp
NOTES
offscl_tmp
outfile
posscl_tmp
@@ -174,6 +174,7 @@ sample_many-static
sample_rand
sample_rand-static
statfs_tmp
.static
status.chk_c.h
strdup_tmp
tags