Synesis Software

Main Page   Modules   Alphabetical List   Compound List   File List   Compound Members   File Members  

/src/glob.c File Reference

#include <unixem/internal/util.h>
#include <windows.h>
#include <errno.h>
#include <stdlib.h>
#include "glob.h"

Functions

int glob (char const *pattern, int flags, const int(*errfunc)(char const *, int), glob_t *pglob)
 Generates pathnames matching a pattern.

void globfree (glob_t *pglob)
 Frees the results of a call to glob.


Function Documentation

int glob char const *    pattern,
int    flags,
const int(*    errfunc)(char const *, int),
glob_t   pglob
 

Generates pathnames matching a pattern.

This function is a pathname generator that implements the rules for file name pattern matching used by the UNIX shell.

Parameters:
pattern  The pattern controlling the search
flags  A combination of the GLOB_* flags
errfunc  A function that is called each time part of the search processing fails
pglob  Pointer to a glob_t structure to receive the search results
Returns:
0 on success, otherwise one of the GLOB_* error codes

void globfree glob_t   pglob
 

Frees the results of a call to glob.

This function releases any memory allocated in a call to glob. It must always be called for a successful call to glob.

Parameters:
pglob  Pointer to a glob_t structure to receive the search results

UNIX Emulation for Win32 Libraries documentation © Synesis Software Pty Ltd, 2002-2005