home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programming
/
powerprogramming1994.iso
/
progtool
/
c
/
jazlib.arc
/
JZUNQFIL.C
< prev
next >
Wrap
Text File
|
1986-06-12
|
803b
|
39 lines
/*
┌────────────────────────────────────────────────────────────────────────────┐
│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);
}
}