public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/modula-2] Improvements to documentation.
@ 2022-05-13 22:26 Gaius Mulley
  0 siblings, 0 replies; only message in thread
From: Gaius Mulley @ 2022-05-13 22:26 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:db1ed08b563e57a90454252496d16b31faa5aceb

commit db1ed08b563e57a90454252496d16b31faa5aceb
Author: Gaius Mulley <gaius.mulley@southwales.ac.uk>
Date:   Fri May 13 23:24:39 2022 +0100

    Improvements to documentation.
    
    Specifically reducing many of the overful box errors which occur
    when generating the pdf documentation.  Also correcting the
    manual scaffold link examples now that the compiler uses a
    different scaffold naming scheme.
    
    2022-05-13   Gaius Mulley   <gaius.mulley@southwales.ac.uk>
    
    gcc/ChangeLog:
    
            * doc/gm2.texi: Tidied up many overful lines and corrected
            scaffold link examples.  Updated dates.
    
    gcc/m2/ChangeLog:
    
            * gm2-compiler/ppg.mod: Reduced the line wrap marker
            to ensure texi pretty print rules do not cause overful box errors
            in gm2 pdf documentation.
            * gm2-libs-iso/SYSTEM.def: Shorten the comment lines
            and parameter lists per line to avoid overful box errors.
            * gm2-libs/Assertion.def: Shorten the comment lines
            and parameter lists per line to avoid overful box errors.
            * gm2-libs/Builtins.def: Shorten the comment lines
            and parameter lists per line to avoid overful box errors.
            * gm2-libs/Builtins.mod: Name change n to nbytes for memcpy,
            memset and memmove.
            * gm2-libs/DynamicStrings.def: Shorten the comment lines
            and parameter lists per line to avoid overful box errors.
            * gm2-libs/Environment.def: Shorten the comment lines
            and parameter lists per line to avoid overful box errors.
            * gm2-libs/FIO.def: Shorten the comment lines
            and parameter lists per line to avoid overful box errors.
            * gm2-libs/FIO.mod: Shorten the comment lines
            and parameter lists per line to avoid overful box errors.
            * gm2-libs/FormatStrings.def: Shorten the comment lines
            and parameter lists per line to avoid overful box errors.
            * gm2-libs/FpuIO.def: Shorten the comment lines
            and parameter lists per line to avoid overful box errors.
            * gm2-libs/GetOpt.def: Shorten the comment lines
            and parameter lists per line to avoid overful box errors.
            * gm2-libs/SYSTEM.def: Shorten the comment lines
            and parameter lists per line to avoid overful box errors.
    
    Signed-off-by: Gaius Mulley <gaius.mulley@southwales.ac.uk>

Diff:
---
 gcc/doc/gm2.texi                   | 381 ++++++++++++++++++-------------------
 gcc/m2/gm2-compiler/ppg.mod        |   2 +-
 gcc/m2/gm2-libs-iso/SYSTEM.def     |  26 +--
 gcc/m2/gm2-libs/Assertion.def      |   3 +-
 gcc/m2/gm2-libs/Builtins.def       |  30 ++-
 gcc/m2/gm2-libs/Builtins.mod       |  28 +--
 gcc/m2/gm2-libs/DynamicStrings.def |  57 +++---
 gcc/m2/gm2-libs/Environment.def    |   3 +-
 gcc/m2/gm2-libs/FIO.def            |  31 +--
 gcc/m2/gm2-libs/FIO.mod            |  18 +-
 gcc/m2/gm2-libs/FormatStrings.def  |  14 +-
 gcc/m2/gm2-libs/FpuIO.def          |  16 +-
 gcc/m2/gm2-libs/GetOpt.def         |  53 +++---
 gcc/m2/gm2-libs/SYSTEM.def         |  26 +--
 14 files changed, 365 insertions(+), 323 deletions(-)

diff --git a/gcc/doc/gm2.texi b/gcc/doc/gm2.texi
index 6c6f048ccb3..74994480b8b 100644
--- a/gcc/doc/gm2.texi
+++ b/gcc/doc/gm2.texi
@@ -1,6 +1,6 @@
 \input texinfo
 @c -*-texinfo-*-
-@c Copyright (C) 2001-2021 Free Software Foundation, Inc.
+@c Copyright (C) 2001-2022 Free Software Foundation, Inc.
 @c This is part of the GM2 manual.
 
 @c User level documentation for GNU Modula-2
@@ -10,13 +10,13 @@
 @setfilename gm2.info
 @settitle The GNU Modula-2 Compiler
 
-@include version.texi
+@include m2/version.texi
 @set version-python  3.5
 
 @include gcc-common.texi
 
 @c Copyright years for this manual.
-@set copyrights-gm2 1999-2021
+@set copyrights-gm2 1999-2022
 
 @copying
 @c man begin COPYRIGHT
@@ -137,7 +137,6 @@ to name but a few processors.
 The compiler provides semantic analysis and runtime checking (full ISO
 Modula-2 checking is implemented) and there is a plugin which can,
 under certain conditions, detect runtime errors at compile time.
-See @xref{Semantic checking, , ,gm2}.
 
 gm2 can produce swig interface headers to allow access from Python and
 other scripting languages.  The compiler supports PIM2, PIM3, PIM4 and
@@ -155,7 +154,7 @@ builtins (vararg access) and GCC features.
 
 There is an intention to implement the M2R10 dialect of Modula-2 and
 any of the language changes.  If you wish to see something different
-please email @email{gaius.mulley@@southwales.ac.uk} with your ideas.
+please email @email{gm2@@nongnu.org} with your ideas.
 
 @node News, Features, Release map, Using
 @section News
@@ -264,7 +263,7 @@ $ cd ..
 @node Obtaining, Features, Development, Using
 
 GNU Modula-2 is in the process of migrating into the
-@url{https://gcc.gnu.org/git.html, GCC git tree}.  Please see the
+@url{https://gcc.gnu.org/git.html, GCC git tree}.
 @xref{Development, , ,gm2} section in this GM2 documentation for git
 details and @xref{Downloading the source, , ,gcc} in the GCC
 documentation.
@@ -276,9 +275,9 @@ documentation.
 
 @item
 the compiler currently complies with Programming in Modula-2 Edition
-2, 3, 4 and ISO Modula-2.  Users can switch on specific mutually
-exclusive features by using: @samp{-fpim}, @samp{-fpim2},
-@samp{-fpim3}, @samp{-fpim4} or @samp{-fiso}.
+2, 3, 4 and ISO Modula-2.  Users can switch on specific language
+features by using: @samp{-fpim}, @samp{-fpim2}, @samp{-fpim3},
+@samp{-fpim4} or @samp{-fiso}.
 
 @item
 the option @samp{-fswig} will automatically create a swig interface
@@ -318,7 +317,7 @@ easy interface to C, and varargs can be passed to C routines.
 
 @item
 many Logitech libraries have been implemented and can be accessed via:
-@samp{-flibs=m2iso,m2pim}.
+@samp{-flibs=m2log,m2pim,m2iso}.
 
 @item
 coroutines have been implemented in the PIM style and these are
@@ -335,24 +334,37 @@ such as the AVR and the ARM).
 @node Documentation, Regression tests, Features, Using
 @section Documentation
 
-The GNU Modula-2 documentation is available on line or as a
-pdf @url{gm2.pdf}.
+The GNU Modula-2 documentation is available on line
+@url{https://www.nongnu.org/gm2/homepage.html,at the gm2 homepage}
+or in the pdf, info, html file format.
 
 @node Regression tests, Limitations, Documentation, Using
 @section Regression tests for gm2 in the repository
 
-The result of the GNU Modula-2 regression tests for the current
-snapshot are held at
-@url{http://floppsie.comp.glam.ac.uk/gm2-results/regression-tests.html}.
+The regression testsuite can be run from the gcc build directory:
 
-Other combinations almost certainly work, if you successfully
-build gm2 on a different platform please email
-@email{gaius.mulley@@southwales.ac.uk}
-or the
-@email{gm2@@nongnu.org}
-GNU Modula-2
-mailing list. You will need to subscribe to send email to
-the mailing list.
+@example
+$ cd build-gcc
+$ make check -j 24
+@end example
+
+which runs the complete testsuite for all compilers using 24 parallel
+invocations of the compiler.  Individual language testsuites can be
+run by specifying the language, for example the Modula-2 testsuite can
+be run using:
+
+@example
+$ cd build-gcc
+$ make check-m2 -j 24
+@end example
+
+Finally the results of the testsuite can be emailed to the
+@url{https://gcc.gnu.org/lists.html, gcc-testresults} list using the
+script:
+
+@example
+$ @file{gccsrcdir/contrib/test_summary}
+@end example
 
 @node Limitations, Objectives, Regression tests, Using
 @section Limitations
@@ -455,6 +467,20 @@ available}.
 * Other languages::       Other languages for GCC.
 * What is GNU Modula-2::  Brief description of GNU Modula-2.
 * Why use GNU Modula-2::  Advantages of GNU Modula-2.
+@ifnothtml
+@c omit these nodes if generating gm2 webpage as these are hand written.
+* Release map:: Release map.
+* News:: News.
+* Development:: Development.
+* Obtaining:: How to Obtain GNU Modula-2.
+* Features:: Features of the implementation.
+* Documentation:: Placeholder for how to access the documentation online.
+* Regression tests:: How to run the testsuite.
+* Limitations:: Current limitations.
+* Objectives:: Objectives of the implementation.
+* FAQ:: Frequently asked questions.
+* Community:: How to join the community.
+@end ifnothtml
 @end menu
 
 This document contains the user and design issues relevant to the
@@ -494,7 +520,7 @@ This manual only documents the options specific to @command{gm2}.
 
 This section describes how to compile and link a simple hello world
 program.  It provides a few examples of using the different options
-mentioned in @xref{Compiler options, , ,gm2}.  Assuming that you have
+mentioned in @pxref{Compiler options, , ,gm2}.  Assuming that you have
 a file called @file{hello.mod} in your current directory which
 contains:
 
@@ -527,7 +553,7 @@ when trouble shooting.}
 @section Compiler options
 
 This section describes the compiler options specific to GNU Modula-2
-for generic flags details see @xref{Invoking GCC, , ,gcc}.
+for generic flags details @xref{Invoking GCC, , ,gcc}.
 
 @c man begin OPTIONS
 
@@ -593,7 +619,7 @@ generate a shared library from the module.
 
 @item -fmakeinit
 generate the start up C++ code for the module, a file
-@file{_m2_modulename.cpp} is created.  This is an internal command
+@file{modulename_m2.cpp} is created.  This is an internal command
 line option.
 
 @item -fruntime-modules=
@@ -732,7 +758,7 @@ order of modules.
 
 @item -fcpp
 preprocess the source with @samp{cpp -lang-asm -traditional-cpp}
-For further details about these options see @xref{Invocation, , ,cpp}.
+For further details about these options @xref{Invocation, , ,cpp}.
 If @samp{-fcpp} is supplied then all definition modules and
 implementation modules which are parsed will be preprocessed by
 @samp{cpp}.
@@ -742,37 +768,37 @@ turn on ISO standard features. Currently this enables the ISO
 @code{SYSTEM} module and alters the default library search path so
 that the ISO libraries are searched before the PIM libraries.  It also
 effects the behaviour of @code{DIV} and @code{MOD} operators.
-See @xref{Dialect, , ,gm2}.
+@xref{Dialect, , ,gm2}.
 
 @item -fpim
 turn on PIM standard features. Currently this enables the PIM
 @code{SYSTEM} module and determines which identifiers are pervasive
 (declared in the base module). If no other @samp{-fpim[234]} switch is
 used then division and modulus operators behave as defined in PIM4.
-See @xref{Dialect, , ,gm2}.
+@xref{Dialect, , ,gm2}.
 
 @item -fpim2
 turn on PIM-2 standard features. Currently this removes @code{SIZE}
 from being a pervasive identifier (declared in the base module).  It
 places @code{SIZE} in the @code{SYSTEM} module.  It also effects the
 behaviour of @code{DIV} and @code{MOD} operators.
-See @xref{Dialect, , ,gm2}.
+@xref{Dialect, , ,gm2}.
 
 @item -fpim3
 turn on PIM-3 standard features. Currently this only effects the
 behaviour of @code{DIV} and @code{MOD} operators.
-See @xref{Dialect, , ,gm2}.
+@xref{Dialect, , ,gm2}.
 
 @item -fpim4
 turn on PIM-4 standard features. Currently this only effects the
 behaviour of @code{DIV} and @code{MOD} operators.
-See @xref{Dialect, , ,gm2}.
+@xref{Dialect, , ,gm2}.
 
 @item -fpositive-mod-floor-div
 forces the @code{DIV} and @code{MOD} operators to behave as defined by PIM4.
 All modulus results are positive and the results from the division are
 rounded to the floor.
-See @xref{Dialect, , ,gm2}.
+@xref{Dialect, , ,gm2}.
 
 @item -flibs=
 modifies the default library search path.  The libraries supplied are:
@@ -905,7 +931,8 @@ this:
 @example
 $ gm2 -g -c -I. -I../project -I../project/unix foo.mod
 $ gm2 -fonlylink -g -I. -I../project -I../project/unix \
-  -fobject-path=../project/obj -Iobject-path=../project/unix/obj -I. foo.mod
+  -fobject-path=../project/obj -Iobject-path=../project/unix/obj \
+  -I. foo.mod
 @end example
 
 they can be simplified by utilising two environment variables to do
@@ -925,33 +952,6 @@ environment variable paths followed by default runtime libraries or
 Modula-2 dialect libraries.  If in doubt include the @code{-v} option
 to see the search path used between the compiler subcomponents.
 
-Lastly there is the @code{GM2_ROOT} environment variable which
-determines where the compiler subcomponents reside in the
-filesystem.  This environment variable overrides the compiler time
-configure option @code{--prefix=}.  For example suppose the compiler
-was built to reside in @file{/usr/local} and the system administrator
-decided to move the entire compiler tree to
-@file{/architecture/i386/usr}.  Once the tree is moved then a system
-wide environment variable (@code{GM2_ROOT}) could be set to:
-
-@example
-$ export GM2_ROOT=/architecture/i386/usr
-@end example
-
-The system administrator needs to ensure that the front end binary
-@file{gm2} can be seen by the users path.  At that point a user can
-invoke @code{gm2 -g -c -I. hello.mod} from the command line and all
-subcomponents will be picked up from @file{/architecture/i386/usr}.
-This allows users to try out different GNU Modula-2 releases and also
-allows system administrators to install compiler binaries at different
-locations to where they were initially configured to reside.
-
-The environment variable @code{GM2_ROOT} has no effect if either the
-@code{LIBRARY_PATH} or @code{COMPILE_PATH} is set.  The last two
-environment variables are used by @code{gcc}.  However if by mistake
-@code{GM2_ROOT} and either @code{LIBRARY_PATH} or @code{COMPILE_PATH}
-is set then an error message is issued.
-
 @c man end
 
 @node Elementary data types, Standard procedures, Environment variables, Using
@@ -1014,7 +1014,7 @@ functions are: @code{ABS}, @code{CAP}, @code{CHR}, @code{FLOAT},
 @example
 
 (*
-   ABS - returns the positive value of, i.
+   ABS - returns the positive value of i.
 *)
 
 @findex ABS
@@ -1025,8 +1025,8 @@ PROCEDURE ABS (i: <any signed type>) : <any signed type> ;
 @example
 
 (*
-   CAP - returns the capital of character, ch, providing
-         ch lies within the range 'a'..'z'. Otherwise, ch,
+   CAP - returns the capital of character ch providing
+         ch lies within the range 'a'..'z'. Otherwise ch
          is returned unaltered.
 *)
 
@@ -1073,7 +1073,7 @@ PROCEDURE DISPOSE (VAR p:<any pointer type>) ;
    DEC - can either take one or two parameters.  If supplied
          with one parameter then on the completion of the call to
          DEC, v will have its predecessor value.  If two
-         parameters are supplied then the value, v, will have its
+         parameters are supplied then the value v will have its
          n'th predecessor.  For these reasons the value of n
          must be >=0.
 *)
@@ -1085,7 +1085,7 @@ PROCEDURE DEC (VAR v: <any base type>; [n: <any base type> = 1]) ;
 @example
 
 (*
-   EXCL - excludes bit element, e, from a set type, s.
+   EXCL - excludes bit element e from a set type s.
 *)
 
 @findex EXCL
@@ -1095,7 +1095,7 @@ PROCEDURE EXCL (VAR s: <any set type>; e: <element of set type s>) ;
 @example
 
 (*
-   FLOAT - will return a REAL number whose value is the same as, o.
+   FLOAT - will return a REAL number whose value is the same as o.
 *)
 
 @findex FLOAT
@@ -1105,7 +1105,7 @@ PROCEDURE FLOAT (o: <any whole number type>) : REAL ;
 @example
 
 (*
-   FLOATS - will return a SHORTREAL number whose value is the same as, o.
+   FLOATS - will return a SHORTREAL number whose value is the same as o.
 *)
 
 @findex FLOATS
@@ -1115,7 +1115,7 @@ PROCEDURE FLOATS (o: <any whole number type>) : REAL ;
 @example
 
 (*
-   FLOATL - will return a LONGREAL number whose value is the same as, o.
+   FLOATL - will return a LONGREAL number whose value is the same as o.
 *)
 
 @findex FLOATL
@@ -1150,7 +1150,7 @@ PROCEDURE HALT ;
              foo('hello')
           END
 
-          will cause the local variable, c, to contain the value 4
+          will cause the local variable c to contain the value 4
 *)
 
 @findex HIGH
@@ -1163,7 +1163,7 @@ PROCEDURE HIGH (a: ARRAY OF CHAR) : CARDINAL ;
    INC - can either take one or two parameters.  If supplied
          with one parameter then on the completion of the call to
          INC, v will have its successor value.  If two
-         parameters are supplied then the value, v, will have its
+         parameters are supplied then the value v will have its
          n'th successor.  For these reasons the value of n
          must be >=0.
 *)
@@ -1175,7 +1175,7 @@ PROCEDURE INC (VAR v: <any base type>; [n: <any base type> = 1]) ;
 @example
 
 (*
-   INCL - includes bit element, e, to a set type, s.
+   INCL - includes bit element e to a set type s.
 *)
 
 @findex INCL
@@ -1185,7 +1185,7 @@ PROCEDURE INCL (VAR s: <any set type>; e: <element of set type s>) ;
 @example
 
 (*
-   LFLOAT - will return a LONGREAL number whose value is the same as, o.
+   LFLOAT - will return a LONGREAL number whose value is the same as o.
 *)
 
 @findex LFLOAT
@@ -1195,9 +1195,9 @@ PROCEDURE LFLOAT (o: <any whole number type>) : LONGREAL ;
 @example
 
 (*
-   LTRUNC - will return a LONG<type> number whose value is the same as, o.
-            PIM2, PIM3 and ISO Modula-2 will return a LONGCARD
-            whereas PIM4 returns LONGINT.
+   LTRUNC - will return a LONG<type> number whose value is the
+            same as o.  PIM2, PIM3 and ISO Modula-2 will return
+            a LONGCARD whereas PIM4 returns LONGINT.
 *)
 
 @findex LTRUNC
@@ -1235,7 +1235,7 @@ PROCEDURE MAX (t: <ordinal type>) : <ordinal type> ;
          (normally found in the module, Storage.)
 
          In:  a variable p: of any pointer type.
-         Out: variable, p, is set to some allocated memory
+         Out: variable p is set to some allocated memory
               which is large enough to hold all the contents of p^.
 *)
 
@@ -1257,7 +1257,8 @@ PROCEDURE ODD (x: <whole number type>) : BOOLEAN ;
 @example
 
 (*
-   SFLOAT - will return a SHORTREAL number whose value is the same as, o.
+   SFLOAT - will return a SHORTREAL number whose value is the same
+            as o.
 *)
 
 @findex SFLOAT
@@ -1267,9 +1268,9 @@ PROCEDURE SFLOAT (o: <any whole number type>) : SHORTREAL ;
 @example
 
 (*
-   STRUNC - will return a SHORT<type> number whose value is the same as, o.
-            PIM2, PIM3 and ISO Modula-2 will return a SHORTCARD
-            whereas PIM4 returns SHORTINT.
+   STRUNC - will return a SHORT<type> number whose value is the same
+            as o.  PIM2, PIM3 and ISO Modula-2 will return a
+            SHORTCARD whereas PIM4 returns SHORTINT.
 *)
 
 @findex STRUNC
@@ -1279,7 +1280,7 @@ PROCEDURE STRUNC (o: <any floating point type>) : SHORT<type> ;
 @example
 
 (*
-   TRUNC - will return a <type> number whose value is the same as, o.
+   TRUNC - will return a <type> number whose value is the same as o.
            PIM2, PIM3 and ISO Modula-2 will return a CARDINAL
            whereas PIM4 returns INTEGER.
 *)
@@ -1291,9 +1292,9 @@ PROCEDURE TRUNC (o: <any floating point type>) : <type> ;
 @example
 
 (*
-   TRUNCS - will return a <type> number whose value is the same as, o.
-            PIM2, PIM3 and ISO Modula-2 will return a SHORTCARD
-            whereas PIM4 returns SHORTINT.
+   TRUNCS - will return a <type> number whose value is the same
+            as o.  PIM2, PIM3 and ISO Modula-2 will return a
+            SHORTCARD whereas PIM4 returns SHORTINT.
 *)
 
 @findex TRUNCS
@@ -1303,9 +1304,9 @@ PROCEDURE TRUNCS (o: <any floating point type>) : <type> ;
 @example
 
 (*
-   TRUNCL - will return a <type> number whose value is the same as, o.
-            PIM2, PIM3 and ISO Modula-2 will return a LONGCARD
-            whereas PIM4 returns LONGINT.
+   TRUNCL - will return a <type> number whose value is the same
+            as o.  PIM2, PIM3 and ISO Modula-2 will return a
+            LONGCARD whereas PIM4 returns LONGINT.
 *)
 
 @findex TRUNCL
@@ -1315,7 +1316,7 @@ PROCEDURE TRUNCL (o: <any floating point type>) : <type> ;
 @example
 
 (*
-   VAL - converts data, i, of <any simple data type 2> to
+   VAL - converts data i of <any simple data type 2> to
          <any simple data type 1> and returns this value.
          No range checking is performed during this conversion.
 *)
@@ -1346,7 +1347,7 @@ PROCEDURE IM (c: <any complex type>) : <floating point type> ;
 @example
 
 (*
-   INT - returns an INTEGER value which has the same value as, v.
+   INT - returns an INTEGER value which has the same value as v.
          This function is equivalent to: VAL(INTEGER, v).
 *)
 
@@ -1357,7 +1358,7 @@ PROCEDURE INT (v: <any ordinal type>) : INTEGER ;
 @example
 
 (*
-   LENGTH - returns the length of string, a.
+   LENGTH - returns the length of string a.
 *)
 
 @findex LENGTH
@@ -1489,7 +1490,6 @@ Consider the following program:
 @example
 MODULE assignvalue ;  (*!m2iso+gm2*)
 
-
 PROCEDURE bad () : INTEGER ;
 VAR
    i: INTEGER ;
@@ -1498,22 +1498,23 @@ BEGIN
    RETURN i
 END bad ;
 
-
 VAR
    foo: CARDINAL ;
 BEGIN
-   (* the m2rte plugin will detect this as an error, post optimization.  *)
+   (* the m2rte plugin will detect this as an error, post
+      optimization.  *)
    foo := bad ()
 END assignvalue.
 @end example
 
-here we see that the programmer has not seen that the return value
+here we see that the programmer has overlooked that the return value
 from @samp{bad} will cause an overflow to @samp{foo}.  If we compile
 the code with the following options:
 
 @example
 $ gm2 -g -fsoft-check-all -O2 -c assignvalue.mod
-assignvalue.mod:16:0:inevitable that this error will occur at runtime, assignment will result in an overflow
+assignvalue.mod:16:0:inevitable that this error will occur at runtime,
+assignment will result in an overflow
 @end example
 
 The gm2 semantic plugin is automatically run and will generate a
@@ -1534,7 +1535,7 @@ not just restricted to a pointer type providing the
 
 Declarations can be made in any order, whether they are
 types, constants, procedures, nested modules or variables.
-@c (see @xref{Passes, , ,}.)
+@c (@xref{Passes, , ,}.)
 
 GNU Modula-2 also allows programmers to interface to @code{C} and
 assembly language.
@@ -1636,7 +1637,8 @@ FROM DynamicStrings IMPORT String, InitString, InitStringChar, Mark,
 
 (*
 #define InitString(X) InitStringDB(X, __FILE__, __LINE__)
-#define InitStringCharStar(X) InitStringCharStarDB(X, __FILE__, __LINE__)
+#define InitStringCharStar(X) InitStringCharStarDB(X, __FILE__, \
+                                                   __LINE__)
 #define InitStringChar(X) InitStringCharDB(X, __FILE__, __LINE__)
 #define Mult(X,Y) MultDB(X, Y, __FILE__, __LINE__)
 #define Dup(X) DupDB(X, __FILE__, __LINE__)
@@ -2025,13 +2027,13 @@ We also must compile the scaffold.
 @example
 gm2 -c -g -fmakelist c.mod
 gm2 -c -g -fmakeinit -fshared c.mod
-libtool --tag=CC --mode=compile g++ -g -c c_m2.cpp -o _m2_c.lo
+libtool --tag=CC --mode=compile g++ -g -c c_m2.cpp -o c_m2.lo
 @end example
 
 The third step is to link all these @file{.lo} files.
 
 @example
-libtool --mode=link gcc -g _m2_c.lo a.lo b.lo c.lo \
+libtool --mode=link gcc -g c_m2.lo a.lo b.lo c.lo \
         -L$(prefix)/lib64 \
         -rpath `pwd` -lgm2 -lstdc++ -lm -o libabc.la
 @end example
@@ -2042,41 +2044,43 @@ created inside the directory @file{.libs}.
 @node Interface for Python, Producing a Python module, Building a shared library, Using
 @section How to produce swig interface files
 
-This section describes how your Modula-2 implementation modules can be
+This section describes how Modula-2 implementation modules can be
 called from Python (and other scripting languages such as TCL and
 Perl).  GNU Modula-2 can be instructed to create a swig interface when
 it is compiling an implementation module.  Swig then uses the
 interface file to generate all the necessary wrapping to that the
-desired scripting language may access your implementation module.
+desired scripting language may access the implementation module.
 
 Here is an example of how you might call upon the services of the
-Modula-2 library module @code{NumberIO} from Python.
-This example can be found in the directory
-@file{gm2/examples/swig/full-strlib} and can be run using the commands:
+Modula-2 library module @code{NumberIO} from Python3.
+
+The following commands can be used to generate the Python3 module:
 
 @example
-$ cd build-@value{version-GCC}/gcc/gm2/examples/swig/full-strlib
-$ make numberio
-@end example
+export src=@samp{directory to the sources}
+export prefix=@samp{directory to where the compiler is installed}
+gm2 -I$@{src@} -c -g -fswig $@{src@}/../../../gm2-libs/NumberIO.mod
+gm2 -I$@{src@} -c -g -fmakelist $@{src@}/../../../gm2-libs/NumberIO.mod
 
-The build commands can be run individually from the command line via:
+gm2 -I$@{src@} -c -g -fmakeinit -fshared \
+   $@{src@}/../../../gm2-libs/NumberIO.mod
 
-@example
-export yoursrc=@samp{path to the sources}
-export yourprefix=@samp{path to where the compiler is installed}
-export yourpython=@samp{your python version}
-gm2 -I$(yoursrc) -c -g -fswig $(yoursrc)/../../../gm2-libs/NumberIO.mod
-gm2 -I$(yoursrc) -c -g -fmakelist $(yoursrc)/../../../gm2-libs/NumberIO.mod
-gm2 -I$(yoursrc) -c -g -fmakeinit -fshared $(yoursrc)/../../../gm2-libs/NumberIO.mod
-swig -c++ -python NumberIO.i
+swig -c++ -python3 NumberIO.i
+
+libtool --mode=compile g++ -g -c -I$@{src@} NumberIO_m2.cpp \
+  -o NumberIO_m2.lo
+
+libtool --tag=CC --mode=compile gm2 -g -c \
+  -I$@{src@}../../../gm2-libs \
+  $@{src@}/../../../gm2-libs/NumberIO.mod -o NumberIO.lo
 
-libtool --mode=compile g++ -g -c -I$(yoursrc) _m2_NumberIO.cpp -o _m2_NumberIO.lo
-libtool --tag=CC --mode=compile gm2 -g -c -I$(yoursrc)../../../gm2-libs $(yoursrc)/../../../gm2-libs/NumberIO.mod -o NumberIO.lo
-libtool --tag=CC --mode=compile g++ -g -c NumberIO_wrap.cxx -I/usr/include/python$(yourpython) -o NumberIO_wrap.lo
+libtool --tag=CC --mode=compile g++ -g -c NumberIO_wrap.cxx \
+  -I/usr/include/python3 -o NumberIO_wrap.lo
 
-libtool --mode=link gcc -g _m2_NumberIO.lo NumberIO_wrap.lo \
-   -L$(yourprefix)/lib64 \
+libtool --mode=link gcc -g NumberIO_m2.lo NumberIO_wrap.lo \
+   -L$@{prefix@}/lib64 \
    -rpath `pwd` -lgm2 -lstdc++ -lm -o libNumberIO.la
+
 cp .libs/libNumberIO.so _NumberIO.so
 @end example
 
@@ -2093,16 +2097,20 @@ Now it is possible to run the following Python script
 @example
 import NumberIO
 
-print "1234 x 2 =", NumberIO.NumberIO_StrToInt("1234")*2
+print ("1234 x 2 =", NumberIO.NumberIO_StrToInt("1234")*2)
 @end example
 
 like this:
 
 @example
-$ python testnum.py
+$ python3 testnum.py
 1234 x 2 = 2468
 @end example
 
+@xref{Producing a Python module, , ,gm2} for another example which
+uses the @code{UNQUALIFIED} keyword to reduce the module name clutter
+from the viewport of Python3.
+
 @subsection Limitations of automatic generated of Swig files
 
 This section discusses the limitations of automatically generating
@@ -2162,28 +2170,22 @@ block of a procedure.
 @section How to produce a Python module
 
 This section descibes how it is possible to produce a Python module
-from your Modula-2 code.  There are a number of advantages to this
+from Modula-2 code.  There are a number of advantages to this
 approach, it ensures your code reaches a wider audience, maybe it is
-easier to initialize your application in Python, maybe users of your
-code are familiar with Python and can use it to configure your
-application.
+easier to initialize your application in Python.
 
-The examples given here can be found in the source tree
-@file{gcc-@var{version-GCC}/gcc/gm2/examples/gravity/}.  The example used
-here is a pedagogical two dimensional gravity next event simulation.
-The Python module needs to have a clear API, this also needs to be
-placed in a single definition module.  In the gravity simulation
-example this is found in the file:
-@file{gcc-@var{version-GCC}/gcc/gm2/examples/gravity/twoDsim.def}.
-Furthermore the API should only use fundamental pervasive data types
-and strings.  Below is @file{twoDsim.def}:
+The example application here is a pedagogical two dimensional gravity
+next event simulation.  The Python module needs to have a clear API
+which should be placed in a single definition module.  Furthermore the
+API should only use fundamental pervasive data types and strings.
+Below the API is contained in the file @file{twoDsim.def}:
 
 @example
 DEFINITION MODULE twoDsim ;
 
 EXPORT UNQUALIFIED gravity, box, poly3, poly5, poly6, mass,
                    fix, circle, pivot, velocity, accel, fps,
-                   replayRate, simulateFor, addDebugging ;
+                   replayRate, simulateFor ;
 (*
    gravity - turn on gravity at: g m^2
 *)
@@ -2211,7 +2213,8 @@ PROCEDURE poly3 (x0, y0, x1, y1, x2, y2: REAL) : CARDINAL ;
            (x0,y0),(x1,y1),(x2,y2),(x3,y3),(x4,y4)
 *)
 
-PROCEDURE poly5 (x0, y0, x1, y1, x2, y2, x3, y3, x4, y4: REAL) : CARDINAL ;
+PROCEDURE poly5 (x0, y0, x1, y1,
+                 x2, y2, x3, y3, x4, y4: REAL) : CARDINAL ;
 
 
 (*
@@ -2219,7 +2222,9 @@ PROCEDURE poly5 (x0, y0, x1, y1, x2, y2, x3, y3, x4, y4: REAL) : CARDINAL ;
            (x0,y0),(x1,y1),(x2,y2),(x3,y3),(x4,y4),(x5,y5)
 *)
 
-PROCEDURE poly6 (x0, y0, x1, y1, x2, y2, x3, y3, x4, y4, x5, y5: REAL) : CARDINAL ;
+PROCEDURE poly6 (x0, y0, x1, y1,
+                 x2, y2, x3, y3,
+                 x4, y4, x5, y5: REAL) : CARDINAL ;
 
 
 (*
@@ -2244,13 +2249,6 @@ PROCEDURE fix (id: CARDINAL) : CARDINAL ;
 PROCEDURE circle (x0, y0, r: REAL) : CARDINAL ;
 
 
-(*
-   pivot - pivot an object at position, (x0,y0).
-*)
-
-PROCEDURE pivot (x0, y0: REAL; id1: CARDINAL) : CARDINAL ;
-
-
 (*
    velocity - give an object, id, a velocity, vx, vy.
 *)
@@ -2286,46 +2284,38 @@ PROCEDURE replayRate (f: REAL) ;
 PROCEDURE simulateFor (t: REAL) ;
 
 
-(*
-   addDebugging - add a debugging event at time, t, which colours objects,
-                  a, and, b, blue.
-*)
-
-PROCEDURE addDebugging (t: REAL; a, b: CARDINAL) ;
-
-
 END twoDsim.
 @end example
 
-By using the keyword @code{UNQUALIFIED} we ensure that the
+The keyword @code{UNQUALIFIED} can be used to ensure that the
 compiler will provide externally accessible functions
 @code{gravity}, @code{box}, @code{poly3}, @code{poly5}, @code{poly6},
 @code{mass}, @code{fix}, @code{circle}, @code{pivot}, @code{velocity},
-@code{accel}, @code{fps}, @code{replayRate}, @code{simulateFor},
-@code{addDebugging} rather than name mangled alternatives.
-Hence in our Python application we could write:
+@code{accel}, @code{fps}, @code{replayRate}, @code{simulateFor}
+rather than name mangled alternatives.
+Hence in our Python3 application we could write:
 
 @example
-#!/usr/bin/python
+#!/usr/bin/env python3
 
 from twoDsim import *
 
-b = box(0.0, 0.0, 1.0, 1.0)
-b = fix(b)
-c1 = circle(0.7, 0.7, 0.05)
-c1 = mass(c1, 0.01)
-c2 = circle(0.7, 0.1, 0.05)
-c2 = mass(c2, 0.01)
-c2 = fix(c2)
-gravity(-9.81)
-fps(24.0*4.0)
-replayRate(24.0)
-print "creating frames"
+b = box (0.0, 0.0, 1.0, 1.0)
+b = fix (b)
+c1 = circle (0.7, 0.7, 0.05)
+c1 = mass (c1, 0.01)
+c2 = circle (0.7, 0.1, 0.05)
+c2 = mass (c2, 0.01)
+c2 = fix (c2)
+gravity (-9.81)
+fps (24.0*4.0)
+replayRate (24.0)
+print ("creating frames")
 try:
-    simulateFor(1.0)
-    print "all done"
+    simulateFor (1.0)
+    print ("all done")
 except:
-    print "exception raised"
+    print ("exception raised")
 @end example
 
 which accesses the various functions defined and implemented by the
@@ -2337,31 +2327,34 @@ $ gm2 -g -fiso -c -fmakelist twoDsim.mod
 $ gm2 -g -fiso -c -fmakeinit twoDsim.mod
 @end example
 
-Notice that the last command both compiled and produced a swig
-interface file @file{swig.i}.  We now use @code{swig} and @code{gcc}
-to produce and compile the interface wrappers:
+The first command both compiles the source file creating
+@file{twoDsim.o} and produces a swig interface file @file{swig.i}.  We
+now use @code{swig} and @code{g++} to produce and compile the
+interface wrappers:
 
 @example
-$ libtool --mode=compile g++ -g -c _m2_twoDsim.cpp -o _m2_twoDsim.lo
-$ swig -c++ -python twoDsim.i
-$ libtool --mode=compile g++ -c -fPIC twoDsim_wrap.cxx -I/usr/include/python@value{version-python} -o twoDsim_wrap.lo
+$ libtool --mode=compile g++ -g -c twoDsim_m2.cpp -o twoDsim_m2.lo
+$ swig -c++ -python3 twoDsim.i
+$ libtool --mode=compile g++ -c -fPIC twoDsim_wrap.cxx \
+   -I/usr/include/python3 -o twoDsim_wrap.lo
 $ libtool --mode=compile gm2 -g -fPIC -fiso -c deviceGnuPic.mod
 $ libtool --mode=compile gm2 -g -fPIC -fiso -c roots.mod
-$ libtool --mode=compile gm2 -g -fPIC -fiso -c -fswig twoDsim.mod -o twoDsim.lo
+$ libtool --mode=compile gm2 -g -fPIC -fiso -c -fswig \
+   twoDsim.mod -o twoDsim.lo
 @end example
 
 Finally the application is linked into a shared library:
 
 @example
-$ libtool --mode=link gcc -g _m2_twoDsim.lo twoDsim_wrap.lo \
+$ libtool --mode=link gcc -g twoDsim_m2.lo twoDsim_wrap.lo \
   roots.lo deviceGnuPic.lo \
-   -L$(yourprefix)/lib64 \
+   -L$@{prefix@}/lib64 \
    -rpath `pwd` -lgm2 -lstdc++ -lm -o libtwoDsim.la
 cp .libs/libtwoDsim.so _twoDsim.so
 @end example
 
-The library name must start with a @code{_} to comply with the Python
-naming scheme.
+The library name must start with @code{_} to comply with the Python3
+module naming scheme.
 
 @node Interface to C, Assembly language, Producing a Python module, Using
 @section Interfacing GNU Modula-2 to C
@@ -2378,8 +2371,7 @@ unbounded array parameters need no copy, but still use the
 The recommended method of interfacing GNU Modula-2 to C is by telling
 the definition module that the implementation is in the C language.
 This is achieved by using the tokens @code{DEFINITION MODULE FOR "C"}.
-Here is an example which can be found in the source tree
-@file{gcc-@var{version-GCC}/gcc/gm2/examples/callingC/libprintf.def}
+Here is an example @file{libprintf.def}.
 
 @example
 DEFINITION MODULE FOR "C" libprintf ;
@@ -2400,7 +2392,7 @@ semantically matches @code{ARRAY OF CHAR} but since the module is for
 the C language it will be mapped onto @code{char *}. The token
 @code{...} indicates a variable number of arguments (varargs) and all
 parameters passed here are mapped onto their C equivalents. Arrays and
-constant strings are passed as pointers.  Lastly the @code{[ INTEGER ]}
+constant strings are passed as pointers.  Lastly @code{[ INTEGER ]}
 states that the caller can ignore the function return result if desired.
 
 The hello world program can be rewritten as:
@@ -2481,7 +2473,8 @@ PROCEDURE Example (foo, bar: CARDINAL) : CARDINAL ;
 VAR
    myout: CARDINAL ;
 BEGIN
-   ASM VOLATILE ("movq %[left],%%rax; addq %[right],%%rax; movq %%rax,%[output]"
+   ASM VOLATILE (
+    "movq %[left],%%rax; addq %[right],%%rax; movq %%rax,%[output]"
       : [output] "=rm" (myout)                  (* outputs *)
       : [left] "rm" (foo), [right] "rm" (bar)   (* inputs  *)
       : "rax") ;                                (* we trash *)
@@ -2776,7 +2769,7 @@ The following module @code{Builtins.def} enumerates the list of
 built-in functions which can be accessed in GNU Modula-2. It also
 serves to define the parameter and return value for each function:
 
-@include Builtins.texi
+@include m2/Builtins.texi
 
 Although this module exists and will result in the generation of
 in-line code if optimization flags are passed to GNU Modula-2, users
@@ -2788,7 +2781,7 @@ be in-lined you need to specify the @samp{-ffast-math -O} options.
 @node The PIM system module, The ISO system module, Built-ins, Using
 @section The PIM system module
 
-@include SYSTEM-pim.texi
+@include m2/SYSTEM-pim.texi
 
 The different dialects of Modula-2 PIM-[234] and ISO Modula-2 declare
 the function @code{SIZE} in different places.  PIM-[34] and ISO
@@ -2814,7 +2807,7 @@ depend upon the target architecture.
 @node The ISO system module, , The PIM system module, Using
 @section The ISO system module
 
-@include SYSTEM-iso.texi
+@include m2/SYSTEM-iso.texi
 
 The data types @code{CSIZE_T} and @code{CSSIZE_T} are also exported from
 the @code{SYSTEM} module.  The type @code{CSIZE_T} is unsigned and is
@@ -2886,7 +2879,7 @@ with the base language.
 Note that the first six productions are built into the lexical analysis
 phase.
 
-@include gm2-ebnf.texi
+@include m2/gm2-ebnf.texi
 
 @node Libraries, Indices, EBNF, Top
 @chapter PIM and ISO library definitions
@@ -2900,7 +2893,7 @@ This chapter contains M2F, PIM and ISO libraries.
 @c University of Ulm and were originally shipped with the ULM sparc
 @c Modula-2 compiler.
 
-@include gm2-libs.texi
+@include m2/gm2-libs.texi
 
 @node Indices, , Libraries, Top
 @section Indices
diff --git a/gcc/m2/gm2-compiler/ppg.mod b/gcc/m2/gm2-compiler/ppg.mod
index 6bb273c3630..f44046fb681 100644
--- a/gcc/m2/gm2-compiler/ppg.mod
+++ b/gcc/m2/gm2-compiler/ppg.mod
@@ -52,7 +52,7 @@ CONST
 
    (* formatting constants *)
    BaseRightLimit    = 75 ;
-   BaseRightMargin   = 60 ;
+   BaseRightMargin   = 50 ;
    BaseNewLine       =  3 ;
 
 TYPE
diff --git a/gcc/m2/gm2-libs-iso/SYSTEM.def b/gcc/m2/gm2-libs-iso/SYSTEM.def
index 8b057766e46..21ef07184dc 100644
--- a/gcc/m2/gm2-libs-iso/SYSTEM.def
+++ b/gcc/m2/gm2-libs-iso/SYSTEM.def
@@ -122,9 +122,10 @@ PROCEDURE TSIZE (<type>; ... ): CARDINAL;
 PROCEDURE THROW (i: INTEGER) ;
   (*
      THROW is a GNU extension and was not part of the PIM or ISO
-     standards.  It throws an exception which will be caught by the EXCEPT
-     block (assuming it exists).  This is a compiler builtin function which
-     interfaces to the GCC exception handling runtime system.
+     standards.  It throws an exception which will be caught by the
+     EXCEPT block (assuming it exists).  This is a compiler builtin
+     function which interfaces to the GCC exception handling runtime
+     system.
      GCC uses the term throw, hence the naming distinction between
      the GCC builtin and the Modula-2 runtime library procedure Raise.
      The later library procedure Raise will call SYSTEM.THROW after
@@ -161,8 +162,8 @@ PROCEDURE ShiftVal (VAR s, d: ARRAY OF BITSET;
 (*
    ShiftLeft - performs the shift left for a multi word set.
                This procedure might be called by the back end of
-               GNU Modula-2 depending whether amount is known at compile
-               time.
+               GNU Modula-2 depending whether amount is known at
+               compile time.
 *)
 
 PROCEDURE ShiftLeft (VAR s, d: ARRAY OF BITSET;
@@ -172,8 +173,8 @@ PROCEDURE ShiftLeft (VAR s, d: ARRAY OF BITSET;
 (*
    ShiftRight - performs the shift left for a multi word set.
                 This procedure might be called by the back end of
-                GNU Modula-2 depending whether amount is known at compile
-                time.
+                GNU Modula-2 depending whether amount is known at
+                compile time.
 *)
 
 PROCEDURE ShiftRight (VAR s, d: ARRAY OF BITSET;
@@ -185,7 +186,8 @@ PROCEDURE ShiftRight (VAR s, d: ARRAY OF BITSET;
    RotateVal - is a runtime procedure whose job is to implement
                the ROTATE procedure of ISO SYSTEM. GNU Modula-2 will
                inline a ROTATE of a single WORD (or less)
-               sized set and will only call this routine for larger sets.
+               sized set and will only call this routine for larger
+               sets.
 *)
 
 PROCEDURE RotateVal (VAR s, d: ARRAY OF BITSET;
@@ -196,8 +198,8 @@ PROCEDURE RotateVal (VAR s, d: ARRAY OF BITSET;
 (*
    RotateLeft - performs the rotate left for a multi word set.
                 This procedure might be called by the back end of
-                GNU Modula-2 depending whether amount is known at compile
-                time.
+                GNU Modula-2 depending whether amount is known at
+                compile time.
 *)
 
 PROCEDURE RotateLeft (VAR s, d: ARRAY OF BITSET;
@@ -208,8 +210,8 @@ PROCEDURE RotateLeft (VAR s, d: ARRAY OF BITSET;
 (*
    RotateRight - performs the rotate right for a multi word set.
                  This procedure might be called by the back end of
-                 GNU Modula-2 depending whether amount is known at compile
-                 time.
+                 GNU Modula-2 depending whether amount is known at
+                 compile time.
 *)
 
 PROCEDURE RotateRight (VAR s, d: ARRAY OF BITSET;
diff --git a/gcc/m2/gm2-libs/Assertion.def b/gcc/m2/gm2-libs/Assertion.def
index 157d24e49f0..9658717f896 100644
--- a/gcc/m2/gm2-libs/Assertion.def
+++ b/gcc/m2/gm2-libs/Assertion.def
@@ -30,7 +30,8 @@ EXPORT QUALIFIED Assert ;
 
 
 (*
-   Assert - tests the boolean Condition, if it fails then HALT is called.
+   Assert - tests the boolean Condition, if it fails then HALT
+            is called.
 *)
 
 PROCEDURE Assert (Condition: BOOLEAN) ;
diff --git a/gcc/m2/gm2-libs/Builtins.def b/gcc/m2/gm2-libs/Builtins.def
index 4bbff713799..1c321691317 100644
--- a/gcc/m2/gm2-libs/Builtins.def
+++ b/gcc/m2/gm2-libs/Builtins.def
@@ -83,7 +83,8 @@ PROCEDURE __BUILTIN__ significandf (s: SHORTREAL) : SHORTREAL ;
 PROCEDURE __BUILTIN__ significandl (l: LONGREAL) : LONGREAL ;
 
 PROCEDURE __BUILTIN__ modf (x: REAL; VAR y: REAL) : REAL ;
-PROCEDURE __BUILTIN__ modff (x: SHORTREAL; VAR y: SHORTREAL) : SHORTREAL ;
+PROCEDURE __BUILTIN__ modff (x: SHORTREAL;
+                             VAR y: SHORTREAL) : SHORTREAL ;
 PROCEDURE __BUILTIN__ modfl (x: LONGREAL; VAR y: LONGREAL) : LONGREAL ;
 
 PROCEDURE __BUILTIN__ signbit (r: REAL) : INTEGER ;
@@ -124,9 +125,11 @@ PROCEDURE __BUILTIN__ conjf (z: SHORTCOMPLEX) : SHORTCOMPLEX ;
 PROCEDURE __BUILTIN__ conj (z: COMPLEX) : COMPLEX ;
 PROCEDURE __BUILTIN__ conjl (z: LONGCOMPLEX) : LONGCOMPLEX ;
 
-PROCEDURE __BUILTIN__ cpowerf (base: SHORTCOMPLEX; exp: SHORTREAL) : SHORTCOMPLEX ;
+PROCEDURE __BUILTIN__ cpowerf (base: SHORTCOMPLEX;
+                               exp: SHORTREAL) : SHORTCOMPLEX ;
 PROCEDURE __BUILTIN__ cpower (base: COMPLEX; exp: REAL) : COMPLEX ;
-PROCEDURE __BUILTIN__ cpowerl (base: LONGCOMPLEX; exp: LONGREAL) : LONGCOMPLEX ;
+PROCEDURE __BUILTIN__ cpowerl (base: LONGCOMPLEX;
+                               exp: LONGREAL) : LONGCOMPLEX ;
 
 PROCEDURE __BUILTIN__ csqrtf (z: SHORTCOMPLEX) : SHORTCOMPLEX ;
 PROCEDURE __BUILTIN__ csqrt (z: COMPLEX) : COMPLEX ;
@@ -167,18 +170,25 @@ PROCEDURE __BUILTIN__ carctanl (z: LONGCOMPLEX) : LONGCOMPLEX ;
 (* memory and string intrincic procedure functions *)
 
 PROCEDURE __BUILTIN__ alloca (i: CARDINAL) : ADDRESS ;
-PROCEDURE __BUILTIN__ memcpy (dest, src: ADDRESS; n: CARDINAL) : ADDRESS ;
+PROCEDURE __BUILTIN__ memcpy (dest, src: ADDRESS;
+                              nbytes: CARDINAL) : ADDRESS ;
 PROCEDURE __BUILTIN__ index (s: ADDRESS; c: INTEGER) : ADDRESS ;
 PROCEDURE __BUILTIN__ rindex (s: ADDRESS; c: INTEGER) : ADDRESS ;
-PROCEDURE __BUILTIN__ memcmp (s1, s2: ADDRESS; n: CARDINAL) : INTEGER ;
-PROCEDURE __BUILTIN__ memset (s: ADDRESS; c: INTEGER; n: CARDINAL) : ADDRESS ;
-PROCEDURE __BUILTIN__ memmove (s1, s2: ADDRESS; n: CARDINAL) : ADDRESS ;
+PROCEDURE __BUILTIN__ memcmp (s1, s2: ADDRESS;
+                              nbytes: CARDINAL) : INTEGER ;
+PROCEDURE __BUILTIN__ memset (s: ADDRESS; c: INTEGER;
+                              nbytes: CARDINAL) : ADDRESS ;
+PROCEDURE __BUILTIN__ memmove (s1, s2: ADDRESS;
+                               nbytes: CARDINAL) : ADDRESS ;
 PROCEDURE __BUILTIN__ strcat (dest, src: ADDRESS) : ADDRESS ;
-PROCEDURE __BUILTIN__ strncat (dest, src: ADDRESS; n: CARDINAL) : ADDRESS ;
+PROCEDURE __BUILTIN__ strncat (dest, src: ADDRESS;
+                               nbytes: CARDINAL) : ADDRESS ;
 PROCEDURE __BUILTIN__ strcpy (dest, src: ADDRESS) : ADDRESS ;
-PROCEDURE __BUILTIN__ strncpy (dest, src: ADDRESS; n: CARDINAL) : ADDRESS ;
+PROCEDURE __BUILTIN__ strncpy (dest, src: ADDRESS;
+                               nbytes: CARDINAL) : ADDRESS ;
 PROCEDURE __BUILTIN__ strcmp (s1, s2: ADDRESS) : INTEGER ;
-PROCEDURE __BUILTIN__ strncmp (s1, s2: ADDRESS; n: CARDINAL) : INTEGER ;
+PROCEDURE __BUILTIN__ strncmp (s1, s2: ADDRESS;
+                               nbytes: CARDINAL) : INTEGER ;
 PROCEDURE __BUILTIN__ strlen (s: ADDRESS) : INTEGER ;
 PROCEDURE __BUILTIN__ strstr (haystack, needle: ADDRESS) : ADDRESS ;
 PROCEDURE __BUILTIN__ strpbrk (s, accept: ADDRESS) : ADDRESS ;
diff --git a/gcc/m2/gm2-libs/Builtins.mod b/gcc/m2/gm2-libs/Builtins.mod
index 172b0781bfd..c679259dc3c 100644
--- a/gcc/m2/gm2-libs/Builtins.mod
+++ b/gcc/m2/gm2-libs/Builtins.mod
@@ -47,14 +47,14 @@ BEGIN
    RETURN returned
 END alloca_trace ;
 
-PROCEDURE __ATTRIBUTE__ __BUILTIN__ ((__builtin_memcpy)) memcpy (dest, src: ADDRESS; n: CARDINAL) : ADDRESS ;
+PROCEDURE __ATTRIBUTE__ __BUILTIN__ ((__builtin_memcpy)) memcpy (dest, src: ADDRESS; nbytes: CARDINAL) : ADDRESS ;
 BEGIN
    (* hopefully the compiler will choose to use the __builtin_memcpy function within GCC.
       This call is here just in case it cannot. Ie if the user sets a procedure variable to
       memcpy, then clearly the compiler cannot inline such a call and thus it will
       be forced into calling this function.
    *)
-   RETURN cbuiltin.memcpy (dest, src, n)
+   RETURN cbuiltin.memcpy (dest, src, nbytes)
 END memcpy ;
 
 PROCEDURE __ATTRIBUTE__  __BUILTIN__ ((__builtin_isfinite)) isfinitef (x: SHORTREAL) : BOOLEAN ;
@@ -547,19 +547,19 @@ BEGIN
    RETURN cbuiltin.rindex (s, c)
 END rindex ;
 
-PROCEDURE __ATTRIBUTE__  __BUILTIN__ ((__builtin_memcmp)) memcmp (s1, s2: ADDRESS; n: CARDINAL) : INTEGER ;
+PROCEDURE __ATTRIBUTE__  __BUILTIN__ ((__builtin_memcmp)) memcmp (s1, s2: ADDRESS; nbytes: CARDINAL) : INTEGER ;
 BEGIN
-   RETURN cbuiltin.memcmp (s1, s2, n)
+   RETURN cbuiltin.memcmp (s1, s2, nbytes)
 END memcmp ;
 
-PROCEDURE __ATTRIBUTE__  __BUILTIN__ ((__builtin_memset)) memset (s: ADDRESS; c: INTEGER; n: CARDINAL) : ADDRESS ;
+PROCEDURE __ATTRIBUTE__  __BUILTIN__ ((__builtin_memset)) memset (s: ADDRESS; c: INTEGER; nbytes: CARDINAL) : ADDRESS ;
 BEGIN
-   RETURN cbuiltin.memset (s, c, n)
+   RETURN cbuiltin.memset (s, c, nbytes)
 END memset ;
 
-PROCEDURE __ATTRIBUTE__  __BUILTIN__ ((__builtin_memmove)) memmove (s1, s2: ADDRESS; n: CARDINAL) : ADDRESS ;
+PROCEDURE __ATTRIBUTE__  __BUILTIN__ ((__builtin_memmove)) memmove (s1, s2: ADDRESS; nbytes: CARDINAL) : ADDRESS ;
 BEGIN
-   RETURN cbuiltin.memmove (s1, s2, n)
+   RETURN cbuiltin.memmove (s1, s2, nbytes)
 END memmove ;
 
 PROCEDURE __ATTRIBUTE__  __BUILTIN__ ((__builtin_strcat)) strcat (dest, src: ADDRESS) : ADDRESS ;
@@ -567,9 +567,9 @@ BEGIN
    RETURN cbuiltin.strcat (dest, src)
 END strcat ;
 
-PROCEDURE __ATTRIBUTE__  __BUILTIN__ ((__builtin_strncat)) strncat (dest, src: ADDRESS; n: CARDINAL) : ADDRESS ;
+PROCEDURE __ATTRIBUTE__  __BUILTIN__ ((__builtin_strncat)) strncat (dest, src: ADDRESS; nbytes: CARDINAL) : ADDRESS ;
 BEGIN
-   RETURN cbuiltin.strncat (dest, src, n)
+   RETURN cbuiltin.strncat (dest, src, nbytes)
 END strncat ;
 
 PROCEDURE __ATTRIBUTE__  __BUILTIN__ ((__builtin_strcpy)) strcpy (dest, src: ADDRESS) : ADDRESS ;
@@ -577,9 +577,9 @@ BEGIN
    RETURN cbuiltin.strcpy (dest, src)
 END strcpy ;
 
-PROCEDURE __ATTRIBUTE__  __BUILTIN__ ((__builtin_strncpy)) strncpy (dest, src: ADDRESS; n: CARDINAL) : ADDRESS ;
+PROCEDURE __ATTRIBUTE__  __BUILTIN__ ((__builtin_strncpy)) strncpy (dest, src: ADDRESS; nbytes: CARDINAL) : ADDRESS ;
 BEGIN
-   RETURN cbuiltin.strncpy (dest, src, n)
+   RETURN cbuiltin.strncpy (dest, src, nbytes)
 END strncpy ;
 
 PROCEDURE __ATTRIBUTE__  __BUILTIN__ ((__builtin_strcmp)) strcmp (s1, s2: ADDRESS) : INTEGER ;
@@ -587,9 +587,9 @@ BEGIN
    RETURN cbuiltin.strcmp (s1, s2)
 END strcmp ;
 
-PROCEDURE __ATTRIBUTE__  __BUILTIN__ ((__builtin_strncmp)) strncmp (s1, s2: ADDRESS; n: CARDINAL) : INTEGER ;
+PROCEDURE __ATTRIBUTE__  __BUILTIN__ ((__builtin_strncmp)) strncmp (s1, s2: ADDRESS; nbytes: CARDINAL) : INTEGER ;
 BEGIN
-   RETURN cbuiltin.strncmp (s1, s2, n)
+   RETURN cbuiltin.strncmp (s1, s2, nbytes)
 END strncmp ;
 
 PROCEDURE __ATTRIBUTE__  __BUILTIN__ ((__builtin_strlen)) strlen (s: ADDRESS) : INTEGER ;
diff --git a/gcc/m2/gm2-libs/DynamicStrings.def b/gcc/m2/gm2-libs/DynamicStrings.def
index 5fcde955d87..c234e574069 100644
--- a/gcc/m2/gm2-libs/DynamicStrings.def
+++ b/gcc/m2/gm2-libs/DynamicStrings.def
@@ -28,8 +28,8 @@ DEFINITION MODULE DynamicStrings ;
 
 FROM SYSTEM IMPORT ADDRESS ;
 EXPORT QUALIFIED String,
-                 InitString, KillString, Fin, InitStringCharStar, InitStringChar,
-                 Index, RIndex,
+                 InitString, KillString, Fin, InitStringCharStar,
+                 InitStringChar, Index, RIndex,
                  Mark, Length, ConCat, ConCatChar, Assign, Dup, Add,
                  Equal, EqualCharStar, EqualArray, ToUpper, ToLower,
                  CopyOut, Mult, Slice,
@@ -69,14 +69,16 @@ PROCEDURE Fin (s: String) ;
 
 
 (*
-   InitStringCharStar - initializes and returns a String to contain the C string.
+   InitStringCharStar - initializes and returns a String to contain
+                        the C string.
 *)
 
 PROCEDURE InitStringCharStar (a: ADDRESS) : String ;
 
 
 (*
-   InitStringChar - initializes and returns a String to contain the single character, ch.
+   InitStringChar - initializes and returns a String to contain the
+                    single character, ch.
 *)
 
 PROCEDURE InitStringChar (ch: CHAR) : String ;
@@ -97,14 +99,16 @@ PROCEDURE Length (s: String) : CARDINAL ;
 
 
 (*
-   ConCat - returns String, a, after the contents of, b, have been appended.
+   ConCat - returns String, a, after the contents of, b,
+            have been appended.
 *)
 
 PROCEDURE ConCat (a, b: String) : String ;
 
 
 (*
-   ConCatChar - returns String, a, after character, ch, has been appended.
+   ConCatChar - returns String, a, after character, ch,
+                has been appended.
 *)
 
 PROCEDURE ConCatChar (a: String; ch: CHAR) : String ;
@@ -140,16 +144,16 @@ PROCEDURE Equal (a, b: String) : BOOLEAN ;
 
 
 (*
-   EqualCharStar - returns TRUE if contents of String, s, is the same as the
-                   string, a.
+   EqualCharStar - returns TRUE if contents of String, s, is
+                   the same as the string, a.
 *)
 
 PROCEDURE EqualCharStar (s: String; a: ADDRESS) : BOOLEAN ;
 
 
 (*
-   EqualArray - returns TRUE if contents of String, s, is the same as the
-                string, a.
+   EqualArray - returns TRUE if contents of String, s, is the
+                same as the string, a.
 *)
 
 PROCEDURE EqualArray (s: String; a: ARRAY OF CHAR) : BOOLEAN ;
@@ -201,7 +205,8 @@ PROCEDURE RIndex (s: String; ch: CHAR; o: CARDINAL) : INTEGER ;
                    which indicates anything to its right is a comment
                    then strip off the comment and also any white space
                    on the remaining right hand side.
-                   It leaves any white space on the left hand side alone.
+                   It leaves any white space on the left hand side
+                   alone.
 *)
 
 PROCEDURE RemoveComment (s: String; comment: CHAR) : String ;
@@ -224,8 +229,8 @@ PROCEDURE RemoveWhitePostfix (s: String) : String ;
 
 
 (*
-   ToUpper - returns string, s, after it has had its lower case characters
-             replaced by upper case characters.
+   ToUpper - returns string, s, after it has had its lower case
+             characters replaced by upper case characters.
              The string, s, is not duplicated.
 *)
 
@@ -233,8 +238,8 @@ PROCEDURE ToUpper (s: String) : String ;
 
 
 (*
-   ToLower - returns string, s, after it has had its upper case characters
-             replaced by lower case characters.
+   ToLower - returns string, s, after it has had its upper case
+             characters replaced by lower case characters.
              The string, s, is not duplicated.
 *)
 
@@ -275,7 +280,8 @@ PROCEDURE string (s: String) : ADDRESS ;
    use the following macro processing defines:
 
    #define InitString(X) InitStringDB(X, __FILE__, __LINE__)
-   #define InitStringCharStar(X) InitStringCharStarDB(X, __FILE__, __LINE__)
+   #define InitStringCharStar(X) InitStringCharStarDB(X, \
+     __FILE__, __LINE__)
    #define InitStringChar(X) InitStringCharDB(X, __FILE__, __LINE__)
    #define Mult(X,Y) MultDB(X, Y, __FILE__, __LINE__)
    #define Dup(X) DupDB(X, __FILE__, __LINE__)
@@ -298,7 +304,8 @@ PROCEDURE InitStringDB (a: ARRAY OF CHAR;
 *)
 
 PROCEDURE InitStringCharStarDB (a: ADDRESS;
-                                file: ARRAY OF CHAR; line: CARDINAL) : String ;
+                                file: ARRAY OF CHAR;
+                                line: CARDINAL) : String ;
 
 
 (*
@@ -306,7 +313,8 @@ PROCEDURE InitStringCharStarDB (a: ADDRESS;
 *)
 
 PROCEDURE InitStringCharDB (ch: CHAR;
-                            file: ARRAY OF CHAR; line: CARDINAL) : String ;
+                            file: ARRAY OF CHAR;
+                            line: CARDINAL) : String ;
 
 
 (*
@@ -352,13 +360,14 @@ PROCEDURE PopAllocation (halt: BOOLEAN) ;
 
 
 (*
-   PopAllocationExemption - test to see that all strings are deallocated, except
-                            string, e, since the last push.
-                            Then it pops to the previous allocation/deallocation
-                            lists.
+   PopAllocationExemption - test to see that all strings are
+                            deallocated, except string, e, since
+                            the last push.
+                            Then it pops to the previous
+                            allocation/deallocation lists.
 
-                            If halt is true then the application terminates
-                            with an exit code of 1.
+                            If halt is true then the application
+                            terminates with an exit code of 1.
 
                             The string, e, is returned unmodified,
 *)
diff --git a/gcc/m2/gm2-libs/Environment.def b/gcc/m2/gm2-libs/Environment.def
index 093326e481c..9c5d1348a22 100644
--- a/gcc/m2/gm2-libs/Environment.def
+++ b/gcc/m2/gm2-libs/Environment.def
@@ -41,7 +41,8 @@ PROCEDURE GetEnvironment (Env: ARRAY OF CHAR;
 
 
 (*
-   PutEnvironment - change or add an environment variable definition EnvDef.
+   PutEnvironment - change or add an environment variable definition
+                    EnvDef.
                     TRUE is returned if the environment variable was
                     set or changed successfully.
 *)
diff --git a/gcc/m2/gm2-libs/FIO.def b/gcc/m2/gm2-libs/FIO.def
index 0a1b6333348..6e2b39c5a20 100644
--- a/gcc/m2/gm2-libs/FIO.def
+++ b/gcc/m2/gm2-libs/FIO.def
@@ -109,13 +109,15 @@ PROCEDURE OpenToWrite (fname: ARRAY OF CHAR) : File ;
                    calling IsNoError.
                    towrite, determines whether the file should be
                    opened for writing or reading.
-                   newfile, determines whether a file should be created
-                   if towrite is TRUE or whether the previous file should
-                   be left alone, allowing this descriptor to seek
+                   newfile, determines whether a file should be
+                   created if towrite is TRUE or whether the
+                   previous file should be left alone,
+                   allowing this descriptor to seek
                    and modify an existing file.
 *)
 
-PROCEDURE OpenForRandom (fname: ARRAY OF CHAR; towrite, newfile: BOOLEAN) : File ;
+PROCEDURE OpenForRandom (fname: ARRAY OF CHAR;
+                         towrite, newfile: BOOLEAN) : File ;
 
 
 (*
@@ -134,7 +136,8 @@ PROCEDURE Close (f: File) ;
 PROCEDURE exists        (fname: ADDRESS; flength: CARDINAL) : BOOLEAN ;
 PROCEDURE openToRead    (fname: ADDRESS; flength: CARDINAL) : File ;
 PROCEDURE openToWrite   (fname: ADDRESS; flength: CARDINAL) : File ;
-PROCEDURE openForRandom (fname: ADDRESS; flength: CARDINAL; towrite, newfile: BOOLEAN) : File ;
+PROCEDURE openForRandom (fname: ADDRESS; flength: CARDINAL;
+                         towrite, newfile: BOOLEAN) : File ;
 
 
 (*
@@ -145,13 +148,14 @@ PROCEDURE FlushBuffer (f: File) ;
 
 
 (*
-   ReadNBytes - reads nBytes of a file into memory area, a, returning
+   ReadNBytes - reads nBytes of a file into memory area, dest, returning
                 the number of bytes actually read.
                 This function will consume from the buffer and then
                 perform direct libc reads. It is ideal for large reads.
 *)
 
-PROCEDURE ReadNBytes (f: File; nBytes: CARDINAL; a: ADDRESS) : CARDINAL ;
+PROCEDURE ReadNBytes (f: File; nBytes: CARDINAL;
+                      dest: ADDRESS) : CARDINAL ;
 
 
 (*
@@ -164,14 +168,15 @@ PROCEDURE ReadAny (f: File; VAR a: ARRAY OF BYTE) ;
 
 
 (*
-   WriteNBytes - writes nBytes of a file into memory area, a, returning
-                 the number of bytes actually written.
+   WriteNBytes - writes nBytes from memory area src to a file
+                 returning the number of bytes actually written.
                  This function will flush the buffer and then
                  write the nBytes using a direct write from libc.
                  It is ideal for large writes.
 *)
 
-PROCEDURE WriteNBytes (f: File; nBytes: CARDINAL; a: ADDRESS) : CARDINAL ;
+PROCEDURE WriteNBytes (f: File; nBytes: CARDINAL;
+                       src: ADDRESS) : CARDINAL ;
 
 
 (*
@@ -286,7 +291,8 @@ PROCEDURE GetUnixFileDescriptor (f: File) : INTEGER ;
 
 
 (*
-   SetPositionFromBeginning - sets the position from the beginning of the file.
+   SetPositionFromBeginning - sets the position from the beginning
+                              of the file.
 *)
 
 PROCEDURE SetPositionFromBeginning (f: File; pos: LONGINT) ;
@@ -321,7 +327,8 @@ PROCEDURE getFileName (f: File) : ADDRESS ;
 
 
 (*
-   getFileNameLength - returns the number of characters associated with filename, f.
+   getFileNameLength - returns the number of characters associated with
+                       filename, f.
 *)
 
 PROCEDURE getFileNameLength (f: File) : CARDINAL ;
diff --git a/gcc/m2/gm2-libs/FIO.mod b/gcc/m2/gm2-libs/FIO.mod
index d14f24e92a0..c8a53e43df1 100644
--- a/gcc/m2/gm2-libs/FIO.mod
+++ b/gcc/m2/gm2-libs/FIO.mod
@@ -1,6 +1,6 @@
 (* FIO.mod provides a simple buffered file input/output library.
 
-Copyright (C) 2001-2021 Free Software Foundation, Inc.
+Copyright (C) 2001-2022 Free Software Foundation, Inc.
 Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
 
 This file is part of GNU Modula-2.
@@ -626,13 +626,13 @@ END ReadFromBuffer ;
 
 
 (*
-   ReadNBytes - reads nBytes of a file into memory area, a, returning
+   ReadNBytes - reads nBytes of a file into memory area, dest, returning
                 the number of bytes actually read.
                 This function will consume from the buffer and then
                 perform direct libc reads. It is ideal for large reads.
 *)
 
-PROCEDURE ReadNBytes (f: File; nBytes: CARDINAL; a: ADDRESS) : CARDINAL ;
+PROCEDURE ReadNBytes (f: File; nBytes: CARDINAL; dest: ADDRESS) : CARDINAL ;
 VAR
    n: INTEGER ;
    p: POINTER TO CHAR ;
@@ -640,12 +640,12 @@ BEGIN
    IF f # Error
    THEN
       CheckAccess (f, openedforread, FALSE) ;
-      n := ReadFromBuffer (f, a, nBytes) ;
+      n := ReadFromBuffer (f, dest, nBytes) ;
       IF n <= 0
       THEN
          RETURN 0
       ELSE
-         p := a ;
+         p := dest ;
          INC (p, n-1) ;
          SetEndOfLine (f, p^) ;
          RETURN n
@@ -1184,14 +1184,14 @@ END WriteLine ;
 
 
 (*
-   WriteNBytes - writes nBytes of a file into memory area, a, returning
-                 the number of bytes actually written.
+   WriteNBytes - writes nBytes from memory area src to a file
+                 returning the number of bytes actually written.
                  This function will flush the buffer and then
                  write the nBytes using a direct write from libc.
                  It is ideal for large writes.
 *)
 
-PROCEDURE WriteNBytes (f: File; nBytes: CARDINAL; a: ADDRESS) : CARDINAL ;
+PROCEDURE WriteNBytes (f: File; nBytes: CARDINAL; src: ADDRESS) : CARDINAL ;
 VAR
    total: INTEGER ;
    fd   : FileDescriptor ;
@@ -1204,7 +1204,7 @@ BEGIN
       IF fd#NIL
       THEN
          WITH fd^ DO
-            total := write(unixfd, a, INTEGER(nBytes)) ;
+            total := write(unixfd, src, INTEGER(nBytes)) ;
             IF total<0
             THEN
                state := failed ;
diff --git a/gcc/m2/gm2-libs/FormatStrings.def b/gcc/m2/gm2-libs/FormatStrings.def
index 2c68545a91a..f5cc9723b88 100644
--- a/gcc/m2/gm2-libs/FormatStrings.def
+++ b/gcc/m2/gm2-libs/FormatStrings.def
@@ -41,8 +41,9 @@ PROCEDURE Sprintf0 (fmt: String) : String ;
 
 
 (*
-   Sprintf1 - returns a String containing, fmt, together with encapsulated
-              entity, w. It only formats the first %s or %d with n.
+   Sprintf1 - returns a String containing, fmt, together with
+              encapsulated entity, w. It only formats the
+              first %s or %d with n.
 *)
 
 PROCEDURE Sprintf1 (fmt: String; w: ARRAY OF BYTE) : String ;
@@ -66,13 +67,14 @@ PROCEDURE Sprintf3 (fmt: String; w1, w2, w3: ARRAY OF BYTE) : String ;
    Sprintf4 - returns a string, fmt, which has been formatted.
 *)
 
-PROCEDURE Sprintf4 (fmt: String; w1, w2, w3, w4: ARRAY OF BYTE) : String ;
+PROCEDURE Sprintf4 (fmt: String;
+                    w1, w2, w3, w4: ARRAY OF BYTE) : String ;
 
 
 (*
-   HandleEscape - translates \a, \b, \e, \f, \n, \r, \x[hex] \[octal] into
-                  their respective ascii codes.  It also converts \[any] into
-                  a single [any] character.
+   HandleEscape - translates \a, \b, \e, \f, \n, \r, \x[hex] \[octal]
+                  into their respective ascii codes.  It also converts
+                  \[any] into a single [any] character.
 *)
 
 PROCEDURE HandleEscape (s: String) : String ;
diff --git a/gcc/m2/gm2-libs/FpuIO.def b/gcc/m2/gm2-libs/FpuIO.def
index 66d7e2fc616..6f3e96d9984 100644
--- a/gcc/m2/gm2-libs/FpuIO.def
+++ b/gcc/m2/gm2-libs/FpuIO.def
@@ -27,19 +27,25 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 DEFINITION MODULE FpuIO ;
 
 EXPORT QUALIFIED ReadReal, WriteReal, StrToReal, RealToStr,
-                 ReadLongReal, WriteLongReal, StrToLongReal, LongRealToStr,
-                 ReadLongInt, WriteLongInt, StrToLongInt, LongIntToStr ;
+                 ReadLongReal, WriteLongReal, StrToLongReal,
+                 LongRealToStr,
+                 ReadLongInt, WriteLongInt, StrToLongInt,
+                 LongIntToStr ;
 
 
 PROCEDURE ReadReal (VAR x: REAL) ;
 PROCEDURE WriteReal (x: REAL; TotalWidth, FractionWidth: CARDINAL) ;
 PROCEDURE StrToReal (a: ARRAY OF CHAR ; VAR x: REAL) ;
-PROCEDURE RealToStr (x: REAL; TotalWidth, FractionWidth: CARDINAL; VAR a: ARRAY OF CHAR) ;
+PROCEDURE RealToStr (x: REAL; TotalWidth, FractionWidth: CARDINAL;
+                     VAR a: ARRAY OF CHAR) ;
 
 PROCEDURE ReadLongReal (VAR x: LONGREAL) ;
-PROCEDURE WriteLongReal (x: LONGREAL; TotalWidth, FractionWidth: CARDINAL) ;
+PROCEDURE WriteLongReal (x: LONGREAL;
+                         TotalWidth, FractionWidth: CARDINAL) ;
 PROCEDURE StrToLongReal (a: ARRAY OF CHAR ; VAR x: LONGREAL) ;
-PROCEDURE LongRealToStr (x: LONGREAL; TotalWidth, FractionWidth: CARDINAL; VAR a: ARRAY OF CHAR) ;
+PROCEDURE LongRealToStr (x: LONGREAL;
+                         TotalWidth, FractionWidth: CARDINAL;
+                         VAR a: ARRAY OF CHAR) ;
 
 PROCEDURE ReadLongInt (VAR x: LONGINT) ;
 PROCEDURE WriteLongInt (x: LONGINT; n: CARDINAL) ;
diff --git a/gcc/m2/gm2-libs/GetOpt.def b/gcc/m2/gm2-libs/GetOpt.def
index 34619a59b77..468754bd975 100644
--- a/gcc/m2/gm2-libs/GetOpt.def
+++ b/gcc/m2/gm2-libs/GetOpt.def
@@ -57,7 +57,8 @@ PROCEDURE InitLongOptions () : LongOptions ;
 
 (*
    AddLongOption - appends long option {name, has_arg, flag, val} to the
-                   array of options and new long options array is returned.
+                   array of options and new long options array is
+                   returned.
                    The old array, lo, should no longer be used.
 
    (from man 3 getopt)
@@ -66,50 +67,58 @@ PROCEDURE InitLongOptions () : LongOptions ;
        name   is the name of the long option.
 
        has_arg
-              is: no_argument (or 0) if the option does not take an  argument;  required_argument
-              (or  1)  if  the  option  requires  an argument; or optional_argument (or 2) if the
-              option takes an optional argument.
-
-       flag   specifies how results are returned for a  long  option.   If  flag  is  NULL,  then
-              getopt_long()  returns  val.   (For example, the calling program may set val to the
-              equivalent short option character.)  Otherwise, getopt_long() returns 0,  and  flag
-              points to a variable which is set to val if the option is found, but left unchanged
-              if the option is not found.
-
-       val    is the value to return, or to load into the variable pointed to by flag.
+              is: no_argument (or 0) if the option does not take an
+              argument; required_argument (or  1) if the option
+              requires an argument; or optional_argument (or 2) if
+              the option takes an optional argument.
+
+       flag   specifies how results are returned for a long option.
+              If flag is NULL, then getopt_long() returns val.
+              (For example, the calling program may set val to the
+              equivalent short option character).  Otherwise,
+              getopt_long() returns 0, and flag points to a
+              variable which is set to val if the option is found,
+              but left unchanged if the option is not found.
+
+       val    is the value to return, or to load into the variable
+              pointed to by flag.
 
        The last element of the array has to be filled with zeros.
 *)
 
 PROCEDURE AddLongOption (lo: LongOptions;
                          name: String; has_arg: INTEGER;
-                         flag: PtrToInteger; val: INTEGER) : LongOptions ;
+                         flag: PtrToInteger;
+                         val: INTEGER) : LongOptions ;
 
 
 (*
-   KillLongOptions - returns NIL and also frees up memory associated with, lo.
+   KillLongOptions - returns NIL and also frees up memory
+                     associated with, lo.
 *)
 
 PROCEDURE KillLongOptions (lo: LongOptions) : LongOptions ;
 
 
 (*
-   GetOptLong - works like GetOpt but will accept long options (using two dashes).
-                If the program only accepts long options then optstring should be
-                an empty string, not NIL.
+   GetOptLong - works like GetOpt but will accept long options (using
+                two dashes).  If the program only accepts long options
+                then optstring should be an empty string, not NIL.
 *)
 
 PROCEDURE GetOptLong (argc: INTEGER; argv: ADDRESS; optstring: String;
-                      longopts: LongOptions; VAR longindex: INTEGER) : INTEGER ;
+                      longopts: LongOptions;
+                      VAR longindex: INTEGER) : INTEGER ;
 
 
 (*
-   GetOptLongOnly - works like GetOptLong except that a single dash can be used
-                    for a long option.
+   GetOptLongOnly - works like GetOptLong except that a single dash
+                    can be used for a long option.
 *)
 
-PROCEDURE GetOptLongOnly (argc: INTEGER; argv: ADDRESS; optstring: String;
-                          longopts: LongOptions; VAR longindex: INTEGER) : INTEGER ;
+PROCEDURE GetOptLongOnly (argc: INTEGER; argv: ADDRESS;
+                          optstring: String; longopts: LongOptions;
+                          VAR longindex: INTEGER) : INTEGER ;
 
 
 END GetOpt.
diff --git a/gcc/m2/gm2-libs/SYSTEM.def b/gcc/m2/gm2-libs/SYSTEM.def
index 3c71b74c73b..938b6bf8d20 100644
--- a/gcc/m2/gm2-libs/SYSTEM.def
+++ b/gcc/m2/gm2-libs/SYSTEM.def
@@ -78,9 +78,10 @@ PROCEDURE SHIFT (val: <a set type>;
 PROCEDURE THROW (i: INTEGER) ;
   (*
      THROW is a GNU extension and was not part of the PIM or ISO
-     standards.  It throws an exception which will be caught by the EXCEPT
-     block (assuming it exists).  This is a compiler builtin function which
-     interfaces to the GCC exception handling runtime system.
+     standards.  It throws an exception which will be caught by the
+     EXCEPT block (assuming it exists).  This is a compiler builtin
+     function which interfaces to the GCC exception handling runtime
+     system.
      GCC uses the term throw, hence the naming distinction between
      the GCC builtin and the Modula-2 runtime library procedure Raise.
      The later library procedure Raise will call SYSTEM.THROW after
@@ -122,8 +123,8 @@ PROCEDURE ShiftVal (VAR s, d: ARRAY OF BITSET;
 (*
    ShiftLeft - performs the shift left for a multi word set.
                This procedure might be called by the back end of
-               GNU Modula-2 depending whether amount is known at compile
-               time.
+               GNU Modula-2 depending whether amount is known at
+               compile time.
 *)
 
 PROCEDURE ShiftLeft (VAR s, d: ARRAY OF BITSET;
@@ -133,8 +134,8 @@ PROCEDURE ShiftLeft (VAR s, d: ARRAY OF BITSET;
 (*
    ShiftRight - performs the shift left for a multi word set.
                 This procedure might be called by the back end of
-                GNU Modula-2 depending whether amount is known at compile
-                time.
+                GNU Modula-2 depending whether amount is known at
+                compile time.
 *)
 
 PROCEDURE ShiftRight (VAR s, d: ARRAY OF BITSET;
@@ -146,7 +147,8 @@ PROCEDURE ShiftRight (VAR s, d: ARRAY OF BITSET;
    RotateVal - is a runtime procedure whose job is to implement
                the ROTATE procedure of ISO SYSTEM. GNU Modula-2 will
                inline a ROTATE of a single WORD (or less)
-               sized set and will only call this routine for larger sets.
+               sized set and will only call this routine for larger
+               sets.
 *)
 
 PROCEDURE RotateVal (VAR s, d: ARRAY OF BITSET;
@@ -157,8 +159,8 @@ PROCEDURE RotateVal (VAR s, d: ARRAY OF BITSET;
 (*
    RotateLeft - performs the rotate left for a multi word set.
                 This procedure might be called by the back end of
-                GNU Modula-2 depending whether amount is known at compile
-                time.
+                GNU Modula-2 depending whether amount is known at
+                compile time.
 *)
 
 PROCEDURE RotateLeft (VAR s, d: ARRAY OF BITSET;
@@ -169,8 +171,8 @@ PROCEDURE RotateLeft (VAR s, d: ARRAY OF BITSET;
 (*
    RotateRight - performs the rotate right for a multi word set.
                  This procedure might be called by the back end of
-                 GNU Modula-2 depending whether amount is known at compile
-                 time.
+                 GNU Modula-2 depending whether amount is known at
+                 compile time.
 *)
 
 PROCEDURE RotateRight (VAR s, d: ARRAY OF BITSET;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-13 22:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-13 22:26 [gcc/devel/modula-2] Improvements to documentation Gaius Mulley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).