/* function prototypes for functions defined in cutil.asm */

unsigned int  near strlenfc(char far *);
int	   	  near strcmpfc(char far *, char far *);
int	   	  near strncmpfc(char far *, char far *, unsigned int);
char  far *   near strcpyfc(char far *, char far *);
char  far *   near memsetfc(char far *, char, unsigned int);

unsigned int       near udivc (unsigned long int, unsigned int);
unsigned long int  near ushortmulc (unsigned int ushort_1, unsigned int ushort_2);
unsigned long int  near ulongmulc (unsigned long int ulong_1, unsigned long int ulong_2);

#define strcatfc(x, y)  strcpyfc(x + strlenfc(x), y)

void near SEM_REQUEST (void);

void near SEM_RELEASE (void);

unsigned near DOSFORCEDELETE (
	char   far *,			/* Filename path */
	unsigned long );		/* Reserved (must be 0) */

unsigned near DOSMKDIR (
	char   far *,			/* New directory name */
	unsigned long );		/* Reserved (must be 0) */

unsigned near DOSMOVE (
	char   far *,			/* Old path name */
	char   far *,			/* New path name */
	unsigned long );		/* Reserved (must be 0) */

unsigned near DOSQCURDISK (
	unsigned far *,			/* Default drive number */
	unsigned long far *);	/* Drive-map area */

unsigned near DOSQCURDIR (
	unsigned,		         /* Drive number - 1=A, etc */
	char far *,             /* Directory path buffer */
	unsigned far * );       /* Directory path buffer length */

unsigned near DOSGETENV (
	unsigned far *,         /* Address to place environment segment*/
	unsigned far * );       /* Address for command line start */

unsigned near pascal P_DOSFINDFIRST (
	char     far *,			  /* File path name */
	unsigned far *,			  /* Directory search handle */
	unsigned,			        /* Search attribute */
	struct FileFindBuf far *, /* Result buffer */
	unsigned,			        /* Result buffer length */
	unsigned far *,			  /* Number of entries to find */
	unsigned long );		     /* Reserved (must be 0) */

unsigned near DOSFINDCLOSE (
	unsigned );			/* Directory search handle */

unsigned near pascal P_DOSOPEN (
	char far *,		      /* File path name */
	unsigned far *,		/* New file's handle */
	unsigned far *,		/* Action taken - 1=file existed, */
                        /*                2=file was created */
	unsigned long,			/* File primary allocation */
	unsigned,            /* File attributes */
	unsigned,            /* Open function type */
	unsigned,            /* Open mode of the file */
	unsigned long );		/* Reserved (must be zero) */

unsigned near DOSCHGFILEPTR (
	unsigned,			     /* File handle */
	long,                  /* Distance to move in bytes */
	unsigned,			     /* Method of moving (0,1,2) */
	unsigned long far *);  /* New pointer location */

unsigned near DOSPWRITE (
	unsigned,              /* File handle */
	char far *,            /* Address of user buffer */
	unsigned,              /* Buffer length */
	unsigned far *);       /* Bytes written */

unsigned near DOSCLOSE (
	unsigned );            /* File handle */

unsigned near DOSREAD (
	unsigned,              /* File handle */
	char far *,            /* Address of user buffer */
	unsigned,              /* Buffer length */
	unsigned far * );      /* Bytes read */

unsigned near DOSNEWSIZE (
	unsigned,              /* File handle */
	unsigned long );       /* File's new size */

unsigned near DOSALLOCSEG (
	unsigned,			/* Number of bytes requested */
	unsigned far *,			/* Selector allocated (returned) */
	unsigned );			/* Indicator for sharing */

unsigned near DOSFREESEG (
	unsigned );			/* Selector */

unsigned near DOSSETFILEMODE (
	char far *,			/* File path name */
	unsigned,			/* New attribute of file */
	unsigned long );		/* Reserved (must be zero) */

unsigned near DOSQPATHINFO (
	char far *,			/* Path string */
	unsigned,			/* Path data required */
	void far *,			/* Path data buffer */
	unsigned,			/* Path data buffer size */
	unsigned long );		/* Reserved (must be zero) */

unsigned near DOSGETDATETIME (
	struct DateTime far * );

unsigned near pascal P_DOSQFSATTACH (
  char far *,       /* Device name or drive letter string */
  unsigned short,   /* Ordinal of entry in name list */
  unsigned short,   /* Type of attached FSD data required */
  char far *,       /* Returned data buffer */
  unsigned int *,   /* Buffer Length */
  unsigned long);   /* Reserved */

