PR modula2/109879 WholeIO.ReadCard and ReadInt should consume leading space
commit509eef9314b24eff20a5dbdd92f6ab52e2c0c786
authorGaius Mulley <gaiusmod2@gmail.com>
Tue, 16 May 2023 23:18:56 +0000 (17 00:18 +0100)
committerGaius Mulley <gaiusmod2@gmail.com>
Tue, 16 May 2023 23:18:56 +0000 (17 00:18 +0100)
tree2a98b53840b958c0e75259c03000d4d8bb4c8b70
parentf25d2de17663a0132f9fe090dee39d3b1132067b
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>
17 files changed:
gcc/m2/gm2-libs-iso/LongIO.mod
gcc/m2/gm2-libs-iso/LongWholeIO.mod
gcc/m2/gm2-libs-iso/RealIO.mod
gcc/m2/gm2-libs-iso/ShortWholeIO.mod
gcc/m2/gm2-libs-iso/TextIO.mod
gcc/m2/gm2-libs-iso/TextUtil.def [new file with mode: 0644]
gcc/m2/gm2-libs-iso/TextUtil.mod [new file with mode: 0644]
gcc/m2/gm2-libs-iso/WholeIO.mod
gcc/testsuite/gm2/isolib/run/pass/testreadint.mod [new file with mode: 0644]
libgm2/Makefile.in
libgm2/aclocal.m4
libgm2/libm2cor/Makefile.in
libgm2/libm2iso/Makefile.am
libgm2/libm2iso/Makefile.in
libgm2/libm2log/Makefile.in
libgm2/libm2min/Makefile.in
libgm2/libm2pim/Makefile.in