Skip to content

Commit b52fbaf

Browse files
jmalakPerditionC
authored andcommitted
Open-Watcom: use safer form of #pragma aux
using ISO standard compiler reserved words form of #pragma aux
1 parent d71b74c commit b52fbaf

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

cmd/verify.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ void setverify(char a);
2424
"mov ah,0x2e" \
2525
"mov dl,0" \
2626
"int 0x21" \
27-
parm [al] modify exact [ah dl]
27+
__parm [__al] __modify __exact [__ah __dl]
2828
char getverify(void);
2929
#pragma aux getverify = \
3030
"mov ah,0x54" \
3131
"int 0x21" \
32-
value [al] modify exact [ah]
32+
__value [__al] __modify __exact [__ah]
3333
#endif
3434

3535
#ifdef __GNUC__

include/cswap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ extern int cdecl XMSexec(void);
3333

3434
#if defined(__WATCOMC__)
3535
typedef unsigned long xmsfunc(unsigned request, unsigned dx, void *si);
36-
#pragma aux xmsfunc = parm [ax] [dx] [si] modify [bx cx]
36+
#pragma aux xmsfunc = __parm [__ax] [__dx] [__si] __modify [__bx __cx]
3737
extern xmsfunc far *far XMSdriverAdress;
3838
#elif defined(__GNUC__)
3939
extern unsigned far *far XMSdriverAdress;

lib/exec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ char *parsfnm(const char *cmdline, struct fcb far *fcbptr, int option);
7979
"jnz ok" \
8080
"xor si, si" \
8181
"ok:" \
82-
parm [si] [es di] [ax] value [si] modify [ax es]
82+
__parm [__si] [__es __di] [__ax] __value [__si] __modify [__ax __es]
8383
#else
8484
#pragma aux parsfnm = \
8585
"mov ah, 29h" \
@@ -88,7 +88,7 @@ char *parsfnm(const char *cmdline, struct fcb far *fcbptr, int option);
8888
"jnz ok" \
8989
"xor si, si" \
9090
"ok:" \
91-
parm [ds si] [es di] [ax] value [ds si] modify [ax es]
91+
__parm [__ds __si] [__es __di] [__ax] __value [__ds __si] __modify [__ax __es]
9292
#endif
9393
#else /* __GNUC__ */
9494
static char *parsfnm(const char *cmdline, struct fcb far *fcbptr, int option)

suppl/p-watcom.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ void intrf(int inter_no, union REGPACK *regs);
7878
#define intrpt(num,regs) intrf((num), (union REGPACK*)(regs))
7979

8080
unsigned CS_(void);
81-
#pragma aux CS_ = "mov ax, cs" value[ax];
81+
#pragma aux CS_ = "mov ax, cs" __value[__ax];
8282
#define _CS CS_()
8383

8484
/* get/set current working drive */
@@ -87,15 +87,15 @@ extern short getdisk(void);
8787
"mov ah, 19h" \
8888
"int 21h" \
8989
"xor ah, ah" \
90-
value [ax]
90+
__value [__ax]
9191

9292
extern short setdisk(int newdrive);
9393
#pragma aux setdisk = \
9494
"mov ah, 0eh" \
9595
"int 21h" \
9696
"xor ah, ah" \
97-
parm [dx] \
98-
modify [dx] \
99-
value [ax]
97+
__parm [__dx] \
98+
__modify [__dx] \
99+
__value [__ax]
100100

101101
#endif

suppl/suppl.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ word resizeBlk(const word segm, const unsigned length);
158158
/* No differences, only for completeness. */
159159

160160
unsigned BLK_byte2para(const unsigned bytes);
161-
/* Return the number of paragraphes that will be needed to store ¯bytes®
161+
/* Return the number of paragraphes that will be needed to store bytes
162162
bytes in.
163163
164164
If bytes == 0, the return value is zero, too.
@@ -178,16 +178,16 @@ int addu(unsigned *u1, unsigned u2);
178178
#pragma aux addu = \
179179
"add word ptr es:[bx], ax" \
180180
"sbb ax, ax" \
181-
parm [es bx] [ax] \
182-
value [ax] \
183-
modify [es bx]
181+
__parm [__es __bx] [__ax] \
182+
__value [__ax] \
183+
__modify [__es __bx]
184184
#else
185185
#pragma aux addu = \
186186
"add word ptr [bx], ax" \
187187
"sbb ax, ax" \
188-
parm [bx] [ax] \
189-
value [ax] \
190-
modify [bx]
188+
__parm [__bx] [__ax] \
189+
__value [__ax] \
190+
__modify [__bx]
191191
#endif
192192
#endif
193193

0 commit comments

Comments
 (0)