mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 02:52:24 +00:00
Base expression casting on C int size, remove dependencies on form=LInt.
This commit is contained in:
parent
b3c71fb2f0
commit
0508097ffe
199 changed files with 6800 additions and 6540 deletions
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/08/30] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/08/31] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#include "SYSTEM.h"
|
||||
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ INTEGER Strings_Length (CHAR *s, LONGINT s__len)
|
|||
INTEGER i;
|
||||
__DUP(s, s__len, CHAR);
|
||||
i = 0;
|
||||
while (((int)i < s__len && s[__X(i, s__len)] != 0x00)) {
|
||||
while ((i < s__len && s[__X(i, s__len)] != 0x00)) {
|
||||
i += 1;
|
||||
}
|
||||
_o_result = i;
|
||||
|
|
@ -36,11 +36,11 @@ void Strings_Append (CHAR *extra, LONGINT extra__len, CHAR *dest, LONGINT dest__
|
|||
n1 = Strings_Length(dest, dest__len);
|
||||
n2 = Strings_Length(extra, extra__len);
|
||||
i = 0;
|
||||
while ((i < n2 && (int)(i + n1) < dest__len)) {
|
||||
while ((i < n2 && (i + n1) < dest__len)) {
|
||||
dest[__X(i + n1, dest__len)] = extra[__X(i, extra__len)];
|
||||
i += 1;
|
||||
}
|
||||
if ((int)(i + n1) < dest__len) {
|
||||
if ((i + n1) < dest__len) {
|
||||
dest[__X(i + n1, dest__len)] = 0x00;
|
||||
}
|
||||
__DEL(extra);
|
||||
|
|
@ -59,10 +59,10 @@ void Strings_Insert (CHAR *source, LONGINT source__len, INTEGER pos, CHAR *dest,
|
|||
Strings_Append(dest, dest__len, (void*)source, source__len);
|
||||
return;
|
||||
}
|
||||
if ((int)(pos + n2) < dest__len) {
|
||||
if ((pos + n2) < dest__len) {
|
||||
i = n1;
|
||||
while (i >= pos) {
|
||||
if ((int)(i + n2) < dest__len) {
|
||||
if ((i + n2) < dest__len) {
|
||||
dest[__X(i + n2, dest__len)] = dest[__X(i, dest__len)];
|
||||
}
|
||||
i -= 1;
|
||||
|
|
@ -91,7 +91,7 @@ void Strings_Delete (CHAR *s, LONGINT s__len, INTEGER pos, INTEGER n)
|
|||
s[__X(i - n, s__len)] = s[__X(i, s__len)];
|
||||
i += 1;
|
||||
}
|
||||
if ((int)(i - n) < s__len) {
|
||||
if ((i - n) < s__len) {
|
||||
s[__X(i - n, s__len)] = 0x00;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -112,7 +112,7 @@ void Strings_Extract (CHAR *source, LONGINT source__len, INTEGER pos, INTEGER n,
|
|||
INTEGER len, destLen, i;
|
||||
__DUP(source, source__len, CHAR);
|
||||
len = Strings_Length(source, source__len);
|
||||
destLen = (int)dest__len - 1;
|
||||
destLen = dest__len - 1;
|
||||
if (pos < 0) {
|
||||
pos = 0;
|
||||
}
|
||||
|
|
@ -121,7 +121,7 @@ void Strings_Extract (CHAR *source, LONGINT source__len, INTEGER pos, INTEGER n,
|
|||
return;
|
||||
}
|
||||
i = 0;
|
||||
while (((((int)(pos + i) <= source__len && source[__X(pos + i, source__len)] != 0x00)) && i < n)) {
|
||||
while (((((pos + i) <= source__len && source[__X(pos + i, source__len)] != 0x00)) && i < n)) {
|
||||
if (i < destLen) {
|
||||
dest[__X(i, dest__len)] = source[__X(pos + i, source__len)];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue