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

Fix various typos, man page issues and improve the documentation (#415)

This commit makes various different improvements to the documentation:
- sh.1: Backported (with changes) mandoc warning fixes from ksh2020
  for the ksh93(1) man page: <https://github.com/att/ast/pull/1406>
- Removed unnecessary spaces at the end of lines to fix a few other
  mandoc warnings.
- Fixed various typos and capitalization errors in the documentation.
- ANNOUNCE: Document the addition of the ${.sh.pid} variable
  (re: 9de65210).
- libast/man/str*: Update the man pages for the libast str* functions
  to improve how accurately each function is described.
- ksh93/README: Update regression test/compatibility notes to include
  OpenBSD 7.0, FreeBSD 13.0 and WSL running Ubuntu 20.04.
- Change a few places to store the return value from strlen in a
  size_t variable rather than signed int.
- comp/setlocale.c: To avoid confusion of two separate variables named
  lang, the function local variable has been renamed to langidx.
This commit is contained in:
Johnothan King 2022-01-07 07:00:00 -08:00 committed by Martijn Dekker
parent d347ec0fc9
commit ca5803419b
95 changed files with 313 additions and 390 deletions

View file

@ -83,7 +83,7 @@ string:
strls ls -l format support
strmatch Korn shell file pattern match
strmode return ls -l style output given st.st_mode
strsignal return signal id string given SIG* number
strsignal return signal ID string given SIG* number
strtape convert generic tape unit to /dev/* file
token generate space separated tokens in string

View file

@ -223,7 +223,7 @@
09-12-04 features/options: add "opt map-libc" check
09-12-03 tm/tmxdate.c: fix 'next month final day' for dec -> jan
09-11-21 misc/magic.tab: add gimp XCF
09-11-20 vmalloc/vmtrace.c: add pid to assertion diagnostics
09-11-20 vmalloc/vmtrace.c: add PID to assertion diagnostics
09-11-11 regex.h,regcomp.c: add REG_CLASS_ESCAPE, \ inside [...] literal by default
09-11-03 regex/regcache.c: change to variable length pattern strings
09-10-28 include/error.h: fix ERROR_translate() arg parens
@ -1300,7 +1300,7 @@
astgetconf: add for thread safe error message control
astlicense: fix type=special but with non-null notice
errorx: add for ERROR_translate() support
ERROR_translate: add locale id args for alternate dictionary
ERROR_translate: add locale ID args for alternate dictionary
option.h: move _OPT_PRIVATE_ to pointer to avoid dll size mismatch
ftwalk: fix FTW_CHILDREN bug that hit top level non-dirs twice
translate.c: default error_info.translate
@ -1310,7 +1310,7 @@
00-03-07 optget: fix numeric option support test
sfkeyprintf: add %q for '...' quoting with ANSI escapes
00-03-06 features/stdio: fix _sfflsbuf prototype (dingold@gte.net)
00-02-14 pathtmp: fix pid cache bug that sometimes repeated after ~10 attempts
00-02-14 pathtmp: fix PID cache bug that sometimes repeated after ~10 attempts
optget: "..." attribute quote
pathfind: eliminate *: prefix in lib, not type
proc: PROC_FOREGROUND for system(3) semantics (wait status return)
@ -1372,7 +1372,7 @@
99-05-21 tm*: add TM_WINDOW==69 for consistent century windowing guard year
99-05-18 tmtime: add century leap year calc anticipating unsigned time_t
99-05-17 sfkeyprintf: handle %o and %x!!
99-05-09 pathprobe: $HOME/.probe if not suid and st_uid!=geteuid()
99-05-09 pathprobe: $HOME/.probe if not SUID and st_uid!=geteuid()
99-04-28 magic,magic.tab: add registry()
99-04-24 regcomp: fix ksh pattern +! parse
regfatalpat: add
@ -1430,7 +1430,7 @@
98-06-01 disc/sf*.c: memset(0) after disc malloc()
98-05-11 strelapsed: y==Y
fts: pathcanon() top list
98-04-01 error: error_info.time for all msgs, just after cmd id
98-04-01 error: error_info.time for all msgs, just after cmd ID
error: no sfsync(sfstdin)
sfio: sfpool, Sffmt_t update
magic.tab: SGI core dumps -- why aren't these ELF?
@ -1486,7 +1486,7 @@
sfio: update including SF_WHOLE
97-10-01 sfdostext: add \r\n => \n sfio discipline
stropt: NiL table => p=name for all name=value
97-08-11 pathtmp: check pid to note forks
97-08-11 pathtmp: check PID to note forks
procopen: FD_CLOEXEC rfd && wfd
fts: fts_close() after fts_children() with no fts_read() now works
97-07-17 error: sfsync(sfstdin,sfstdout,sfstderr) instead of sfsync(NiL)

View file

@ -66,7 +66,7 @@ aso_init_semaphore(void* data, const char* details)
{
/*
* semaphore 0 is the reference count
* the id is dropped on last reference
* the ID is dropped on last reference
*/
sem.sem_num = 0;

View file

@ -47,7 +47,7 @@ typedef struct Optdisc_s
{
unsigned long version; /* OPT_VERSION */
unsigned long flags; /* OPT_* flags */
char* catalog; /* error catalog id */
char* catalog; /* error catalog ID */
Optinfo_f infof; /* runtime info function */
} Optdisc_t;

View file

@ -21,7 +21,7 @@
* *
***********************************************************************/
/*
* access() euid/egid implementation
* access() EUID/EGID implementation
*/
#include <ast.h>

View file

@ -464,7 +464,7 @@ runve(int mode, const char* path, char* const* argv, char* const* envv)
{
/*
* 2004-02-29 Cygwin _P_DETACH is useless:
* spawn*() returns 0 instead of the spawned pid
* spawn*() returns 0 instead of the spawned PID
* spawned { pgid sid } are the same as the parent
*/

View file

@ -104,7 +104,7 @@ native_locale(const char* locale, char* buf, size_t siz)
const Lc_attribute_list_t* ap;
int i;
unsigned long lcid;
unsigned long lang;
unsigned long langidx;
unsigned long ctry;
char lbuf[128];
char cbuf[128];
@ -113,7 +113,7 @@ native_locale(const char* locale, char* buf, size_t siz)
{
if (!(lc = lcmake(locale)))
return 0;
lang = lc->language->index;
langidx = lc->language->index;
ctry = 0;
for (ap = lc->attributes; ap; ap = ap->next)
if (ctry = ap->attribute->index)
@ -128,12 +128,12 @@ native_locale(const char* locale, char* buf, size_t siz)
}
if (!ctry)
{
if (!lang)
if (!langidx)
return 0;
ctry = SUBLANG_DEFAULT;
}
}
lcid = MAKELCID(MAKELANGID(lang, ctry), SORT_DEFAULT);
lcid = MAKELCID(MAKELANGID(langidx, ctry), SORT_DEFAULT);
}
else
lcid = GetUserDefaultLCID();

View file

@ -51,7 +51,7 @@ extern int setpgrp(void);
#endif
/*
* set process group id
* set process group ID
*/
int

View file

@ -83,7 +83,7 @@
/* openlog flags */
#define LOG_PID 0x01 /* log the pid with each message */
#define LOG_PID 0x01 /* log the PID with each message */
#define LOG_CONS 0x02 /* log to console if errors in sending */
#define LOG_NDELAY 0x08 /* open right now */
#define LOG_ODELAY 0x04 /* delay open until syslog() is called */

View file

@ -23,7 +23,7 @@
/*
* POSIX waitpid()
*
* pid < -1 WUNTRACED may not be fully supported
* PID < -1 WUNTRACED may not be fully supported
* process group specifics ignored by non-{waitpid,wait4}
*/

View file

@ -196,7 +196,7 @@ cat{
unsigned long f_files; /* total # of file nodes (inodes) */
unsigned long f_ffree; /* total # of free file nodes */
unsigned long f_favail; /* # of free nodes avail to non-superuser */
unsigned long f_fsid; /* file system id (dev for now) */
unsigned long f_fsid; /* file system ID (dev for now) */
char f_basetype[16]; /* target fs type name, null-terminated */
unsigned long f_flag; /* bit-mask of flags */
unsigned long f_namemax; /* maximum file name length */

View file

@ -66,7 +66,7 @@ struct Cmddisc_s
typedef struct Cmdarg_s /* cmdopen() handle */
{
const char* id; /* library id string */
const char* id; /* library ID string */
#ifdef _CMDARG_PRIVATE_
_CMDARG_PRIVATE_

View file

@ -112,7 +112,7 @@ typedef struct Error_context_s Error_context_t;
int line; /* input|output line number */ \
int warnings; /* ERROR_WARNING count */ \
char* file; /* input|output file name */ \
char* id; /* command id */
char* id; /* command ID */
struct Error_context_s /* context stack element */
{

View file

@ -63,7 +63,7 @@ typedef struct Finddisc_s
typedef struct Find_s
{
const char* id; /* library id string */
const char* id; /* library ID string */
unsigned long stamp; /* codes time stamp */
#ifdef _FIND_PRIVATE_

View file

@ -63,7 +63,7 @@ typedef struct Magicdisc_s
typedef struct Magic_s
{
const char* id; /* library id string */
const char* id; /* library ID string */
#ifdef _MAGIC_PRIVATE_
_MAGIC_PRIVATE_

View file

@ -22,7 +22,7 @@
***********************************************************************/
/*
* generic binary magic id definitions
* generic binary magic ID definitions
*/
#ifndef _MAGICID_H

View file

@ -64,7 +64,7 @@ struct Mimedisc_s
struct Mime_s
{
const char* id; /* library id string */
const char* id; /* library ID string */
#ifdef _MIME_PRIVATE_
_MIME_PRIVATE_

View file

@ -45,7 +45,7 @@ typedef struct Optdisc_s
{
unsigned long version; /* OPT_VERSION */
unsigned long flags; /* OPT_* flags */
char* catalog; /* error catalog id */
char* catalog; /* error catalog ID */
Optinfo_f infof; /* runtime info function */
} Optdisc_t;

View file

@ -83,8 +83,8 @@
typedef struct
{
pid_t pid; /* process id */
pid_t pgrp; /* process group id */
pid_t pid; /* process ID */
pid_t pgrp; /* process group ID */
int rfd; /* read fd if applicable */
int wfd; /* write fd if applicable */

View file

@ -123,7 +123,7 @@
#define REG_ENULL 14 /* empty subexpr in pattern */
#define REG_ECOUNT 15 /* re component count overflow */
#define REG_BADESC 16 /* invalid \char escape */
#define REG_VERSIONID 17 /* version id (pseudo error) */
#define REG_VERSIONID 17 /* version ID (pseudo error) */
#define REG_EFLAGS 18 /* flags conflict */
#define REG_EDELIM 19 /* invalid or omitted delimiter */
#define REG_PANIC 20 /* unrecoverable internal error */

View file

@ -42,7 +42,7 @@
struct _sfdisc_s* disc; /* discipline */ \
struct _sfpool_s* pool; /* the pool containing this */ \
struct _sfrsrv_s* rsrv; /* reserved buffer */ \
struct _sfproc_s* proc; /* coprocess id, etc. */ \
struct _sfproc_s* proc; /* coprocess ID, etc. */ \
void* mutex; /* mutex for thread-safety */ \
void* stdio; /* stdio FILE if any */ \
Sfoff_t lpos; /* last seek position */ \

View file

@ -71,8 +71,8 @@
* bits used in mode field
*/
#define TSUID 04000 /* set uid on exec */
#define TSGID 02000 /* set gid on exec */
#define TSUID 04000 /* setuid on exec */
#define TSGID 02000 /* setgid on exec */
#define TSVTX 01000 /* sticky bit -- reserved */
/*

View file

@ -393,7 +393,7 @@ where the length of
.IR pfx ,
if !=0, is limited to 5, the length of
.I <pid>
(the base 64 representation of the current process id)
(the base 64 representation of the current process ID)
is limited to 3, and
.I <suf>
(an internally generated suffix that avoid file conflicts)

View file

@ -206,7 +206,7 @@ The child environment is cleared before
is added.
.TP
.L PROC_GID
The child effective group id is set to the real group id.
The child effective group ID is set to the real group ID.
.TP
.L PROC_IGNORE
Parent pipe errors are ignored.
@ -239,11 +239,11 @@ is used to execute
if it is a shell script.
.TP
.L PROC_PRIVELEGED
If the effective user id is
If the effective user ID is
.L 0
then the child real user id is set to
then the child real user ID is set to
.L 0
and the child real group id is set to the effective group id.
and the child real group ID is set to the effective group ID.
.TP
.L PROC_READ
.I proc.rfd
@ -259,7 +259,7 @@ entry
.LR PROC_SYS_PGRP(-1) .)
.TP
.L PROC_UID
The child effective user id is set to the real user id.
The child effective user ID is set to the real user ID.
.TP
.L PROC_WRITE
.I proc.wfd
@ -270,7 +270,7 @@ standard input.
The return value is a pointer to a structure with the following members:
.TP
.L "pid_t \fIpid\fP"
The child process id.
The child process ID.
.TP
.L "pid_t \fIpgrp\fP"
The child process group.

View file

@ -40,7 +40,7 @@
.SH NAME
strdup \- duplicate null-terminated string
.SH SYNOPSIS
.L "char* strdup(char* s)"
.L "char* strdup(const char* s)"
.SH DESCRIPTION
.I strdup
copies the null-terminated string

View file

@ -40,7 +40,7 @@
.SH NAME
strelapsed \- parse elapsed time expression
.SH SYNOPSIS
.L "unsigned long strelapsed(char* buf, char** next, int persec)"
.L "unsigned long strelapsed(const char* buf, char** next, int persec)"
.SH DESCRIPTION
.I strelapsed
returns a pointer to a string representation of the elapsed time for

View file

@ -40,7 +40,7 @@
.SH NAME
streval \- long integer arithmetic expression evaluator
.SH SYNOPSIS
.L "long streval(char* s, char** e, long (*conv)(char* cs, char** ce))"
.L "long streval(const char* s, char** e, long (*conv)(const char* cs, char** ce))"
.SH DESCRIPTION
.I streval
evaluates the long integer arithmetic expression in the null-terminated string

View file

@ -40,9 +40,9 @@
.SH NAME
strmatch \- match shell file patterns
.SH SYNOPSIS
.L "int strmatch(char* s, char* p)"
.L "int strmatch(const char* s, const char* p)"
.br
.L "char* submatch(char* s, char* p, int m)"
.L "char* submatch(const char* s, const char* p, int flags)"
.SH DESCRIPTION
.I strmatch
compares the string
@ -56,7 +56,7 @@ does a leading substring match of the shell pattern
with the string
.IR s .
If
.I m
.I flags
is 0 then the match is minimal, otherwise a maximal match is done.
A pointer to the first character after the matched substring is returned,
.I 0

View file

@ -42,7 +42,7 @@ stropt \- table driven option expression evaluator
.SH SYNOPSIS
.L "#include <namval.h>"
.br
.L "int stropt(char* s, struct namval* tab,
.L "int stropt(const char* s, struct namval* tab, int siz,
.br
.L " int (*fun)(void* a, struct namval* p, int n, char* v),"
.br

View file

@ -40,7 +40,7 @@
.SH NAME
strperm \- evaluate file permission expression
.SH SYNOPSIS
.L "int strperm(char* s, char** e, int p)"
.L "int strperm(const char* s, char** e, int p)"
.SH DESCRIPTION
.I strperm
applies a file permission expression in the null-terminated string

View file

@ -40,7 +40,7 @@
.SH NAME
strtape \- convert string to tape device pathname
.SH SYNOPSIS
.L "char* strtape(char* s, char** e)"
.L "char* strtape(const char* s, char** e)"
.SH DESCRIPTION
.I strtape
converts the generic tape device specification in the null-terminated string

View file

@ -40,7 +40,7 @@
.SH NAME
strton \- convert string to long integer
.SH SYNOPSIS
.L "long strton(char* s, char** e)"
.L "long strton(const char* s, char** e, char *basep, int m)"
.SH DESCRIPTION
.I strton
converts the null-terminated string

View file

@ -29,7 +29,7 @@ static char** ids;
static const char* dflt[] = { "ast", "standard", 0 };
/*
* initialize the conformance() id list
* initialize the conformance() ID list
*/
static char**
@ -97,8 +97,8 @@ initconformance(void)
}
/*
* return conformance id if s size n is in conformance
* prefix match of s on the conformance id table
* return conformance ID if s size n is in conformance
* prefix match of s on the conformance ID table
* s==0 => "standard"
*/

View file

@ -139,7 +139,7 @@ typedef struct Push_s
typedef struct Tag_s
{
unsigned char level; /* indent level */
unsigned char id; /* TAG_* id */
unsigned char id; /* TAG_* ID */
} Tag_t;
typedef struct Indent_s

View file

@ -101,7 +101,7 @@ typedef struct Optstate_s
Dtdisc_t msgdisc; /* msgdict discipline */
Dt_t* msgdict; /* default ast.id catalog msgs */
Optcache_t* cache; /* OPT_cache cache */
char** conformance; /* conformance id vector */
char** conformance; /* conformance ID vector */
} Optstate_t;
#define _OPT_PRIVATE_ \

View file

@ -29,7 +29,7 @@ static const char id[] = "\n@(#)$Id: ast (AT&T Research) 2012-05-28 $\0\n";
_Ast_info_t _ast_info =
{
"libast", /* id */
"libast", /* ID */
{ 0 },
0,0,0,0,0,
strcmp, /* collate */

View file

@ -422,7 +422,7 @@ char *_stkseek(register Sfio_t *stream, register ssize_t n)
/*
* advance the stack to the current top
* if extra is non-zero, first add a extra bytes and zero the first
* if extra is non-zero, first add extra bytes and zero the first
*/
char *stkfreeze(register Sfio_t *stream, register size_t extra)
{

View file

@ -349,7 +349,7 @@ translate(const char* loc, const char* cmd, const char* cat, const char* msg)
!(cp = mp->cat))
{
#if DEBUG_trace > 1
sfprintf(sfstderr, "AHA#%d:%s cmd %s cat %s:%s id %s msg `%s'\n", __LINE__, __FILE__, cmd, cat, error_info.catalog, ast.id, msg);
sfprintf(sfstderr, "AHA#%d:%s cmd %s cat %s:%s ID %s msg `%s'\n", __LINE__, __FILE__, cmd, cat, error_info.catalog, ast.id, msg);
#endif
cp = 0;
goto done;

View file

@ -36,7 +36,7 @@
*
* SHELL is read from the environment and must start with /
*
* if set-uid or set-gid then the executable and its containing
* if setuid or setgid then the executable and its containing
* directory must not be owned by the real user/group
*
* root/administrator has its own test

View file

@ -35,7 +35,7 @@
/*
* return 1 if files a and b are the same under preroot
*
* NOTE: the kernel disables preroot for set-uid processes
* NOTE: the kernel disables preroot for setuid processes
*/
static int

View file

@ -669,7 +669,7 @@ struct _sfrsrv_s
/* co-process structure */
typedef struct _sfproc_s Sfproc_t;
struct _sfproc_s
{ int pid; /* process id */
{ int pid; /* process ID */
uchar* rdata; /* read data being cached */
int ndata; /* size of cached data */
int size; /* buffer size */

View file

@ -147,7 +147,7 @@ int _sfsetpool(Sfio_t* f)
}
/* always add at end of array because if this was done during some sort
of walk thru all streams, we'll want the new stream to be seen.
of walk through all streams, we'll want the new stream to be seen.
*/
p->sf[p->n_sf++] = f;
rv = 0;

View file

@ -126,7 +126,7 @@ struct _vtmutex_s
/* structure for states of thread */
struct _vthread_s
{ _vtself_t self; /* self-handle */
_vtid_t id; /* thread id */
_vtid_t id; /* thread ID */
_vtattr_t attrs; /* attributes */
size_t stack; /* stack size */
int state; /* execution state */

View file

@ -129,7 +129,7 @@ ccmaplist(Ccmap_t* mp)
}
/*
* return ccode map id given name
* return ccode map ID given name
*/
int
@ -158,7 +158,7 @@ ccmapid(const char* name)
}
/*
* return ccode map name given id
* return ccode map name given ID
*/
char*

View file

@ -24,7 +24,7 @@
* Glenn Fowler
* AT&T Bell Laboratories
*
* cached gid number -> name
* cached GID number -> group name
*/
#if defined(__STDPP__directive) && defined(__STDPP__hide)
@ -53,7 +53,7 @@ typedef struct Id_s
} Id_t;
/*
* return gid name given gid number
* return group name for given GID number
*/
char*

View file

@ -24,7 +24,7 @@
* Glenn Fowler
* AT&T Bell Laboratories
*
* uid number -> name
* UID number -> user name
*/
#if defined(__STDPP__directive) && defined(__STDPP__hide)
@ -53,7 +53,7 @@ typedef struct Id_s
} Id_t;
/*
* return uid name given uid number
* return user name for given UID number
*/
char*

View file

@ -24,7 +24,7 @@
* Glenn Fowler
* AT&T Bell Laboratories
*
* gid name -> number
* group name -> GID number
*/
#if defined(__STDPP__directive) && defined(__STDPP__hide)
@ -60,8 +60,8 @@ typedef struct Id_s
} Id_t;
/*
* return gid number given gid/uid name
* gid attempted first, then uid->pw_gid
* return GID number for given group name
* gr->gr_gid attempted first, then pw->pw_gid
* -1 on first error for a given name
* -2 on subsequent errors for a given name
*/

View file

@ -24,7 +24,7 @@
* Glenn Fowler
* AT&T Bell Laboratories
*
* uid name -> number
* user name -> UID
*/
#if defined(__STDPP__directive) && defined(__STDPP__hide)
@ -56,7 +56,7 @@ typedef struct Id_s
} Id_t;
/*
* return uid number given uid name
* return UID number for given user name
* -1 on first error for a given name
* -2 on subsequent errors for a given name
*/

View file

@ -204,7 +204,7 @@ static int mminit(Mmdisc_t* mmdc)
MAP_SHARED, fd, (off_t)0 );
}
else
{ /* make the key and get/create an id for the share mem segment */
{ /* make the key and get/create an ID for the share mem segment */
if((key = ftok(mmdc->file, mmdc->proj)) < 0 )
goto done;
if((mmdc->shmid = shmget(key, size, IPC_CREAT|FILE_MODE)) < 0 )

View file

@ -64,7 +64,7 @@ static void* poolalloc(Vmalloc_t* vm, reg size_t size, int local)
size = ROUND(size,ALIGN);
/* look thru all segments for a suitable free block */
/* look through all segments for a suitable free block */
for(tp = NIL(Block_t*), seg = vd->seg; seg; seg = seg->next)
{ if((tp = seg->free) &&
(s = (SIZE(tp) & ~BITS) + sizeof(Head_t)) >= size )

View file

@ -92,7 +92,7 @@
08-04-01 stty.c: fix off2 uninitialized reference
08-03-28 chgrp.c: add --before=file
08-03-14 pids.c: add
08-03-11 chgrp.c: fix -m to use uid:gid as lookup key
08-03-11 chgrp.c: fix -m to use UID:GID as lookup key
08-02-11 Makefile: add -lmd possibly required by sumlib.o -- hack alert
08-01-30 expr.c: fix <=0 type that broke substr * 1 * -- wow
07-12-13 cp.c: fix builtin state reinitialization
@ -299,7 +299,7 @@
mkdir: fix -p default mode
97-12-07 mkdir: fix umask() reset
97-11-11 chown,chgrp: proper interpretation of -h,-l for lchown()
chown,chgrp: only chown() if uid or gid change
chown,chgrp: only chown() if UID or GID change
97-10-31 mkdir: do umask right
97-08-11 cmdinit: clear opt_info.index to allow multiple calls
cp,ln,mv: add
@ -324,7 +324,7 @@
add void* context 3rd arg to b_main()
95-05-09 add getconf
cat -u avoids mmap
add chown|chgrp -m uid|gid map file
add chown|chgrp -m UID|GID map file
add chown|chgrp -P for systems with lchown(2)
chown|chgrp -P => lstat() too!
chmod|chown|chgrp -HLP

View file

@ -36,7 +36,7 @@ static const char usage_grp_1[] =
"[+NAME?chgrp - change the group ownership of files]"
"[+DESCRIPTION?\bchgrp\b changes the group ownership of each file"
" to \agroup\a, which can be either a group name or a numeric"
" group id. The user ownership of each file may also be changed to"
" group ID. The user ownership of each file may also be changed to"
" \auser\a by prepending \auser\a\b:\b to the group name.]"
;
@ -44,7 +44,7 @@ static const char usage_own_1[] =
"[+NAME?chown - change the ownership of files]"
"[+DESCRIPTION?\bchown\b changes the ownership of each file"
" to \auser\a, which can be either a user name or a numeric"
" user id. The group ownership of each file may also be changed to"
" user ID. The group ownership of each file may also be changed to"
" \auser\a by appending \b:\b\agroup\a to the user name.]"
;
@ -65,10 +65,10 @@ static const char usage_2[] =
"determined it is not overridden by any subsequent match. Unmatched "
"files are silently ignored.]"
"[n:show?Show actions but don't execute.]"
"[N:numeric?By default numeric user and group id operands are first "
"[N:numeric?By default numeric user and group ID operands are first "
"interpreted as names; if no name exists then they are interpreted as "
"explicit numeric ids. \b--numeric\b interprets numeric id operands as "
"numeric ids.]"
"explicit numeric IDs. \b--numeric\b interprets numeric ID operands as "
"numeric IDs.]"
"[r:reference?Omit the explicit ownership operand and use the ownership "
"of \afile\a instead.]:[file]"
"[u:unmapped?Print a diagnostic for each file for which either the "
@ -117,13 +117,13 @@ __STDPP__directive pragma pp:nohide lchown
#undef lchown
#endif
typedef struct Key_s /* uid/gid key */
typedef struct Key_s /* UID/GID key */
{
int uid; /* uid */
int gid; /* gid */
int uid; /* UID */
int gid; /* GID */
} Key_t;
typedef struct Map_s /* uid/gid map */
typedef struct Map_s /* UID/GID map */
{
Dtlink_t link; /* dictionary link */
Key_t key; /* key */
@ -132,19 +132,19 @@ typedef struct Map_s /* uid/gid map */
#define OPT_CHOWN 0x0001 /* chown */
#define OPT_FORCE 0x0002 /* ignore errors */
#define OPT_GID 0x0004 /* have gid */
#define OPT_GID 0x0004 /* have GID */
#define OPT_LCHOWN 0x0008 /* lchown */
#define OPT_NUMERIC 0x0010 /* favor numeric ids */
#define OPT_NUMERIC 0x0010 /* favor numeric IDs */
#define OPT_SHOW 0x0020 /* show but don't do */
#define OPT_TEST 0x0040 /* canonicalize output */
#define OPT_UID 0x0080 /* have uid */
#define OPT_UID 0x0080 /* have UID */
#define OPT_UNMAPPED 0x0100 /* unmapped file diagnostic */
#define OPT_VERBOSE 0x0200 /* have uid */
#define OPT_VERBOSE 0x0200 /* have UID */
extern int lchown(const char*, uid_t, gid_t);
/*
* parse uid and gid from s
* parse UID and GID from s
*/
static void
@ -483,11 +483,11 @@ b_chgrp(int argc, char** argv, Shbltin_t* context)
if ((options & OPT_UNMAPPED) && (uid < 0 || gid < 0))
{
if (uid < 0 && gid < 0)
error(ERROR_warn(0), "%s: uid and gid not mapped", ent->fts_path);
error(ERROR_warn(0), "%s: UID and GID not mapped", ent->fts_path);
else if (uid < 0)
error(ERROR_warn(0), "%s: uid not mapped", ent->fts_path);
error(ERROR_warn(0), "%s: UID not mapped", ent->fts_path);
else
error(ERROR_warn(0), "%s: gid not mapped", ent->fts_path);
error(ERROR_warn(0), "%s: GID not mapped", ent->fts_path);
}
if (uid != ent->fts_statp->st_uid && uid >= 0 || gid != ent->fts_statp->st_gid && gid >= 0)
{

View file

@ -121,7 +121,7 @@ typedef struct State_s /* program state */
int all; /* list all items */
Sfio_t* check; /* check previous output */
int flags; /* sumprint() SUM_* flags */
gid_t gid; /* caller gid */
gid_t gid; /* caller GID */
int header; /* list method on output */
int list; /* list file name too */
Sum_t* oldsum; /* previous sum method */
@ -135,7 +135,7 @@ typedef struct State_s /* program state */
Sum_t* sum; /* sum method */
int text; /* \r\n == \n */
int total; /* list totals only */
uid_t uid; /* caller uid */
uid_t uid; /* caller UID */
int warn; /* invalid check line warnings */
} State_t;
@ -336,7 +336,7 @@ verify(State_t* state, register char* s, char* check, Sfio_t* rp)
if (state->silent)
error_info.errors++;
else
error(2, "%s: uid should be %s", file, fmtuid(uid));
error(2, "%s: UID should be %s", file, fmtuid(uid));
}
if (gid < 0 || gid == st.st_gid)
gid = -1;
@ -345,7 +345,7 @@ verify(State_t* state, register char* s, char* check, Sfio_t* rp)
if (state->silent)
error_info.errors++;
else
error(2, "%s: gid should be %s", file, fmtgid(gid));
error(2, "%s: GID should be %s", file, fmtgid(gid));
}
if (state->permissions && (uid >= 0 || gid >= 0))
{

View file

@ -45,7 +45,7 @@ static const char usage_cp[] =
"[A:attributes?Preserve selected file attributes:]:[eipt]"
"{"
"[+e?Everything permissible.]"
"[+i?Owner uid and gid.]"
"[+i?Owner UID and GID.]"
"[+p?Permissions.]"
"[+t?Access and modify times.]"
"}"
@ -144,7 +144,7 @@ static const char usage_tail[] =
#define LN 2
#define MV 3
#define PRESERVE_IDS 0x1 /* preserve uid gid */
#define PRESERVE_IDS 0x1 /* preserve UID and GID */
#define PRESERVE_PERM 0x2 /* preserve permissions */
#define PRESERVE_TIME 0x4 /* preserve times */
@ -172,7 +172,7 @@ typedef struct State_s /* program state */
int remove; /* remove destination before op */
int suflen; /* strlen(state.suffix) */
int sync; /* fsync() each file after copy */
int uid; /* caller uid */
int uid; /* caller UID */
int update; /* replace only if newer */
int verbose; /* list each file before op */
int wflags; /* open() for write flags */

View file

@ -25,22 +25,22 @@
static const char usage[] =
"[-?\n@(#)$Id: pids (AT&T Research) 2011-08-27 $\n]"
"[--catalog?" ERROR_CATALOG "]"
"[+NAME?pids - list calling shell process ids]"
"[+NAME?pids - list calling shell process IDs]"
"[+DESCRIPTION?When invoked as a shell builtin, \bpids\b lists one or "
"more of the calling process ids determined by \bgetpid\b(2), "
"more of the calling process IDs determined by \bgetpid\b(2), "
"\bgetppid\b(2), \bgetpgrp\b(2), \btcgetpgrp\b(3) and \bgetsid\b(2). "
"Unknown or invalid ids have the value \b-1\b.]"
"[f:format?List the ids specified by \aformat\a. \aformat\a follows "
"\bprintf\b(3) conventions, except that \bsfio\b(3) inline ids are used "
"Unknown or invalid IDs have the value \b-1\b.]"
"[f:format?List the IDs specified by \aformat\a. \aformat\a follows "
"\bprintf\b(3) conventions, except that \bsfio\b(3) inline IDs are used "
"instead of arguments: "
"%[-+]][\awidth\a[.\aprecis\a[.\abase\a]]]]]](\aid\a)\achar\a. The "
"supported \aid\as are:]:[format:=" FORMAT "]"
"{"
"[+pid?The process id.]"
"[+pgid?The process group id.]"
"[+ppid?The parent process id.]"
"[+tid|tty?The controlling terminal id.]"
"[+sid?The session id.]"
"[+pid?The process ID.]"
"[+pgid?The process group ID.]"
"[+ppid?The parent process ID.]"
"[+tid|tty?The controlling terminal ID.]"
"[+sid?The session ID.]"
"}"
"[+SEE ALSO?\bgetpid\b(2), \bgetppid\b(2), \bgetpgrp\b(2), "
"\btcgetpgrp\b(3), \bgetsid\b(2)]"

View file

@ -86,7 +86,7 @@ typedef struct State_s /* program state */
int interactive; /* prompt for approval */
int recursive; /* remove subtrees too */
int terminal; /* attached to terminal */
int uid; /* caller uid */
int uid; /* caller UID */
int unconditional; /* enable dir rwx on preorder */
int verbose; /* display each file */
#if _lib_fsync

View file

@ -37,7 +37,7 @@ static const char usage[] =
"[g:save?Writes the current settings to standard output in a form that "
"can be used as an argument to another \bstty\b command. The \brows\b "
"and \bcolumns\b values are not included.]"
"[t:terminal-group?Print the terminal group id of the device, -1 if "
"[t:terminal-group?Print the terminal group ID of the device, -1 if "
"unknown.]"
"\n"
"\n[mode ...]\n"

View file

@ -55,7 +55,7 @@ static const char usage[] =
"[i:implementation|platform|hardware-platform?The hardware implementation;"
" this is \b--host-id\b on some systems.]"
"[o:operating-system?The generic operating system name.]"
"[h:host-id|id?The host id in hex.]"
"[h:host-id|id?The host ID in hex.]"
"[d:domain?The domain name returned by \agetdomainname\a(2).]"
"[R:extended-release?The extended release name.]"
"[A:everything?Equivalent to \b-snrvmpiohdR\b.]"

View file

@ -34,8 +34,8 @@ static const char usage[] =
"[+NAME?vmstate - list the calling process vmalloc region state]"
"[+DESCRIPTION?When invoked as a shell builtin, \bvmstate\b lists the "
"calling process \bvmalloc\b(3) state for all regions.]"
"[f:format?List the ids specified by \aformat\a. \aformat\a follows "
"\bprintf\b(3) conventions, except that \bsfio\b(3) inline ids are used "
"[f:format?List the IDs specified by \aformat\a. \aformat\a follows "
"\bprintf\b(3) conventions, except that \bsfio\b(3) inline IDs are used "
"instead of arguments: "
"%[-+]][\awidth\a[.\aprecis\a[.\abase\a]]]]]](\aid\a)\achar\a. The "
"supported \aid\as are:]:[format:=" FORMAT "]"

View file

@ -226,7 +226,7 @@ dllsopen(const char* lib, const char* name, const char* version)
if (lib && *lib && (*lib != '-' || *(lib + 1)))
{
/*
* grab the local part of the library id
* grab the local part of the library ID
*/
if (s = strrchr(lib, ':'))