Skip to content

Commit

Permalink
crtl: correct definition for int86../int386../intdos.. and auxiliary …
Browse files Browse the repository at this point in the history
…functions

now it uses pointer to constant object (input registers) with regards to appropriate changes in header files
  • Loading branch information
jmalak committed Jan 16, 2025
1 parent c7d7c5b commit 505e15a
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion bld/clib/_dos/c/intd086.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include "seterrno.h"


_WCRTLINK int intdos( union REGS *inregs, union REGS *outregs )
_WCRTLINK int intdos( const union REGS *inregs, union REGS *outregs )
{
int reg_ax;

Expand Down
2 changes: 1 addition & 1 deletion bld/clib/_dos/c/intd386.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#endif


_WCRTLINK int intdos( union REGS *inregs, union REGS *outregs )
_WCRTLINK int intdos( const union REGS *inregs, union REGS *outregs )
{
#if defined( __WINDOWS_386__ )
return( _clib_intdos( inregs, outregs ) );
Expand Down
2 changes: 1 addition & 1 deletion bld/clib/_dos/c/intdx086.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include "seterrno.h"


_WCRTLINK int intdosx( union REGS *inregs, union REGS *outregs, struct SREGS *segregs )
_WCRTLINK int intdosx( const union REGS *inregs, union REGS *outregs, struct SREGS *segregs )
{
int reg_ax;

Expand Down
2 changes: 1 addition & 1 deletion bld/clib/_dos/c/intdx386.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#endif


_WCRTLINK int intdosx( union REGS *inregs, union REGS *outregs, struct SREGS *segregs )
_WCRTLINK int intdosx( const union REGS *inregs, union REGS *outregs, struct SREGS *segregs )
{
#if defined( __WINDOWS_386__ )
return( _clib_intdosx( inregs, outregs, segregs ) );
Expand Down
4 changes: 2 additions & 2 deletions bld/clib/_dos/h/dodoscal.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
#define WIN386FAR
#endif

extern int DoDosCall( union REGS WIN386FAR *in, union REGS WIN386FAR *out );
extern int DoDosxCall( union REGS WIN386FAR *in, union REGS WIN386FAR *out, struct SREGS WIN386FAR *sr );
extern int DoDosCall( const union REGS WIN386FAR *in, union REGS WIN386FAR *out );
extern int DoDosxCall( const union REGS WIN386FAR *in, union REGS WIN386FAR *out, struct SREGS WIN386FAR *sr );

#if defined( _M_I86 )

Expand Down
2 changes: 1 addition & 1 deletion bld/clib/intel/c/int386.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include <i86.h>


_WCRTLINK int int386( int intno, union REGS *inregs, union REGS *outregs )
_WCRTLINK int int386( int intno, const union REGS *inregs, union REGS *outregs )
{
struct SREGS segregs;

Expand Down
2 changes: 1 addition & 1 deletion bld/clib/intel/c/intq16.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "variety.h"
#include <i86.h>

_WCRTLINK int (int86)( int intno, union REGS *inregs, union REGS *outregs )
_WCRTLINK int (int86)( int intno, const union REGS *inregs, union REGS *outregs )
{
struct SREGS segregs;

Expand Down
4 changes: 2 additions & 2 deletions bld/clib/intel/c/intx086.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include "dointr.h"


_WCRTLINK int int86x( int intno, union REGS *inregs, union REGS *outregs, struct SREGS *segregs )
_WCRTLINK int int86x( int intno, const union REGS *inregs, union REGS *outregs, struct SREGS *segregs )
{
union REGPACK regs;

Expand Down Expand Up @@ -65,7 +65,7 @@ _WCRTLINK int int86x( int intno, union REGS *inregs, union REGS *outregs, struct
return( regs.x.ax );
}

_WCRTLINK int int86( int intno, union REGS *inregs, union REGS *outregs )
_WCRTLINK int int86( int intno, const union REGS *inregs, union REGS *outregs )
{
struct SREGS segregs;

Expand Down
4 changes: 2 additions & 2 deletions bld/clib/intel/c/intx386.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
#include <i86.h>


extern void __int386x( unsigned char intno, void _WCNEAR *inregs, void _WCNEAR *outregs, void _WCNEAR *segregs );
extern void __int386x( unsigned char intno, const void _WCNEAR *inregs, void _WCNEAR *outregs, void _WCNEAR *segregs );
#pragma aux __int386x "*_" \
__parm __caller [__eax] [__edi] [__edx] [__ebx] \
__modify [__ecx __esi]


_WCRTLINK int int386x( int intno, union REGS *inregs, union REGS *outregs, struct SREGS *segregs )
_WCRTLINK int int386x( int intno, const union REGS *inregs, union REGS *outregs, struct SREGS *segregs )
{
__int386x( intno, inregs, outregs, segregs );
return( outregs->x.eax );
Expand Down
2 changes: 1 addition & 1 deletion bld/clib/intel/c/intxq16.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@


_WCRTLINK int (int86x)( int intno,
union REGS *inregs,
const union REGS *inregs,
union REGS *outregs,
struct SREGS *segregs )
{
Expand Down
4 changes: 2 additions & 2 deletions bld/clib/intel/c/intxw32.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
#include "clibxw32.h"


_WCRTLINK int int86( int intno, union REGS *inregs, union REGS *outregs )
_WCRTLINK int int86( int intno, const union REGS *inregs, union REGS *outregs )
{
return( _clib_int86( intno, inregs, outregs ) );
}

_WCRTLINK int int86x( int intno, union REGS *inregs, union REGS *outregs, struct SREGS *segregs )
_WCRTLINK int int86x( int intno, const union REGS *inregs, union REGS *outregs, struct SREGS *segregs )
{
return( _clib_int86x( intno, inregs, outregs, segregs ) );
}
8 changes: 4 additions & 4 deletions bld/lib_misc/h/clibxw32.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
#define _FAR
#endif

extern int _FAR __pascal _clib_intdos( union REGS _FAR *in_regs, union REGS _FAR *out_regs );
extern int _FAR __pascal _clib_intdosx( union REGS _FAR *in_regs, union REGS _FAR *out_regs, struct SREGS _FAR *seg_regs );
extern int _FAR __pascal _clib_int86( int inter_no, union REGS _FAR *in_regs, union REGS _FAR *out_regs );
extern int _FAR __pascal _clib_int86x( int inter_no, union REGS _FAR *in_regs, union REGS _FAR *out_regs, struct SREGS _FAR *seg_regs );
extern int _FAR __pascal _clib_intdos( const union REGS _FAR *in_regs, union REGS _FAR *out_regs );
extern int _FAR __pascal _clib_intdosx( const union REGS _FAR *in_regs, union REGS _FAR *out_regs, struct SREGS _FAR *seg_regs );
extern int _FAR __pascal _clib_int86( int inter_no, const union REGS _FAR *in_regs, union REGS _FAR *out_regs );
extern int _FAR __pascal _clib_int86x( int inter_no, const union REGS _FAR *in_regs, union REGS _FAR *out_regs, struct SREGS _FAR *seg_regs );
extern void _FAR __pascal _clib_intr( int inter_no, union REGPACK _FAR *regs );
extern void _FAR __pascal _clib_intrf( int inter_no, union REGPACK _FAR *regs );
extern unsigned _FAR __pascal _clib_dos_findfirst( char _FAR *__path,unsigned __attr, struct find_t _FAR *__buf );
Expand Down
4 changes: 2 additions & 2 deletions bld/wattcp/src/wdpmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,15 +288,15 @@ int dpmi_dos_yield (void)
return (-1);
}

int int386 (int intno, union REGS *ireg, union REGS *oreg)
int int386 (int intno, const union REGS *ireg, union REGS *oreg)
{
struct SREGS sreg;

segread (&sreg);
return int386x (intno, ireg, oreg, &sreg);
}

int int386x (int intno, union REGS *ireg, union REGS *oreg, struct SREGS *sreg)
int int386x (int intno, const union REGS *ireg, union REGS *oreg, struct SREGS *sreg)
{
static struct DPMI_regs rm_reg;

Expand Down
10 changes: 5 additions & 5 deletions bld/win386/c/clib.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
* here lie all interrupt functions
*/

int __far __pascal _clib_intdos( union REGS __far *inregs, union REGS __far *outregs )
int __far __pascal _clib_intdos( const union REGS __far *inregs, union REGS __far *outregs )
{
int reg_ax;

Expand All @@ -66,7 +66,7 @@ int __far __pascal _clib_intdos( union REGS __far *inregs, union REGS __far *out
return( reg_ax );
}

int __far __pascal _clib_intdosx( union REGS __far *inregs, union REGS __far *outregs,
int __far __pascal _clib_intdosx( const union REGS __far *inregs, union REGS __far *outregs,
struct SREGS __far *segregs )
{
int reg_ax;
Expand All @@ -77,7 +77,7 @@ int __far __pascal _clib_intdosx( union REGS __far *inregs, union REGS __far *ou
return( reg_ax );
}

static int __int86x( int intno, union REGS __far *inregs, union REGS __far *outregs,
static int __int86x( int intno, const union REGS __far *inregs, union REGS __far *outregs,
struct SREGS __far *segregs )
{
union REGPACK regs;
Expand Down Expand Up @@ -107,7 +107,7 @@ static int __int86x( int intno, union REGS __far *inregs, union REGS __far *outr
return( regs.x.ax );
}

int __far __pascal _clib_int86( int intno, union REGS __far *inregs,
int __far __pascal _clib_int86( int intno, const union REGS __far *inregs,
union REGS __far *outregs )
{
#ifdef DLL32
Expand All @@ -120,7 +120,7 @@ int __far __pascal _clib_int86( int intno, union REGS __far *inregs,
return( __int86x( intno, inregs, outregs, &segregs ) );
}

int __far __pascal _clib_int86x( int intno, union REGS __far *inregs,
int __far __pascal _clib_int86x( int intno, const union REGS __far *inregs,
union REGS __far *outregs, struct SREGS __far *segregs )
{
return( __int86x( intno, inregs, outregs, segregs ) );
Expand Down

0 comments on commit 505e15a

Please sign in to comment.