typ.size aware OPV.Convert

This commit is contained in:
David Brown 2016-08-21 14:59:11 +01:00
parent 731f2215aa
commit 02803ae1fb
16 changed files with 96 additions and 232 deletions

View file

@ -872,13 +872,13 @@ void OPM_WriteReal (LONGREAL r, CHAR suffx)
CHAR s[32];
CHAR ch;
INTEGER i;
if ((((r < OPM_SignedMaximum(OPM_LIntSize) && r > OPM_SignedMinimum(OPM_LIntSize))) && r == (__ENTIER(r)))) {
if ((((r < OPM_SignedMaximum(OPM_LIntSize) && r > OPM_SignedMinimum(OPM_LIntSize))) && r == ((LONGINT)__ENTIER(r)))) {
if (suffx == 'f') {
OPM_WriteString((CHAR*)"(REAL)", (LONGINT)7);
} else {
OPM_WriteString((CHAR*)"(LONGREAL)", (LONGINT)11);
}
OPM_WriteInt(__ENTIER(r));
OPM_WriteInt((LONGINT)__ENTIER(r));
} else {
Texts_OpenWriter(&W, Texts_Writer__typ);
if (suffx == 'f') {