Hi!
init-mod.h
- cleaned prototype for function from intr.asm.
- init_fatal() described (for Watcom) as non-returned functions.
proto.h
- fatal() and panic() described (for Watcom) as non-returned functions;
this improves code generation.
- cleaned prototypes for functions from intr.asm.
- removed prototypes for nonexisting functions.
- added brackets around parameters of macro.
About improved code generation: with `#pragma aborts' HMA_TEXT sement
reduced by another 5 bytes.
BTW, init_fatal() may be removed, because it not used.
--- Begin Message ---
diff -ruNp old/kernel/init-mod.h new/kernel/init-mod.h
--- old/kernel/init-mod.h 2004-05-29 02:51:30.000000000 +0000
+++ new/kernel/init-mod.h 2004-06-10 00:32:18.000000000 +0000
@@ -164,7 +164,7 @@ int ASMPASCAL close(int fd);
int ASMPASCAL dup2(int oldfd, int newfd);
seg ASMPASCAL allocmem(UWORD size);
void ASMPASCAL init_PSPSet(seg psp_seg);
-int ASMPASCAL init_DosExec(int mode, exec_blk * ep, char * lp);
+int ASMPASCAL init_DosExec(int mode, exec_blk * ep, const char * lp);
int ASMPASCAL init_setdrive(int drive);
int ASMPASCAL init_switchar(int chr);
void ASMPASCAL keycheck(void);
@@ -215,6 +215,9 @@ VOID ASMCFUNC FreeDOSmain(void);
BOOL init_device(struct dhdr FAR * dhp, char * cmdLine,
COUNT mode, char FAR **top);
VOID init_fatal(BYTE * err_msg);
+#ifdef __WATCOMC__
+#pragma aux init_fatal aborts
+#endif
/* prf.c */
int VA_CDECL init_printf(const char * fmt, ...);
@@ -312,4 +315,3 @@ ULONG ASMCFUNC FAR MULULUL(ULONG mul1, U
ULONG ASMCFUNC FAR DIVULUS(ULONG mul1, UWORD mul2); /* DIVide ULong by UShort */
ULONG ASMCFUNC FAR DIVMODULUS(ULONG mul1, UWORD mul2, UWORD * rem); /* DIVide
ULong by UShort */
#endif
-
diff -ruNp old/kernel/proto.h new/kernel/proto.h
--- old/kernel/proto.h 2004-05-28 12:09:02.000000000 +0000
+++ new/kernel/proto.h 2004-06-10 00:03:10.000000000 +0000
@@ -135,6 +135,10 @@ int ParseDosName(const char *, char *, B
VOID dump(void);
VOID panic(BYTE * s);
VOID fatal(BYTE * err_msg);
+#ifdef __WATCOMC__
+#pragma aux panic aborts
+#pragma aux fatal aborts
+#endif
/* fatdir.c */
VOID dir_init_fnode(f_node_ptr fnp, CLUSTER dirstart);
@@ -225,8 +229,8 @@ void FcbCloseAll(void);
UBYTE FcbFindFirstNext(xfcb FAR * lpXfcb, BOOL First);
/* intr.asm */
-COUNT ASMPASCAL res_DosExec(COUNT mode, exec_blk * ep, BYTE * lp);
-UCOUNT ASMPASCAL res_read(int fd, void *buf, UCOUNT count);
+int ASMPASCAL res_DosExec(int mode, exec_blk * ep, const char * lp);
+unsigned ASMPASCAL res_read(int fd, void *buf, unsigned 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]
@@ -236,9 +240,6 @@ UCOUNT ASMPASCAL res_read(int fd, void *
COUNT DosDevIOctl(lregs * r);
/* memmgr.c */
-seg far2para(VOID FAR * p);
-seg long2para(ULONG size);
-void FAR *add_far(void FAR * fp, unsigned off);
VOID FAR *adjust_far(const void FAR * fp);
COUNT DosMemAlloc(UWORD size, COUNT mode, seg * para, UWORD * asize);
COUNT DosMemLargest(UWORD * size);
@@ -403,5 +404,4 @@ VOID ASMCFUNC exec_user(iregs FAR * irp,
ASSERT_CONST( (BYTE FAR *)x->fcb_ext - (BYTE FAR *)x->fcbname == 8)
*/
-#define ASSERT_CONST(x) { typedef struct { char _xx[x ? 1 : -1]; } xx ; }
-
+#define ASSERT_CONST(x) { typedef struct { char _[(x) ? 1 : -1]; } _; }
--- End Message ---