Node:Calling Wordexp, Next:Flags for Wordexp, Previous:Expansion Stages, Up:Word Expansion
wordexpAll the functions, constants and data types for word expansion are
declared in the header file wordexp.h.
Word expansion produces a vector of words (strings).  To return this
vector, wordexp uses a special data type, wordexp_t, which
is a structure.  You pass wordexp the address of the structure,
and it fills in the structure's fields to tell you about the results.
| wordexp_t | Data Type | 
This data type holds a pointer to a word vector.  More precisely, it
records both the address of the word vector and its size.
  | 
| int wordexp (const char *words, wordexp_t *word-vector-ptr, int flags) | Function | 
Perform word expansion on the string words, putting the result in
a newly allocated vector, and store the size and address of this vector
into *word-vector-ptr.  The argument flags is a
combination of bit flags; see Flags for Wordexp, for details of
the flags.
You shouldn't use any of the characters  The results of word expansion are a sequence of words.  The function
 To return this vector,  If  
  | 
| void wordfree (wordexp_t *word-vector-ptr) | Function | 
Free the storage used for the word-strings and vector that
*word-vector-ptr points to.  This does not free the
structure *word-vector-ptr itself--only the other
data it points to. 
 |