Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / lib / DtSvc / DtEncap / pathwexp.c
1 /*
2  * File:         pathwexp.c $XConsortium: pathwexp.c /main/3 1995/10/26 15:37:07 rswiston $
3  * Language:     C
4  *
5  * (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
6  *
7  * (c) Copyright 1993, 1994 Hewlett-Packard Company                     *
8  * (c) Copyright 1993, 1994 International Business Machines Corp.       *
9  * (c) Copyright 1993, 1994 Sun Microsystems, Inc.                      *
10  * (c) Copyright 1993, 1994 Novell, Inc.                                *
11  */
12
13 #include <bms/sbport.h>
14 #include <bms/pathwexp.h>
15
16 #include <codelibs/shellutils.h>
17
18 /*------------------------------------------------------------------------+*/
19 XeString Xe_shellexp(XeString path)
20 /*------------------------------------------------------------------------+*/
21 {
22    int num;
23    XeString *res = (XeString *) shellscan(path, &num,
24                          SHX_NOGLOB | SHX_NOSPACE | SHX_NOMETA | SHX_NOGRAVE);
25       
26    if (num == 0)
27       return NULL;
28    else
29       return res[0];
30 }
31