diff options
author | Gaius Mulley <gaiusmod2@gmail.com> | 2023-05-17 17:42:03 +0100 |
---|---|---|
committer | Gaius Mulley <gaiusmod2@gmail.com> | 2023-05-17 17:42:03 +0100 |
commit | f5b246ce5fd95e721f0f418633964f466448d2ae (patch) | |
tree | 3f9491e960cc7a2bd50e904aaf1d0a059bcad63d /gcc/m2 | |
parent | 637edefc5863cf3b572c0c0bcd58fcc01ee60184 (diff) | |
download | gcc-f5b246ce5fd95e721f0f418633964f466448d2ae.zip gcc-f5b246ce5fd95e721f0f418633964f466448d2ae.tar.gz gcc-f5b246ce5fd95e721f0f418633964f466448d2ae.tar.bz2 |
WriteInt in the ISO libraries should not emit '+' for positive values
This trivial patch changes the default behaviour for WriteInt so that
'+' is not emitted when writing positive values.
gcc/m2/ChangeLog:
* gm2-libs-iso/LongWholeIO.mod (WriteInt): Only request a
sign if the value is < 0.
* gm2-libs-iso/ShortWholeIO.mod (WriteInt): Only request a
sign if the value is < 0.
* gm2-libs-iso/WholeIO.mod (WriteInt): Only request a sign
if the value is < 0.
* gm2-libs-iso/WholeStr.mod (WriteInt): Only request a sign
if the value is < 0.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Diffstat (limited to 'gcc/m2')
-rw-r--r-- | gcc/m2/gm2-libs-iso/LongWholeIO.mod | 6 | ||||
-rw-r--r-- | gcc/m2/gm2-libs-iso/ShortWholeIO.mod | 6 | ||||
-rw-r--r-- | gcc/m2/gm2-libs-iso/WholeIO.mod | 6 | ||||
-rw-r--r-- | gcc/m2/gm2-libs-iso/WholeStr.mod | 6 |
4 files changed, 12 insertions, 12 deletions
diff --git a/gcc/m2/gm2-libs-iso/LongWholeIO.mod b/gcc/m2/gm2-libs-iso/LongWholeIO.mod index 252026c..666e109 100644 --- a/gcc/m2/gm2-libs-iso/LongWholeIO.mod +++ b/gcc/m2/gm2-libs-iso/LongWholeIO.mod @@ -116,9 +116,9 @@ PROCEDURE WriteInt (cid: IOChan.ChanId; int: LONGINT; VAR s: String ; BEGIN - s := LongIntegerToString(int, width, ' ', TRUE, 10, FALSE) ; - writeString(cid, s) ; - s := KillString(s) + s := LongIntegerToString (int, width, ' ', int < 0, 10, FALSE) ; + writeString (cid, s) ; + s := KillString (s) END WriteInt ; diff --git a/gcc/m2/gm2-libs-iso/ShortWholeIO.mod b/gcc/m2/gm2-libs-iso/ShortWholeIO.mod index ac244fa..0c7286c 100644 --- a/gcc/m2/gm2-libs-iso/ShortWholeIO.mod +++ b/gcc/m2/gm2-libs-iso/ShortWholeIO.mod @@ -116,9 +116,9 @@ PROCEDURE WriteInt (cid: IOChan.ChanId; int: SHORTINT; VAR s: String ; BEGIN - s := IntegerToString(int, width, ' ', TRUE, 10, FALSE) ; - writeString(cid, s) ; - s := KillString(s) + s := IntegerToString (int, width, ' ', int < 0, 10, FALSE) ; + writeString (cid, s) ; + s := KillString (s) END WriteInt ; diff --git a/gcc/m2/gm2-libs-iso/WholeIO.mod b/gcc/m2/gm2-libs-iso/WholeIO.mod index 0bfe1a8..b8ed377 100644 --- a/gcc/m2/gm2-libs-iso/WholeIO.mod +++ b/gcc/m2/gm2-libs-iso/WholeIO.mod @@ -116,9 +116,9 @@ PROCEDURE WriteInt (cid: IOChan.ChanId; int: INTEGER; VAR s: String ; BEGIN - s := IntegerToString(int, width, ' ', TRUE, 10, FALSE) ; - writeString(cid, s) ; - s := KillString(s) + s := IntegerToString (int, width, ' ', int < 0, 10, FALSE) ; + writeString (cid, s) ; + s := KillString (s) END WriteInt ; diff --git a/gcc/m2/gm2-libs-iso/WholeStr.mod b/gcc/m2/gm2-libs-iso/WholeStr.mod index cbe1572..328246a 100644 --- a/gcc/m2/gm2-libs-iso/WholeStr.mod +++ b/gcc/m2/gm2-libs-iso/WholeStr.mod @@ -57,9 +57,9 @@ PROCEDURE IntToStr (int: INTEGER; VAR str: ARRAY OF CHAR); VAR s: String ; BEGIN - s := IntegerToString(int, 0, ' ', TRUE, 10, FALSE) ; - CopyOut(str, s) ; - s := KillString(s) + s := IntegerToString (int, 0, ' ', int < 0, 10, FALSE) ; + CopyOut (str, s) ; + s := KillString (s) END IntToStr ; |