summaryrefslogtreecommitdiff
path: root/gcc/m2/gm2-libs-iso/LongIO.mod
diff options
context:
space:
mode:
authorGaius Mulley <gaiusmod2@gmail.com>2023-05-17 00:18:56 +0100
committerGaius Mulley <gaiusmod2@gmail.com>2023-05-17 00:18:56 +0100
commit509eef9314b24eff20a5dbdd92f6ab52e2c0c786 (patch)
tree2a98b53840b958c0e75259c03000d4d8bb4c8b70 /gcc/m2/gm2-libs-iso/LongIO.mod
parentf25d2de17663a0132f9fe090dee39d3b1132067b (diff)
downloadgcc-509eef9314b24eff20a5dbdd92f6ab52e2c0c786.tar.gz
PR modula2/109879 WholeIO.ReadCard and ReadInt should consume leading space
The Read{TYPE} procedures in LongIO, LongWholeIO, RealIO, ShortWholeIO and WholeIO all require skip space functionality. A new module TextUtil is supplied with this functionality and the previous modules have been changed to call SkipSpaces. gcc/m2/ChangeLog: PR modula2/109879 * gm2-libs-iso/LongIO.mod (ReadReal): Call SkipSpaces. * gm2-libs-iso/LongWholeIO.mod (ReadInt): Call SkipSpaces. (ReadCard): Call SkipSpaces. * gm2-libs-iso/RealIO.mod (ReadReal): Call SkipSpaces. * gm2-libs-iso/ShortWholeIO.mod: (ReadInt): Call SkipSpaces. (ReadCard): Call SkipSpaces. * gm2-libs-iso/TextIO.mod: Import SkipSpaces. * gm2-libs-iso/WholeIO.mod (ReadInt): Call SkipSpaces. (ReadCard): Call SkipSpaces. * gm2-libs-iso/TextUtil.def: New file. * gm2-libs-iso/TextUtil.mod: New file. libgm2/ChangeLog: PR modula2/109879 * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * libm2cor/Makefile.in: Regenerate. * libm2iso/Makefile.am (M2DEFS): Add TextUtil.def. (M2MODS): Add TextUtil.mod. * libm2iso/Makefile.in: Regenerate. * libm2log/Makefile.in: Regenerate. * libm2min/Makefile.in: Regenerate. * libm2pim/Makefile.in: Regenerate. gcc/testsuite/ChangeLog: PR modula2/109879 * gm2/isolib/run/pass/testreadint.mod: New test. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Diffstat (limited to 'gcc/m2/gm2-libs-iso/LongIO.mod')
-rw-r--r--gcc/m2/gm2-libs-iso/LongIO.mod2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/m2/gm2-libs-iso/LongIO.mod b/gcc/m2/gm2-libs-iso/LongIO.mod
index dd62e32cb4e..40a2a601b63 100644
--- a/gcc/m2/gm2-libs-iso/LongIO.mod
+++ b/gcc/m2/gm2-libs-iso/LongIO.mod
@@ -30,6 +30,7 @@ FROM DynamicStrings IMPORT String, char, KillString, Length, InitString, ConCatC
FROM LongConv IMPORT ScanReal ;
FROM StringChan IMPORT writeString, writeFieldWidth ;
FROM ldtoa IMPORT strtold ;
+FROM TextUtil IMPORT SkipSpaces ;
(* The text form of a signed fixed-point real number is
@@ -55,6 +56,7 @@ VAR
s : String ;
error : BOOLEAN ;
BEGIN
+ SkipSpaces (cid) ;
ReadChar(cid, ch) ;
nextState := ScanReal ;
REPEAT