2 Directory Access Library
4 FIND.C taken from DIRLIB.C by M. J. Weinstein
5 Released to public domain 1-Jan-89
7 The author may be contacted at:
8 matt@cs.ucla.edu -or- POB 84524, L.A., CA 90073
10 Modified by dvadura@watdragon.edu to work with dmake.
11 (nuked the DOS version 2 code, since dmake needs version
12 3.0 or greater to function).
19 * VER MM/DD/YY COMMENTS
20 * ---- -------- --------
21 * 0.99 02/24/86 Beta release to INTERNET
34 #define MK_FP(seg,ofs) ((void far *) \
35 (((unsigned long)(seg) << 16) | (unsigned)(ofs)))
38 #define FP_SEG(fp) ((unsigned)((unsigned long)(fp) >> 16))
41 #define FP_OFF(fp) ((unsigned)(fp))
62 olddta
= (DTA far
*) MK_FP(s
.es
, r
.x
.bx
);
64 /* conditionally set new dta */
67 s
.ds
= FP_SEG(newdta
);
68 r
.x
.dx
= FP_OFF(newdta
);
87 char far
*nmp
= (char far
*)name
;
89 dtasave
= _getsetdta((DTA far
*)dta
);
91 /* do directory lookup */
118 dtasave
= _getsetdta((DTA far
*)dta
);
120 /* do directory lookup */
123 /* restore old dta */