MSC/TurboC compatibility fixes (Luchezar/Bart)

git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@735 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Bart Oldeman 2003-12-02 23:46:03 +00:00
parent ef3e38de7b
commit f1f51592ba
5 changed files with 6 additions and 5 deletions

View File

@ -1,6 +1,5 @@
#if defined(_MSC_VER) #if defined(_MSC_VER)
#define asm __asm
#if _MSC_VER >= 700 #if _MSC_VER >= 700
#pragma warning(disable:4103) #pragma warning(disable:4103)
#endif #endif

View File

@ -69,6 +69,9 @@ void __int__(int);
#elif defined (_MSC_VER) #elif defined (_MSC_VER)
#define I86 #define I86
#define asm __asm
#pragma warning(disable: 4761) /* "integral size mismatch in argument;
conversion supplied" */
#define CDECL _cdecl #define CDECL _cdecl
#define PASCAL pascal #define PASCAL pascal
#define __int__(intno) asm int intno; #define __int__(intno) asm int intno;

View File

@ -1928,7 +1928,7 @@ VOID ASMCFUNC int2F_12_handler(struct int2f12regs r)
{ {
int rel_idx = idx_to_sft_(r.bx); int rel_idx = idx_to_sft_(r.bx);
if (rel_idx == (size_t) - 1) if (rel_idx == -1)
{ {
r.flags |= FLG_CARRY; r.flags |= FLG_CARRY;
break; break;

View File

@ -57,7 +57,7 @@ static BYTE *prfRcsId =
static int buff_offset = 0; static int buff_offset = 0;
static char buff[MAX_BUFSIZE]; static char buff[MAX_BUFSIZE];
VOID put_console(COUNT c) STATIC VOID put_console(COUNT c)
{ {
if (buff_offset >= MAX_BUFSIZE) if (buff_offset >= MAX_BUFSIZE)
{ {
@ -91,7 +91,7 @@ VOID put_console(COUNT c)
} }
} }
#else #else
VOID put_console(COUNT c) STATIC VOID put_console(COUNT c)
{ {
if (c == '\n') if (c == '\n')
put_console('\r'); put_console('\r');

View File

@ -279,7 +279,6 @@ UWORD ASMCFUNC syscall_MUX14(DIRECT_IREGS);
int CDECL printf(CONST BYTE * fmt, ...); int CDECL printf(CONST BYTE * fmt, ...);
int CDECL sprintf(BYTE * buff, CONST BYTE * fmt, ...); int CDECL sprintf(BYTE * buff, CONST BYTE * fmt, ...);
#endif #endif
VOID put_console(COUNT c);
VOID hexd(char *title, VOID FAR * p, COUNT numBytes); VOID hexd(char *title, VOID FAR * p, COUNT numBytes);
void put_unsigned(unsigned n, int base, int width); void put_unsigned(unsigned n, int base, int width);
void put_string(const char *s); void put_string(const char *s);