2000-05-06 21:34:20 +02:00
|
|
|
/****************************************************************/
|
|
|
|
/* */
|
|
|
|
/* proto.h */
|
|
|
|
/* */
|
|
|
|
/* Global Function Prototypes */
|
|
|
|
/* */
|
|
|
|
/* Copyright (c) 1995, 1996 */
|
|
|
|
/* Pasquale J. Villani */
|
|
|
|
/* All Rights Reserved */
|
|
|
|
/* */
|
|
|
|
/* This file is part of DOS-C. */
|
|
|
|
/* */
|
|
|
|
/* DOS-C is free software; you can redistribute it and/or */
|
|
|
|
/* modify it under the terms of the GNU General Public License */
|
|
|
|
/* as published by the Free Software Foundation; either version */
|
|
|
|
/* 2, or (at your option) any later version. */
|
|
|
|
/* */
|
|
|
|
/* DOS-C is distributed in the hope that it will be useful, but */
|
|
|
|
/* WITHOUT ANY WARRANTY; without even the implied warranty of */
|
|
|
|
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See */
|
|
|
|
/* the GNU General Public License for more details. */
|
|
|
|
/* */
|
|
|
|
/* You should have received a copy of the GNU General Public */
|
|
|
|
/* License along with DOS-C; see the file COPYING. If not, */
|
|
|
|
/* write to the Free Software Foundation, 675 Mass Ave, */
|
|
|
|
/* Cambridge, MA 02139, USA. */
|
|
|
|
/****************************************************************/
|
|
|
|
|
|
|
|
#ifdef MAIN
|
|
|
|
#ifdef VERSION_STRINGS
|
2001-11-18 15:01:12 +01:00
|
|
|
static BYTE *Proto_hRcsId =
|
|
|
|
"$Id$";
|
2000-05-06 21:34:20 +02:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* blockio.c */
|
2002-12-09 01:17:15 +01:00
|
|
|
struct buffer FAR *getblk(ULONG blkno, COUNT dsk, BOOL overwrite);
|
|
|
|
#define getblock(blkno, dsk) getblk(blkno, dsk, FALSE);
|
|
|
|
#define getblockOver(blkno, dsk) getblk(blkno, dsk, TRUE);
|
2000-05-06 21:34:20 +02:00
|
|
|
VOID setinvld(REG COUNT dsk);
|
2009-06-26 22:12:33 +02:00
|
|
|
BOOL dirty_buffers(REG COUNT dsk);
|
2000-05-06 21:34:20 +02:00
|
|
|
BOOL flush_buffers(REG COUNT dsk);
|
|
|
|
BOOL flush(void);
|
|
|
|
BOOL fill(REG struct buffer FAR * bp, ULONG blkno, COUNT dsk);
|
2003-06-17 10:38:20 +02:00
|
|
|
BOOL DeleteBlockInBufferCache(ULONG blknolow, ULONG blknohigh, COUNT dsk, int mode);
|
2000-10-30 01:21:15 +01:00
|
|
|
/* *** Changed on 9/4/00 BER */
|
2001-11-18 15:01:12 +01:00
|
|
|
UWORD dskxfer(COUNT dsk, ULONG blkno, VOID FAR * buf, UWORD numblocks,
|
|
|
|
COUNT mode);
|
2001-09-23 22:39:44 +02:00
|
|
|
/* *** End of change */
|
2004-04-10 23:07:06 +02:00
|
|
|
void AllocateHMASpace (size_t lowbuffer, size_t highbuffer);
|
2000-05-06 21:34:20 +02:00
|
|
|
|
2002-10-22 04:40:19 +02:00
|
|
|
/* break.c */
|
2004-04-14 17:40:51 +02:00
|
|
|
unsigned char ctrl_break_pressed(void);
|
|
|
|
unsigned char check_handle_break(struct dhdr FAR **pdev);
|
|
|
|
void handle_break(struct dhdr FAR **pdev, int sft_out);
|
|
|
|
#ifdef __WATCOMC__
|
|
|
|
#pragma aux handle_break aborts;
|
|
|
|
#endif
|
2002-10-22 04:40:19 +02:00
|
|
|
|
2000-05-06 21:34:20 +02:00
|
|
|
/* chario.c */
|
2003-09-09 19:43:43 +02:00
|
|
|
struct dhdr FAR *sft_to_dev(sft FAR *sft);
|
|
|
|
long BinaryCharIO(struct dhdr FAR **pdev, size_t n, void FAR * bp,
|
|
|
|
unsigned command);
|
2004-04-14 11:20:08 +02:00
|
|
|
int ndread(struct dhdr FAR **pdev);
|
2003-09-09 19:43:43 +02:00
|
|
|
int StdinBusy(void);
|
|
|
|
void con_flush(struct dhdr FAR **pdev);
|
2004-04-14 11:20:08 +02:00
|
|
|
unsigned char read_char(int sft_in, int sft_out, BOOL check_break);
|
2002-10-22 04:40:19 +02:00
|
|
|
unsigned char read_char_stdin(BOOL check_break);
|
2003-09-09 19:43:43 +02:00
|
|
|
long cooked_read(struct dhdr FAR **pdev, size_t n, char FAR *bp);
|
2002-10-22 04:40:19 +02:00
|
|
|
void read_line(int sft_in, int sft_out, keyboard FAR * kp);
|
|
|
|
size_t read_line_handle(int sft_idx, size_t n, char FAR * bp);
|
|
|
|
void write_char(int c, int sft_idx);
|
2002-11-11 09:41:28 +01:00
|
|
|
void write_char_stdout(int c);
|
2004-01-27 21:07:28 +01:00
|
|
|
void update_scr_pos(unsigned char c, unsigned char count);
|
2003-09-09 19:43:43 +02:00
|
|
|
long cooked_write(struct dhdr FAR **pdev, size_t n, char FAR *bp);
|
2000-05-06 21:34:20 +02:00
|
|
|
|
2001-06-03 16:16:18 +02:00
|
|
|
sft FAR *get_sft(UCOUNT);
|
2000-05-06 21:34:20 +02:00
|
|
|
|
|
|
|
/* dosfns.c */
|
2002-08-04 03:14:18 +02:00
|
|
|
const char FAR *get_root(const char FAR *);
|
2000-05-06 21:34:20 +02:00
|
|
|
BOOL check_break(void);
|
2002-08-04 03:14:18 +02:00
|
|
|
UCOUNT GenericReadSft(sft far * sftp, UCOUNT n, void FAR * bp,
|
|
|
|
COUNT * err, BOOL force_binary);
|
2009-06-09 20:50:03 +02:00
|
|
|
COUNT SftSeek(int sft_idx, LONG new_pos, unsigned mode);
|
2002-01-23 23:29:41 +01:00
|
|
|
/*COUNT DosRead(COUNT hndl, UCOUNT n, BYTE FAR * bp, COUNT FAR * err); */
|
2002-10-22 04:40:19 +02:00
|
|
|
void BinarySftIO(int sft_idx, void *bp, int mode);
|
|
|
|
#define BinaryIO(hndl, bp, mode) BinarySftIO(get_sft_idx(hndl), bp, mode)
|
|
|
|
long DosRWSft(int sft_idx, size_t n, void FAR * bp, int mode);
|
|
|
|
#define DosRead(hndl, n, bp) DosRWSft(get_sft_idx(hndl), n, bp, XFR_READ)
|
|
|
|
#define DosWrite(hndl, n, bp) DosRWSft(get_sft_idx(hndl), n, bp, XFR_WRITE)
|
2009-06-09 20:50:03 +02:00
|
|
|
ULONG DosSeek(unsigned hndl, LONG new_pos, COUNT mode, int *rc);
|
2002-08-04 03:14:18 +02:00
|
|
|
long DosOpen(char FAR * fname, unsigned flags, unsigned attrib);
|
|
|
|
COUNT CloneHandle(unsigned hndl);
|
|
|
|
long DosDup(unsigned Handle);
|
|
|
|
COUNT DosForceDup(unsigned OldHandle, unsigned NewHandle);
|
|
|
|
long DosOpenSft(char FAR * fname, unsigned flags, unsigned attrib);
|
2000-05-06 21:34:20 +02:00
|
|
|
COUNT DosClose(COUNT hndl);
|
2002-10-22 04:40:19 +02:00
|
|
|
COUNT DosCloseSft(int sft_idx, BOOL commitonly);
|
2002-01-23 23:29:41 +01:00
|
|
|
#define DosCommit(hndl) DosCloseSft(get_sft_idx(hndl), TRUE)
|
2004-07-25 10:04:54 +02:00
|
|
|
UWORD DosGetFree(UBYTE drive, UWORD * navc, UWORD * bps, UWORD * nc);
|
2001-04-15 05:21:50 +02:00
|
|
|
COUNT DosGetCuDir(UBYTE drive, BYTE FAR * s);
|
2000-05-06 21:34:20 +02:00
|
|
|
COUNT DosChangeDir(BYTE FAR * s);
|
|
|
|
COUNT DosFindFirst(UCOUNT attr, BYTE FAR * name);
|
|
|
|
COUNT DosFindNext(void);
|
2002-08-04 03:14:18 +02:00
|
|
|
COUNT DosGetFtime(COUNT hndl, date * dp, time * tp);
|
2002-10-22 04:40:19 +02:00
|
|
|
COUNT DosSetFtimeSft(int sft_idx, date dp, time tp);
|
2001-07-23 14:47:42 +02:00
|
|
|
#define DosSetFtime(hndl, dp, tp) DosSetFtimeSft(get_sft_idx(hndl), (dp), (tp))
|
2001-07-22 03:58:58 +02:00
|
|
|
COUNT DosGetFattr(BYTE FAR * name);
|
|
|
|
COUNT DosSetFattr(BYTE FAR * name, UWORD attrp);
|
2001-04-15 05:21:50 +02:00
|
|
|
UBYTE DosSelectDrv(UBYTE drv);
|
2002-02-16 20:20:20 +01:00
|
|
|
COUNT DosDelete(BYTE FAR * path, int attrib);
|
2000-05-08 06:30:00 +02:00
|
|
|
COUNT DosRename(BYTE FAR * path1, BYTE FAR * path2);
|
2002-02-16 20:20:20 +01:00
|
|
|
COUNT DosRenameTrue(BYTE * path1, BYTE * path2, int attrib);
|
2004-05-23 16:10:39 +02:00
|
|
|
COUNT DosMkRmdir(const char FAR * dir, int action);
|
2002-08-04 03:14:18 +02:00
|
|
|
struct dhdr FAR *IsDevice(const char FAR * FileName);
|
2009-05-12 00:04:43 +02:00
|
|
|
BOOL IsShareInstalled(BOOL recheck);
|
2001-04-15 05:21:50 +02:00
|
|
|
COUNT DosLockUnlock(COUNT hndl, LONG pos, LONG len, COUNT unlock);
|
2003-10-05 15:30:47 +02:00
|
|
|
int idx_to_sft_(int SftIndex);
|
2002-10-22 04:40:19 +02:00
|
|
|
sft FAR *idx_to_sft(int SftIndex);
|
|
|
|
int get_sft_idx(UCOUNT hndl);
|
2003-06-16 00:06:03 +02:00
|
|
|
struct cds FAR *get_cds(unsigned dsk);
|
2009-06-01 16:55:11 +02:00
|
|
|
struct cds FAR *get_cds1(unsigned dsk);
|
2002-08-04 03:14:18 +02:00
|
|
|
COUNT DosTruename(const char FAR * src, char FAR * dest);
|
2000-05-06 21:34:20 +02:00
|
|
|
|
2007-07-21 05:37:53 +02:00
|
|
|
/* dosidle.asm */
|
2001-09-23 22:39:44 +02:00
|
|
|
VOID ASMCFUNC DosIdle_int(void);
|
2007-07-21 05:37:53 +02:00
|
|
|
VOID ASMCFUNC DosIdle_hlt(void);
|
2004-04-09 13:37:40 +02:00
|
|
|
#ifdef __WATCOMC__
|
|
|
|
#pragma aux (cdecl) DosIdle_int modify exact []
|
2007-07-21 05:37:53 +02:00
|
|
|
#pragma aux (cdecl) DosIdle_hlt modify exact []
|
2004-04-09 13:37:40 +02:00
|
|
|
#endif
|
2000-05-06 21:34:20 +02:00
|
|
|
|
|
|
|
/* error.c */
|
|
|
|
VOID dump(void);
|
|
|
|
VOID panic(BYTE * s);
|
2001-04-15 05:21:50 +02:00
|
|
|
VOID fatal(BYTE * err_msg);
|
2000-05-06 21:34:20 +02:00
|
|
|
|
|
|
|
/* fatdir.c */
|
2001-11-04 20:47:39 +01:00
|
|
|
VOID dir_init_fnode(f_node_ptr fnp, CLUSTER dirstart);
|
2009-06-13 06:31:55 +02:00
|
|
|
f_node_ptr dir_open(const char *dirname, BOOL split, f_node_ptr fnp);
|
2001-06-03 16:16:18 +02:00
|
|
|
COUNT dir_read(REG f_node_ptr fnp);
|
2009-05-22 02:25:11 +02:00
|
|
|
BOOL dir_write_update(REG f_node_ptr fnp, BOOL update);
|
|
|
|
#define dir_write(fnp) dir_write_update(fnp, FALSE)
|
2001-07-22 03:58:58 +02:00
|
|
|
COUNT dos_findfirst(UCOUNT attr, BYTE * name);
|
2000-05-06 21:34:20 +02:00
|
|
|
COUNT dos_findnext(void);
|
2001-11-18 15:01:12 +01:00
|
|
|
void ConvertName83ToNameSZ(BYTE FAR * destSZ, BYTE FAR * srcFCBName);
|
2009-06-10 21:02:24 +02:00
|
|
|
const char *ConvertNameSZToName83(char *destFCBName, const char *srcSZ);
|
2000-05-06 21:34:20 +02:00
|
|
|
|
|
|
|
/* fatfs.c */
|
2002-10-22 04:40:19 +02:00
|
|
|
struct dpb FAR *get_dpb(COUNT dsk);
|
2001-11-18 15:01:12 +01:00
|
|
|
ULONG clus2phys(CLUSTER cl_no, struct dpb FAR * dpbp);
|
2009-05-26 16:11:50 +02:00
|
|
|
int dos_open(char * path, unsigned flag, unsigned attrib, int fd);
|
2002-08-04 03:14:18 +02:00
|
|
|
BOOL fcbmatch(const char *fcbname1, const char *fcbname2);
|
|
|
|
BOOL fcmp_wild(const char * s1, const char * s2, unsigned n);
|
2001-07-22 03:58:58 +02:00
|
|
|
VOID touc(BYTE * s, COUNT n);
|
2001-04-15 05:21:50 +02:00
|
|
|
COUNT dos_close(COUNT fd);
|
2002-02-16 20:20:20 +01:00
|
|
|
COUNT dos_delete(BYTE * path, int attrib);
|
2001-07-22 03:58:58 +02:00
|
|
|
COUNT dos_rmdir(BYTE * path);
|
2002-02-16 20:20:20 +01:00
|
|
|
COUNT dos_rename(BYTE * path1, BYTE * path2, int attrib);
|
2001-04-15 05:21:50 +02:00
|
|
|
date dos_getdate(void);
|
|
|
|
time dos_gettime(void);
|
2001-07-22 03:58:58 +02:00
|
|
|
COUNT dos_mkdir(BYTE * dir);
|
2001-06-03 16:16:18 +02:00
|
|
|
BOOL last_link(f_node_ptr fnp);
|
|
|
|
COUNT map_cluster(REG f_node_ptr fnp, COUNT mode);
|
2003-09-24 21:34:11 +02:00
|
|
|
long rwblock(COUNT fd, VOID FAR * buffer, UCOUNT count, int mode);
|
2001-04-15 05:21:50 +02:00
|
|
|
COUNT dos_read(COUNT fd, VOID FAR * buffer, UCOUNT count);
|
2002-02-16 20:20:20 +01:00
|
|
|
COUNT dos_write(COUNT fd, const VOID FAR * buffer, UCOUNT count);
|
2001-11-18 15:01:12 +01:00
|
|
|
CLUSTER dos_free(struct dpb FAR * dpbp);
|
2002-08-04 03:14:18 +02:00
|
|
|
BOOL dir_exists(char * path);
|
2005-03-06 17:58:33 +01:00
|
|
|
VOID dpb16to32(struct dpb FAR *dpbp);
|
2000-05-06 21:34:20 +02:00
|
|
|
|
2009-06-13 06:31:55 +02:00
|
|
|
f_node_ptr split_path(const char *, f_node_ptr fnp);
|
2000-05-06 21:34:20 +02:00
|
|
|
|
2002-10-22 04:40:19 +02:00
|
|
|
int dos_cd(char * PathName);
|
2000-05-06 21:34:20 +02:00
|
|
|
|
2001-07-22 03:58:58 +02:00
|
|
|
COUNT dos_getfattr(BYTE * name);
|
|
|
|
COUNT dos_setfattr(BYTE * name, UWORD attrp);
|
2001-11-18 15:01:12 +01:00
|
|
|
COUNT media_check(REG struct dpb FAR * dpbp);
|
2001-06-03 16:16:18 +02:00
|
|
|
f_node_ptr xlt_fd(COUNT fd);
|
|
|
|
COUNT xlt_fnp(f_node_ptr fnp);
|
2002-01-23 23:29:41 +01:00
|
|
|
struct dhdr FAR * select_unit(COUNT drive);
|
2009-05-26 22:44:44 +02:00
|
|
|
void dos_merge_file_changes(int fd);
|
2000-05-06 21:34:20 +02:00
|
|
|
|
|
|
|
/* fattab.c */
|
2001-11-18 15:01:12 +01:00
|
|
|
void read_fsinfo(struct dpb FAR * dpbp);
|
|
|
|
void write_fsinfo(struct dpb FAR * dpbp);
|
2004-04-30 19:06:45 +02:00
|
|
|
CLUSTER link_fat(struct dpb FAR * dpbp, CLUSTER Cluster1,
|
|
|
|
REG CLUSTER Cluster2);
|
2001-11-18 15:01:12 +01:00
|
|
|
CLUSTER next_cluster(struct dpb FAR * dpbp, REG CLUSTER ClusterNum);
|
2008-03-08 21:31:37 +01:00
|
|
|
BOOL is_free_cluster(struct dpb FAR * dpbp, REG CLUSTER ClusterNum);
|
2000-05-06 21:34:20 +02:00
|
|
|
|
|
|
|
/* fcbfns.c */
|
|
|
|
VOID DosOutputString(BYTE FAR * s);
|
|
|
|
int DosCharInputEcho(VOID);
|
|
|
|
int DosCharInput(VOID);
|
|
|
|
VOID DosDirectConsoleIO(iregs FAR * r);
|
|
|
|
VOID DosCharOutput(COUNT c);
|
|
|
|
VOID DosDisplayOutput(COUNT c);
|
2004-07-25 10:04:54 +02:00
|
|
|
BYTE FAR *FatGetDrvData(UBYTE drive, UBYTE * spc, UWORD * bps,
|
2002-08-04 03:14:18 +02:00
|
|
|
UWORD * nc);
|
2004-07-25 01:53:21 +02:00
|
|
|
UWORD FcbParseFname(UBYTE *wTestMode, const BYTE FAR *lpFileName, fcb FAR * lpFcb);
|
2002-02-16 20:20:20 +01:00
|
|
|
const BYTE FAR *ParseSkipWh(const BYTE FAR * lpFileName);
|
2000-05-06 21:34:20 +02:00
|
|
|
BOOL TestCmnSeps(BYTE FAR * lpFileName);
|
|
|
|
BOOL TestFieldSeps(BYTE FAR * lpFileName);
|
2002-02-16 20:20:20 +01:00
|
|
|
const BYTE FAR *GetNameField(const BYTE FAR * lpFileName, BYTE FAR * lpDestField,
|
2001-11-18 15:01:12 +01:00
|
|
|
COUNT nFieldSize, BOOL * pbWildCard);
|
2002-08-04 03:14:18 +02:00
|
|
|
UBYTE FcbReadWrite(xfcb FAR *, UCOUNT, int);
|
|
|
|
UBYTE FcbGetFileSize(xfcb FAR * lpXfcb);
|
|
|
|
void FcbSetRandom(xfcb FAR * lpXfcb);
|
2003-10-12 01:58:51 +02:00
|
|
|
UBYTE FcbRandomBlockIO(xfcb FAR * lpXfcb, UWORD *nRecords, int mode);
|
2002-08-04 03:14:18 +02:00
|
|
|
UBYTE FcbRandomIO(xfcb FAR * lpXfcb, int mode);
|
|
|
|
UBYTE FcbOpen(xfcb FAR * lpXfcb, unsigned flags);
|
|
|
|
UBYTE FcbDelete(xfcb FAR * lpXfcb);
|
|
|
|
UBYTE FcbRename(xfcb FAR * lpXfcb);
|
|
|
|
UBYTE FcbClose(xfcb FAR * lpXfcb);
|
|
|
|
void FcbCloseAll(void);
|
|
|
|
UBYTE FcbFindFirstNext(xfcb FAR * lpXfcb, BOOL First);
|
2000-05-06 21:34:20 +02:00
|
|
|
|
2004-03-07 13:19:43 +01:00
|
|
|
/* intr.asm */
|
2004-04-09 13:37:40 +02:00
|
|
|
COUNT ASMPASCAL res_DosExec(COUNT mode, exec_blk * ep, BYTE * lp);
|
|
|
|
UCOUNT ASMPASCAL res_read(int fd, void *buf, UCOUNT count);
|
|
|
|
#ifdef __WATCOMC__
|
|
|
|
#pragma aux (pascal) res_DosExec modify exact [ax bx dx es]
|
|
|
|
#pragma aux (pascal) res_read modify exact [ax bx cx dx]
|
|
|
|
#endif
|
2004-03-07 13:19:43 +01:00
|
|
|
|
2000-05-06 21:34:20 +02:00
|
|
|
/* ioctl.c */
|
2002-08-04 03:14:18 +02:00
|
|
|
COUNT DosDevIOctl(lregs * r);
|
2001-04-15 05:21:50 +02:00
|
|
|
|
2000-05-06 21:34:20 +02:00
|
|
|
/* memmgr.c */
|
|
|
|
seg far2para(VOID FAR * p);
|
2001-04-15 05:21:50 +02:00
|
|
|
seg long2para(ULONG size);
|
2004-03-21 14:56:13 +01:00
|
|
|
void FAR *add_far(void FAR * fp, unsigned off);
|
2002-08-04 03:14:18 +02:00
|
|
|
VOID FAR *adjust_far(const void FAR * fp);
|
2004-04-13 13:02:36 +02:00
|
|
|
COUNT DosMemAlloc(UWORD size, COUNT mode, seg * para, UWORD * asize);
|
|
|
|
COUNT DosMemLargest(UWORD * size);
|
2000-05-06 21:34:20 +02:00
|
|
|
COUNT DosMemFree(UWORD para);
|
|
|
|
COUNT DosMemChange(UWORD para, UWORD size, UWORD * maxSize);
|
|
|
|
COUNT DosMemCheck(void);
|
|
|
|
COUNT FreeProcessMem(UWORD ps);
|
2004-04-13 13:02:36 +02:00
|
|
|
COUNT DosGetLargestBlock(UWORD * block);
|
2000-05-06 21:34:20 +02:00
|
|
|
VOID show_chain(void);
|
2004-05-28 21:08:48 +02:00
|
|
|
void DosUmbLink(unsigned n);
|
2000-05-06 21:34:20 +02:00
|
|
|
VOID mcb_print(mcb FAR * mcbp);
|
|
|
|
|
2001-11-14 00:36:45 +01:00
|
|
|
/* lfnapi.c */
|
|
|
|
COUNT lfn_allocate_inode(VOID);
|
|
|
|
COUNT lfn_free_inode(COUNT handle);
|
|
|
|
|
2004-04-13 13:02:36 +02:00
|
|
|
COUNT lfn_setup_inode(COUNT handle, ULONG dirstart, UWORD diroff);
|
2001-11-14 00:36:45 +01:00
|
|
|
|
|
|
|
COUNT lfn_create_entries(COUNT handle, lfn_inode_ptr lip);
|
|
|
|
COUNT lfn_remove_entries(COUNT handle);
|
|
|
|
|
|
|
|
COUNT lfn_dir_read(COUNT handle, lfn_inode_ptr lip);
|
|
|
|
COUNT lfn_dir_write(COUNT handle);
|
2001-03-21 03:56:26 +01:00
|
|
|
|
2000-05-06 21:34:20 +02:00
|
|
|
/* nls.c */
|
2009-06-10 01:41:50 +02:00
|
|
|
BYTE DosYesNo(UWORD ch);
|
2000-08-06 07:50:17 +02:00
|
|
|
#ifndef DosUpMem
|
|
|
|
VOID DosUpMem(VOID FAR * str, unsigned len);
|
|
|
|
#endif
|
2001-09-23 22:39:44 +02:00
|
|
|
unsigned char ASMCFUNC DosUpChar(unsigned char ch);
|
2001-11-18 15:01:12 +01:00
|
|
|
VOID DosUpString(char FAR * str);
|
|
|
|
VOID DosUpFMem(VOID FAR * str, unsigned len);
|
2000-08-06 07:50:17 +02:00
|
|
|
unsigned char DosUpFChar(unsigned char ch);
|
2001-11-18 15:01:12 +01:00
|
|
|
VOID DosUpFString(char FAR * str);
|
|
|
|
COUNT DosGetData(int subfct, UWORD cp, UWORD cntry, UWORD bufsize,
|
|
|
|
VOID FAR * buf);
|
2000-08-06 07:50:17 +02:00
|
|
|
#ifndef DosGetCountryInformation
|
2001-11-18 15:01:12 +01:00
|
|
|
COUNT DosGetCountryInformation(UWORD cntry, VOID FAR * buf);
|
2000-08-06 07:50:17 +02:00
|
|
|
#endif
|
|
|
|
#ifndef DosSetCountry
|
|
|
|
COUNT DosSetCountry(UWORD cntry);
|
|
|
|
#endif
|
2002-08-04 03:14:18 +02:00
|
|
|
COUNT DosGetCodepage(UWORD * actCP, UWORD * sysCP);
|
2000-08-06 07:50:17 +02:00
|
|
|
COUNT DosSetCodepage(UWORD actCP, UWORD sysCP);
|
2009-06-10 01:41:50 +02:00
|
|
|
VOID FAR *DosGetDBCS(void);
|
2001-09-23 22:39:44 +02:00
|
|
|
UWORD ASMCFUNC syscall_MUX14(DIRECT_IREGS);
|
2000-05-06 21:34:20 +02:00
|
|
|
|
|
|
|
/* prf.c */
|
2002-10-22 04:40:19 +02:00
|
|
|
#ifdef DEBUG
|
2004-04-07 18:13:23 +02:00
|
|
|
int VA_CDECL printf(const char * fmt, ...);
|
|
|
|
int VA_CDECL sprintf(char * buff, const char * fmt, ...);
|
2002-10-22 04:40:19 +02:00
|
|
|
#endif
|
2001-11-18 15:01:12 +01:00
|
|
|
VOID hexd(char *title, VOID FAR * p, COUNT numBytes);
|
2002-10-22 04:40:19 +02:00
|
|
|
void put_unsigned(unsigned n, int base, int width);
|
|
|
|
void put_string(const char *s);
|
2004-01-26 01:51:49 +01:00
|
|
|
void put_console(int);
|
2000-05-06 21:34:20 +02:00
|
|
|
|
|
|
|
/* strings.c */
|
2002-10-22 04:40:19 +02:00
|
|
|
size_t /* ASMCFUNC */ ASMPASCAL strlen(const char * s);
|
|
|
|
size_t /* ASMCFUNC */ ASMPASCAL fstrlen(const char FAR * s);
|
|
|
|
char FAR * /*ASMCFUNC*/ ASMPASCAL _fstrcpy(char FAR * d, const char FAR * s);
|
|
|
|
int /*ASMCFUNC*/ ASMPASCAL strcmp(const char * d, const char * s);
|
|
|
|
int /*ASMCFUNC*/ ASMPASCAL fstrcmp(const char FAR * d, const char FAR * s);
|
|
|
|
int /*ASMCFUNC*/ ASMPASCAL fstrncmp(const char FAR * d, const char FAR * s, size_t l);
|
|
|
|
int /*ASMCFUNC*/ ASMPASCAL strncmp(const char * d, const char * s, size_t l);
|
|
|
|
char * /*ASMCFUNC*/ ASMPASCAL strchr(const char * s, int c);
|
|
|
|
char FAR * /*ASMCFUNC*/ ASMPASCAL fstrchr(const char FAR * s, int c);
|
|
|
|
void FAR * /*ASMCFUNC*/ ASMPASCAL fmemchr(const void FAR * s, int c, size_t n);
|
|
|
|
|
|
|
|
/* misc.c */
|
|
|
|
char * /*ASMCFUNC*/ ASMPASCAL strcpy(char * d, const char * s);
|
|
|
|
void /*ASMCFUNC*/ ASMPASCAL fmemcpyBack(void FAR * d, const void FAR * s, size_t n);
|
|
|
|
void /*ASMCFUNC*/ ASMPASCAL fmemcpy(void FAR * d, const void FAR * s, size_t n);
|
|
|
|
void /*ASMCFUNC*/ ASMPASCAL fstrcpy(char FAR * d, const char FAR * s);
|
|
|
|
void * /*ASMCFUNC*/ ASMPASCAL memcpy(void *d, const void * s, size_t n);
|
|
|
|
void * /*ASMCFUNC*/ ASMPASCAL fmemset(void FAR * s, int ch, size_t n);
|
|
|
|
void * /*ASMCFUNC*/ ASMPASCAL memset(void * s, int ch, size_t n);
|
|
|
|
|
|
|
|
int /*ASMCFUNC*/ ASMPASCAL memcmp(const void *m1, const void *m2, size_t n);
|
|
|
|
int /*ASMCFUNC*/ ASMPASCAL fmemcmp(const void FAR *m1, const void FAR *m2, size_t n);
|
|
|
|
|
2004-04-02 02:38:24 +02:00
|
|
|
#ifdef __WATCOMC__
|
2004-04-06 18:29:27 +02:00
|
|
|
/* bx, cx, dx and es not used or clobbered for all asmsupt.asm functions except
|
|
|
|
(f)memchr/(f)strchr (which clobber dx) */
|
|
|
|
#pragma aux (pascal) pascal_ax modify exact [ax]
|
|
|
|
#pragma aux (pascal_ax) fmemcpy
|
|
|
|
#pragma aux (pascal_ax) memcpy
|
|
|
|
#pragma aux (pascal_ax) fmemset
|
|
|
|
#pragma aux (pascal_ax) memset
|
|
|
|
#pragma aux (pascal_ax) fmemcmp modify nomemory
|
|
|
|
#pragma aux (pascal_ax) memcmp modify nomemory
|
|
|
|
#pragma aux (pascal_ax) fstrcpy
|
|
|
|
#pragma aux (pascal_ax) strcpy
|
|
|
|
#pragma aux (pascal_ax) fstrlen modify nomemory
|
|
|
|
#pragma aux (pascal_ax) strlen modify nomemory
|
|
|
|
#pragma aux (pascal) memchr modify exact [ax dx] nomemory
|
|
|
|
#pragma aux (pascal) fmemchr modify exact [ax dx] nomemory
|
|
|
|
#pragma aux (pascal) strchr modify exact [ax dx] nomemory
|
|
|
|
#pragma aux (pascal) fstrchr modify exact [ax dx] nomemory
|
2004-04-02 02:38:24 +02:00
|
|
|
#endif
|
2000-05-06 21:34:20 +02:00
|
|
|
|
|
|
|
/* sysclk.c */
|
|
|
|
COUNT BcdToByte(COUNT x);
|
|
|
|
COUNT BcdToWord(BYTE * x, UWORD * mon, UWORD * day, UWORD * yr);
|
|
|
|
LONG WordToBcd(BYTE * x, UWORD * mon, UWORD * day, UWORD * yr);
|
|
|
|
|
|
|
|
/* syspack.c */
|
2001-09-23 22:39:44 +02:00
|
|
|
#ifdef NONNATIVE
|
2002-08-04 03:14:18 +02:00
|
|
|
VOID getdirent(UBYTE FAR * vp, struct dirent FAR * dp);
|
|
|
|
VOID putdirent(struct dirent FAR * dp, UBYTE FAR * vp);
|
2001-09-23 22:39:44 +02:00
|
|
|
#else
|
|
|
|
#define getdirent(vp, dp) fmemcpy(dp, vp, sizeof(struct dirent))
|
|
|
|
#define putdirent(dp, vp) fmemcpy(vp, dp, sizeof(struct dirent))
|
|
|
|
#endif
|
|
|
|
|
2000-05-06 21:34:20 +02:00
|
|
|
/* systime.c */
|
2002-10-22 04:40:19 +02:00
|
|
|
void DosGetTime(struct dostime *dt);
|
|
|
|
int DosSetTime(const struct dostime *dt);
|
|
|
|
unsigned char DosGetDate(struct dosdate *dd);
|
|
|
|
int DosSetDate(const struct dosdate *dd);
|
2000-05-06 21:34:20 +02:00
|
|
|
|
2002-02-03 23:40:24 +01:00
|
|
|
const UWORD *is_leap_year_monthdays(UWORD year);
|
2001-08-19 14:58:36 +02:00
|
|
|
UWORD DaysFromYearMonthDay(UWORD Year, UWORD Month, UWORD DayOfMonth);
|
2001-03-21 03:56:26 +01:00
|
|
|
|
2000-05-06 21:34:20 +02:00
|
|
|
/* task.c */
|
2004-03-17 22:28:54 +01:00
|
|
|
VOID new_psp(seg para, seg cur_psp);
|
|
|
|
VOID child_psp(seg para, seg cur_psp, int psize);
|
2000-05-06 21:34:20 +02:00
|
|
|
VOID return_user(void);
|
2001-04-15 05:21:50 +02:00
|
|
|
COUNT DosExec(COUNT mode, exec_blk FAR * ep, BYTE FAR * lp);
|
2002-10-22 04:40:19 +02:00
|
|
|
ULONG SftGetFsize(int sft_idx);
|
2001-04-15 05:21:50 +02:00
|
|
|
VOID InitPSP(VOID);
|
2000-05-06 21:34:20 +02:00
|
|
|
|
|
|
|
/* newstuff.c */
|
|
|
|
int SetJFTSize(UWORD nHandles);
|
2004-05-23 21:45:48 +02:00
|
|
|
long DosMkTmp(BYTE FAR * pathname, UWORD attr);
|
2002-08-04 03:14:18 +02:00
|
|
|
COUNT truename(const char FAR * src, char * dest, COUNT t);
|
2000-05-06 21:34:20 +02:00
|
|
|
|
|
|
|
/* network.c */
|
2004-04-20 22:25:26 +02:00
|
|
|
int network_redirector(unsigned cmd);
|
2004-04-21 02:53:45 +02:00
|
|
|
int network_redirector_fp(unsigned cmd, void far *s);
|
2004-04-21 13:04:08 +02:00
|
|
|
long ASMPASCAL network_redirector_mx(unsigned cmd, void far *s, void *arg);
|
2004-05-25 02:02:46 +02:00
|
|
|
#define remote_rw(cmd,s,arg) network_redirector_mx(cmd, s, (void *)arg)
|
2004-04-21 13:04:08 +02:00
|
|
|
#define remote_getfree(s,d) (int)network_redirector_mx(REM_GETSPACE, s, d)
|
|
|
|
#define remote_lseek(s,new_pos) network_redirector_mx(REM_LSEEK, s, &new_pos)
|
|
|
|
#define remote_setfattr(attr) (int)network_redirector_mx(REM_SETATTR, NULL, (void *)attr)
|
2004-04-21 19:40:12 +02:00
|
|
|
#define remote_printredir(dx,ax) (int)network_redirector_mx(REM_PRINTREDIR, MK_FP(0,dx),(void *)ax)
|
2004-05-02 17:21:35 +02:00
|
|
|
#define QRemote_Fn(d,s) (int)network_redirector_mx(REM_FILENAME, d, (void *)&s)
|
2000-05-06 21:34:20 +02:00
|
|
|
|
|
|
|
UWORD get_machine_name(BYTE FAR * netname);
|
|
|
|
VOID set_machine_name(BYTE FAR * netname, UWORD name_num);
|
|
|
|
|
|
|
|
/* procsupt.asm */
|
2003-08-28 22:25:09 +02:00
|
|
|
VOID ASMCFUNC exec_user(iregs FAR * irp, int disable_a20);
|
2000-08-06 07:50:17 +02:00
|
|
|
|
2001-03-21 03:56:26 +01:00
|
|
|
/* new by TE */
|
|
|
|
|
|
|
|
/*
|
|
|
|
assert at compile time, that something is true.
|
|
|
|
|
|
|
|
use like
|
|
|
|
ASSERT_CONST( SECSIZE == 512)
|
|
|
|
ASSERT_CONST( (BYTE FAR *)x->fcb_ext - (BYTE FAR *)x->fcbname == 8)
|
|
|
|
*/
|
|
|
|
|
2001-09-23 22:39:44 +02:00
|
|
|
#define ASSERT_CONST(x) { typedef struct { char _xx[x ? 1 : -1]; } xx ; }
|
|
|
|
|