diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 3d221d47..5ae8f8e0 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -983,7 +983,7 @@ void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x) CHAR b[2]; b[0] = __CHR(x); b[1] = __CHR(__ASHR(x, 8)); - Files_WriteBytes(&*R, R__typ, (void*)b, 2, 2); + Files_WriteBytes(&*R, R__typ, b, 2, 2); } void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x) @@ -993,7 +993,7 @@ void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x) b[1] = __CHR(__ASHR(x, 8)); b[2] = __CHR(__ASHR(x, 16)); b[3] = __CHR(__ASHR(x, 24)); - Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); + Files_WriteBytes(&*R, R__typ, b, 4, 4); } void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x) @@ -1005,21 +1005,21 @@ void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x) b[1] = __CHR(__ASHR(i, 8)); b[2] = __CHR(__ASHR(i, 16)); b[3] = __CHR(__ASHR(i, 24)); - Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); + Files_WriteBytes(&*R, R__typ, b, 4, 4); } void Files_WriteReal (Files_Rider *R, ADDRESS *R__typ, REAL x) { CHAR b[4]; Files_FlipBytes((void*)&x, 4, (void*)b, 4); - Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); + Files_WriteBytes(&*R, R__typ, b, 4, 4); } void Files_WriteLReal (Files_Rider *R, ADDRESS *R__typ, LONGREAL x) { CHAR b[8]; Files_FlipBytes((void*)&x, 8, (void*)b, 8); - Files_WriteBytes(&*R, R__typ, (void*)b, 8, 8); + Files_WriteBytes(&*R, R__typ, b, 8, 8); } void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) @@ -1029,7 +1029,7 @@ void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len while (x[__X(i, x__len)] != 0x00) { i += 1; } - Files_WriteBytes(&*R, R__typ, (void*)x, x__len * 1, i + 1); + Files_WriteBytes(&*R, R__typ, x, x__len * 1, i + 1); } void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x) diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index f72ff5c5..d05cb9ca 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -101,6 +101,9 @@ OPT_Node OPB_NewLeaf (OPT_Object obj) } node->obj = obj; node->typ = obj->typ; + if ((((obj->mode == 1 && __IN(obj->typ->comp, 0x0c, 32))) && obj->typ->sysflag != 0)) { + node->readonly = 1; + } return node; } diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 85e2f3a0..ab64f723 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -848,7 +848,7 @@ void OPM_WriteString (CHAR *s, ADDRESS s__len) while (s[__X(i, s__len)] != 0x00) { i += 1; } - Files_WriteBytes(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, (void*)s, s__len * 1, i); + Files_WriteBytes(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, s, s__len * 1, i); } void OPM_WriteStringVar (CHAR *s, ADDRESS s__len) @@ -858,7 +858,7 @@ void OPM_WriteStringVar (CHAR *s, ADDRESS s__len) while (s[__X(i, s__len)] != 0x00) { i += 1; } - Files_WriteBytes(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, (void*)s, s__len * 1, i); + Files_WriteBytes(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, s, s__len * 1, i); } void OPM_WriteHex (INT64 i) @@ -976,7 +976,7 @@ static void OPM_Append (Files_Rider *R, ADDRESS *R__typ, Files_File F) Files_Set(&R1, Files_Rider__typ, F, 0); Files_ReadBytes(&R1, Files_Rider__typ, (void*)buffer, 4096, 4096); while (4096 - R1.res > 0) { - Files_WriteBytes(&*R, R__typ, (void*)buffer, 4096, 4096 - R1.res); + Files_WriteBytes(&*R, R__typ, buffer, 4096, 4096 - R1.res); Files_ReadBytes(&R1, Files_Rider__typ, (void*)buffer, 4096, 4096); } } diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index 5d708381..2a0b8f9e 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1733,11 +1733,11 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) delta = (*(Texts_Piece*)&u)->len; while (delta > 1024) { Files_ReadBytes(&r1, Files_Rider__typ, (void*)block, 1024, 1024); - Files_WriteBytes(&msg.r, Files_Rider__typ, (void*)block, 1024, 1024); + Files_WriteBytes(&msg.r, Files_Rider__typ, block, 1024, 1024); delta -= 1024; } Files_ReadBytes(&r1, Files_Rider__typ, (void*)block, 1024, delta); - Files_WriteBytes(&msg.r, Files_Rider__typ, (void*)block, 1024, delta); + Files_WriteBytes(&msg.r, Files_Rider__typ, block, 1024, delta); } } else __WITHCHK; } else { diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 3d221d47..5ae8f8e0 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -983,7 +983,7 @@ void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x) CHAR b[2]; b[0] = __CHR(x); b[1] = __CHR(__ASHR(x, 8)); - Files_WriteBytes(&*R, R__typ, (void*)b, 2, 2); + Files_WriteBytes(&*R, R__typ, b, 2, 2); } void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x) @@ -993,7 +993,7 @@ void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x) b[1] = __CHR(__ASHR(x, 8)); b[2] = __CHR(__ASHR(x, 16)); b[3] = __CHR(__ASHR(x, 24)); - Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); + Files_WriteBytes(&*R, R__typ, b, 4, 4); } void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x) @@ -1005,21 +1005,21 @@ void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x) b[1] = __CHR(__ASHR(i, 8)); b[2] = __CHR(__ASHR(i, 16)); b[3] = __CHR(__ASHR(i, 24)); - Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); + Files_WriteBytes(&*R, R__typ, b, 4, 4); } void Files_WriteReal (Files_Rider *R, ADDRESS *R__typ, REAL x) { CHAR b[4]; Files_FlipBytes((void*)&x, 4, (void*)b, 4); - Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); + Files_WriteBytes(&*R, R__typ, b, 4, 4); } void Files_WriteLReal (Files_Rider *R, ADDRESS *R__typ, LONGREAL x) { CHAR b[8]; Files_FlipBytes((void*)&x, 8, (void*)b, 8); - Files_WriteBytes(&*R, R__typ, (void*)b, 8, 8); + Files_WriteBytes(&*R, R__typ, b, 8, 8); } void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) @@ -1029,7 +1029,7 @@ void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len while (x[__X(i, x__len)] != 0x00) { i += 1; } - Files_WriteBytes(&*R, R__typ, (void*)x, x__len * 1, i + 1); + Files_WriteBytes(&*R, R__typ, x, x__len * 1, i + 1); } void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x) diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index f72ff5c5..d05cb9ca 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -101,6 +101,9 @@ OPT_Node OPB_NewLeaf (OPT_Object obj) } node->obj = obj; node->typ = obj->typ; + if ((((obj->mode == 1 && __IN(obj->typ->comp, 0x0c, 32))) && obj->typ->sysflag != 0)) { + node->readonly = 1; + } return node; } diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 85e2f3a0..ab64f723 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -848,7 +848,7 @@ void OPM_WriteString (CHAR *s, ADDRESS s__len) while (s[__X(i, s__len)] != 0x00) { i += 1; } - Files_WriteBytes(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, (void*)s, s__len * 1, i); + Files_WriteBytes(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, s, s__len * 1, i); } void OPM_WriteStringVar (CHAR *s, ADDRESS s__len) @@ -858,7 +858,7 @@ void OPM_WriteStringVar (CHAR *s, ADDRESS s__len) while (s[__X(i, s__len)] != 0x00) { i += 1; } - Files_WriteBytes(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, (void*)s, s__len * 1, i); + Files_WriteBytes(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, s, s__len * 1, i); } void OPM_WriteHex (INT64 i) @@ -976,7 +976,7 @@ static void OPM_Append (Files_Rider *R, ADDRESS *R__typ, Files_File F) Files_Set(&R1, Files_Rider__typ, F, 0); Files_ReadBytes(&R1, Files_Rider__typ, (void*)buffer, 4096, 4096); while (4096 - R1.res > 0) { - Files_WriteBytes(&*R, R__typ, (void*)buffer, 4096, 4096 - R1.res); + Files_WriteBytes(&*R, R__typ, buffer, 4096, 4096 - R1.res); Files_ReadBytes(&R1, Files_Rider__typ, (void*)buffer, 4096, 4096); } } diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 9777874c..d335e885 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1733,11 +1733,11 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) delta = (*(Texts_Piece*)&u)->len; while (delta > 1024) { Files_ReadBytes(&r1, Files_Rider__typ, (void*)block, 1024, 1024); - Files_WriteBytes(&msg.r, Files_Rider__typ, (void*)block, 1024, 1024); + Files_WriteBytes(&msg.r, Files_Rider__typ, block, 1024, 1024); delta -= 1024; } Files_ReadBytes(&r1, Files_Rider__typ, (void*)block, 1024, delta); - Files_WriteBytes(&msg.r, Files_Rider__typ, (void*)block, 1024, delta); + Files_WriteBytes(&msg.r, Files_Rider__typ, block, 1024, delta); } } else __WITHCHK; } else { diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 54bdf415..39a442b5 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -983,7 +983,7 @@ void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x) CHAR b[2]; b[0] = __CHR(x); b[1] = __CHR(__ASHR(x, 8)); - Files_WriteBytes(&*R, R__typ, (void*)b, 2, 2); + Files_WriteBytes(&*R, R__typ, b, 2, 2); } void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x) @@ -993,7 +993,7 @@ void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x) b[1] = __CHR(__ASHR(x, 8)); b[2] = __CHR(__ASHR(x, 16)); b[3] = __CHR(__ASHR(x, 24)); - Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); + Files_WriteBytes(&*R, R__typ, b, 4, 4); } void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x) @@ -1005,21 +1005,21 @@ void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x) b[1] = __CHR(__ASHR(i, 8)); b[2] = __CHR(__ASHR(i, 16)); b[3] = __CHR(__ASHR(i, 24)); - Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); + Files_WriteBytes(&*R, R__typ, b, 4, 4); } void Files_WriteReal (Files_Rider *R, ADDRESS *R__typ, REAL x) { CHAR b[4]; Files_FlipBytes((void*)&x, 4, (void*)b, 4); - Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); + Files_WriteBytes(&*R, R__typ, b, 4, 4); } void Files_WriteLReal (Files_Rider *R, ADDRESS *R__typ, LONGREAL x) { CHAR b[8]; Files_FlipBytes((void*)&x, 8, (void*)b, 8); - Files_WriteBytes(&*R, R__typ, (void*)b, 8, 8); + Files_WriteBytes(&*R, R__typ, b, 8, 8); } void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) @@ -1029,7 +1029,7 @@ void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len while (x[__X(i, x__len)] != 0x00) { i += 1; } - Files_WriteBytes(&*R, R__typ, (void*)x, x__len * 1, i + 1); + Files_WriteBytes(&*R, R__typ, x, x__len * 1, i + 1); } void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x) diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index f72ff5c5..d05cb9ca 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -101,6 +101,9 @@ OPT_Node OPB_NewLeaf (OPT_Object obj) } node->obj = obj; node->typ = obj->typ; + if ((((obj->mode == 1 && __IN(obj->typ->comp, 0x0c, 32))) && obj->typ->sysflag != 0)) { + node->readonly = 1; + } return node; } diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index bd3ede1d..a1f841f0 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -848,7 +848,7 @@ void OPM_WriteString (CHAR *s, ADDRESS s__len) while (s[__X(i, s__len)] != 0x00) { i += 1; } - Files_WriteBytes(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, (void*)s, s__len * 1, i); + Files_WriteBytes(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, s, s__len * 1, i); } void OPM_WriteStringVar (CHAR *s, ADDRESS s__len) @@ -858,7 +858,7 @@ void OPM_WriteStringVar (CHAR *s, ADDRESS s__len) while (s[__X(i, s__len)] != 0x00) { i += 1; } - Files_WriteBytes(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, (void*)s, s__len * 1, i); + Files_WriteBytes(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, s, s__len * 1, i); } void OPM_WriteHex (INT64 i) @@ -976,7 +976,7 @@ static void OPM_Append (Files_Rider *R, ADDRESS *R__typ, Files_File F) Files_Set(&R1, Files_Rider__typ, F, 0); Files_ReadBytes(&R1, Files_Rider__typ, (void*)buffer, 4096, 4096); while (4096 - R1.res > 0) { - Files_WriteBytes(&*R, R__typ, (void*)buffer, 4096, 4096 - R1.res); + Files_WriteBytes(&*R, R__typ, buffer, 4096, 4096 - R1.res); Files_ReadBytes(&R1, Files_Rider__typ, (void*)buffer, 4096, 4096); } } diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 4613a76e..a961b700 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1733,11 +1733,11 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) delta = (*(Texts_Piece*)&u)->len; while (delta > 1024) { Files_ReadBytes(&r1, Files_Rider__typ, (void*)block, 1024, 1024); - Files_WriteBytes(&msg.r, Files_Rider__typ, (void*)block, 1024, 1024); + Files_WriteBytes(&msg.r, Files_Rider__typ, block, 1024, 1024); delta -= 1024; } Files_ReadBytes(&r1, Files_Rider__typ, (void*)block, 1024, delta); - Files_WriteBytes(&msg.r, Files_Rider__typ, (void*)block, 1024, delta); + Files_WriteBytes(&msg.r, Files_Rider__typ, block, 1024, delta); } } else __WITHCHK; } else { diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index b22535a6..8311b466 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -983,7 +983,7 @@ void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x) CHAR b[2]; b[0] = __CHR(x); b[1] = __CHR(__ASHR(x, 8)); - Files_WriteBytes(&*R, R__typ, (void*)b, 2, 2); + Files_WriteBytes(&*R, R__typ, b, 2, 2); } void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x) @@ -993,7 +993,7 @@ void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x) b[1] = __CHR(__ASHR(x, 8)); b[2] = __CHR(__ASHR(x, 16)); b[3] = __CHR(__ASHR(x, 24)); - Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); + Files_WriteBytes(&*R, R__typ, b, 4, 4); } void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x) @@ -1005,21 +1005,21 @@ void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x) b[1] = __CHR(__ASHR(i, 8)); b[2] = __CHR(__ASHR(i, 16)); b[3] = __CHR(__ASHR(i, 24)); - Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); + Files_WriteBytes(&*R, R__typ, b, 4, 4); } void Files_WriteReal (Files_Rider *R, ADDRESS *R__typ, REAL x) { CHAR b[4]; Files_FlipBytes((void*)&x, 4, (void*)b, 4); - Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); + Files_WriteBytes(&*R, R__typ, b, 4, 4); } void Files_WriteLReal (Files_Rider *R, ADDRESS *R__typ, LONGREAL x) { CHAR b[8]; Files_FlipBytes((void*)&x, 8, (void*)b, 8); - Files_WriteBytes(&*R, R__typ, (void*)b, 8, 8); + Files_WriteBytes(&*R, R__typ, b, 8, 8); } void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) @@ -1029,7 +1029,7 @@ void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len while (x[__X(i, x__len)] != 0x00) { i += 1; } - Files_WriteBytes(&*R, R__typ, (void*)x, x__len * 1, i + 1); + Files_WriteBytes(&*R, R__typ, x, x__len * 1, i + 1); } void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x) diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index f72ff5c5..d05cb9ca 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -101,6 +101,9 @@ OPT_Node OPB_NewLeaf (OPT_Object obj) } node->obj = obj; node->typ = obj->typ; + if ((((obj->mode == 1 && __IN(obj->typ->comp, 0x0c, 32))) && obj->typ->sysflag != 0)) { + node->readonly = 1; + } return node; } diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 85e2f3a0..ab64f723 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -848,7 +848,7 @@ void OPM_WriteString (CHAR *s, ADDRESS s__len) while (s[__X(i, s__len)] != 0x00) { i += 1; } - Files_WriteBytes(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, (void*)s, s__len * 1, i); + Files_WriteBytes(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, s, s__len * 1, i); } void OPM_WriteStringVar (CHAR *s, ADDRESS s__len) @@ -858,7 +858,7 @@ void OPM_WriteStringVar (CHAR *s, ADDRESS s__len) while (s[__X(i, s__len)] != 0x00) { i += 1; } - Files_WriteBytes(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, (void*)s, s__len * 1, i); + Files_WriteBytes(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, s, s__len * 1, i); } void OPM_WriteHex (INT64 i) @@ -976,7 +976,7 @@ static void OPM_Append (Files_Rider *R, ADDRESS *R__typ, Files_File F) Files_Set(&R1, Files_Rider__typ, F, 0); Files_ReadBytes(&R1, Files_Rider__typ, (void*)buffer, 4096, 4096); while (4096 - R1.res > 0) { - Files_WriteBytes(&*R, R__typ, (void*)buffer, 4096, 4096 - R1.res); + Files_WriteBytes(&*R, R__typ, buffer, 4096, 4096 - R1.res); Files_ReadBytes(&R1, Files_Rider__typ, (void*)buffer, 4096, 4096); } } diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 9777874c..d335e885 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1733,11 +1733,11 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) delta = (*(Texts_Piece*)&u)->len; while (delta > 1024) { Files_ReadBytes(&r1, Files_Rider__typ, (void*)block, 1024, 1024); - Files_WriteBytes(&msg.r, Files_Rider__typ, (void*)block, 1024, 1024); + Files_WriteBytes(&msg.r, Files_Rider__typ, block, 1024, 1024); delta -= 1024; } Files_ReadBytes(&r1, Files_Rider__typ, (void*)block, 1024, delta); - Files_WriteBytes(&msg.r, Files_Rider__typ, (void*)block, 1024, delta); + Files_WriteBytes(&msg.r, Files_Rider__typ, block, 1024, delta); } } else __WITHCHK; } else { diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 665811a0..5f2dc4a8 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -985,7 +985,7 @@ void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x) CHAR b[2]; b[0] = __CHR(x); b[1] = __CHR(__ASHR(x, 8)); - Files_WriteBytes(&*R, R__typ, (void*)b, 2, 2); + Files_WriteBytes(&*R, R__typ, b, 2, 2); } void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x) @@ -995,7 +995,7 @@ void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x) b[1] = __CHR(__ASHR(x, 8)); b[2] = __CHR(__ASHR(x, 16)); b[3] = __CHR(__ASHR(x, 24)); - Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); + Files_WriteBytes(&*R, R__typ, b, 4, 4); } void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x) @@ -1007,21 +1007,21 @@ void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x) b[1] = __CHR(__ASHR(i, 8)); b[2] = __CHR(__ASHR(i, 16)); b[3] = __CHR(__ASHR(i, 24)); - Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); + Files_WriteBytes(&*R, R__typ, b, 4, 4); } void Files_WriteReal (Files_Rider *R, ADDRESS *R__typ, REAL x) { CHAR b[4]; Files_FlipBytes((void*)&x, 4, (void*)b, 4); - Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); + Files_WriteBytes(&*R, R__typ, b, 4, 4); } void Files_WriteLReal (Files_Rider *R, ADDRESS *R__typ, LONGREAL x) { CHAR b[8]; Files_FlipBytes((void*)&x, 8, (void*)b, 8); - Files_WriteBytes(&*R, R__typ, (void*)b, 8, 8); + Files_WriteBytes(&*R, R__typ, b, 8, 8); } void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) @@ -1031,7 +1031,7 @@ void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len while (x[__X(i, x__len)] != 0x00) { i += 1; } - Files_WriteBytes(&*R, R__typ, (void*)x, x__len * 1, i + 1); + Files_WriteBytes(&*R, R__typ, x, x__len * 1, i + 1); } void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x) diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index f72ff5c5..d05cb9ca 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -101,6 +101,9 @@ OPT_Node OPB_NewLeaf (OPT_Object obj) } node->obj = obj; node->typ = obj->typ; + if ((((obj->mode == 1 && __IN(obj->typ->comp, 0x0c, 32))) && obj->typ->sysflag != 0)) { + node->readonly = 1; + } return node; } diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index bd3ede1d..a1f841f0 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -848,7 +848,7 @@ void OPM_WriteString (CHAR *s, ADDRESS s__len) while (s[__X(i, s__len)] != 0x00) { i += 1; } - Files_WriteBytes(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, (void*)s, s__len * 1, i); + Files_WriteBytes(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, s, s__len * 1, i); } void OPM_WriteStringVar (CHAR *s, ADDRESS s__len) @@ -858,7 +858,7 @@ void OPM_WriteStringVar (CHAR *s, ADDRESS s__len) while (s[__X(i, s__len)] != 0x00) { i += 1; } - Files_WriteBytes(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, (void*)s, s__len * 1, i); + Files_WriteBytes(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, s, s__len * 1, i); } void OPM_WriteHex (INT64 i) @@ -976,7 +976,7 @@ static void OPM_Append (Files_Rider *R, ADDRESS *R__typ, Files_File F) Files_Set(&R1, Files_Rider__typ, F, 0); Files_ReadBytes(&R1, Files_Rider__typ, (void*)buffer, 4096, 4096); while (4096 - R1.res > 0) { - Files_WriteBytes(&*R, R__typ, (void*)buffer, 4096, 4096 - R1.res); + Files_WriteBytes(&*R, R__typ, buffer, 4096, 4096 - R1.res); Files_ReadBytes(&R1, Files_Rider__typ, (void*)buffer, 4096, 4096); } } diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 4613a76e..a961b700 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1733,11 +1733,11 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) delta = (*(Texts_Piece*)&u)->len; while (delta > 1024) { Files_ReadBytes(&r1, Files_Rider__typ, (void*)block, 1024, 1024); - Files_WriteBytes(&msg.r, Files_Rider__typ, (void*)block, 1024, 1024); + Files_WriteBytes(&msg.r, Files_Rider__typ, block, 1024, 1024); delta -= 1024; } Files_ReadBytes(&r1, Files_Rider__typ, (void*)block, 1024, delta); - Files_WriteBytes(&msg.r, Files_Rider__typ, (void*)block, 1024, delta); + Files_WriteBytes(&msg.r, Files_Rider__typ, block, 1024, delta); } } else __WITHCHK; } else {