Fix typo: WRDE_DOOFS -> WRDE_DOOFFS.

Noticed by:	Stoned Elipot
This commit is contained in:
Tim J. Robbins 2004-06-30 13:55:08 +00:00
parent 888fa8dfec
commit b7114d4a9c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=131331
3 changed files with 6 additions and 6 deletions

View file

@ -49,7 +49,7 @@ typedef struct {
* Flags for wordexp().
*/
#define WRDE_APPEND 0x1 /* append to previously generated */
#define WRDE_DOOFS 0x2 /* we_offs member is valid */
#define WRDE_DOOFFS 0x2 /* we_offs member is valid */
#define WRDE_NOCMD 0x4 /* disallow command substitution */
#define WRDE_REUSE 0x8 /* reuse wordexp_t */
#define WRDE_SHOWERR 0x10 /* don't redirect stderr to /dev/null */

View file

@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd December 27, 2002
.Dd June 30, 2004
.Dt WORDEXP 3
.Os
.Sh NAME
@ -58,7 +58,7 @@ argument is the bitwise inclusive OR of any of the following constants:
.It Dv WRDE_APPEND
Append the words to those generated by a previous call to
.Fn wordexp .
.It Dv WRDE_DOOFS
.It Dv WRDE_DOOFFS
As many
.Dv NULL
pointers as are specified by the

View file

@ -155,12 +155,12 @@ we_askshell(const char *words, wordexp_t *we, int flags)
*/
sofs = we->we_nbytes;
vofs = we->we_wordc;
if ((flags & (WRDE_DOOFS|WRDE_APPEND)) == (WRDE_DOOFS|WRDE_APPEND))
if ((flags & (WRDE_DOOFFS|WRDE_APPEND)) == (WRDE_DOOFFS|WRDE_APPEND))
vofs += we->we_offs;
we->we_wordc += nwords;
we->we_nbytes += nbytes;
if ((nwv = realloc(we->we_wordv, (we->we_wordc + 1 +
(flags & WRDE_DOOFS ? we->we_offs : 0)) *
(flags & WRDE_DOOFFS ? we->we_offs : 0)) *
sizeof(char *))) == NULL) {
_close(pdes[0]);
_waitpid(pid, &status, 0);
@ -194,7 +194,7 @@ we_askshell(const char *words, wordexp_t *we, int flags)
* Break the null-terminated expanded word strings out into
* the vector.
*/
if (vofs == 0 && flags & WRDE_DOOFS)
if (vofs == 0 && flags & WRDE_DOOFFS)
while (vofs < we->we_offs)
we->we_wordv[vofs++] = NULL;
p = we->we_strings + sofs;