home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / PROGRAM / C / JAZLIB / JZFNDNXT.C < prev    next >
Text File  |  1993-12-01  |  1KB  |  37 lines

  1. /*
  2. ┌────────────────────────────────────────────────────────────────────────────┐
  3. │ Title   : jzfndnxt                                 │
  4. │ Purpose : find the next matching file from the disk transfer area specified│
  5. │        in a previous call to jzfndfst                     │
  6. │ Parms                                      │
  7. │   fdta - directory record defined in jzdirect.h                 │
  8. │                                         │
  9. │  i.e.        error = jzfndnxt(&dir_record);                     │
  10. │    Written by Jack Zucker - 75766,1336    301-794-5950  on 1/15/85      │                                     │
  11. └────────────────────────────────────────────────────────────────────────────┘
  12. */
  13.  
  14. #include <jaz.h>
  15. #include <jzdirect.h>
  16. jzfndnxt(fdta)
  17. TDIR *fdta;
  18.  
  19. {
  20.  
  21.   TREG wreg;
  22.   int wdtaofs,wdtaseg;
  23.  
  24.   jzgetdta(&wdtaofs,&wdtaseg);        /* save old dta address */
  25.  
  26.   jzsetdta(fdta);            /* set new address */
  27.  
  28.   wreg.h.ah = 0x4f;        /* find next function */
  29.   msdos(&wreg);
  30.  
  31.   jzsetdta(wdtaofs);        /* conditionalize later for large model */
  32.  
  33.   if (wreg.x.flags & 0x0001 == 1) return(wreg.x.ax);
  34.   else return(0);     /* return 0 if no error, otherwise dos error code */
  35.  
  36. }
  37.