Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ wordexp(5) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

wordexp(3C)

wordexp(5)                                                       wordexp(5)

NAME
     wordexp - word-expansion types

SYNOPSIS
     #include <wordexp.h>

DESCRIPTION
     The wordexp.h header defines the structures and symbolic constants
     used by the wordexp() and wordfree() functions.

     The structure type wordexpt contains at least the following members:

     sizet     wewordc      Count of words matched by words.

     char       **wewordv    Pointer to list of expanded words.

     sizet     weoffs       Slots to reserve at the beginning of
                              wewordv.

     The flags argument to the wordexp() function is the bitwise inclusive
     OR of the following flags:

     WRDEAPPEND    Append words to those previously generated.

     WRDEDOOFS     Number of null points to prepend to wewordv.

     WRDENOCMD     Fail if command substitution is requested.

     WRDEREUSE     The pwordexp argument was passed to a previous success-
                    ful call to wordexp(), and has not been passed to
                    wordfree(). The result will be the same as if the
                    application had called wordfree() and then called
                    wordexp() without WRDEREUSE.

     WRDESHOWERR   Do not redirect stderr to /dev/null.

     WRDEUNDEF     Report error on an attempt to expand an undefined shell
                    variable.

















Page 1                       Reliant UNIX 5.44                Printed 11/98

wordexp(5)                                                       wordexp(5)

     The following constants are defined as error return values:

     WRDEBADCHAR   One of the unquoted characters:

                    newline |  & ;  <  > (  ) {  }

                    appears in words in an inappropriate context.

     WRDEBADVAL    Reference to undefined shell variable when WRDEUNDEF
                    is set in flags.

     WRDECMDSUB    Command substitution requested when WRDENOCMD was set
                    in flags.

     WRDENOSPACE   Attempt to allocate memory failed.

     WRDENOSYS     The implementation does not support the function.

     WRDESYNTAX    Shell syntax error, such as unbalanced parentheses or
                    unterminated string.

     The following are declared as functions and may also be declared as
     macros:

          int  wordexp(const char *words, wordexpt *pwordexp, int flags);

          void wordfree(wordexpt *pwordexp);

     The implementation may define additional macros or constants using
     names beginning with WRDE.

SEE ALSO
     wordexp(3C).





















Page 2                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026