mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Fix some formatting errors, typos and other problems (#78)
Some notes: - Removed a TODO note that was fixed in commit43d9fbac
. - Removed a duplicate note about the '%l' time format in the changelog. - Applied the following documentation fixes from Terrence J. Doyle: - https://www.mail-archive.com/ast-developers@lists.research.att.com/msg01852.html - https://www.mail-archive.com/ast-developers@lists.research.att.com/msg01856.html - Fixed strange grammar in one of the error messages. - Added missing options for rksh to the synopsis section. - Applied a formatting fix from ksh93v- to the man page. - Replaced a C99 line comment in src/lib/libast/comp/realpath.c with a proper comment that is valid in C89. - Prioritize UTC over GMT in the documentation (missed by commitc9634e90
). - Add some extra information for 'ksh -R file' to the man page. This patch is from Red Hat: https://git.centos.org/rpms/ksh/blob/c8/f/SOURCES/ksh-20080202-manfix.patch
This commit is contained in:
parent
03224ae3af
commit
ea5b25b93a
16 changed files with 26 additions and 24 deletions
1
NEWS
1
NEWS
|
@ -77,7 +77,6 @@ Any uppercase BUG_* names are modernish shell bug IDs.
|
|||
- '%k' and '%l' print the current hour with blank padding, the former
|
||||
based on a 24-hour clock and the latter a twelve hour clock. These
|
||||
are common extensions present on Linux and *BSD.
|
||||
- '%l' prints the current hour (0-12) with blank padding (GNU and BSD).
|
||||
- '%f' prints a date with the format string '%Y.%m.%d-%H:%M:%S' (BusyBox).
|
||||
- '%q' prints the quarter of the year (GNU).
|
||||
|
||||
|
|
1
TODO
1
TODO
|
@ -3,7 +3,6 @@ TODO for AT&T ksh93, 93u+m bugfix branch
|
|||
______
|
||||
Fix regression test failures:
|
||||
|
||||
- On FreeBSD, there is a test failure in [[ -N file ]] in bracket.sh.
|
||||
- On OpenBSD, there are 15 locale-related test failures in variables.sh.
|
||||
|
||||
______
|
||||
|
|
|
@ -43,7 +43,7 @@ USAGE_LICENSE
|
|||
" window year of 69 (we can produce an example coding dated 1991 - this"
|
||||
" can be patented?, how about 1+1=2?.) The date tag lines are followed by"
|
||||
" \areadme\a text in reverse chronological order (newer entries at the"
|
||||
" top of the file.) If no selection options are spcified then all"
|
||||
" top of the file.) If no selection options are specified then all"
|
||||
" changes are listed. If no \afile\a operands are specified then the"
|
||||
" standard input is read.]"
|
||||
"[+?The entries for each \afile\a are annotated with the file directory name.]"
|
||||
|
|
|
@ -1424,7 +1424,7 @@ USAGE_LICENSE
|
|||
"a terminal or pipe.]"
|
||||
"[n]#[count?Read at most \acount\a characters. For binary fields \acount\a "
|
||||
"is the number of bytes.]"
|
||||
"[N]#[count?Read exactly \ancount\a characters. For binary fields \acount\a "
|
||||
"[N]#[count?Read exactly \acount\a characters. For binary fields \acount\a "
|
||||
"is the number of bytes.]"
|
||||
"[v?When reading from a terminal the value of the first variable is displayed "
|
||||
"and used as a default value.]"
|
||||
|
|
|
@ -48,7 +48,7 @@ const char e_timeout[] = "timed out waiting for input";
|
|||
const char e_mailmsg[] = "you have mail in $_";
|
||||
const char e_query[] = "no query process";
|
||||
const char e_history[] = "no history file";
|
||||
const char e_histopen[] = "history file cannot open";
|
||||
const char e_histopen[] = "cannot open history file";
|
||||
const char e_option[] = "%s: bad option(s)";
|
||||
const char e_toomany[] = "open file limit exceeded";
|
||||
const char e_argtype[] = "invalid argument of type %c";
|
||||
|
|
|
@ -58,7 +58,7 @@ option ] .\|.\|. [
|
|||
.B rksh93
|
||||
.\}
|
||||
[
|
||||
.B \(+-abcefhikmnoprstuvxBCD
|
||||
.B \(+-abcefhiklmnopstuvxBCDEGH
|
||||
] [
|
||||
.B \-R
|
||||
file ] [
|
||||
|
@ -732,6 +732,8 @@ A word beginning with
|
|||
.B #
|
||||
causes that word and all the following characters up to a new-line
|
||||
to be ignored.
|
||||
.PD
|
||||
.RE
|
||||
.SS Aliasing.
|
||||
The first word of each command is replaced by the text of an
|
||||
.B alias
|
||||
|
@ -1648,7 +1650,7 @@ is assigned a new value.
|
|||
Used for defining arithmetic functions
|
||||
(see
|
||||
.I "Arithmetic evaluation"
|
||||
below).
|
||||
below)
|
||||
and stores the list of user defined arithmetic functions.
|
||||
.TP
|
||||
.B .sh.name
|
||||
|
@ -7980,7 +7982,7 @@ No commands will be executed.
|
|||
Reads the file named by the
|
||||
.B ENV
|
||||
variable or by
|
||||
\s-1$HOME\s+1/\f3.\fPkshrc
|
||||
.B \s-1$HOME\s+1/\f3.\fPkshrc
|
||||
if not defined after the profiles.
|
||||
.TP 8
|
||||
.BI \-c
|
||||
|
@ -8042,6 +8044,8 @@ option is used
|
|||
to generate a cross reference database
|
||||
that can be used by a separate utility
|
||||
to find definitions and references for variables and commands.
|
||||
The filename argument specifies the generated database. A script file must be
|
||||
provided on the command line as well.
|
||||
.PP
|
||||
The remaining options and arguments are described under the
|
||||
.B set
|
||||
|
|
|
@ -663,8 +663,8 @@ arr5=(foo bar)
|
|||
[[ $(typeset -p arr5) == 'typeset -a arr5=(foo bar)' ]] || err_exit 'typeset expanding non-declaration aliases'
|
||||
|
||||
typeset -A Foo
|
||||
Foo=( [a]=AA;[b]=BB)
|
||||
[[ ${Foo[a]} == AA ]] || err_exit 'Fooa[a] is {Foo[a]} not AA'
|
||||
Foo=([a]=AA;[b]=BB)
|
||||
[[ ${Foo[a]} == AA ]] || err_exit 'Foo[a] is {Foo[a]} not AA'
|
||||
|
||||
# ======
|
||||
# Crash when listing an indexed array
|
||||
|
|
|
@ -447,7 +447,7 @@ typeset -l x=
|
|||
|
||||
unset x
|
||||
typeset -L4 x=$'\001abcdef'
|
||||
[[ ${#x} == 5 ]] || err_exit "width of character '\01' is not zero"
|
||||
[[ ${#x} == 5 ]] || err_exit "width of character '\001' is not zero"
|
||||
|
||||
unset x
|
||||
typeset -L x=-1
|
||||
|
|
|
@ -694,7 +694,7 @@ actual=$(
|
|||
expect='1'
|
||||
if [[ $actual != "$expect" ]]
|
||||
then
|
||||
err_exit "I/O error not detected: expected $(printf %q "$expect"), got $(printf %q "$actual"))"
|
||||
err_exit "I/O error not detected: expected $(printf %q "$expect"), got $(printf %q "$actual")"
|
||||
fi
|
||||
|
||||
# ======
|
||||
|
@ -702,11 +702,11 @@ fi
|
|||
|
||||
expect=$'0m00.0[0-9][0-9]s 0m00.0[0-9][0-9]s\n0m00.000s 0m00.000s'
|
||||
actual=$("$SHELL" -c times)
|
||||
[[ $actual == $expect ]] || err_exit "times output: expected $(printf %q "$expect"), got $(printf %q "$actual"))"
|
||||
[[ $actual == $expect ]] || err_exit "times output: expected $(printf %q "$expect"), got $(printf %q "$actual")"
|
||||
|
||||
expect=$'*: times: too many operands'
|
||||
actual=$(set +x; eval 'times Extra Args' 2>&1)
|
||||
[[ $actual == $expect ]] || err_exit "times with args: expected $(printf %q "$expect"), got $(printf %q "$actual"))"
|
||||
[[ $actual == $expect ]] || err_exit "times with args: expected $(printf %q "$expect"), got $(printf %q "$actual")"
|
||||
|
||||
# ======
|
||||
# 'whence' builtin
|
||||
|
|
|
@ -448,7 +448,7 @@ r echo repeat-3
|
|||
!
|
||||
|
||||
# Following test is disabled because a bug in pty causes it to fail on too
|
||||
# many operating systems. Apparently pty doesn't handle SIGSTP correctly:
|
||||
# many operating systems. Apparently pty doesn't handle SIGTSTP correctly:
|
||||
# https://github.com/att/ast/issues/375
|
||||
# TODO: fix pty and re-enable this test.
|
||||
: <<\end_disabled
|
||||
|
|
|
@ -44,7 +44,7 @@ extern int resolvepath(const char*, char*, size_t);
|
|||
extern char*
|
||||
realpath(const char* file, char* path)
|
||||
{
|
||||
// @lkoutsofios path may be NULL
|
||||
/* @lkoutsofios: path may be NULL */
|
||||
if (!path) {
|
||||
if (!(path = malloc (PATH_MAX)))
|
||||
return NULL;
|
||||
|
|
|
@ -70,7 +70,7 @@ are used to determine local time zone and savings time information.
|
|||
.PP
|
||||
.L time_t
|
||||
values are the number of seconds since the epoch,
|
||||
.BR "Jan 1 00:00:00 GMT 1970" ,
|
||||
.BR "Jan 1 00:00:00 UTC 1970" ,
|
||||
with leap seconds omitted.
|
||||
.PP
|
||||
The global variable
|
||||
|
@ -433,7 +433,7 @@ that includes the hours and minutes.
|
|||
.B z
|
||||
Time zone
|
||||
.I SHHMM
|
||||
west of GMT offset where
|
||||
west of UTC offset where
|
||||
.I S
|
||||
is
|
||||
.B +
|
||||
|
@ -614,7 +614,7 @@ Meridian names: AM, PM.
|
|||
.TP
|
||||
.B 43-46
|
||||
.B UTC
|
||||
time zone names: GMT, UTC, UCT, CUT.
|
||||
time zone names: UTC, UCT, CUT, GMT.
|
||||
.TP
|
||||
.B 47-50
|
||||
Daylight savings time suffix names: DST.
|
||||
|
|
|
@ -59,7 +59,7 @@ are used to determine local time zone information.
|
|||
.PP
|
||||
.L time_t
|
||||
values are the number of seconds since the epoch,
|
||||
.BR "Jan 1 00:00:00 GMT 1970" ,
|
||||
.BR "Jan 1 00:00:00 UTC 1970" ,
|
||||
with leap seconds omitted.
|
||||
.PP
|
||||
The global variable
|
||||
|
@ -492,7 +492,7 @@ Meridian names: AM, PM.
|
|||
.TP
|
||||
.B 43-46
|
||||
.B UTC
|
||||
time zone names: GMT, UTC, UCT, CUT.
|
||||
time zone names: UTC, UCT, CUT, GMT.
|
||||
.TP
|
||||
.B 47-50
|
||||
Daylight savings time suffix names: DST.
|
||||
|
|
|
@ -71,7 +71,7 @@ extern long int random();
|
|||
then initialized to contain information for random number generation with
|
||||
that much state information. Good sizes for the amount of state
|
||||
information are 32, 64, 128, and 256 bytes. The state can be switched by
|
||||
calling the setstate() function with the same array as was initiallized
|
||||
calling the setstate() function with the same array as was initialized
|
||||
with initstate(). By default, the package runs with 128 bytes of state
|
||||
information and generates far better random numbers than a linear
|
||||
congruential generator. If the amount of state information is less than
|
||||
|
|
|
@ -61,7 +61,7 @@ static const char usage_cp[] =
|
|||
"[L:logical|dereference?Follow symbolic links and copy the files they "
|
||||
"point to.]"
|
||||
"[P|d:physical|nodereference?Don't follow symbolic links; copy symbolic "
|
||||
"rather than the files they point to.]"
|
||||
"links rather than the files they point to.]"
|
||||
;
|
||||
|
||||
static const char usage_ln[] =
|
||||
|
|
|
@ -151,7 +151,7 @@ USAGE_LICENSE
|
|||
" \"%?%l\"; export TM_OPTIONS=\"format='\aoverride\a'\""
|
||||
" to override the default]"
|
||||
"}"
|
||||
"[i:incremental|adjust?Set the system time in incrementatl adjustments to"
|
||||
"[i:incremental|adjust?Set the system time in incremental adjustments to"
|
||||
" avoid complete time shift shock. Negative adjustments still maintain"
|
||||
" monotonic increasing time. Not available on all systems.]"
|
||||
"[L:last?List only the last time for multiple \adate\a operands.]"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue