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/gm2-libs-iso/WholeIO.mod | |
parent | 637edefc5863cf3b572c0c0bcd58fcc01ee60184 (diff) | |
download | gcc-f5b246ce5fd95e721f0f418633964f466448d2ae.tar.gz |
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/gm2-libs-iso/WholeIO.mod')
-rw-r--r-- | gcc/m2/gm2-libs-iso/WholeIO.mod | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/m2/gm2-libs-iso/WholeIO.mod b/gcc/m2/gm2-libs-iso/WholeIO.mod index 0bfe1a8fc0a..b8ed3779739 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 ; |