Glob.xs revision 7c478bd95313f5f23a4c958a745db2134aa03244
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include "bsd_glob.h"
/* XXX: need some thread awareness */
static int GLOB_ERROR = 0;
static double
{
errno = 0;
goto not_there;
switch (*(name+5)) {
case 'A':
#ifdef GLOB_ABEND
return GLOB_ABEND;
#else
goto not_there;
#endif
#ifdef GLOB_ALPHASORT
return GLOB_ALPHASORT;
#else
goto not_there;
#endif
#ifdef GLOB_ALTDIRFUNC
return GLOB_ALTDIRFUNC;
#else
goto not_there;
#endif
break;
case 'B':
#ifdef GLOB_BRACE
return GLOB_BRACE;
#else
goto not_there;
#endif
break;
case 'C':
break;
case 'D':
break;
case 'E':
#ifdef GLOB_ERR
return GLOB_ERR;
#else
goto not_there;
#endif
return GLOB_ERROR;
break;
case 'F':
break;
case 'G':
break;
case 'H':
break;
case 'I':
break;
case 'J':
break;
case 'K':
break;
case 'L':
#ifdef GLOB_LIMIT
return GLOB_LIMIT;
#else
goto not_there;
#endif
break;
case 'M':
#ifdef GLOB_MARK
return GLOB_MARK;
#else
goto not_there;
#endif
break;
case 'N':
#ifdef GLOB_NOCASE
return GLOB_NOCASE;
#else
goto not_there;
#endif
#ifdef GLOB_NOCHECK
return GLOB_NOCHECK;
#else
goto not_there;
#endif
#ifdef GLOB_NOMAGIC
return GLOB_NOMAGIC;
#else
goto not_there;
#endif
#ifdef GLOB_NOSORT
return GLOB_NOSORT;
#else
goto not_there;
#endif
#ifdef GLOB_NOSPACE
return GLOB_NOSPACE;
#else
goto not_there;
#endif
break;
case 'O':
break;
case 'P':
break;
case 'Q':
#ifdef GLOB_QUOTE
return GLOB_QUOTE;
#else
goto not_there;
#endif
break;
case 'R':
break;
case 'S':
break;
case 'T':
#ifdef GLOB_TILDE
return GLOB_TILDE;
#else
goto not_there;
#endif
break;
case 'U':
break;
case 'V':
break;
case 'W':
break;
case 'X':
break;
case 'Y':
break;
case 'Z':
break;
}
return 0;
return 0;
}
#ifdef WIN32
#else
int
}
#endif
void
char *pattern
PROTOTYPE: $;$
int i;
int retval;
int flags = 0;
{
/* allow for optional flags argument */
if (items > 1) {
}
/* call glob */
GLOB_ERROR = retval;
/* return any matches found */
/* printf("# bsd_glob: %s\n", pglob.gl_pathv[i]); */
}
}
double
char *name
int arg
PROTOTYPE: $$