Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought






       wordexp(5)                                                wordexp(5)


       NAME
             wordexp - word-expansion utilities

       SYNOPSIS
             #include <wordexp.h>

       DESCRIPTION
             The wordexp header declares the type wordexp_t which includes
             the following members:
       size_t  we_wordc   The number of words that have been matched by words.
       char  **we_wordv   This is a pointer to a list of expanded words.
       size_t  we_offs    Slots to be reserved.  These are found at the beginning of
                          we_wordv .
             wordexp takes the argument flags.  This argument is the
             bitwise inclusive OR of the flags that are listed below:
       WRDE_APPEND    To words previously obtained,append new words.
       WRDE_DOOFFS    A count of the null-pointers that should prepend to we_wordv.
       WRDE_NOCMD     If there is a request for command substitution then fail.
       WRDE_REUSE     Due to a successful call to wordexp, the pwordexp
                      argument has been passed to it but has not been passed to
                      wordfree.  The result would be the same if a call had first
                      been made by the application to wordfree and then to
                      wordexp without using WRDE_REUSE.
       WRDE_SHOWERR   The redirection of stderr to /dev/null should not occur.
       WRDE_UNDEF     If the expansion of a shell variable that has not been defined is
                      attempted then an error is reported.
             Error return values have the following constants defined:
       WRDE_BADCHAR   One of the unquoted characters below is found in words
                      in an irrelevant context:
                      <newline> | & ; < > ( ) {}
       WRDE_BADVAL    Attempting to reference shell variables that haven't been
                      defined when WRDE_UNDEF is set in flags.
       WRDE_CMDSUB    Requesting command substitution when WRDE_NOCMD was set
                      in flags
       WRDE_NOSPACE   Memory allocation attempt failure
       WRDE_NOSYS     Function not supported by this implementation.
       WRDE_SYNTAX    This is a syntax error in the shell such as an odd number of
                      brackets or strings that are unterminated.
             The following functions are declared:
                   int wordexp(const char *words,wordexp_t *pwordexp,int flags);
                   void wordfree(wordexp_t *pwordexp);







                           Copyright 1994 Novell, Inc.               Page 1








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