Mail Archives: djgpp/1998/03/25/02:45:27
| From:  | Erik Max Francis <max AT alcyone DOT com>
 | 
| Newsgroups:  | comp.os.msdos.djgpp
 | 
| Subject:  | Re: The for_each_file function???
 | 
| Date:  | Tue, 24 Mar 1998 18:24:59 -0800
 | 
| Organization:  | Alcyone Systems
 | 
| Lines:  | 28
 | 
| Message-ID:  | <35186AFB.49C13B53@alcyone.com>
 | 
| References:  | <01bd5791$1aa5f480$0851dece AT stachowiak>
 | 
| NNTP-Posting-Host:  | charmaine.alcyone.com
 | 
| Mime-Version:  | 1.0
 | 
| To:  | djgpp AT delorie DOT com
 | 
| DJ-Gateway:  | from newsgroup comp.os.msdos.djgpp
 | 
Helix wrote:
> for_each_file("*.map", NULL, callback(), NULL);
>
> callback()
> {
>  int d=0;
>  d=d+15;
> 
>  textout(screen, font, "Does exits", 272+d, 147, 104);
> }
I'm not familiar with this particular routine, but one obvious problem
is that if the third parameter to `for_each_file' is supposed to be a
function pointer (e.g., a callback, as it is named), then you are
calling it wrong.  This syntax calls the function before calling
`for_each_file', rather than passing the function pointer to
`for_each_file'.  What you meant was this:
    for_each_file("*.map", NULL, callback, NULL);
-- 
         Erik Max Francis, &tSftDotIotE / mailto:max AT alcyone DOT com
                       Alcyone Systems / http://www.alcyone.com/max/
  San Jose, California, United States / icbm:+37.20.07/-121.53.38
                                     \
        "I've got the fever for the / flavor of a cracker"
                                   / Ice Cube
- Raw text -