home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / call32.zip / exefl.c < prev    next >
C/C++ Source or Header  |  1992-08-15  |  691b  |  26 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include "filefind.h"    // the code in this header defines the structs for
  4.                         //   FILEFINDBUF3.
  5.  
  6. void far pascal dbmprint(PFILEFINDBUF3);
  7.  
  8. long far pascal DoFiles(char far *pattern, ULONG Attribute, void (far pascal *fn)(PFILEFINDBUF3));
  9.  
  10. void main (void)
  11. {
  12.    char far *pat = "*.*";
  13.    ULONG   attrib = FILE_NORMAL;
  14.    long      num;
  15.  
  16.     printf("Hello from %s line %d before DoFiles call\n",__FILE__, __LINE__);
  17.    num = DoFiles(pat, attrib, dbmprint);
  18.    printf("\ndone %d printed\n",num);
  19.    exit(0);
  20. }
  21.  
  22. void far pascal dbmprint(PFILEFINDBUF3 fl)
  23. {
  24.    printf("\n%s \t %ld",fl->achName, fl->cbFileAlloc);
  25. }
  26.