Re: passing glob an argument

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14 May 2013 15:47, ballsystemlord wrote:
> Hi, I'm uncertain what an argument to glob should be.
>
> int glob (const char *pattern, int flags, int (*errfunc) (const char
> *filename, int error-code), glob_t *vector-ptr)
>
> It takes a pointer to a function called errfunc. Now I've read the docs but
> they give no mention of a function called errfunc, so I think I have to
> write it myself. What should it look like? What should it do?

glob() is not part of GCC and your question is not about GCC so it's
not relevant on this list.

The glob(3) man page explains it clearly.  errfunc is not a function
that exists already, it's the name of one of the parameters in the
glob prototype, you have to pass an argument (or NULL) matching the
signature:
    int (*errfunc) (const char *epath, int eerrno)




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux