Files
Arquivotheca.SunOS-4.1.4/usr.lib/libsuntool/include/suntool/expand_name.h
seta75D ff309bfe1c Init
2021-10-11 18:37:13 -03:00

49 lines
1.1 KiB
C

/* @(#)expand_name.h 1.1 94/10/31 SMI */
/*
* Copyright (c) 1984 by Sun Microsystems, Inc.
*/
/* struct namelist *
* expand_name(str)
* char *str;
*
* void
* free_namelist(nl)
* struct namelist *nl;
*
* expand_name returns a pointer to a struct namelist containing
* the client's shell's idea of what its argument expands to.
* If str contains no shell metacharacters, the shell is never
* consulted, and the argument string is simply returned
* in a singleton namelist.
*
* In case of errors, expand_name() writes an error message to
* stderr, and returns NONAMES.
*
* free_namelist
* The struct namelist is dynamically allocated, and should be
* freed after use by a call to free_namelist().
*/
struct namelist {
unsigned count;
char *names[1]; /* LIE --it's actually names[count]
* followed by the strings themselves
*/
};
#define NONAMES ((struct namelist*) 0)
struct namelist *expand_name();
void free_namelist();
/*
* For hysterical reasons, the following defines are also provided:
*/
#define globlist namelist
#define glob expand_name
#define glob_free free_namelist