mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 16:52:25 +00:00
Change of mind: s/uintptr/address/. Replace LONGINT with ADDRESS in Platform*.
This commit is contained in:
parent
90737e5677
commit
a865643d6c
215 changed files with 1441 additions and 1410 deletions
|
|
@ -38,7 +38,7 @@ void SYSTEM_INHERIT(LONGINT *t, LONGINT *t0)
|
|||
void SYSTEM_ENUMP(void *adr, LONGINT n, void (*P)())
|
||||
{
|
||||
while (n > 0) {
|
||||
P((uintptr)(*((void**)(adr))));
|
||||
P((address)(*((void**)(adr))));
|
||||
adr = ((void**)adr) + 1;
|
||||
n--;
|
||||
}
|
||||
|
|
@ -51,7 +51,7 @@ void SYSTEM_ENUMR(void *adr, LONGINT *typ, LONGINT size, LONGINT n, void (*P)())
|
|||
while (n > 0) {
|
||||
t = typ;
|
||||
off = *t;
|
||||
while (off >= 0) {P(*(uintptr*)((char*)adr+off)); t++; off = *t;}
|
||||
while (off >= 0) {P(*(address*)((char*)adr+off)); t++; off = *t;}
|
||||
adr = ((char*)adr) + size;
|
||||
n--;
|
||||
}
|
||||
|
|
@ -109,7 +109,7 @@ SYSTEM_PTR SYSTEM_NEWARR(LONGINT *typ, LONGINT elemsz, int elemalgn, int nofdim,
|
|||
else if (typ == (LONGINT*)POINTER__typ) {
|
||||
/* element type is a pointer */
|
||||
x = Heap_NEWBLK(size + nofelems * sizeof(LONGINT));
|
||||
p = (LONGINT*)(uintptr)x[-1];
|
||||
p = (LONGINT*)(address)x[-1];
|
||||
p[-nofelems] = *p; /* build new type desc in situ: 1. copy block size; 2. setup ptr tab; 3. set sentinel; 4. patch tag */
|
||||
p -= nofelems - 1; n = 1; /* n =1 for skipping the size field */
|
||||
while (n <= nofelems) {*p = n*sizeof(LONGINT); p++; n++;}
|
||||
|
|
@ -122,7 +122,7 @@ SYSTEM_PTR SYSTEM_NEWARR(LONGINT *typ, LONGINT elemsz, int elemalgn, int nofdim,
|
|||
while (ptab[nofptrs] >= 0) {nofptrs++;} /* number of pointers per element */
|
||||
nptr = nofelems * nofptrs; /* total number of pointers */
|
||||
x = Heap_NEWBLK(size + nptr * sizeof(LONGINT));
|
||||
p = (LONGINT*)(uintptr)x[- 1];
|
||||
p = (LONGINT*)(address)x[- 1];
|
||||
p[-nptr] = *p; /* build new type desc in situ; 1. copy block size; 2. setup ptr tab; 3. set sentinel; 4. patch tag */
|
||||
p -= nptr - 1; n = 0; off = dataoff;
|
||||
while (n < nofelems) {i = 0;
|
||||
|
|
@ -158,7 +158,7 @@ typedef void (*SystemSignalHandler)(INTEGER); // = Platform_SignalHandler
|
|||
// (Ignore other signals)
|
||||
}
|
||||
|
||||
void SystemSetHandler(int s, uintptr h) {
|
||||
void SystemSetHandler(int s, address h) {
|
||||
if (s >= 2 && s <= 4) {
|
||||
int needtosetsystemhandler = handler[s-2] == 0;
|
||||
handler[s-2] = (SystemSignalHandler)h;
|
||||
|
|
@ -197,12 +197,12 @@ typedef void (*SystemSignalHandler)(INTEGER); // = Platform_SignalHandler
|
|||
}
|
||||
}
|
||||
|
||||
void SystemSetInterruptHandler(uintptr h) {
|
||||
void SystemSetInterruptHandler(address h) {
|
||||
EnsureConsoleCtrlHandler();
|
||||
SystemInterruptHandler = (SystemSignalHandler)h;
|
||||
}
|
||||
|
||||
void SystemSetQuitHandler(uintptr h) {
|
||||
void SystemSetQuitHandler(address h) {
|
||||
EnsureConsoleCtrlHandler();
|
||||
SystemQuitHandler = (SystemSignalHandler)h;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue