1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

Fix typos in <customtypecommand> --man self-documentation

src/cmd/ksh93/bltins/enum.c:
- enum_type[]: Fix typos; minor edit for style.
- enum_type[], enuminfo(): Make the list of supported values
  comma-separated, instead of using a comma at the start of each.

src/cmd/ksh93/sh/nvtype.c:
- sh_opttype[]: Fix typos.
This commit is contained in:
Martijn Dekker 2021-02-10 16:22:11 +00:00
parent 76ea18dcbd
commit 2996d7ae7c
2 changed files with 12 additions and 14 deletions

View file

@ -45,22 +45,22 @@ static const char enum_type[] =
"[-1c?\n@(#)$Id: type (AT&T Labs Research) 2008-01-08 $\n]"
"[--catalog?" ERROR_CATALOG "]"
"[+NAME?\f?\f - create an instance of type \b\f?\f\b]"
"[+DESCRIPTION?\b\f?\f\b creates a variable for each \aname\a with "
"enumeration type \b\f?\f\b where \b\f?\f\b is a type that has been "
"[+DESCRIPTION?The \b\f?\f\b declaration command creates a variable for "
"each \aname\a with enumeration type \b\f?\f\b, a type that has been "
"created with the \benum\b(1) command.]"
"[+?The variable can have one of the following values\fvalues\f. "
"The the values are \fcase\fcase sensitive.]"
"[+?The variable can have one of the following values: \fvalues\f. "
"The values are \fcase\fcase sensitive.]"
"[+?If \b=\b\avalue\a is omitted, the default is \fdefault\f.]"
"[+?If no \aname\as are specified then the names and values of all "
"variables of this type are written to standard output.]"
"[+?\b\f?\f\b is built-in to the shell as a declaration command so that "
"[+?\b\f?\f\b is built in to the shell as a declaration command so that "
"field splitting and pathname expansion are not performed on "
"the arguments. Tilde expansion occurs on \avalue\a.]"
"[r?Enables readonly. Once enabled, the value cannot be changed or unset.]"
"[a?index array. Each \aname\a will converted to an index "
"[a?Indexed array. Each \aname\a will converted to an indexed "
"array of type \b\f?\f\b. If a variable already exists, the current "
"value will become index \b0\b.]"
"[A?Associative array. Each \aname\a will converted to an associate "
"[A?Associative array. Each \aname\a will converted to an associative "
"array of type \b\f?\f\b. If a variable already exists, the current "
"value will become subscript \b0\b.]"
"[h]:[string?Used within a type definition to provide a help string "
@ -104,10 +104,8 @@ static int enuminfo(Opt_t* op, Sfio_t *out, const char *str, Optdisc_t *fp)
if(ep->iflag)
sfprintf(out,"not ");
}
else while(v=ep->values[n++])
{
sfprintf(out,", \b%s\b",v);
}
else while(v=ep->values[n])
sfprintf(out, n++ ? ", \b%s\b" : "\b%s\b", v);
return(0);
}

View file

@ -37,16 +37,16 @@ static const char sh_opttype[] =
"is converted to \b\f?\f\b.]"
"[+?If no \aname\as are specified then the names and values of all "
"variables of this type are written to standard output.]"
"[+?\b\f?\f\b is built-in to the shell as a declaration command so that "
"[+?\b\f?\f\b is built in to the shell as a declaration command so that "
"field splitting and pathname expansion are not performed on "
"the arguments. Tilde expansion occurs on \avalue\a.]"
"[r?Enables readonly. Once enabled, the value cannot be changed or unset.]"
"[a]:?[type?Indexed array. Each \aname\a will converted to an index "
"[a]:?[type?Indexed array. Each \aname\a will converted to an indexed "
"array of type \b\f?\f\b. If a variable already exists, the current "
"value will become index \b0\b. If \b[\b\atype\a\b]]\b is "
"specified, each subscript is interpreted as a value of enumeration "
"type \atype\a.]"
"[A?Associative array. Each \aname\a will converted to an associate "
"[A?Associative array. Each \aname\a will converted to an associative "
"array of type \b\f?\f\b. If a variable already exists, the current "
"value will become subscript \b0\b.]"
"[h]:[string?Used within a type definition to provide a help string "