home *** CD-ROM | disk | FTP | other *** search
-
- /*
- ┌────────────────────────────────────────────────────────────────────────────┐
- │jzunqfil.c │
- │Create a unique file and return its name and file handle. │
- │wname is a string which ends in a backslash ! │
- │ │
- │Synopsis: │
- │ werr = jzunqfil(whandle,wname,wattr) │
- └────────────────────────────────────────────────────────────────────────────┘
- */
- #include <jaz.h>
-
- jzunqfil(fhandle,fname,fattr)
- int fhandle;
- char *fname;
- int fattr;
- {
- TREG wreg;
-
- wreg.h.ah = 0x5A; /* get unique file name handle function */
-
- wreg.x.ds = getds();
-
- wreg.x.dx = (int) fname;
-
- wreg.x.cx = fattr;
-
- msdos(&wreg);
-
- if (wreg.x.flags & 1)
- return(-1);
- else {
- fhandle = wreg.x.ax;
- return(0);
- }
- }
-