Fix some prototypes and add definitions for "extended open" support.

git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@412 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Bart Oldeman 2002-08-03 04:08:58 +00:00
parent 8567cb9ed5
commit 3b5e79890e
8 changed files with 34 additions and 12 deletions

View File

@ -126,8 +126,8 @@ struct dhdr {
struct dhdr struct dhdr
FAR *dh_next; FAR *dh_next;
UWORD dh_attr; UWORD dh_attr;
VOID(*dh_strategy) (); VOID(*dh_strategy) (void);
VOID(*dh_interrupt) (); VOID(*dh_interrupt) (void);
BYTE dh_name[8]; BYTE dh_name[8];
}; };

View File

@ -36,7 +36,7 @@ static BYTE *dirmatch_hRcsId =
#endif #endif
typedef struct { typedef struct {
BYTE dm_drive; UBYTE dm_drive;
BYTE dm_name_pat[FNAME_SIZE + FEXT_SIZE]; BYTE dm_name_pat[FNAME_SIZE + FEXT_SIZE];
BYTE dm_attr_srch; BYTE dm_attr_srch;
UWORD dm_entry; UWORD dm_entry;

View File

@ -53,6 +53,7 @@ typedef struct {
} exe_header; } exe_header;
#define MAGIC 0x5a4d #define MAGIC 0x5a4d
#define OLD_MAGIC 0x4d5a
/* /*
* Log: exe.h,v * Log: exe.h,v

View File

@ -78,7 +78,7 @@ static BYTE *fcb_hRcsId =
/* File Control Block (FCB) */ /* File Control Block (FCB) */
typedef struct { typedef struct {
BYTE fcb_drive; /* Drive number 0=default, 1=A, etc */ UBYTE fcb_drive; /* Drive number 0=default, 1=A, etc */
BYTE fcb_fname[FNAME_SIZE]; /* File name */ BYTE fcb_fname[FNAME_SIZE]; /* File name */
BYTE fcb_fext[FEXT_SIZE]; /* File name Extension */ BYTE fcb_fext[FEXT_SIZE]; /* File name Extension */
UWORD fcb_cublock; /* Current block number of */ UWORD fcb_cublock; /* Current block number of */

View File

@ -51,6 +51,21 @@ static BYTE *file_hRcsId =
#define O_WRONLY SFT_MWRITE #define O_WRONLY SFT_MWRITE
#define O_RDWR SFT_MRDWR #define O_RDWR SFT_MRDWR
/* bits 2, 3 reserved */
/* bits 4, 5, 6 sharing modes */
#define O_NOINHERIT 0x0080
#define O_OPEN 0x0100 /* not */
#define O_TRUNC 0x0200 /* both */
#define O_CREAT 0x0400
#define O_LEGACY 0x0800
#define O_LARGEFILE 0x1000
#define O_NOCRIT 0x2000
#define O_SYNC 0x4000
#define O_FCB 0x8000
/* status for extended open */
enum {S_OPENED = 1, S_CREATED = 2, S_REPLACED = 3};
/* /*
* Log: file.h,v * Log: file.h,v
* *

View File

@ -175,7 +175,7 @@
* *
* Performance tweaks: * Performance tweaks:
* When the system -- This word applies to the combination of kernel and * When the system -- This word applies to the combination of kernel and
* any loaded MUX-14 extension   la NLSFUNC here. -- uppercases * any loaded MUX-14 extension á la NLSFUNC here. -- uppercases
* _filenames_, it must perform a DOS-65-A2 internally. In the basic * _filenames_, it must perform a DOS-65-A2 internally. In the basic
* implementation this request would be channeled through MUX-14, even * implementation this request would be channeled through MUX-14, even
* if there is no external NLSFUNC at all. Also, when a NLS pkg had * if there is no external NLSFUNC at all. Also, when a NLS pkg had
@ -517,22 +517,22 @@ extern BYTE FAR hcTablesStart[], hcTablesEnd[];
#define CSYS_FD_IDSTRING "FreeDOS COUNTRY.SYS v1.0\r\n" #define CSYS_FD_IDSTRING "FreeDOS COUNTRY.SYS v1.0\r\n"
struct nlsCSys_function { /* S3: function definition */ struct csys_function { /* S3: function definition */
UDWORD csys_rpos; /* relative position to actual data */ UDWORD csys_rpos; /* relative position to actual data */
UWORD csys_length; UWORD csys_length;
UBYTE csys_fctID; /* As passed to DOS-65-XX */ UBYTE csys_fctID; /* As passed to DOS-65-XX */
UBYTE csys_reserved1; /* always 0, reserved for future use */ UBYTE csys_reserved1; /* always 0, reserved for future use */
}; };
struct nlsCSys_ccDefinition { /* S1: country/codepage reference */ struct csys_ccDefinition { /* S1: country/codepage reference */
UDWORD csys_rpos; /* moving the 4byte value to the front UDWORD csys_rpos; /* moving the 4byte value to the front
can increase performance */ can increase performance */
UWORD csys_cp; UWORD csys_cp;
UWORD csys_cntry; UWORD csys_cntry;
}; };
struct nlsCSys_numEntries { /* helper structure for "number of entries" */ struct csys_numEntries { /* helper structure for "number of entries" */
UWORD csys_numEntries; UWORD csys_entries;
}; };
/* Actually, this structure is never really used */ /* Actually, this structure is never really used */
@ -541,7 +541,7 @@ struct nlsCSys_fileHeader { /* S0: primary structure */
/* decrement by 1 to cut off \0 from IDString -- ska */ /* decrement by 1 to cut off \0 from IDString -- ska */
}; };
struct nlsCSys_completeFileHeader { /* as S0, but full 128 bytes */ struct csys_completeFileHeader { /* as S0, but full 128 bytes */
unsigned char csys_idstring[sizeof(CSYS_FD_IDSTRING) - 1]; unsigned char csys_idstring[sizeof(CSYS_FD_IDSTRING) - 1];
unsigned char csys_padbytes[128 - (sizeof(CSYS_FD_IDSTRING) - 1)]; unsigned char csys_padbytes[128 - (sizeof(CSYS_FD_IDSTRING) - 1)];
}; };

View File

@ -81,6 +81,12 @@ typedef struct _iregss {
UWORD ip, cs, flags; UWORD ip, cs, flags;
} iregs; } iregs;
/* struct used for local copy of registers */
typedef struct {
xreg a, b, c, d;
UWORD si, di, ds, es;
} lregs;
/* Registers directly passed to syscall; /* Registers directly passed to syscall;
must be the same order as iregs! must be the same order as iregs!
Is used to define parameters. */ Is used to define parameters. */

View File

@ -68,7 +68,7 @@ typedef struct {
/* CP/M-like entry point */ /* CP/M-like entry point */
UBYTE ps_farcall; /* 05 far call opcode */ UBYTE ps_farcall; /* 05 far call opcode */
VOID(FAR ASMCFUNC * ps_reentry) (); /* 06 re-entry point */ VOID(FAR ASMCFUNC * ps_reentry) (void); /* 06 re-entry point */
intvec ps_isv22, /* 0a terminate address */ intvec ps_isv22, /* 0a terminate address */
ps_isv23, /* 0e break address */ ps_isv23, /* 0e break address */
ps_isv24; /* 12 critical error address */ ps_isv24; /* 12 critical error address */
@ -76,7 +76,7 @@ typedef struct {
UBYTE ps_files[20]; /* 18 file table - 0xff is unused */ UBYTE ps_files[20]; /* 18 file table - 0xff is unused */
UWORD ps_environ; /* 2c environment paragraph */ UWORD ps_environ; /* 2c environment paragraph */
BYTE FAR *ps_stack; /* 2e user stack pointer - int 21 */ BYTE FAR *ps_stack; /* 2e user stack pointer - int 21 */
WORD ps_maxfiles; /* 32 maximum open files */ UWORD ps_maxfiles; /* 32 maximum open files */
UBYTE FAR *ps_filetab; /* 34 open file table pointer */ UBYTE FAR *ps_filetab; /* 34 open file table pointer */
VOID FAR *ps_prevpsp; /* 38 previous psp pointer */ VOID FAR *ps_prevpsp; /* 38 previous psp pointer */
BYTE FAR *ps_dta; /* 3c process dta address */ BYTE FAR *ps_dta; /* 3c process dta address */