<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Lacking Natural Simplicity</title><link>https://tkurtbond.github.io/</link><description>Random musings on books, code, and tabletop games.</description><atom:link href="https://tkurtbond.github.io/rss.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2026 &lt;a href="mailto:tkurtbond@gmail.com"&gt;T. Kurt Bond&lt;/a&gt; </copyright><lastBuildDate>Fri, 07 Aug 2026 15:11:30 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Mini Six - Odds of Hitting a Target Number (colorized)</title><link>https://tkurtbond.github.io/posts/2026/08/07/mini-six-odds-of-hitting-a-target-number-colorized/</link><dc:creator>T. Kurt Bond</dc:creator><description>&lt;p&gt;Somebody took my table of Mini &lt;a class="reference external" href="https://tkurtbond.github.io/posts/2021/05/08/mini-six-odds-of-hitting-a-target-number/"&gt;Six Odds of Hitting a Target Number&lt;/a&gt; and &lt;a class="reference external" href="https://mknaomi-publications.itch.io/mini-six-odds-colorized"&gt;colorized it!&lt;/a&gt;&lt;/p&gt;</description><category>d6</category><category>mini six</category><category>odds</category><category>open d6</category><category>rpg</category><guid>https://tkurtbond.github.io/posts/2026/08/07/mini-six-odds-of-hitting-a-target-number-colorized/</guid><pubDate>Fri, 07 Aug 2026 15:06:37 GMT</pubDate></item><item><title>NCURSES PROGRAMMING HOWTO Updated for modern C compilers</title><link>https://tkurtbond.github.io/posts/2026/02/13/ncurses-howto-updated-for-modern-c-compilers/</link><dc:creator>T. Kurt Bond</dc:creator><description>&lt;p&gt;I updated the &lt;a class="reference external" href="https://tldp.org/HOWTO/NCURSES-Programming-HOWTO/index.html"&gt;NCURSES PROGRAMMING HOWTO&lt;/a&gt; from
&lt;a class="reference external" href="https://tldp.org/"&gt;The Linux Documentation Project&lt;/a&gt;
slightly so the example programs would compile with modern compilers
and my pull request was accepted in January 2025, but unfortunately
the updated version has not made it online at TLDP.org.  So I decided
to put it online here:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;As a &lt;a class="reference external" href="https://tkurtbond.github.io/NCURSES-HOWTO/NCURSES-ONE-BIG-FILE.html"&gt;single HTML file&lt;/a&gt;, and&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;As &lt;a class="reference external" href="https://tkurtbond.github.io/NCURSES-HOWTO/multinode/t1.htm"&gt;multiple HTML files&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;</description><category>c</category><category>documentation</category><category>ncurses</category><guid>https://tkurtbond.github.io/posts/2026/02/13/ncurses-howto-updated-for-modern-c-compilers/</guid><pubDate>Sat, 14 Feb 2026 04:02:56 GMT</pubDate></item><item><title>Ada Quality and Style: Guidelines for Professional Programmers</title><link>https://tkurtbond.github.io/posts/2024/11/22/ada-quality-and-style-guidelines-for-professional-programmers/</link><dc:creator>T. Kurt Bond</dc:creator><description>&lt;p&gt;The &lt;cite&gt;Ada Quality and Style: Guidelines for Professional
Programmers&lt;/cite&gt; is available on the &lt;a class="reference external" href="http://archive.adaic.com/docs/style-guide/83style/html/"&gt;web&lt;/a&gt;, but I don't think that there is
a PDF copy anywhere easily found, so I'm making a copy available
&lt;a class="reference external" href="https://tkurtbond.github.io/83style/83style.pdf"&gt;here&lt;/a&gt;.  This is the style guide for Ada 83, by the way.  I got it from
the &lt;a class="reference external" href="http://archive.adaic.com/docs/style-guide/83style/"&gt;Ada Information Clearinghouse&lt;/a&gt;.  I downloaded the file
&lt;a class="reference external" href="http://archive.adaic.com/docs/style-guide/83style/style-ps.zip"&gt;style-ps.zip&lt;/a&gt;
into a temporary directory and then ran the shell script
&lt;a class="reference external" href="https://tkurtbond.github.io/83style/make-83style-pdf.sh"&gt;make-83style-pdf.sh&lt;/a&gt; to create the PDF file:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code bash"&gt;&lt;a id="rest_code_35713cc7bdf942c1b3711846fbd749a9-1" name="rest_code_35713cc7bdf942c1b3711846fbd749a9-1" href="https://tkurtbond.github.io/posts/2024/11/22/ada-quality-and-style-guidelines-for-professional-programmers/#rest_code_35713cc7bdf942c1b3711846fbd749a9-1"&gt;&lt;/a&gt;&lt;span class="ch"&gt;#! /usr/bin/env bash&lt;/span&gt;
&lt;a id="rest_code_35713cc7bdf942c1b3711846fbd749a9-2" name="rest_code_35713cc7bdf942c1b3711846fbd749a9-2" href="https://tkurtbond.github.io/posts/2024/11/22/ada-quality-and-style-guidelines-for-professional-programmers/#rest_code_35713cc7bdf942c1b3711846fbd749a9-2"&gt;&lt;/a&gt;&lt;span class="c1"&gt;# First, unzip style-ps.zip.  Then, in another directory, unzip all six of&lt;/span&gt;
&lt;a id="rest_code_35713cc7bdf942c1b3711846fbd749a9-3" name="rest_code_35713cc7bdf942c1b3711846fbd749a9-3" href="https://tkurtbond.github.io/posts/2024/11/22/ada-quality-and-style-guidelines-for-professional-programmers/#rest_code_35713cc7bdf942c1b3711846fbd749a9-3"&gt;&lt;/a&gt;&lt;span class="c1"&gt;# those zip files.  Then do the following:&lt;/span&gt;
&lt;a id="rest_code_35713cc7bdf942c1b3711846fbd749a9-4" name="rest_code_35713cc7bdf942c1b3711846fbd749a9-4" href="https://tkurtbond.github.io/posts/2024/11/22/ada-quality-and-style-guidelines-for-professional-programmers/#rest_code_35713cc7bdf942c1b3711846fbd749a9-4"&gt;&lt;/a&gt;&lt;span class="nb"&gt;set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-x
&lt;a id="rest_code_35713cc7bdf942c1b3711846fbd749a9-5" name="rest_code_35713cc7bdf942c1b3711846fbd749a9-5" href="https://tkurtbond.github.io/posts/2024/11/22/ada-quality-and-style-guidelines-for-professional-programmers/#rest_code_35713cc7bdf942c1b3711846fbd749a9-5"&gt;&lt;/a&gt;mkdir&lt;span class="w"&gt; &lt;/span&gt;tmp&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
&lt;a id="rest_code_35713cc7bdf942c1b3711846fbd749a9-6" name="rest_code_35713cc7bdf942c1b3711846fbd749a9-6" href="https://tkurtbond.github.io/posts/2024/11/22/ada-quality-and-style-guidelines-for-professional-programmers/#rest_code_35713cc7bdf942c1b3711846fbd749a9-6"&gt;&lt;/a&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;tmp&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
&lt;a id="rest_code_35713cc7bdf942c1b3711846fbd749a9-7" name="rest_code_35713cc7bdf942c1b3711846fbd749a9-7" href="https://tkurtbond.github.io/posts/2024/11/22/ada-quality-and-style-guidelines-for-professional-programmers/#rest_code_35713cc7bdf942c1b3711846fbd749a9-7"&gt;&lt;/a&gt;&lt;span class="w"&gt;    &lt;/span&gt;unzip&lt;span class="w"&gt; &lt;/span&gt;-L&lt;span class="w"&gt; &lt;/span&gt;../style-ps.zip&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
&lt;a id="rest_code_35713cc7bdf942c1b3711846fbd749a9-8" name="rest_code_35713cc7bdf942c1b3711846fbd749a9-8" href="https://tkurtbond.github.io/posts/2024/11/22/ada-quality-and-style-guidelines-for-professional-programmers/#rest_code_35713cc7bdf942c1b3711846fbd749a9-8"&gt;&lt;/a&gt;&lt;span class="w"&gt;    &lt;/span&gt;mkdir&lt;span class="w"&gt; &lt;/span&gt;tmp&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
&lt;a id="rest_code_35713cc7bdf942c1b3711846fbd749a9-9" name="rest_code_35713cc7bdf942c1b3711846fbd749a9-9" href="https://tkurtbond.github.io/posts/2024/11/22/ada-quality-and-style-guidelines-for-professional-programmers/#rest_code_35713cc7bdf942c1b3711846fbd749a9-9"&gt;&lt;/a&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;tmp&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
&lt;a id="rest_code_35713cc7bdf942c1b3711846fbd749a9-10" name="rest_code_35713cc7bdf942c1b3711846fbd749a9-10" href="https://tkurtbond.github.io/posts/2024/11/22/ada-quality-and-style-guidelines-for-professional-programmers/#rest_code_35713cc7bdf942c1b3711846fbd749a9-10"&gt;&lt;/a&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;i&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;../*.zip&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;do&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;unzip&lt;span class="w"&gt; &lt;/span&gt;-L&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$i&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;done&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;
&lt;a id="rest_code_35713cc7bdf942c1b3711846fbd749a9-11" name="rest_code_35713cc7bdf942c1b3711846fbd749a9-11" href="https://tkurtbond.github.io/posts/2024/11/22/ada-quality-and-style-guidelines-for-professional-programmers/#rest_code_35713cc7bdf942c1b3711846fbd749a9-11"&gt;&lt;/a&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;i&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;*.ps&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;do&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;ps2pdf&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$i&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;basename&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$i&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;.ps&lt;span class="k"&gt;)&lt;/span&gt;.pdf&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;done&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
&lt;a id="rest_code_35713cc7bdf942c1b3711846fbd749a9-12" name="rest_code_35713cc7bdf942c1b3711846fbd749a9-12" href="https://tkurtbond.github.io/posts/2024/11/22/ada-quality-and-style-guidelines-for-professional-programmers/#rest_code_35713cc7bdf942c1b3711846fbd749a9-12"&gt;&lt;/a&gt;&lt;span class="w"&gt;    &lt;/span&gt;qpdf&lt;span class="w"&gt; &lt;/span&gt;--empty&lt;span class="w"&gt; &lt;/span&gt;-pages&lt;span class="w"&gt; &lt;/span&gt;covers.pdf&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;-3&lt;span class="w"&gt; &lt;/span&gt;--&lt;span class="w"&gt; &lt;/span&gt;covers_fixed.pdf&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
&lt;a id="rest_code_35713cc7bdf942c1b3711846fbd749a9-13" name="rest_code_35713cc7bdf942c1b3711846fbd749a9-13" href="https://tkurtbond.github.io/posts/2024/11/22/ada-quality-and-style-guidelines-for-professional-programmers/#rest_code_35713cc7bdf942c1b3711846fbd749a9-13"&gt;&lt;/a&gt;&lt;span class="w"&gt;    &lt;/span&gt;pdfunite&lt;span class="w"&gt; &lt;/span&gt;covers_fixed.pdf&lt;span class="w"&gt; &lt;/span&gt;preface.pdf&lt;span class="w"&gt; &lt;/span&gt;ack.pdf&lt;span class="w"&gt; &lt;/span&gt;toc.pdf&lt;span class="w"&gt; &lt;/span&gt;intro.pdf&lt;span class="w"&gt; &lt;/span&gt;source_c.pdf&lt;span class="w"&gt; &lt;/span&gt;readabil.pdf&lt;span class="w"&gt; &lt;/span&gt;prog_str.pdf&lt;span class="w"&gt; &lt;/span&gt;prog_pra.pdf&lt;span class="w"&gt; &lt;/span&gt;concurr.pdf&lt;span class="w"&gt; &lt;/span&gt;portabil.pdf&lt;span class="w"&gt; &lt;/span&gt;reuse.pdf&lt;span class="w"&gt; &lt;/span&gt;performa.pdf&lt;span class="w"&gt; &lt;/span&gt;complete.pdf&lt;span class="w"&gt; &lt;/span&gt;appendix.pdf&lt;span class="w"&gt; &lt;/span&gt;ref.pdf&lt;span class="w"&gt; &lt;/span&gt;bib_0188.pdf&lt;span class="w"&gt; &lt;/span&gt;index.pdf&lt;span class="w"&gt; &lt;/span&gt;83style.pdf
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Note the &lt;span class="app"&gt;qpdf&lt;/span&gt; command?  That pulls out the first three pages
of covers.pdf, because the other pages duplicate stuff that is in
the other &lt;span class="file"&gt;.pdf&lt;/span&gt; files.&lt;/p&gt;
&lt;p&gt;Then I read through the PDF and made a &lt;a class="reference external" href="https://tkurtbond.github.io/83style/83style.bookmarks"&gt;bookmarks file&lt;/a&gt; for use with
&lt;a class="reference external" href="https://sourceforge.net/projects/jpdfbookmarks/"&gt;jpdfbookmarks&lt;/a&gt; (I use one of the releases from this github &lt;a class="reference external" href="https://github.com/life888888/JPdfBookmarks"&gt;repo&lt;/a&gt;):&lt;/p&gt;
&lt;pre class="literal-block"&gt;Ada Quality and Style/1
        Cover 1/1
        Cover 2/2
        Preface/4
        Authors and Acknowledgements/6
        Contents/8
        Chapter 1: Introduction/10
                1.1 How to use this book/11
                1.2 To the new Ada programmer/11
                1.3 To the experienced Ada programmer/12
                1.4 To the software project manager/12
                1.5 to contracting agencies and standards organizations/13
        Chapter 2: Source Code Presentation/14
                2.1 Code formatting/14
                        2.1.1 Horizontal spacing/14
                        2.1.2 Indentation/15
                        2.1.3 Alignment of operators/18
                        2.1.4 Alignment of declarations/19
                        2.1.5 More on alignmeent/20
                        2.1.6 Blank lines/21
                        2.1.7 Pagination/22
                        2.1.8 Number of statements per line/23
                        2.1.9 Source code line length/24
                2.2 Summary/24
        Chapter 3: Readability/26
                3.1 Spelling/26
                        3.1.1 Use of underscores/26
                        3.1.2 Numbers/26
                        3.1.3 Capitalization/27
                        3.1.4 Abbreviations/28
                3.2 Naming conventions/29
                        3.2.1 Names/29
                        3.2.2 Type names/29
                        3.2.3 Object names/30
                        3.2.4 Program unit names/31
                        3.2.5 Constants and named numbers/32
                3.3 Comments/33
                        3.3.1 General comments/34
                        3.3.2 File headers/35
                        3.3.3 Program unit specification header/35
                        3.3.4 Program unit body header/38
                        3.3.5 Data comments/39
                        3.3.6 Statement comments/41
                        3.3.7 Marker comments/43
                3.4 Using types/44
                        3.4.1 Declaring types/44
                        3.4.2 Enumeration types/45
                3.5 Summary/46
        Chapter 4: Program Structure/50
                4.1 High level structure/50
                        4.1.1 Separate compilation capabilities/50
                        4.1.2 Subprograms/51
                        4.1.3 Functions/52
                        4.1.4 Packages/53
                        4.1.5 Cohesion/53
                        4.1.6 Data coupling/54
                        4.1.7 Tasks/54
                4.2 Visibility/55
                        4.2.1 Minimization of interfaces/55
                        4.2.2 Nested packages/56
                        4.2.3 Restricting visibility/56
                        4.2.4 Hiding tasks/57
                4.3 Exceptions/59
                        4.3.1 Using exceptions to help define an abstraction/59
                4.4 Summary/61
        Chapter 5: Programming Practices/64
                5.1 Optional parts of the syntax/64
                        5.1.1 Loop names/64
                        5.1.2 Block names/65
                        5.1.3 Exit statements/66
                        5.1.4 Naming end statemnts/66
                5.2 Parameter lists/67
                        5.2.1 Formal parameters/67
                        5.2.2 Named association/67
                        5.2.33 Default parameters/68
                        5.2.4 Mode indication/69
                5.3 Types/69
                        5.3.1 Derived types and subtypes/69
                        5.3.2 Anonymous types/71
                        5.3.3 Private types/71
                5.4 Data structures/72
                        5.4.1 Heeterogeneous data/72
                        5.4.2 Nested records/73
                        5.4.3 Dynamic data/74
                5.5 Expressions/75
                        5.5.1 Range values/75
                        5.5.2 Array attributes/76
                        5.5.3 Parenthetical expressions/76
                        5.5.4 Positive forms of logic/77
                        5.5.5 Short circuit forms of the logical operators/77
                        5.5.6 Accuracy of operations with real operands/78
                5.6 Statements/78
                        5.6.1 Nesting/78
                        5.6.2 Slices/80
                        5.6.3 Case statements/80
                        5.6.4 Loops/81
                        5.6.5 Exit statements/82
                        5.6.6 Recursion and iteration bounds/83
                        5.6.8 Return statements/84
                        5.6.9 Blocks/85
                        5.6.10 Aggregates/86
                5.7 Visibility/86
                        5.7.1 The use clause/87
                        5.7.2 The renames clause/88
                        5.7.3 Overloaded subprograms/88
                        5.7.4 Overloaded operators/89
                        5.7.5 Overloading the equality operator/89
                5.8 Using exceptions/89
                        5.8.1 Handling versus avoiding exceptions/90
                        5.8.2 Handlers for others/90
                        5.8.3 Propagation/91
                        5.8.4 Localizing the causes of an exception/91
                5.9 Erroneous Execution/92
                        5.9.1 Unchecked conversion/92
                        5.9.2 Unchecked deallocation/93
                        5.9.3 Dependeence on parameter passing mechanism/93
                        5.9.4 Multiple address clauses/94
                        5.9.5 Suppression of exception check/94
                        5.9.6 Initialization/94
                        5.9.7 Direct_IO and Sequential_IO/95
                        5.9.8 Incorrect order dependencies/96
                5.10 Summary/96
        Chapter 6: Concurrency/100
                6.1 Tasking/100
                        6.1.1 Tasks/100
                        6.1.2 Anonymous task types/101
                        6.1.3 Dynamic tasks/102
                        6.1.4 Prioritis/103
                        6.1.5 Delay statements/104
                6.2 Commmunication/105
                        6.2.1 Effecient task communications/105
                        6.2.2 Defensive task communication/106
                        6.2.3 Attributes 'Count, 'Callable, and 'Terminated/108
                        6.2.4 Shared variables/109
                        6.2.5 Tenative rendezvous constructs/111
                        6.2.6 Commmunication complexity/112
                6.3 Termination/113
                        6.1.1 Avoiding termination/113
                        6.3.2 Normal termination/114
                        6.3.3 The abort statement/115
                        6.3.4 Abnormal termination/115
                6.4 Summary/116
        Chapter 7: Portability/118
                7.1 Fundamentals/119
                        7.1.1 Global assumptions/119
                        7.1.2 Actual limits/120
                        7.1.3 Comments/120
                        7.1.4 Main subprogram/121
                        7.1.5 Encapsulating implementation dependencies/121
                        7.1.6 Implementation-added features/122
                7.2 Numeric types and expressions/122
                        7.2.1 Predefined numeric types/122
                        7.2.2 Ada model/123
                        7.2.3 Analysis/123
                        7.2.4 Accuracy Constraints/124
                        7.2.5 Comments/124
                        7.2.6 Precision of constants/124
                        7.2.7 Subexpression evaluation/124
                        7.2.8 Relational tests/124
                7.3 Storage control/125
                        7.3.1 Representation clause/125
                7.4 Tasking/126
                        7.4.1 Task activation order/126
                        7.4.2 Delay statements/126
                        7.4.3 Package Calendar, type Duration, and System.Tick/126
                        7.4.4 Select statement evaluation ordr/126
                        7.4.5 Task scheduling algorithm/127
                        7.4.6 Abort/127
                        7.4.7 Shared variables and pragma shared/127
                7.5 Exceptions/127
                        7.5.1 Predefined exceptions/127
                        7.5.2 Constraint_Error and Numeric_Error/128
                        7.5.3 Implementation-defined exceptions/128
                7.6 Representationi clauses and implementation dependent features/128
                        7.6.1 Representation clauses/129
                        7.6.2 Package System/129
                        7.6.3 Machine code inserts/129
                        7.6.4 Interfacing Foreign Languages/130
                        7.6.5 Implementation-defined pragmas and attributes/130
                        7.6.6 Unchecked deallocation/130
                        7.6.7 Unchecked conversion/131
                7.7 Input/output/131
                        7.7.1 Name and Form parameters/132
                        7.7.2 File closing/132
                        7.7.3 I/O on access types/132
                        7.7.4 Package Low_Level_IO/132
                7.8 Summmary/133
        Chapter 8: Reusability/136
                8.1 Understanding and clarity/137
                        8.1.1 Application-independent naming/137
                        8.1.2 Abbreviations/138
                        8.1.3 Generic formal parameters/139
                8.2 Robustness/139
                        8.2.1 Named numbers/139
                        8.2.2 Unconstrained arrays/140
                        8.2.3 Assumptions/140
                        8.2.4 Subtypes in generic specifications/141
                        8.2.5 Overloading in generic units/143
                        8.2.6 Hidden tasks/143
                        8.2.7 Exceptions/143
                8.3 Adaptability/145
                        8.3.1 Complete functionality/145
                        8.3.2 Generic units/146
                        8.3.3 Using generic units to encapsulate algorithms/146
                        8.3.4 Using generic units for abstract data types/148
                        8.3.5 Iterators/151
                        8.3.6 Private and limited private types/154
                8.4 Independence/156
                        8.4.1 Using generic parameters to reduce coupling/156
                        8.4.2 Coupling due to pragmas/157
                        8.4.3 Part families/158
                        8.4.4 Conditional compilation/158
                        8.4.5 Table-driven programming/159
                8.5 Summary/160
        Chapter 9: Performance/162
                9.1 Improving exception speed/162
                        9.1.1 Pragma inline/162
                        9.1.2 Blocks/163
                        9.1.3 Arrays/163
                        9.1.4 Mod and rem operators/164
                        9.1.5 Constraint checking/164
                9.2 Summmary/165
        Chapter 10: Complete Examples/166
                10.1 Menu-driven user interface/166
                10.2 Line-oriented portablee dining philosophers example/174
                10.3 Window-oriented portable dining philosophers example/179
        Appendix A: Map from Ada Language Referencee Manual to Guidelines/188
        References/194
        Bibliography/198
        Index/202
&lt;/pre&gt;
&lt;p&gt;Then I ran another shell script, &lt;a class="reference external" href="https://tkurtbond.github.io/83style/build-bookmarks.sh"&gt;build-bookmarks.sh&lt;/a&gt;:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code bash"&gt;&lt;a id="rest_code_6e2aad17dcd04b48b37d50ae4bac330a-1" name="rest_code_6e2aad17dcd04b48b37d50ae4bac330a-1" href="https://tkurtbond.github.io/posts/2024/11/22/ada-quality-and-style-guidelines-for-professional-programmers/#rest_code_6e2aad17dcd04b48b37d50ae4bac330a-1"&gt;&lt;/a&gt;&lt;span class="ch"&gt;#! /usr/bin/env bash&lt;/span&gt;
&lt;a id="rest_code_6e2aad17dcd04b48b37d50ae4bac330a-2" name="rest_code_6e2aad17dcd04b48b37d50ae4bac330a-2" href="https://tkurtbond.github.io/posts/2024/11/22/ada-quality-and-style-guidelines-for-professional-programmers/#rest_code_6e2aad17dcd04b48b37d50ae4bac330a-2"&gt;&lt;/a&gt;
&lt;a id="rest_code_6e2aad17dcd04b48b37d50ae4bac330a-3" name="rest_code_6e2aad17dcd04b48b37d50ae4bac330a-3" href="https://tkurtbond.github.io/posts/2024/11/22/ada-quality-and-style-guidelines-for-professional-programmers/#rest_code_6e2aad17dcd04b48b37d50ae4bac330a-3"&gt;&lt;/a&gt;jpdfbookmarks&lt;span class="w"&gt; &lt;/span&gt;-f&lt;span class="w"&gt; &lt;/span&gt;tmp/tmp/83style.pdf&lt;span class="w"&gt; &lt;/span&gt;--apply&lt;span class="w"&gt; &lt;/span&gt;83style.bookmarks&lt;span class="w"&gt; &lt;/span&gt;--out&lt;span class="w"&gt; &lt;/span&gt;83style.pdf
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;There is a PDF of the style guide for &lt;a class="reference external" href="https://www.adaic.org/resources/add_content/docs/95style/95style.pdf"&gt;Ada 95&lt;/a&gt; online, but the links to the other formats listed on the &lt;a class="reference external" href="https://www.adaic.org/ada-resources/standards/ada-95-documents/"&gt;Ada 95 Documents&lt;/a&gt; page have bit rotted, alas.&lt;/p&gt;</description><category>ada</category><category>ada 83</category><category>style guide</category><guid>https://tkurtbond.github.io/posts/2024/11/22/ada-quality-and-style-guidelines-for-professional-programmers/</guid><pubDate>Fri, 22 Nov 2024 16:49:59 GMT</pubDate></item><item><title>Another way of using the SWTOOLS VOS TCS revision system</title><link>https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/</link><dc:creator>T. Kurt Bond</dc:creator><description>&lt;p&gt;Right, So, I've &lt;a class="reference external" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/"&gt;talked&lt;/a&gt; about how the LBL Software Tools Virtual
Operating System organized its source files, using its archiver to
collect all the source files, etc. for a program into an archive
(sometimes with nested archives, because RECURSION IS NEAT) and then
putting the archive under revision control using the &lt;span class="app"&gt;TCS&lt;/span&gt; commands
&lt;span class="command"&gt;admin&lt;/span&gt;, &lt;span class="command"&gt;delta&lt;/span&gt;, and &lt;span class="command"&gt;get&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;And that makes a lot of sense when what you are working on is one
program or another closely related collection of information.  But
what if you are working on a collection of individual or nearly
individual programs?  Or what if your program is large enough that
putting all its source in a single archive runs up against size limits
in the SWTOOLS programs?  Remember, they were meant to run on the 16
bit minicomputers of the day, as well as the 32 bit minicomputers that
showed up soon after the SWTOOLS VOS was written, so there is a limit
on the number of lines in a file that these can handle somewhere
between 10,000 and 15,000 lines.  What do you do then?&lt;/p&gt;
&lt;p&gt;Well, today I wrote a set of commands to make it easy to work with a
collection of source files, which each have a corresponding &lt;span class="app"&gt;TCS&lt;/span&gt;
history file in the subdirectory &lt;span class="file"&gt;[.TCS]&lt;/span&gt;.  I decided to have
one DCL command procedure whose first parameter was the command to
execute, so the common processing could be shared instead of
duplicated between programs.  But I had already written a program to
compare a current source file inn the working directory with an older
version in a &lt;span class="app"&gt;TCS&lt;/span&gt; revision  file.  Hmm.&lt;/p&gt;
&lt;p&gt;Anyway, I went on to write the &lt;span class="command"&gt;tcs&lt;/span&gt; command as a front end
for the normal &lt;span class="app"&gt;TCS&lt;/span&gt; commands.  Here's an example from running
&lt;code class="docutils literal"&gt;TCS HELP&lt;/code&gt;&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-1" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-1" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-1"&gt;&lt;/a&gt;$ tcs help
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-2" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-2" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-2"&gt;&lt;/a&gt;usage:
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-3" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-3" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-3"&gt;&lt;/a&gt;tcs [ help | -h | -help | -? ]
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-4" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-4" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-4"&gt;&lt;/a&gt;      Output this help message.
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-5" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-5" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-5"&gt;&lt;/a&gt;
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-6" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-6" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-6"&gt;&lt;/a&gt;tcs admin FILE
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-7" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-7" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-7"&gt;&lt;/a&gt;
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-8" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-8" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-8"&gt;&lt;/a&gt;      Initialize TCS file [.TCS]FILE from FILE.
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-9" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-9" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-9"&gt;&lt;/a&gt;
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-10" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-10" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-10"&gt;&lt;/a&gt;tcs get [-oOUTFILE] [-h] [-rM.N] FILE
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-11" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-11" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-11"&gt;&lt;/a&gt;
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-12" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-12" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-12"&gt;&lt;/a&gt;      Get a revision of FILE from TCS file [.TCS]FILE.
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-13" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-13" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-13"&gt;&lt;/a&gt;
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-14" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-14" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-14"&gt;&lt;/a&gt;          -oOUTFILE writes the output to OUTFILE.
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-15" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-15" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-15"&gt;&lt;/a&gt;              If -o is not specifed the output goes to standard output.
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-16" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-16" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-16"&gt;&lt;/a&gt;
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-17" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-17" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-17"&gt;&lt;/a&gt;          -h Output history information instead of a revision.
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-18" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-18" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-18"&gt;&lt;/a&gt;
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-19" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-19" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-19"&gt;&lt;/a&gt;          -rM.N Output revision M.N.
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-20" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-20" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-20"&gt;&lt;/a&gt;
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-21" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-21" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-21"&gt;&lt;/a&gt;tcs delta FILE
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-22" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-22" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-22"&gt;&lt;/a&gt;
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-23" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-23" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-23"&gt;&lt;/a&gt;      Add a new version to TCS file [.TCS]FILE from FILE.
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-24" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-24" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-24"&gt;&lt;/a&gt;
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-25" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-25" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-25"&gt;&lt;/a&gt;tcs outdated
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-26" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-26" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-26"&gt;&lt;/a&gt;
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-27" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-27" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-27"&gt;&lt;/a&gt;      List all the source files that are newer than their corresponding
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-28" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-28" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-28"&gt;&lt;/a&gt;      TCS file in [.TCS]
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-29" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-29" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-29"&gt;&lt;/a&gt;
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-30" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-30" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-30"&gt;&lt;/a&gt;tcs uncovered [FILESPEC] [IGNOREDTYPES]
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-31" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-31" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-31"&gt;&lt;/a&gt;
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-32" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-32" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-32"&gt;&lt;/a&gt;      List all the files in the current directory that do not have
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-33" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-33" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-33"&gt;&lt;/a&gt;      corresponding files in [.TCS].
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-34" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-34" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-34"&gt;&lt;/a&gt;
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-35" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-35" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-35"&gt;&lt;/a&gt;      If FILEPSEC is specified it should be a VMS wildcard that
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-36" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-36" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-36"&gt;&lt;/a&gt;      will be applied to the current directory for matching.
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-37" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-37" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-37"&gt;&lt;/a&gt;
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-38" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-38" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-38"&gt;&lt;/a&gt;      If IGNOREDTYPES is specified it should be a single file type
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-39" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-39" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-39"&gt;&lt;/a&gt;      (without the ".") or a comma separated list of file types
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-40" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-40" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-40"&gt;&lt;/a&gt;      to be ignored.
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-41" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-41" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-41"&gt;&lt;/a&gt;
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-42" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-42" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-42"&gt;&lt;/a&gt;      If one needs to specified IGNOREDTYPES but not FILESPEC just
&lt;a id="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-43" name="rest_code_ffe4a1e511944a6c9f70ab2120caa53c-43" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_ffe4a1e511944a6c9f70ab2120caa53c-43"&gt;&lt;/a&gt;      specify an empty string for FILESPEC.
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And here is the current source code of &lt;span class="file"&gt;TCS.SDCL&lt;/span&gt;:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-1" name="rest_code_53b06444fcdc425995ea93937c160270-1" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-1"&gt;&lt;/a&gt;!&amp;gt; TCS.SDCL -- TCS frontend.
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-2" name="rest_code_53b06444fcdc425995ea93937c160270-2" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-2"&gt;&lt;/a&gt;##############################################################################
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-3" name="rest_code_53b06444fcdc425995ea93937c160270-3" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-3"&gt;&lt;/a&gt;###
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-4" name="rest_code_53b06444fcdc425995ea93937c160270-4" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-4"&gt;&lt;/a&gt;### tcs [ help | -h | -help | -? ]
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-5" name="rest_code_53b06444fcdc425995ea93937c160270-5" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-5"&gt;&lt;/a&gt;### tcs admin FILE
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-6" name="rest_code_53b06444fcdc425995ea93937c160270-6" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-6"&gt;&lt;/a&gt;### tcs get [-ooutfile] [-h] [-rM.N] FILE
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-7" name="rest_code_53b06444fcdc425995ea93937c160270-7" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-7"&gt;&lt;/a&gt;### tcs delta FILE
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-8" name="rest_code_53b06444fcdc425995ea93937c160270-8" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-8"&gt;&lt;/a&gt;### tcs outdated
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-9" name="rest_code_53b06444fcdc425995ea93937c160270-9" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-9"&gt;&lt;/a&gt;### tcs uncovered [FILESPEC] [IGNOREDTYPES]
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-10" name="rest_code_53b06444fcdc425995ea93937c160270-10" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-10"&gt;&lt;/a&gt;###
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-11" name="rest_code_53b06444fcdc425995ea93937c160270-11" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-11"&gt;&lt;/a&gt;##############################################################################
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-12" name="rest_code_53b06444fcdc425995ea93937c160270-12" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-12"&gt;&lt;/a&gt;    wso :== write sys$output
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-13" name="rest_code_53b06444fcdc425995ea93937c160270-13" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-13"&gt;&lt;/a&gt;    wse :== write sys$error
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-14" name="rest_code_53b06444fcdc425995ea93937c160270-14" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-14"&gt;&lt;/a&gt;    TRUE = 1 .eq. 1
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-15" name="rest_code_53b06444fcdc425995ea93937c160270-15" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-15"&gt;&lt;/a&gt;    FALSE = 1 .ne. 1
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-16" name="rest_code_53b06444fcdc425995ea93937c160270-16" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-16"&gt;&lt;/a&gt;    QUIET = %x10000000
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-17" name="rest_code_53b06444fcdc425995ea93937c160270-17" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-17"&gt;&lt;/a&gt;
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-18" name="rest_code_53b06444fcdc425995ea93937c160270-18" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-18"&gt;&lt;/a&gt;    months_jan = "01"
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-19" name="rest_code_53b06444fcdc425995ea93937c160270-19" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-19"&gt;&lt;/a&gt;    months_feb = "02"
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-20" name="rest_code_53b06444fcdc425995ea93937c160270-20" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-20"&gt;&lt;/a&gt;    months_mar = "03"
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-21" name="rest_code_53b06444fcdc425995ea93937c160270-21" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-21"&gt;&lt;/a&gt;    months_apr = "04"
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-22" name="rest_code_53b06444fcdc425995ea93937c160270-22" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-22"&gt;&lt;/a&gt;    months_may = "05"
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-23" name="rest_code_53b06444fcdc425995ea93937c160270-23" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-23"&gt;&lt;/a&gt;    months_jun = "06"
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-24" name="rest_code_53b06444fcdc425995ea93937c160270-24" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-24"&gt;&lt;/a&gt;    months_jul = "07"
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-25" name="rest_code_53b06444fcdc425995ea93937c160270-25" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-25"&gt;&lt;/a&gt;    months_aug = "08"
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-26" name="rest_code_53b06444fcdc425995ea93937c160270-26" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-26"&gt;&lt;/a&gt;    months_sep = "09"
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-27" name="rest_code_53b06444fcdc425995ea93937c160270-27" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-27"&gt;&lt;/a&gt;    months_oct = "10"
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-28" name="rest_code_53b06444fcdc425995ea93937c160270-28" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-28"&gt;&lt;/a&gt;    months_nov = "11"
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-29" name="rest_code_53b06444fcdc425995ea93937c160270-29" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-29"&gt;&lt;/a&gt;    months_dec = "12"
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-30" name="rest_code_53b06444fcdc425995ea93937c160270-30" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-30"&gt;&lt;/a&gt;
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-31" name="rest_code_53b06444fcdc425995ea93937c160270-31" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-31"&gt;&lt;/a&gt;    debugging = f$type (tcs_debugging) .nes. ""
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-32" name="rest_code_53b06444fcdc425995ea93937c160270-32" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-32"&gt;&lt;/a&gt;    verbose = FALSE
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-33" name="rest_code_53b06444fcdc425995ea93937c160270-33" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-33"&gt;&lt;/a&gt;
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-34" name="rest_code_53b06444fcdc425995ea93937c160270-34" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-34"&gt;&lt;/a&gt;    command = p1
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-35" name="rest_code_53b06444fcdc425995ea93937c160270-35" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-35"&gt;&lt;/a&gt;
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-36" name="rest_code_53b06444fcdc425995ea93937c160270-36" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-36"&gt;&lt;/a&gt;    if (command .eqs. "HELP" .or.
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-37" name="rest_code_53b06444fcdc425995ea93937c160270-37" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-37"&gt;&lt;/a&gt;        command .eqs. "-H" .or.
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-38" name="rest_code_53b06444fcdc425995ea93937c160270-38" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-38"&gt;&lt;/a&gt;        command .eqs. "-HELP" .or.
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-39" name="rest_code_53b06444fcdc425995ea93937c160270-39" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-39"&gt;&lt;/a&gt;        command .eqs. "-?")
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-40" name="rest_code_53b06444fcdc425995ea93937c160270-40" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-40"&gt;&lt;/a&gt;    {
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-41" name="rest_code_53b06444fcdc425995ea93937c160270-41" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-41"&gt;&lt;/a&gt;        goto usage
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-42" name="rest_code_53b06444fcdc425995ea93937c160270-42" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-42"&gt;&lt;/a&gt;    }
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-43" name="rest_code_53b06444fcdc425995ea93937c160270-43" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-43"&gt;&lt;/a&gt;
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-44" name="rest_code_53b06444fcdc425995ea93937c160270-44" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-44"&gt;&lt;/a&gt;    if ((command .eqs. "") .or.
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-45" name="rest_code_53b06444fcdc425995ea93937c160270-45" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-45"&gt;&lt;/a&gt;        .not. (command .eqs. "ADMIN" .or.
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-46" name="rest_code_53b06444fcdc425995ea93937c160270-46" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-46"&gt;&lt;/a&gt;               command .eqs. "GET" .or.
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-47" name="rest_code_53b06444fcdc425995ea93937c160270-47" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-47"&gt;&lt;/a&gt;               command .eqs. "DELTA" .or.
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-48" name="rest_code_53b06444fcdc425995ea93937c160270-48" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-48"&gt;&lt;/a&gt;               command .eqs. "OUTDATED" .or.
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-49" name="rest_code_53b06444fcdc425995ea93937c160270-49" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-49"&gt;&lt;/a&gt;               command .eqs. "UNCOVERED"))
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-50" name="rest_code_53b06444fcdc425995ea93937c160270-50" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-50"&gt;&lt;/a&gt;    {
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-51" name="rest_code_53b06444fcdc425995ea93937c160270-51" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-51"&gt;&lt;/a&gt;        wse "tcs: unrecognized TCS command: """, command, """"
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-52" name="rest_code_53b06444fcdc425995ea93937c160270-52" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-52"&gt;&lt;/a&gt;        exit 2
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-53" name="rest_code_53b06444fcdc425995ea93937c160270-53" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-53"&gt;&lt;/a&gt;    }
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-54" name="rest_code_53b06444fcdc425995ea93937c160270-54" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-54"&gt;&lt;/a&gt;
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-55" name="rest_code_53b06444fcdc425995ea93937c160270-55" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-55"&gt;&lt;/a&gt;    param_idx = 2
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-56" name="rest_code_53b06444fcdc425995ea93937c160270-56" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-56"&gt;&lt;/a&gt;    num_options = 0
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-57" name="rest_code_53b06444fcdc425995ea93937c160270-57" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-57"&gt;&lt;/a&gt;    outfile = ""
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-58" name="rest_code_53b06444fcdc425995ea93937c160270-58" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-58"&gt;&lt;/a&gt;    while (f$extract (0, 1, p'param_idx') .eqs. "-") {
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-59" name="rest_code_53b06444fcdc425995ea93937c160270-59" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-59"&gt;&lt;/a&gt;         ## Remember, DCL upcases everything!
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-60" name="rest_code_53b06444fcdc425995ea93937c160270-60" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-60"&gt;&lt;/a&gt;        if (f$extract (0, 2, p'param_idx') .eqs. "-O") {
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-61" name="rest_code_53b06444fcdc425995ea93937c160270-61" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-61"&gt;&lt;/a&gt;            outfile = f$extract (2, f$length (p'param_idx'), p'param_idx')
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-62" name="rest_code_53b06444fcdc425995ea93937c160270-62" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-62"&gt;&lt;/a&gt;        } else {
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-63" name="rest_code_53b06444fcdc425995ea93937c160270-63" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-63"&gt;&lt;/a&gt;            num_options = num_options + 1
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-64" name="rest_code_53b06444fcdc425995ea93937c160270-64" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-64"&gt;&lt;/a&gt;            options_'num_options' = p'param_idx'
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-65" name="rest_code_53b06444fcdc425995ea93937c160270-65" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-65"&gt;&lt;/a&gt;        }
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-66" name="rest_code_53b06444fcdc425995ea93937c160270-66" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-66"&gt;&lt;/a&gt;        param_idx = param_idx + 1
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-67" name="rest_code_53b06444fcdc425995ea93937c160270-67" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-67"&gt;&lt;/a&gt;    }
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-68" name="rest_code_53b06444fcdc425995ea93937c160270-68" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-68"&gt;&lt;/a&gt;
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-69" name="rest_code_53b06444fcdc425995ea93937c160270-69" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-69"&gt;&lt;/a&gt;    file = p'param_idx'                         # Can be blank
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-70" name="rest_code_53b06444fcdc425995ea93937c160270-70" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-70"&gt;&lt;/a&gt;    dirname = f$search ("TCS.DIR")
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-71" name="rest_code_53b06444fcdc425995ea93937c160270-71" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-71"&gt;&lt;/a&gt;    if (dirname .eqs. "") {             # No [.TCS] directory.
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-72" name="rest_code_53b06444fcdc425995ea93937c160270-72" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-72"&gt;&lt;/a&gt;        create/dir [.TCS]
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-73" name="rest_code_53b06444fcdc425995ea93937c160270-73" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-73"&gt;&lt;/a&gt;    }
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-74" name="rest_code_53b06444fcdc425995ea93937c160270-74" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-74"&gt;&lt;/a&gt;
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-75" name="rest_code_53b06444fcdc425995ea93937c160270-75" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-75"&gt;&lt;/a&gt;    tcsfile = "[.tcs]" + file + "-TCS"  # Not used by some commands.
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-76" name="rest_code_53b06444fcdc425995ea93937c160270-76" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-76"&gt;&lt;/a&gt;
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-77" name="rest_code_53b06444fcdc425995ea93937c160270-77" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-77"&gt;&lt;/a&gt;    if (debugging) {
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-78" name="rest_code_53b06444fcdc425995ea93937c160270-78" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-78"&gt;&lt;/a&gt;        wso "command: ", command, " file: ", file, " tcsfile: ", tcsfile
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-79" name="rest_code_53b06444fcdc425995ea93937c160270-79" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-79"&gt;&lt;/a&gt;        wso "outfile: """, outfile, """"
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-80" name="rest_code_53b06444fcdc425995ea93937c160270-80" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-80"&gt;&lt;/a&gt;    }
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-81" name="rest_code_53b06444fcdc425995ea93937c160270-81" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-81"&gt;&lt;/a&gt;
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-82" name="rest_code_53b06444fcdc425995ea93937c160270-82" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-82"&gt;&lt;/a&gt;    if (command .eqs. "ADMIN") {
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-83" name="rest_code_53b06444fcdc425995ea93937c160270-83" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-83"&gt;&lt;/a&gt;        goto do_admin
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-84" name="rest_code_53b06444fcdc425995ea93937c160270-84" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-84"&gt;&lt;/a&gt;    } else if (command .eqs. "GET") {
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-85" name="rest_code_53b06444fcdc425995ea93937c160270-85" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-85"&gt;&lt;/a&gt;        goto do_get
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-86" name="rest_code_53b06444fcdc425995ea93937c160270-86" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-86"&gt;&lt;/a&gt;    } else if (command .eqs. "DELTA") {
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-87" name="rest_code_53b06444fcdc425995ea93937c160270-87" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-87"&gt;&lt;/a&gt;        goto do_delta
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-88" name="rest_code_53b06444fcdc425995ea93937c160270-88" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-88"&gt;&lt;/a&gt;    } else if (command .eqs. "OUTDATED") {
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-89" name="rest_code_53b06444fcdc425995ea93937c160270-89" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-89"&gt;&lt;/a&gt;        goto do_outdated
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-90" name="rest_code_53b06444fcdc425995ea93937c160270-90" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-90"&gt;&lt;/a&gt;    } else if (command .eqs. "UNCOVERED") {
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-91" name="rest_code_53b06444fcdc425995ea93937c160270-91" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-91"&gt;&lt;/a&gt;        goto do_uncovered
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-92" name="rest_code_53b06444fcdc425995ea93937c160270-92" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-92"&gt;&lt;/a&gt;    }
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-93" name="rest_code_53b06444fcdc425995ea93937c160270-93" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-93"&gt;&lt;/a&gt;    wso "tcs: This should be impossible, so somebody screwed up.  Exiting."
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-94" name="rest_code_53b06444fcdc425995ea93937c160270-94" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-94"&gt;&lt;/a&gt;    exit 2 .or. QUIET
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-95" name="rest_code_53b06444fcdc425995ea93937c160270-95" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-95"&gt;&lt;/a&gt;
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-96" name="rest_code_53b06444fcdc425995ea93937c160270-96" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-96"&gt;&lt;/a&gt;
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-97" name="rest_code_53b06444fcdc425995ea93937c160270-97" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-97"&gt;&lt;/a&gt;do_admin:
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-98" name="rest_code_53b06444fcdc425995ea93937c160270-98" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-98"&gt;&lt;/a&gt;    result = f$search (tcsfile)
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-99" name="rest_code_53b06444fcdc425995ea93937c160270-99" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-99"&gt;&lt;/a&gt;    if (result .nes. "") {
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-100" name="rest_code_53b06444fcdc425995ea93937c160270-100" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-100"&gt;&lt;/a&gt;        wse "tcs: TCS file ", tcsfile, " already exists, exiting."
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-101" name="rest_code_53b06444fcdc425995ea93937c160270-101" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-101"&gt;&lt;/a&gt;        exit 2
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-102" name="rest_code_53b06444fcdc425995ea93937c160270-102" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-102"&gt;&lt;/a&gt;    }
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-103" name="rest_code_53b06444fcdc425995ea93937c160270-103" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-103"&gt;&lt;/a&gt;    file = f$edit (file, "LOWERCASE")
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-104" name="rest_code_53b06444fcdc425995ea93937c160270-104" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-104"&gt;&lt;/a&gt;    dclcmd = "admin ""-i''file'"" ''tcsfile'"
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-105" name="rest_code_53b06444fcdc425995ea93937c160270-105" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-105"&gt;&lt;/a&gt;    wso "Executing ", dclcmd
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-106" name="rest_code_53b06444fcdc425995ea93937c160270-106" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-106"&gt;&lt;/a&gt;    define/user sys$input sys$command
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-107" name="rest_code_53b06444fcdc425995ea93937c160270-107" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-107"&gt;&lt;/a&gt;    'dclcmd'
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-108" name="rest_code_53b06444fcdc425995ea93937c160270-108" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-108"&gt;&lt;/a&gt;    exit
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-109" name="rest_code_53b06444fcdc425995ea93937c160270-109" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-109"&gt;&lt;/a&gt;
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-110" name="rest_code_53b06444fcdc425995ea93937c160270-110" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-110"&gt;&lt;/a&gt;
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-111" name="rest_code_53b06444fcdc425995ea93937c160270-111" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-111"&gt;&lt;/a&gt;do_get:
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-112" name="rest_code_53b06444fcdc425995ea93937c160270-112" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-112"&gt;&lt;/a&gt;    if (outfile .eqs. "") {
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-113" name="rest_code_53b06444fcdc425995ea93937c160270-113" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-113"&gt;&lt;/a&gt;        get 'options_1' 'options_2' 'options_3' 'options_4' 'tcsfile'
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-114" name="rest_code_53b06444fcdc425995ea93937c160270-114" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-114"&gt;&lt;/a&gt;    } else {
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-115" name="rest_code_53b06444fcdc425995ea93937c160270-115" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-115"&gt;&lt;/a&gt;        get 'options_1' 'options_2' 'options_3' 'options_4' 'tcsfile' &amp;gt;'outfile'
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-116" name="rest_code_53b06444fcdc425995ea93937c160270-116" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-116"&gt;&lt;/a&gt;    }
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-117" name="rest_code_53b06444fcdc425995ea93937c160270-117" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-117"&gt;&lt;/a&gt;    exit
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-118" name="rest_code_53b06444fcdc425995ea93937c160270-118" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-118"&gt;&lt;/a&gt;
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-119" name="rest_code_53b06444fcdc425995ea93937c160270-119" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-119"&gt;&lt;/a&gt;do_delta:
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-120" name="rest_code_53b06444fcdc425995ea93937c160270-120" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-120"&gt;&lt;/a&gt;    result = f$search (tcsfile)
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-121" name="rest_code_53b06444fcdc425995ea93937c160270-121" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-121"&gt;&lt;/a&gt;    if (result .eqs. "") {
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-122" name="rest_code_53b06444fcdc425995ea93937c160270-122" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-122"&gt;&lt;/a&gt;        wse "tcs: TCS file ", tcsfile, " does not exist, exiting."
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-123" name="rest_code_53b06444fcdc425995ea93937c160270-123" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-123"&gt;&lt;/a&gt;        exit 2
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-124" name="rest_code_53b06444fcdc425995ea93937c160270-124" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-124"&gt;&lt;/a&gt;    }
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-125" name="rest_code_53b06444fcdc425995ea93937c160270-125" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-125"&gt;&lt;/a&gt;    define/user sys$input sys$command
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-126" name="rest_code_53b06444fcdc425995ea93937c160270-126" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-126"&gt;&lt;/a&gt;    delta 'file' 'tcsfile'
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-127" name="rest_code_53b06444fcdc425995ea93937c160270-127" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-127"&gt;&lt;/a&gt;    exit
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-128" name="rest_code_53b06444fcdc425995ea93937c160270-128" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-128"&gt;&lt;/a&gt;
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-129" name="rest_code_53b06444fcdc425995ea93937c160270-129" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-129"&gt;&lt;/a&gt;
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-130" name="rest_code_53b06444fcdc425995ea93937c160270-130" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-130"&gt;&lt;/a&gt;do_outdated:
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-131" name="rest_code_53b06444fcdc425995ea93937c160270-131" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-131"&gt;&lt;/a&gt;    filespec = "[.tcs]*.*-tcs"
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-132" name="rest_code_53b06444fcdc425995ea93937c160270-132" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-132"&gt;&lt;/a&gt;    repeat {
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-133" name="rest_code_53b06444fcdc425995ea93937c160270-133" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-133"&gt;&lt;/a&gt;        tcsfile = f$search (filespec)
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-134" name="rest_code_53b06444fcdc425995ea93937c160270-134" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-134"&gt;&lt;/a&gt;        if (tcsfile .eqs. "") break
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-135" name="rest_code_53b06444fcdc425995ea93937c160270-135" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-135"&gt;&lt;/a&gt;        tcsrdt = f$file (tcsfile, "RDT")
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-136" name="rest_code_53b06444fcdc425995ea93937c160270-136" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-136"&gt;&lt;/a&gt;        tcs_day     = f$extract (00, 02, tcsrdt)
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-137" name="rest_code_53b06444fcdc425995ea93937c160270-137" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-137"&gt;&lt;/a&gt;        tcs_monname = f$extract (03, 03, tcsrdt)
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-138" name="rest_code_53b06444fcdc425995ea93937c160270-138" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-138"&gt;&lt;/a&gt;        tcs_year    = f$extract (07, 04, tcsrdt)
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-139" name="rest_code_53b06444fcdc425995ea93937c160270-139" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-139"&gt;&lt;/a&gt;        tcs_rest    = f$extract (11, 12, tcsrdt)
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-140" name="rest_code_53b06444fcdc425995ea93937c160270-140" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-140"&gt;&lt;/a&gt;        tcs_monnum  = months_'tcs_monname'
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-141" name="rest_code_53b06444fcdc425995ea93937c160270-141" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-141"&gt;&lt;/a&gt;        tcs_cmpdate = tcs_year + tcs_monnum + tcs_day + tcs_rest
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-142" name="rest_code_53b06444fcdc425995ea93937c160270-142" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-142"&gt;&lt;/a&gt;        if (debugging .and. verbose) wso "tcs_cmpdate: ", tcs_cmpdate
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-143" name="rest_code_53b06444fcdc425995ea93937c160270-143" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-143"&gt;&lt;/a&gt;        dirname = f$parse (tcsfile,,, "DIRECTORY") - ".TCS]" + "]"
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-144" name="rest_code_53b06444fcdc425995ea93937c160270-144" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-144"&gt;&lt;/a&gt;        filename = f$parse (tcsfile,,, "NAME")
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-145" name="rest_code_53b06444fcdc425995ea93937c160270-145" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-145"&gt;&lt;/a&gt;        filetype = f$parse (tcsfile,,, "TYPE") - "-TCS"
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-146" name="rest_code_53b06444fcdc425995ea93937c160270-146" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-146"&gt;&lt;/a&gt;        srcfile = filename + filetype
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-147" name="rest_code_53b06444fcdc425995ea93937c160270-147" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-147"&gt;&lt;/a&gt;        srcrdt = f$file (srcfile, "RDT")
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-148" name="rest_code_53b06444fcdc425995ea93937c160270-148" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-148"&gt;&lt;/a&gt;        src_day     = f$extract (00, 02, srcrdt)
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-149" name="rest_code_53b06444fcdc425995ea93937c160270-149" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-149"&gt;&lt;/a&gt;        src_monname = f$extract (03, 03, srcrdt)
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-150" name="rest_code_53b06444fcdc425995ea93937c160270-150" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-150"&gt;&lt;/a&gt;        src_year    = f$extract (07, 04, srcrdt)
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-151" name="rest_code_53b06444fcdc425995ea93937c160270-151" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-151"&gt;&lt;/a&gt;        src_rest    = f$extract (11, 12, srcrdt)
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-152" name="rest_code_53b06444fcdc425995ea93937c160270-152" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-152"&gt;&lt;/a&gt;        src_monnum  = months_'src_monname'
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-153" name="rest_code_53b06444fcdc425995ea93937c160270-153" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-153"&gt;&lt;/a&gt;        src_cmpdate = src_year + src_monnum + src_day + src_rest
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-154" name="rest_code_53b06444fcdc425995ea93937c160270-154" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-154"&gt;&lt;/a&gt;        if (debugging .and. verbose) wso "src_cmpdate: ", src_cmpdate
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-155" name="rest_code_53b06444fcdc425995ea93937c160270-155" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-155"&gt;&lt;/a&gt;        if (src_cmpdate .gts. tcs_cmpdate) wso srcfile, " is newer than ", tcsfile
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-156" name="rest_code_53b06444fcdc425995ea93937c160270-156" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-156"&gt;&lt;/a&gt;    }
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-157" name="rest_code_53b06444fcdc425995ea93937c160270-157" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-157"&gt;&lt;/a&gt;    exit
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-158" name="rest_code_53b06444fcdc425995ea93937c160270-158" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-158"&gt;&lt;/a&gt;
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-159" name="rest_code_53b06444fcdc425995ea93937c160270-159" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-159"&gt;&lt;/a&gt;
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-160" name="rest_code_53b06444fcdc425995ea93937c160270-160" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-160"&gt;&lt;/a&gt;do_uncovered:
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-161" name="rest_code_53b06444fcdc425995ea93937c160270-161" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-161"&gt;&lt;/a&gt;    i = param_idx + 1
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-162" name="rest_code_53b06444fcdc425995ea93937c160270-162" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-162"&gt;&lt;/a&gt;    ignoredtypes = p'i'
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-163" name="rest_code_53b06444fcdc425995ea93937c160270-163" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-163"&gt;&lt;/a&gt;    if (ignoredtypes .nes. "") ignoredtypes = "," + ignoredtypes
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-164" name="rest_code_53b06444fcdc425995ea93937c160270-164" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-164"&gt;&lt;/a&gt;    if (debugging) wse "ignoredtypes: ", ignoredtypes
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-165" name="rest_code_53b06444fcdc425995ea93937c160270-165" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-165"&gt;&lt;/a&gt;    ignoredtypes_len = f$length (ignoredtypes)
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-166" name="rest_code_53b06444fcdc425995ea93937c160270-166" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-166"&gt;&lt;/a&gt;    if (file .eqs. "") filespec = "*.*"
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-167" name="rest_code_53b06444fcdc425995ea93937c160270-167" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-167"&gt;&lt;/a&gt;    else filespec = file
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-168" name="rest_code_53b06444fcdc425995ea93937c160270-168" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-168"&gt;&lt;/a&gt;    if (debugging) wse "filespec: ", filespec
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-169" name="rest_code_53b06444fcdc425995ea93937c160270-169" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-169"&gt;&lt;/a&gt;    old_result = ""
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-170" name="rest_code_53b06444fcdc425995ea93937c160270-170" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-170"&gt;&lt;/a&gt;    repeat {
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-171" name="rest_code_53b06444fcdc425995ea93937c160270-171" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-171"&gt;&lt;/a&gt;        result = f$search (filespec, 1)
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-172" name="rest_code_53b06444fcdc425995ea93937c160270-172" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-172"&gt;&lt;/a&gt;        if (debugging) wso "result: ", result
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-173" name="rest_code_53b06444fcdc425995ea93937c160270-173" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-173"&gt;&lt;/a&gt;        # No more results
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-174" name="rest_code_53b06444fcdc425995ea93937c160270-174" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-174"&gt;&lt;/a&gt;        if (result .eqs. "") break
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-175" name="rest_code_53b06444fcdc425995ea93937c160270-175" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-175"&gt;&lt;/a&gt;        # No wildcard specified
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-176" name="rest_code_53b06444fcdc425995ea93937c160270-176" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-176"&gt;&lt;/a&gt;        if (result .eqs. old_result) break
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-177" name="rest_code_53b06444fcdc425995ea93937c160270-177" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-177"&gt;&lt;/a&gt;        old_result = result
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-178" name="rest_code_53b06444fcdc425995ea93937c160270-178" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-178"&gt;&lt;/a&gt;        filename = f$parse (result,,, "NAME")
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-179" name="rest_code_53b06444fcdc425995ea93937c160270-179" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-179"&gt;&lt;/a&gt;        filetype = f$parse (result,,, "TYPE")
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-180" name="rest_code_53b06444fcdc425995ea93937c160270-180" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-180"&gt;&lt;/a&gt;        file = filename + filetype
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-181" name="rest_code_53b06444fcdc425995ea93937c160270-181" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-181"&gt;&lt;/a&gt;        # Ignore directories
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-182" name="rest_code_53b06444fcdc425995ea93937c160270-182" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-182"&gt;&lt;/a&gt;        if (filetype .eqs. ".DIR") next
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-183" name="rest_code_53b06444fcdc425995ea93937c160270-183" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-183"&gt;&lt;/a&gt;        # Skip the ignored file types.
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-184" name="rest_code_53b06444fcdc425995ea93937c160270-184" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-184"&gt;&lt;/a&gt;        skip = "," + (filetype - ".")
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-185" name="rest_code_53b06444fcdc425995ea93937c160270-185" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-185"&gt;&lt;/a&gt;        if (debugging) wse "skip: ", skip, " ignoredtypes: ", ignoredtypes
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-186" name="rest_code_53b06444fcdc425995ea93937c160270-186" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-186"&gt;&lt;/a&gt;        if (f$locate (skip, ignoredtypes) .ne. ignoredtypes_len) {
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-187" name="rest_code_53b06444fcdc425995ea93937c160270-187" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-187"&gt;&lt;/a&gt;            if (debugging) wse "Skipping ", file
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-188" name="rest_code_53b06444fcdc425995ea93937c160270-188" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-188"&gt;&lt;/a&gt;            next
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-189" name="rest_code_53b06444fcdc425995ea93937c160270-189" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-189"&gt;&lt;/a&gt;        }
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-190" name="rest_code_53b06444fcdc425995ea93937c160270-190" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-190"&gt;&lt;/a&gt;        tcsfile = "[.TCS]" + file + "-TCS"
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-191" name="rest_code_53b06444fcdc425995ea93937c160270-191" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-191"&gt;&lt;/a&gt;        if (f$search (tcsfile) .eqs. "")
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-192" name="rest_code_53b06444fcdc425995ea93937c160270-192" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-192"&gt;&lt;/a&gt;            wso file, " does not have a ", tcsfile
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-193" name="rest_code_53b06444fcdc425995ea93937c160270-193" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-193"&gt;&lt;/a&gt;    }
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-194" name="rest_code_53b06444fcdc425995ea93937c160270-194" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-194"&gt;&lt;/a&gt;    exit
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-195" name="rest_code_53b06444fcdc425995ea93937c160270-195" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-195"&gt;&lt;/a&gt;
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-196" name="rest_code_53b06444fcdc425995ea93937c160270-196" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-196"&gt;&lt;/a&gt;
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-197" name="rest_code_53b06444fcdc425995ea93937c160270-197" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-197"&gt;&lt;/a&gt;usage:
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-198" name="rest_code_53b06444fcdc425995ea93937c160270-198" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-198"&gt;&lt;/a&gt;    copy sys$input sys$output
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-199" name="rest_code_53b06444fcdc425995ea93937c160270-199" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-199"&gt;&lt;/a&gt;//usage:
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-200" name="rest_code_53b06444fcdc425995ea93937c160270-200" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-200"&gt;&lt;/a&gt;//tcs [ help | -h | -help | -? ]
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-201" name="rest_code_53b06444fcdc425995ea93937c160270-201" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-201"&gt;&lt;/a&gt;//      Output this help message.
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-202" name="rest_code_53b06444fcdc425995ea93937c160270-202" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-202"&gt;&lt;/a&gt;//
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-203" name="rest_code_53b06444fcdc425995ea93937c160270-203" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-203"&gt;&lt;/a&gt;//tcs admin FILE
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-204" name="rest_code_53b06444fcdc425995ea93937c160270-204" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-204"&gt;&lt;/a&gt;//
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-205" name="rest_code_53b06444fcdc425995ea93937c160270-205" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-205"&gt;&lt;/a&gt;//      Initialize TCS file [.TCS]FILE from FILE.
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-206" name="rest_code_53b06444fcdc425995ea93937c160270-206" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-206"&gt;&lt;/a&gt;//
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-207" name="rest_code_53b06444fcdc425995ea93937c160270-207" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-207"&gt;&lt;/a&gt;//tcs get [-oOUTFILE] [-h] [-rM.N] FILE
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-208" name="rest_code_53b06444fcdc425995ea93937c160270-208" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-208"&gt;&lt;/a&gt;//
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-209" name="rest_code_53b06444fcdc425995ea93937c160270-209" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-209"&gt;&lt;/a&gt;//      Get a revision of FILE from TCS file [.TCS]FILE.
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-210" name="rest_code_53b06444fcdc425995ea93937c160270-210" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-210"&gt;&lt;/a&gt;//
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-211" name="rest_code_53b06444fcdc425995ea93937c160270-211" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-211"&gt;&lt;/a&gt;//          -oOUTFILE writes the output to OUTFILE.
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-212" name="rest_code_53b06444fcdc425995ea93937c160270-212" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-212"&gt;&lt;/a&gt;//              If -o is not specifed the output goes to standard output.
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-213" name="rest_code_53b06444fcdc425995ea93937c160270-213" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-213"&gt;&lt;/a&gt;//
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-214" name="rest_code_53b06444fcdc425995ea93937c160270-214" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-214"&gt;&lt;/a&gt;//          -h Output history information instead of a revision.
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-215" name="rest_code_53b06444fcdc425995ea93937c160270-215" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-215"&gt;&lt;/a&gt;//
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-216" name="rest_code_53b06444fcdc425995ea93937c160270-216" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-216"&gt;&lt;/a&gt;//          -rM.N Output revision M.N.
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-217" name="rest_code_53b06444fcdc425995ea93937c160270-217" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-217"&gt;&lt;/a&gt;//
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-218" name="rest_code_53b06444fcdc425995ea93937c160270-218" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-218"&gt;&lt;/a&gt;//tcs delta FILE
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-219" name="rest_code_53b06444fcdc425995ea93937c160270-219" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-219"&gt;&lt;/a&gt;//
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-220" name="rest_code_53b06444fcdc425995ea93937c160270-220" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-220"&gt;&lt;/a&gt;//      Add a new version to TCS file [.TCS]FILE from FILE.
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-221" name="rest_code_53b06444fcdc425995ea93937c160270-221" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-221"&gt;&lt;/a&gt;//
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-222" name="rest_code_53b06444fcdc425995ea93937c160270-222" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-222"&gt;&lt;/a&gt;//tcs outdated
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-223" name="rest_code_53b06444fcdc425995ea93937c160270-223" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-223"&gt;&lt;/a&gt;//
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-224" name="rest_code_53b06444fcdc425995ea93937c160270-224" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-224"&gt;&lt;/a&gt;//      List all the source files that are newer than their corresponding
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-225" name="rest_code_53b06444fcdc425995ea93937c160270-225" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-225"&gt;&lt;/a&gt;//      TCS file in [.TCS]
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-226" name="rest_code_53b06444fcdc425995ea93937c160270-226" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-226"&gt;&lt;/a&gt;//
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-227" name="rest_code_53b06444fcdc425995ea93937c160270-227" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-227"&gt;&lt;/a&gt;//tcs uncovered [FILESPEC] [IGNOREDTYPES]
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-228" name="rest_code_53b06444fcdc425995ea93937c160270-228" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-228"&gt;&lt;/a&gt;//
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-229" name="rest_code_53b06444fcdc425995ea93937c160270-229" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-229"&gt;&lt;/a&gt;//      List all the files in the current directory that do not have
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-230" name="rest_code_53b06444fcdc425995ea93937c160270-230" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-230"&gt;&lt;/a&gt;//      corresponding files in [.TCS].
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-231" name="rest_code_53b06444fcdc425995ea93937c160270-231" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-231"&gt;&lt;/a&gt;//
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-232" name="rest_code_53b06444fcdc425995ea93937c160270-232" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-232"&gt;&lt;/a&gt;//      If FILEPSEC is specified it should be a VMS wildcard that
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-233" name="rest_code_53b06444fcdc425995ea93937c160270-233" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-233"&gt;&lt;/a&gt;//      will be applied to the current directory for matching.
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-234" name="rest_code_53b06444fcdc425995ea93937c160270-234" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-234"&gt;&lt;/a&gt;//
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-235" name="rest_code_53b06444fcdc425995ea93937c160270-235" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-235"&gt;&lt;/a&gt;//      If IGNOREDTYPES is specified it should be a single file type
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-236" name="rest_code_53b06444fcdc425995ea93937c160270-236" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-236"&gt;&lt;/a&gt;//      (without the ".") or a comma separated list of file types
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-237" name="rest_code_53b06444fcdc425995ea93937c160270-237" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-237"&gt;&lt;/a&gt;//      to be ignored.
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-238" name="rest_code_53b06444fcdc425995ea93937c160270-238" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-238"&gt;&lt;/a&gt;//
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-239" name="rest_code_53b06444fcdc425995ea93937c160270-239" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-239"&gt;&lt;/a&gt;//      If one needs to specified IGNOREDTYPES but not FILESPEC just
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-240" name="rest_code_53b06444fcdc425995ea93937c160270-240" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-240"&gt;&lt;/a&gt;//      specify an empty string for FILESPEC.
&lt;a id="rest_code_53b06444fcdc425995ea93937c160270-241" name="rest_code_53b06444fcdc425995ea93937c160270-241" href="https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/#rest_code_53b06444fcdc425995ea93937c160270-241"&gt;&lt;/a&gt;    exit 2 .or. QUIET
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I decided to leave my &lt;span class="file"&gt;tcsdiff.sdcl&lt;/span&gt; program separate for the
time being, since it was easy to convert to use with &lt;span class="app"&gt;TCS&lt;/span&gt; files
in &lt;span class="file"&gt;[.TCS]&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;I found it amusing when I recently was working on some
&lt;span class="command"&gt;ratfor&lt;/span&gt; code soon after revising my &lt;span class="command"&gt;SDCL&lt;/span&gt;
(Structured DCL preprocessor) and I realized that the reason that the
internal goto labels that I generate in SDCL start at 23000 because
the original &lt;span class="command"&gt;ratfor&lt;/span&gt; command started at 23000, which was
carried over to the SWTOOLS VOS &lt;span class="command"&gt;ratfor&lt;/span&gt; and the original
&lt;span class="command"&gt;sdcl&lt;/span&gt; written by Sohail Aslam of the University of Colorado
at Colorado Springs, and from there to my version of &lt;span class="command"&gt;SDCL&lt;/span&gt;.&lt;/p&gt;
&lt;img alt="/labgen-in-ratfor.jpg" src="https://tkurtbond.github.io/labgen-in-ratfor.jpg"&gt;</description><guid>https://tkurtbond.github.io/posts/2024/08/13/another-way-of-using-the-swtools-vos-tcs-revision-system/</guid><pubDate>Tue, 13 Aug 2024 19:33:56 GMT</pubDate></item><item><title>SWTOOLS VOS shells need GRPNAM as well as CMEXEC and DETACH for subshells</title><link>https://tkurtbond.github.io/posts/2024/07/19/swtools-vos-shells-need-grpnam-as-well-as-cmexec-and-detach-for-subshells/</link><dc:creator>T. Kurt Bond</dc:creator><description>&lt;p&gt;The SWTOOLS VOS provides three shells, &lt;span class="command"&gt;sh&lt;/span&gt;, &lt;span class="command"&gt;hsh&lt;/span&gt;
(which adds a history mechanism), and &lt;span class="command"&gt;esh&lt;/span&gt; (which adds
&lt;span class="command"&gt;ed&lt;/span&gt;-style editing of the history).  The release notes state
that the shells need the privileges &lt;code class="docutils literal"&gt;DETACH&lt;/code&gt; and &lt;code class="docutils literal"&gt;CMEXEC&lt;/code&gt;, but
under VMS 5.5-2 it turns out that they need the &lt;code class="docutils literal"&gt;GRPNAM&lt;/code&gt; privilege
as well.&lt;/p&gt;</description><category>cmexec</category><category>detach</category><category>esh</category><category>fortran</category><category>grpnam</category><category>hsh</category><category>sh</category><category>swtools ratfor</category><category>swtools vos</category><category>vax/vms</category><guid>https://tkurtbond.github.io/posts/2024/07/19/swtools-vos-shells-need-grpnam-as-well-as-cmexec-and-detach-for-subshells/</guid><pubDate>Fri, 19 Jul 2024 16:03:19 GMT</pubDate></item><item><title>My first program using SWTOOLS VOS</title><link>https://tkurtbond.github.io/posts/2024/07/18/my-first-program-using-swtools-vos/</link><dc:creator>T. Kurt Bond</dc:creator><description>&lt;p&gt;Well, it's my first program using SWTOOLS VOS &lt;strong&gt;this time around&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;So, I finished by first program using SWTOOLS.  It is a simple
directory lister, called l, that interprets all its arguments as as
file specifications to search for using normal RMS wildcards, or used
&lt;span class="file"&gt;*.*&lt;/span&gt; if not arguments are specified.  It only returns the files with
the highest version number, does not include the device, directory, or
version number in the output, and converts the filenames to lower
case.  It should only be used to list files in the current directory.
I needed it because I do things like&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code shell"&gt;&lt;a id="rest_code_cffddba01ddd420eaf78419e4c337e27-1" name="rest_code_cffddba01ddd420eaf78419e4c337e27-1" href="https://tkurtbond.github.io/posts/2024/07/18/my-first-program-using-swtools-vos/#rest_code_cffddba01ddd420eaf78419e4c337e27-1"&gt;&lt;/a&gt;l&lt;span class="w"&gt; &lt;/span&gt;*.sdcl&lt;span class="w"&gt; &lt;/span&gt;*.for&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;sedit&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'s/{?+}$/ar uv src.ar $1'&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;and I don't want any version numbers to end up in the names of the
archive members, and so on.&lt;/p&gt;
&lt;p&gt;Rafor &lt;em&gt;is&lt;/em&gt; much better than Fortran 77.  And Fortran has even more
footguns than C when it comes to using separately compiled functions
and subroutines, with no notices that I'd passed things with the wrong
type until I actually ran the program and got a register dump because
of an access violation.&lt;/p&gt;
&lt;p&gt;I was not able to include things from
&lt;span class="file"&gt;SYS$LIBRARY:FORSYSDEF.TLB&lt;/span&gt; using the Fortran &lt;code class="docutils literal"&gt;INCLUDE&lt;/code&gt;
statement in ratfor, since it has its own include keyword , so I
separated that part of the program into its own Fortran source file.
Because that file wasn't run through ratfor I couldn't use the
standard macro definitions, like STDERR, so when I wanted to output
the filesnames, I just wrote a ratfor subroutine that would print them
and called that from the Fortran subroutine.  A little clunky, but it
worked.&lt;/p&gt;
&lt;p&gt;Annoying, the &lt;span class="command"&gt;fc&lt;/span&gt; command (which compiles &lt;span class="file"&gt;*.f&lt;/span&gt; files to
objects) doesn't work when run under &lt;span class="command"&gt;mmk&lt;/span&gt;, so I had to write
a command procedure &lt;span class="file"&gt;dommk&lt;/span&gt; that does &lt;code class="docutils literal"&gt;mmk/noact/out=tmp.com&lt;/code&gt;
and &lt;code class="docutils literal"&gt;@tmp.com&lt;/code&gt; to do the build.  (I think this was somehow due to
having multiple levels of subprocesses: &lt;span class="command"&gt;mmk&lt;/span&gt;'s and
&lt;span class="command"&gt;rc&lt;/span&gt;'s.)&lt;/p&gt;
&lt;p&gt;Anyway, the program ended up 48 lines of ratfor in three files and 84
lines of Fortran.  The C program I started with was 170 lines (in one
file), but doesn't work with the SWTOOLS shell's notions of I/O
redirection.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Last edited: 2024-07-19 12:44:44 EDT&lt;/em&gt;&lt;/p&gt;
&lt;!-- Local Variables:
time-stamp-format: "%Y-%02m-%02d %02H:%02M:%02S %Z"
time-stamp-start: "\\*Last edited:[ \t]+\\\\?"
time-stamp-end: "\\*\\\\?\n"
time-stamp-line-limit: -20
End: --&gt;</description><category>fortran</category><category>swtools ratfor</category><category>swtools vos</category><category>vax/vms</category><guid>https://tkurtbond.github.io/posts/2024/07/18/my-first-program-using-swtools-vos/</guid><pubDate>Thu, 18 Jul 2024 20:10:56 GMT</pubDate></item><item><title>Fixing a 41 year old bug in the SWTOOLS VOS SEDIT commmand</title><link>https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/</link><dc:creator>T. Kurt Bond</dc:creator><description>&lt;p&gt;Today I fixed a 41 year old bug in the SWTOOLS VOS &lt;span class="command"&gt;sedit&lt;/span&gt; commmand!&lt;/p&gt;
&lt;p&gt;At work part of my job is to maintain an emulated VAX/VMS 5.5-2 system
for one of our clients.  I have been using the SWTOOLS Virtual
Operating System &lt;a class="reference external" href="https://tkurtbond.github.io/posts/2024/07/03/software-tools/"&gt;recently&lt;/a&gt; (Unix style
I/O redirection! And pipes!), and whenever I tried to use the sedit
command it would die with an integer overflow:&lt;/p&gt;
&lt;pre class="literal-block"&gt;%SYSTEM-F-INTOVF, arithmetic trap, integer overflow at PC=0002D6C9, PSL=03C00022

Improperly handled condition, image exit forced.

      Signal arguments              Stack contents

      Number = 00000003                00000000
      Name   = 0000047C                08000020
               0002D6C9                000017C4
               03C00022                7FEF9784
                                       0002D479
                                       00001DC0
                                       00000000
                                       08000020
                                       7FEF97B4
                                       7FEF979C

      Register dump

      R0 = 0000000E  R1 = 0002BAF4  R2 = 0000000F  R3 = 7FF6A489
      R4 = 7FFE5E0C  R5 = 7FFE5EBC  R6 = 00000000  R7 = 00000001
      R8 = 7FFECA4C  R9 = 7FFECC54  R10= 7FFED7D4  R11= 00001E94
      AP = 7FEF9738  FP = 7FEF96F8  SP = 7FEF976C  PC = 0002D6C9
      PSL= 03C00022&lt;/pre&gt;
&lt;p&gt;Drats, drats, drats.&lt;/p&gt;
&lt;p&gt;I use &lt;span class="command"&gt;sed&lt;/span&gt; frequently on Unix, and it would be nice to have
the SWTOOLS equivalent on VAX/VMS.  What could I do but set the
&lt;a class="reference external" href="https://en.wikipedia.org/wiki/Wayback_Machine_(Peabody%27s_Improbable_History)"&gt;Wayback Machine&lt;/a&gt;
for 1986 and dive in!&lt;/p&gt;
&lt;p&gt;Those following along may want to read my post about how the &lt;a class="reference external" href="slug://how-the-lbl-software-tools-system-organized-its-source-files"&gt;Software Tools VOS organized its source files&lt;/a&gt; first.&lt;/p&gt;
&lt;p&gt;The SWTOOLS VOS was written in &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Ratfor"&gt;Ratfor&lt;/a&gt;, which added structured
control structures and other niceties such as macros, include files,
and string constants to pre-1977 Fortran.  I suspect that even as late
as 1986, when the version of the SWTOOLS VOS was released, lots of
installations were on machines that only &lt;strong&gt;*had*&lt;/strong&gt; pre-1977 Fortran
compilers.&lt;/p&gt;
&lt;p&gt;Here's an example of &lt;span class="app"&gt;Ratfor&lt;/span&gt; source, from &lt;span class="file"&gt;sedit.r&lt;/span&gt;:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code fortran"&gt;&lt;a id="rest_code_2f16dbf362f7492390e20ff652a47033-1" name="rest_code_2f16dbf362f7492390e20ff652a47033-1" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_2f16dbf362f7492390e20ff652a47033-1"&gt;&lt;/a&gt;&lt;span class="cp"&gt;# copyf - copy file name to opened file fdo&lt;/span&gt;
&lt;a id="rest_code_2f16dbf362f7492390e20ff652a47033-2" name="rest_code_2f16dbf362f7492390e20ff652a47033-2" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_2f16dbf362f7492390e20ff652a47033-2"&gt;&lt;/a&gt;&lt;span class="k"&gt;subroutine &lt;/span&gt;&lt;span class="n"&gt;copyf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;fdo&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_2f16dbf362f7492390e20ff652a47033-3" name="rest_code_2f16dbf362f7492390e20ff652a47033-3" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_2f16dbf362f7492390e20ff652a47033-3"&gt;&lt;/a&gt;&lt;span class="kt"&gt;integer &lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ARB&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_2f16dbf362f7492390e20ff652a47033-4" name="rest_code_2f16dbf362f7492390e20ff652a47033-4" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_2f16dbf362f7492390e20ff652a47033-4"&gt;&lt;/a&gt;&lt;span class="kt"&gt;integer &lt;/span&gt;&lt;span class="n"&gt;fdo&lt;/span&gt;
&lt;a id="rest_code_2f16dbf362f7492390e20ff652a47033-5" name="rest_code_2f16dbf362f7492390e20ff652a47033-5" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_2f16dbf362f7492390e20ff652a47033-5"&gt;&lt;/a&gt;&lt;span class="kt"&gt;integer &lt;/span&gt;&lt;span class="n"&gt;fdi&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;
&lt;a id="rest_code_2f16dbf362f7492390e20ff652a47033-6" name="rest_code_2f16dbf362f7492390e20ff652a47033-6" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_2f16dbf362f7492390e20ff652a47033-6"&gt;&lt;/a&gt;&lt;span class="kt"&gt;integer &lt;/span&gt;&lt;span class="k"&gt;open&lt;/span&gt;
&lt;a id="rest_code_2f16dbf362f7492390e20ff652a47033-7" name="rest_code_2f16dbf362f7492390e20ff652a47033-7" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_2f16dbf362f7492390e20ff652a47033-7"&gt;&lt;/a&gt;&lt;span class="kt"&gt;character &lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;namstr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;MAXLINE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_2f16dbf362f7492390e20ff652a47033-8" name="rest_code_2f16dbf362f7492390e20ff652a47033-8" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_2f16dbf362f7492390e20ff652a47033-8"&gt;&lt;/a&gt;&lt;span class="kt"&gt;character &lt;/span&gt;&lt;span class="n"&gt;getch&lt;/span&gt;
&lt;a id="rest_code_2f16dbf362f7492390e20ff652a47033-9" name="rest_code_2f16dbf362f7492390e20ff652a47033-9" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_2f16dbf362f7492390e20ff652a47033-9"&gt;&lt;/a&gt;
&lt;a id="rest_code_2f16dbf362f7492390e20ff652a47033-10" name="rest_code_2f16dbf362f7492390e20ff652a47033-10" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_2f16dbf362f7492390e20ff652a47033-10"&gt;&lt;/a&gt;&lt;span class="n"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="c"&gt;!=EOS; i=i+1)               #get name into string&lt;/span&gt;
&lt;a id="rest_code_2f16dbf362f7492390e20ff652a47033-11" name="rest_code_2f16dbf362f7492390e20ff652a47033-11" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_2f16dbf362f7492390e20ff652a47033-11"&gt;&lt;/a&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="n"&gt;namstr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_2f16dbf362f7492390e20ff652a47033-12" name="rest_code_2f16dbf362f7492390e20ff652a47033-12" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_2f16dbf362f7492390e20ff652a47033-12"&gt;&lt;/a&gt;&lt;span class="n"&gt;namstr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;EOS&lt;/span&gt;
&lt;a id="rest_code_2f16dbf362f7492390e20ff652a47033-13" name="rest_code_2f16dbf362f7492390e20ff652a47033-13" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_2f16dbf362f7492390e20ff652a47033-13"&gt;&lt;/a&gt;&lt;span class="n"&gt;fdi&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;namstr&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;READ&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_2f16dbf362f7492390e20ff652a47033-14" name="rest_code_2f16dbf362f7492390e20ff652a47033-14" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_2f16dbf362f7492390e20ff652a47033-14"&gt;&lt;/a&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fdi&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ERR&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_2f16dbf362f7492390e20ff652a47033-15" name="rest_code_2f16dbf362f7492390e20ff652a47033-15" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_2f16dbf362f7492390e20ff652a47033-15"&gt;&lt;/a&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="k"&gt;call &lt;/span&gt;&lt;span class="n"&gt;cant&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;namstr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_2f16dbf362f7492390e20ff652a47033-16" name="rest_code_2f16dbf362f7492390e20ff652a47033-16" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_2f16dbf362f7492390e20ff652a47033-16"&gt;&lt;/a&gt;&lt;span class="k"&gt;while&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;getch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;fdi&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;!= EOF)&lt;/span&gt;
&lt;a id="rest_code_2f16dbf362f7492390e20ff652a47033-17" name="rest_code_2f16dbf362f7492390e20ff652a47033-17" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_2f16dbf362f7492390e20ff652a47033-17"&gt;&lt;/a&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="k"&gt;call &lt;/span&gt;&lt;span class="n"&gt;putch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;fdo&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_2f16dbf362f7492390e20ff652a47033-18" name="rest_code_2f16dbf362f7492390e20ff652a47033-18" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_2f16dbf362f7492390e20ff652a47033-18"&gt;&lt;/a&gt;&lt;span class="k"&gt;call close&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fdi&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_2f16dbf362f7492390e20ff652a47033-19" name="rest_code_2f16dbf362f7492390e20ff652a47033-19" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_2f16dbf362f7492390e20ff652a47033-19"&gt;&lt;/a&gt;&lt;span class="k"&gt;return&lt;/span&gt;
&lt;a id="rest_code_2f16dbf362f7492390e20ff652a47033-20" name="rest_code_2f16dbf362f7492390e20ff652a47033-20" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_2f16dbf362f7492390e20ff652a47033-20"&gt;&lt;/a&gt;&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You can tell it was inspired by Unix.&lt;/p&gt;
&lt;p&gt;Here's the corresponding generated Fortran&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code fortran"&gt;&lt;a id="rest_code_f3704e0f469d48e4aab43892e2c900cf-1" name="rest_code_f3704e0f469d48e4aab43892e2c900cf-1" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_f3704e0f469d48e4aab43892e2c900cf-1"&gt;&lt;/a&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="k"&gt;SUBROUTINE &lt;/span&gt;&lt;span class="n"&gt;COPYF&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;NAME&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;FDO&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_f3704e0f469d48e4aab43892e2c900cf-2" name="rest_code_f3704e0f469d48e4aab43892e2c900cf-2" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_f3704e0f469d48e4aab43892e2c900cf-2"&gt;&lt;/a&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="kt"&gt;INTEGER &lt;/span&gt;&lt;span class="n"&gt;NAME&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2048&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_f3704e0f469d48e4aab43892e2c900cf-3" name="rest_code_f3704e0f469d48e4aab43892e2c900cf-3" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_f3704e0f469d48e4aab43892e2c900cf-3"&gt;&lt;/a&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="kt"&gt;INTEGER &lt;/span&gt;&lt;span class="n"&gt;FDO&lt;/span&gt;
&lt;a id="rest_code_f3704e0f469d48e4aab43892e2c900cf-4" name="rest_code_f3704e0f469d48e4aab43892e2c900cf-4" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_f3704e0f469d48e4aab43892e2c900cf-4"&gt;&lt;/a&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="kt"&gt;INTEGER &lt;/span&gt;&lt;span class="n"&gt;FDI&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;I&lt;/span&gt;
&lt;a id="rest_code_f3704e0f469d48e4aab43892e2c900cf-5" name="rest_code_f3704e0f469d48e4aab43892e2c900cf-5" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_f3704e0f469d48e4aab43892e2c900cf-5"&gt;&lt;/a&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="kt"&gt;INTEGER &lt;/span&gt;&lt;span class="k"&gt;OPEN&lt;/span&gt;
&lt;a id="rest_code_f3704e0f469d48e4aab43892e2c900cf-6" name="rest_code_f3704e0f469d48e4aab43892e2c900cf-6" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_f3704e0f469d48e4aab43892e2c900cf-6"&gt;&lt;/a&gt;&lt;span class="k"&gt;      &lt;/span&gt;&lt;span class="kt"&gt;LOGICAL&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;C&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;NAMSTR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2048&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_f3704e0f469d48e4aab43892e2c900cf-7" name="rest_code_f3704e0f469d48e4aab43892e2c900cf-7" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_f3704e0f469d48e4aab43892e2c900cf-7"&gt;&lt;/a&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="kt"&gt;LOGICAL&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;GETCH&lt;/span&gt;
&lt;a id="rest_code_f3704e0f469d48e4aab43892e2c900cf-8" name="rest_code_f3704e0f469d48e4aab43892e2c900cf-8" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_f3704e0f469d48e4aab43892e2c900cf-8"&gt;&lt;/a&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="n"&gt;I&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
&lt;a id="rest_code_f3704e0f469d48e4aab43892e2c900cf-9" name="rest_code_f3704e0f469d48e4aab43892e2c900cf-9" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_f3704e0f469d48e4aab43892e2c900cf-9"&gt;&lt;/a&gt;&lt;span class="mi"&gt;23190&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;IF&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(.&lt;/span&gt;&lt;span class="nb"&gt;NOT&lt;/span&gt;&lt;span class="p"&gt;.(&lt;/span&gt;&lt;span class="n"&gt;NAME&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;I&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;NE&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="k"&gt;GOTO&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;23192&lt;/span&gt;
&lt;a id="rest_code_f3704e0f469d48e4aab43892e2c900cf-10" name="rest_code_f3704e0f469d48e4aab43892e2c900cf-10" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_f3704e0f469d48e4aab43892e2c900cf-10"&gt;&lt;/a&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="n"&gt;NAMSTR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;I&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;NAME&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;I&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_f3704e0f469d48e4aab43892e2c900cf-11" name="rest_code_f3704e0f469d48e4aab43892e2c900cf-11" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_f3704e0f469d48e4aab43892e2c900cf-11"&gt;&lt;/a&gt;&lt;span class="mi"&gt;23191&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;I&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;I&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
&lt;a id="rest_code_f3704e0f469d48e4aab43892e2c900cf-12" name="rest_code_f3704e0f469d48e4aab43892e2c900cf-12" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_f3704e0f469d48e4aab43892e2c900cf-12"&gt;&lt;/a&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="k"&gt;GOTO&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;23190&lt;/span&gt;
&lt;a id="rest_code_f3704e0f469d48e4aab43892e2c900cf-13" name="rest_code_f3704e0f469d48e4aab43892e2c900cf-13" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_f3704e0f469d48e4aab43892e2c900cf-13"&gt;&lt;/a&gt;&lt;span class="mi"&gt;23192&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;CONTINUE&lt;/span&gt;
&lt;a id="rest_code_f3704e0f469d48e4aab43892e2c900cf-14" name="rest_code_f3704e0f469d48e4aab43892e2c900cf-14" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_f3704e0f469d48e4aab43892e2c900cf-14"&gt;&lt;/a&gt;&lt;span class="k"&gt;      &lt;/span&gt;&lt;span class="n"&gt;NAMSTR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;I&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;
&lt;a id="rest_code_f3704e0f469d48e4aab43892e2c900cf-15" name="rest_code_f3704e0f469d48e4aab43892e2c900cf-15" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_f3704e0f469d48e4aab43892e2c900cf-15"&gt;&lt;/a&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="n"&gt;FDI&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;OPEN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;NAMSTR&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_f3704e0f469d48e4aab43892e2c900cf-16" name="rest_code_f3704e0f469d48e4aab43892e2c900cf-16" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_f3704e0f469d48e4aab43892e2c900cf-16"&gt;&lt;/a&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="k"&gt;IF&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(.&lt;/span&gt;&lt;span class="nb"&gt;NOT&lt;/span&gt;&lt;span class="p"&gt;.(&lt;/span&gt;&lt;span class="n"&gt;FDI&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;EQ&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="k"&gt;GOTO&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;23193&lt;/span&gt;
&lt;a id="rest_code_f3704e0f469d48e4aab43892e2c900cf-17" name="rest_code_f3704e0f469d48e4aab43892e2c900cf-17" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_f3704e0f469d48e4aab43892e2c900cf-17"&gt;&lt;/a&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="k"&gt;CALL &lt;/span&gt;&lt;span class="n"&gt;CANT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;NAMSTR&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_f3704e0f469d48e4aab43892e2c900cf-18" name="rest_code_f3704e0f469d48e4aab43892e2c900cf-18" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_f3704e0f469d48e4aab43892e2c900cf-18"&gt;&lt;/a&gt;&lt;span class="mi"&gt;23193&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;CONTINUE&lt;/span&gt;
&lt;a id="rest_code_f3704e0f469d48e4aab43892e2c900cf-19" name="rest_code_f3704e0f469d48e4aab43892e2c900cf-19" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_f3704e0f469d48e4aab43892e2c900cf-19"&gt;&lt;/a&gt;&lt;span class="mi"&gt;23195&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;IF&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(.&lt;/span&gt;&lt;span class="nb"&gt;NOT&lt;/span&gt;&lt;span class="p"&gt;.(&lt;/span&gt;&lt;span class="n"&gt;GETCH&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;C&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;FDI&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;NE&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="k"&gt;GOTO&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;23196&lt;/span&gt;
&lt;a id="rest_code_f3704e0f469d48e4aab43892e2c900cf-20" name="rest_code_f3704e0f469d48e4aab43892e2c900cf-20" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_f3704e0f469d48e4aab43892e2c900cf-20"&gt;&lt;/a&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="k"&gt;CALL &lt;/span&gt;&lt;span class="n"&gt;PUTCH&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;C&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;FDO&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_f3704e0f469d48e4aab43892e2c900cf-21" name="rest_code_f3704e0f469d48e4aab43892e2c900cf-21" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_f3704e0f469d48e4aab43892e2c900cf-21"&gt;&lt;/a&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="k"&gt;GOTO&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;23195&lt;/span&gt;
&lt;a id="rest_code_f3704e0f469d48e4aab43892e2c900cf-22" name="rest_code_f3704e0f469d48e4aab43892e2c900cf-22" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_f3704e0f469d48e4aab43892e2c900cf-22"&gt;&lt;/a&gt;&lt;span class="mi"&gt;23196&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;CONTINUE&lt;/span&gt;
&lt;a id="rest_code_f3704e0f469d48e4aab43892e2c900cf-23" name="rest_code_f3704e0f469d48e4aab43892e2c900cf-23" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_f3704e0f469d48e4aab43892e2c900cf-23"&gt;&lt;/a&gt;&lt;span class="k"&gt;      CALL CLOSE&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;FDI&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_f3704e0f469d48e4aab43892e2c900cf-24" name="rest_code_f3704e0f469d48e4aab43892e2c900cf-24" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_f3704e0f469d48e4aab43892e2c900cf-24"&gt;&lt;/a&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="k"&gt;RETURN&lt;/span&gt;
&lt;a id="rest_code_f3704e0f469d48e4aab43892e2c900cf-25" name="rest_code_f3704e0f469d48e4aab43892e2c900cf-25" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_f3704e0f469d48e4aab43892e2c900cf-25"&gt;&lt;/a&gt;&lt;span class="k"&gt;      END&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Notice that the &lt;code class="docutils literal"&gt;character&lt;/code&gt; variables got changed to &lt;code class="docutils literal"&gt;LOGICAL*1&lt;/code&gt;?
That turns out to be 1 byte variable...&lt;/p&gt;
&lt;p&gt;So, to start, I needed to run sedit in the debugger.  That's easy
enough:&lt;/p&gt;
&lt;pre class="literal-block"&gt;% cd ~tmp
% mkdir sedit
% cd sedit
/dua1/software/swtools/tmp/sedit/
% get -r1.5 ~src/sedit.tcs &amp;gt;sedit.w
% ar xv sedit.w
patdef
csedit
sedit.r
sedit.fmt
% rc -d -v sedit.r
~bin/ratp1.exe sedit.r | ~bin/ratp2.exe &amp;gt;sedit.f
~bin/fc.exe -v -d sedit.f
for/noop/object=sedit.obj/nolist/check=all/debug=all sedit.f
~bin/ld.exe -v -d sedit.obj
$ link/exe=dua1:[software.swtools.tmp.sedit]sedit.exe/debug/nomap sys$input/opti
ons
dua1:[software.swtools.tmp.sedit]sedit.obj,-
dua1:[software.swtools.bin]rlib.olb/incl=(tools$main),-
dua1:[software.swtools.bin]rlib.olb/libr
% echo Hello | sedit "s/H/J/"
%DEBUG-I-CANTCREATEMAIN, could not create the debugger subprocess
%DEBUG-I-CANTCREATEMAIN, could not create the debugger subprocess
-LIB-F-NOCLI, no CLI present to perform function
-LIB-F-NOCLI, no CLI present to perform function
%DEBUG-I-SHRPRC, debugger will share user process
%DEBUG-I-SHRPRC, debugger will share user process

         VAX DEBUG Version V5.5-023

%DEBUG-I-INITIAL, language is MACRO, module set to TOOLS$MAIN

DBG&amp;gt; go
%DEBUG-I-DYNMODSET, setting module DOCOM
%SYSTEM-F-INTOVF, arithmetic trap, integer overflow at PC=0002E345, PSL=03C00022
break on unhandled exception preceding DOCOM\%LINE 20
    20:       IF (.NOT.(CMD .EQ. 97))GOTO 23162
DBG&amp;gt; go
%DEBUG-I-DYNMODSET, setting module DOCOM
%SYSTEM-F-INTOVF, arithmetic trap, integer overflow at PC=0002E345, PSL=03C00022
break on unhandled exception preceding DOCOM\%LINE 20
    20:       IF (.NOT.(CMD .EQ. 97))GOTO 23162
DBG&amp;gt;&lt;/pre&gt;
&lt;p&gt;I guess we'll need a little more context.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_bed418b0bfac48bc816a7a6be9b10316-1" name="rest_code_bed418b0bfac48bc816a7a6be9b10316-1" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_bed418b0bfac48bc816a7a6be9b10316-1"&gt;&lt;/a&gt;DBG&amp;gt; type docom\1:20
&lt;a id="rest_code_bed418b0bfac48bc816a7a6be9b10316-2" name="rest_code_bed418b0bfac48bc816a7a6be9b10316-2" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_bed418b0bfac48bc816a7a6be9b10316-2"&gt;&lt;/a&gt;module DOCOM
&lt;a id="rest_code_bed418b0bfac48bc816a7a6be9b10316-3" name="rest_code_bed418b0bfac48bc816a7a6be9b10316-3" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_bed418b0bfac48bc816a7a6be9b10316-3"&gt;&lt;/a&gt;     1:       SUBROUTINE DOCOM(I, LINBUF, LINENO)
&lt;a id="rest_code_bed418b0bfac48bc816a7a6be9b10316-4" name="rest_code_bed418b0bfac48bc816a7a6be9b10316-4" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_bed418b0bfac48bc816a7a6be9b10316-4"&gt;&lt;/a&gt;     2:       LOGICAL*1 LINBUF(2048)
&lt;a id="rest_code_bed418b0bfac48bc816a7a6be9b10316-5" name="rest_code_bed418b0bfac48bc816a7a6be9b10316-5" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_bed418b0bfac48bc816a7a6be9b10316-5"&gt;&lt;/a&gt;     3:       INTEGER I, LINENO
&lt;a id="rest_code_bed418b0bfac48bc816a7a6be9b10316-6" name="rest_code_bed418b0bfac48bc816a7a6be9b10316-6" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_bed418b0bfac48bc816a7a6be9b10316-6"&gt;&lt;/a&gt;     4:       LOGICAL*1 CMD
&lt;a id="rest_code_bed418b0bfac48bc816a7a6be9b10316-7" name="rest_code_bed418b0bfac48bc816a7a6be9b10316-7" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_bed418b0bfac48bc816a7a6be9b10316-7"&gt;&lt;/a&gt;     5:       INTEGER K1, K2
&lt;a id="rest_code_bed418b0bfac48bc816a7a6be9b10316-8" name="rest_code_bed418b0bfac48bc816a7a6be9b10316-8" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_bed418b0bfac48bc816a7a6be9b10316-8"&gt;&lt;/a&gt;     6:       INTEGER AQ
&lt;a id="rest_code_bed418b0bfac48bc816a7a6be9b10316-9" name="rest_code_bed418b0bfac48bc816a7a6be9b10316-9" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_bed418b0bfac48bc816a7a6be9b10316-9"&gt;&lt;/a&gt;     7:       INTEGER IQ
&lt;a id="rest_code_bed418b0bfac48bc816a7a6be9b10316-10" name="rest_code_bed418b0bfac48bc816a7a6be9b10316-10" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_bed418b0bfac48bc816a7a6be9b10316-10"&gt;&lt;/a&gt;     8:       INTEGER BUF
&lt;a id="rest_code_bed418b0bfac48bc816a7a6be9b10316-11" name="rest_code_bed418b0bfac48bc816a7a6be9b10316-11" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_bed418b0bfac48bc816a7a6be9b10316-11"&gt;&lt;/a&gt;     9:       INTEGER LASTBF
&lt;a id="rest_code_bed418b0bfac48bc816a7a6be9b10316-12" name="rest_code_bed418b0bfac48bc816a7a6be9b10316-12" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_bed418b0bfac48bc816a7a6be9b10316-12"&gt;&lt;/a&gt;    10:       INTEGER NLINES
&lt;a id="rest_code_bed418b0bfac48bc816a7a6be9b10316-13" name="rest_code_bed418b0bfac48bc816a7a6be9b10316-13" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_bed418b0bfac48bc816a7a6be9b10316-13"&gt;&lt;/a&gt;    11:       INTEGER LINE1
&lt;a id="rest_code_bed418b0bfac48bc816a7a6be9b10316-14" name="rest_code_bed418b0bfac48bc816a7a6be9b10316-14" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_bed418b0bfac48bc816a7a6be9b10316-14"&gt;&lt;/a&gt;    12:       INTEGER LINE2
&lt;a id="rest_code_bed418b0bfac48bc816a7a6be9b10316-15" name="rest_code_bed418b0bfac48bc816a7a6be9b10316-15" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_bed418b0bfac48bc816a7a6be9b10316-15"&gt;&lt;/a&gt;    13:       INTEGER PAT
&lt;a id="rest_code_bed418b0bfac48bc816a7a6be9b10316-16" name="rest_code_bed418b0bfac48bc816a7a6be9b10316-16" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_bed418b0bfac48bc816a7a6be9b10316-16"&gt;&lt;/a&gt;    14:       INTEGER PREVC
&lt;a id="rest_code_bed418b0bfac48bc816a7a6be9b10316-17" name="rest_code_bed418b0bfac48bc816a7a6be9b10316-17" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_bed418b0bfac48bc816a7a6be9b10316-17"&gt;&lt;/a&gt;    15:       INTEGER NFLAG
&lt;a id="rest_code_bed418b0bfac48bc816a7a6be9b10316-18" name="rest_code_bed418b0bfac48bc816a7a6be9b10316-18" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_bed418b0bfac48bc816a7a6be9b10316-18"&gt;&lt;/a&gt;    16:       INTEGER QFLAG
&lt;a id="rest_code_bed418b0bfac48bc816a7a6be9b10316-19" name="rest_code_bed418b0bfac48bc816a7a6be9b10316-19" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_bed418b0bfac48bc816a7a6be9b10316-19"&gt;&lt;/a&gt;    17:       COMMON /CSEDIT/ AQ, IQ, BUF(20000), LASTBF, NLINES, LINE1, LINE2,
&lt;a id="rest_code_bed418b0bfac48bc816a7a6be9b10316-20" name="rest_code_bed418b0bfac48bc816a7a6be9b10316-20" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_bed418b0bfac48bc816a7a6be9b10316-20"&gt;&lt;/a&gt;    18:      *PAT(132), PREVC, NFLAG, QFLAG
&lt;a id="rest_code_bed418b0bfac48bc816a7a6be9b10316-21" name="rest_code_bed418b0bfac48bc816a7a6be9b10316-21" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_bed418b0bfac48bc816a7a6be9b10316-21"&gt;&lt;/a&gt;    19:       CMD = BUF(I+5)
&lt;a id="rest_code_bed418b0bfac48bc816a7a6be9b10316-22" name="rest_code_bed418b0bfac48bc816a7a6be9b10316-22" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_bed418b0bfac48bc816a7a6be9b10316-22"&gt;&lt;/a&gt;    20:       IF (.NOT.(CMD .EQ. 97))GOTO 23162
&lt;a id="rest_code_bed418b0bfac48bc816a7a6be9b10316-23" name="rest_code_bed418b0bfac48bc816a7a6be9b10316-23" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_bed418b0bfac48bc816a7a6be9b10316-23"&gt;&lt;/a&gt;DBG&amp;gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Ok, line 19 is where the the integer overflow happened.  &lt;code class="docutils literal"&gt;BUF&lt;/code&gt; is an
array of &lt;code class="docutils literal"&gt;INTEGER&lt;/code&gt;s, while &lt;code class="docutils literal"&gt;CMD&lt;/code&gt; is a &lt;code class="docutils literal"&gt;LOGICAL*1&lt;/code&gt;, which, if I
look at the &lt;span class="file"&gt;sedit.r&lt;/span&gt; source:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code fortran"&gt;&lt;a id="rest_code_a7ca9964d55342e49736dafe97a518e2-1" name="rest_code_a7ca9964d55342e49736dafe97a518e2-1" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_a7ca9964d55342e49736dafe97a518e2-1"&gt;&lt;/a&gt;&lt;span class="cp"&gt;# docom - execute a single command at buf(i) on linbuf and lineno&lt;/span&gt;
&lt;a id="rest_code_a7ca9964d55342e49736dafe97a518e2-2" name="rest_code_a7ca9964d55342e49736dafe97a518e2-2" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_a7ca9964d55342e49736dafe97a518e2-2"&gt;&lt;/a&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="k"&gt;subroutine &lt;/span&gt;&lt;span class="n"&gt;docom&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;linbuf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;lineno&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_a7ca9964d55342e49736dafe97a518e2-3" name="rest_code_a7ca9964d55342e49736dafe97a518e2-3" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_a7ca9964d55342e49736dafe97a518e2-3"&gt;&lt;/a&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="kt"&gt;character &lt;/span&gt;&lt;span class="n"&gt;linbuf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;MAXLINE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_a7ca9964d55342e49736dafe97a518e2-4" name="rest_code_a7ca9964d55342e49736dafe97a518e2-4" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_a7ca9964d55342e49736dafe97a518e2-4"&gt;&lt;/a&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="kt"&gt;integer &lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;lineno&lt;/span&gt;
&lt;a id="rest_code_a7ca9964d55342e49736dafe97a518e2-5" name="rest_code_a7ca9964d55342e49736dafe97a518e2-5" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_a7ca9964d55342e49736dafe97a518e2-5"&gt;&lt;/a&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="kt"&gt;character &lt;/span&gt;&lt;span class="n"&gt;cmd&lt;/span&gt;
&lt;a id="rest_code_a7ca9964d55342e49736dafe97a518e2-6" name="rest_code_a7ca9964d55342e49736dafe97a518e2-6" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_a7ca9964d55342e49736dafe97a518e2-6"&gt;&lt;/a&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="kt"&gt;integer &lt;/span&gt;&lt;span class="n"&gt;k1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;k2&lt;/span&gt;
&lt;a id="rest_code_a7ca9964d55342e49736dafe97a518e2-7" name="rest_code_a7ca9964d55342e49736dafe97a518e2-7" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_a7ca9964d55342e49736dafe97a518e2-7"&gt;&lt;/a&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="k"&gt;include &lt;/span&gt;&lt;span class="n"&gt;csedit&lt;/span&gt;
&lt;a id="rest_code_a7ca9964d55342e49736dafe97a518e2-8" name="rest_code_a7ca9964d55342e49736dafe97a518e2-8" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_a7ca9964d55342e49736dafe97a518e2-8"&gt;&lt;/a&gt;
&lt;a id="rest_code_a7ca9964d55342e49736dafe97a518e2-9" name="rest_code_a7ca9964d55342e49736dafe97a518e2-9" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_a7ca9964d55342e49736dafe97a518e2-9"&gt;&lt;/a&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="n"&gt;cmd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;COMMAND&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_a7ca9964d55342e49736dafe97a518e2-10" name="rest_code_a7ca9964d55342e49736dafe97a518e2-10" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_a7ca9964d55342e49736dafe97a518e2-10"&gt;&lt;/a&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="err"&gt;…&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;started as a &lt;code class="docutils literal"&gt;character&lt;/code&gt; and got translated to a &lt;code class="docutils literal"&gt;LOGICAL*1&lt;/code&gt;, the
one byte logical data type.  Normally that's ok, because we're just working
with ASCII, so any character should fit in in one byte.  Lets take a look:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_0a8b18277cb749bd87148f4a8fa38d1b-1" name="rest_code_0a8b18277cb749bd87148f4a8fa38d1b-1" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_0a8b18277cb749bd87148f4a8fa38d1b-1"&gt;&lt;/a&gt;DBG&amp;gt; ex buf[i+5]
&lt;a id="rest_code_0a8b18277cb749bd87148f4a8fa38d1b-2" name="rest_code_0a8b18277cb749bd87148f4a8fa38d1b-2" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_0a8b18277cb749bd87148f4a8fa38d1b-2"&gt;&lt;/a&gt;DOCOM\BUF[19]:  00000173
&lt;a id="rest_code_0a8b18277cb749bd87148f4a8fa38d1b-3" name="rest_code_0a8b18277cb749bd87148f4a8fa38d1b-3" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_0a8b18277cb749bd87148f4a8fa38d1b-3"&gt;&lt;/a&gt;DBG&amp;gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Oh dear.  That's hexadecimal 173, which is decimal 371.  No wonder we
got an arithmetic trap, integer overflow.&lt;/p&gt;
&lt;p&gt;If I look for occurrences of &lt;code class="docutils literal"&gt;buf&lt;/code&gt; in &lt;span class="file"&gt;sedit.r&lt;/span&gt; (using emacs
18.55.105) I see lots of lines like where &lt;code class="docutils literal"&gt;buf&lt;/code&gt; is passed to
subroutine &lt;code class="docutils literal"&gt;addint&lt;/code&gt;, which is not documented in the manual pages,
unfortunately, but is in the runtime library &lt;span class="file"&gt;RLIB.OLB&lt;/span&gt;.  On
VAX/VMS the source for that is in &lt;span class="file"&gt;~vms/rlib.w&lt;/span&gt;:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code fortran"&gt;&lt;a id="rest_code_b7f3ca36594b43089526b5e09bc4240c-1" name="rest_code_b7f3ca36594b43089526b5e09bc4240c-1" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b7f3ca36594b43089526b5e09bc4240c-1"&gt;&lt;/a&gt;&lt;span class="cp"&gt;# AddInt      Put int into intara if it fits, increment j&lt;/span&gt;
&lt;a id="rest_code_b7f3ca36594b43089526b5e09bc4240c-2" name="rest_code_b7f3ca36594b43089526b5e09bc4240c-2" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b7f3ca36594b43089526b5e09bc4240c-2"&gt;&lt;/a&gt;&lt;span class="cp"&gt;# works with an array of integers&lt;/span&gt;
&lt;a id="rest_code_b7f3ca36594b43089526b5e09bc4240c-3" name="rest_code_b7f3ca36594b43089526b5e09bc4240c-3" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b7f3ca36594b43089526b5e09bc4240c-3"&gt;&lt;/a&gt;
&lt;a id="rest_code_b7f3ca36594b43089526b5e09bc4240c-4" name="rest_code_b7f3ca36594b43089526b5e09bc4240c-4" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b7f3ca36594b43089526b5e09bc4240c-4"&gt;&lt;/a&gt;&lt;span class="kt"&gt;integer &lt;/span&gt;&lt;span class="k"&gt;function &lt;/span&gt;&lt;span class="n"&gt;addint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;intara&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;maxsiz&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_b7f3ca36594b43089526b5e09bc4240c-5" name="rest_code_b7f3ca36594b43089526b5e09bc4240c-5" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b7f3ca36594b43089526b5e09bc4240c-5"&gt;&lt;/a&gt;
&lt;a id="rest_code_b7f3ca36594b43089526b5e09bc4240c-6" name="rest_code_b7f3ca36594b43089526b5e09bc4240c-6" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b7f3ca36594b43089526b5e09bc4240c-6"&gt;&lt;/a&gt;&lt;span class="kt"&gt;integer         &lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;maxsiz&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;intara&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;maxsiz&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_b7f3ca36594b43089526b5e09bc4240c-7" name="rest_code_b7f3ca36594b43089526b5e09bc4240c-7" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b7f3ca36594b43089526b5e09bc4240c-7"&gt;&lt;/a&gt;
&lt;a id="rest_code_b7f3ca36594b43089526b5e09bc4240c-8" name="rest_code_b7f3ca36594b43089526b5e09bc4240c-8" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b7f3ca36594b43089526b5e09bc4240c-8"&gt;&lt;/a&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;maxsiz&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_b7f3ca36594b43089526b5e09bc4240c-9" name="rest_code_b7f3ca36594b43089526b5e09bc4240c-9" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b7f3ca36594b43089526b5e09bc4240c-9"&gt;&lt;/a&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;NO&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_b7f3ca36594b43089526b5e09bc4240c-10" name="rest_code_b7f3ca36594b43089526b5e09bc4240c-10" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b7f3ca36594b43089526b5e09bc4240c-10"&gt;&lt;/a&gt;
&lt;a id="rest_code_b7f3ca36594b43089526b5e09bc4240c-11" name="rest_code_b7f3ca36594b43089526b5e09bc4240c-11" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b7f3ca36594b43089526b5e09bc4240c-11"&gt;&lt;/a&gt;&lt;span class="n"&gt;intara&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;
&lt;a id="rest_code_b7f3ca36594b43089526b5e09bc4240c-12" name="rest_code_b7f3ca36594b43089526b5e09bc4240c-12" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b7f3ca36594b43089526b5e09bc4240c-12"&gt;&lt;/a&gt;&lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
&lt;a id="rest_code_b7f3ca36594b43089526b5e09bc4240c-13" name="rest_code_b7f3ca36594b43089526b5e09bc4240c-13" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b7f3ca36594b43089526b5e09bc4240c-13"&gt;&lt;/a&gt;
&lt;a id="rest_code_b7f3ca36594b43089526b5e09bc4240c-14" name="rest_code_b7f3ca36594b43089526b5e09bc4240c-14" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b7f3ca36594b43089526b5e09bc4240c-14"&gt;&lt;/a&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;YES&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_b7f3ca36594b43089526b5e09bc4240c-15" name="rest_code_b7f3ca36594b43089526b5e09bc4240c-15" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b7f3ca36594b43089526b5e09bc4240c-15"&gt;&lt;/a&gt;&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Yes, that's just putting an integer in an array and incrementing the
variable that stores where the next one goes.&lt;/p&gt;
&lt;p&gt;Ok, lets look at all the
&lt;code class="docutils literal"&gt;addint&lt;/code&gt; calls.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code fortran"&gt;&lt;a id="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-1" name="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-1" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-1"&gt;&lt;/a&gt;&lt;span class="n"&gt;Lines&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;matching&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"\\baddint\\b("&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;buffer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;sedit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;a id="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-2" name="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-2" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-2"&gt;&lt;/a&gt;&lt;span class="mi"&gt;176&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;addint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;maxsiz&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;NO&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-3" name="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-3" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-3"&gt;&lt;/a&gt;&lt;span class="mi"&gt;223&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;addint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nlines&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;lastbf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MAXBUF&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-4" name="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-4" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-4"&gt;&lt;/a&gt;&lt;span class="mi"&gt;224&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;addint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;lastbf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MAXBUF&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-5" name="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-5" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-5"&gt;&lt;/a&gt;&lt;span class="mi"&gt;225&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;addint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;line1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;lastbf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MAXBUF&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-6" name="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-6" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-6"&gt;&lt;/a&gt;&lt;span class="mi"&gt;226&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;addint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;line2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;lastbf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MAXBUF&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-7" name="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-7" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-7"&gt;&lt;/a&gt;&lt;span class="mi"&gt;229&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;addint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;NOTSTATE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;lastbf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MAXBUF&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-8" name="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-8" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-8"&gt;&lt;/a&gt;&lt;span class="mi"&gt;235&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;addint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;OKSTATE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;lastbf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MAXBUF&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-9" name="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-9" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-9"&gt;&lt;/a&gt;&lt;span class="mi"&gt;236&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;addint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;lastbf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MAXBUF&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-10" name="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-10" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-10"&gt;&lt;/a&gt;&lt;span class="mi"&gt;238&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;addint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;lastbf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MAXBUF&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-11" name="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-11" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-11"&gt;&lt;/a&gt;&lt;span class="mi"&gt;242&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;addint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;lastbf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MAXBUF&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-12" name="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-12" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-12"&gt;&lt;/a&gt;&lt;span class="mi"&gt;248&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;addint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;lastbf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MAXBUF&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-13" name="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-13" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-13"&gt;&lt;/a&gt;&lt;span class="mi"&gt;256&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;addint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;lastbf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MAXBUF&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-14" name="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-14" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-14"&gt;&lt;/a&gt;&lt;span class="mi"&gt;260&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;         &lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;addint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;EOS&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;lastbf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MAXBUF&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-15" name="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-15" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-15"&gt;&lt;/a&gt;&lt;span class="mi"&gt;269&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;         &lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;addint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;gflag&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;lastbf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MAXBUF&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-16" name="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-16" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-16"&gt;&lt;/a&gt;&lt;span class="mi"&gt;270&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;         &lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;addint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pflag&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;lastbf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MAXBUF&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-17" name="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-17" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-17"&gt;&lt;/a&gt;&lt;span class="mi"&gt;271&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;         &lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;addint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;lastbf&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;lastbf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MAXBUF&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-18" name="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-18" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-18"&gt;&lt;/a&gt;&lt;span class="mi"&gt;273&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;         &lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;addint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;lastbf&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;lastbf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MAXBUF&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-19" name="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-19" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-19"&gt;&lt;/a&gt;&lt;span class="mi"&gt;276&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;         &lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;addint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;EOS&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;lastbf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MAXBUF&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-20" name="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-20" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-20"&gt;&lt;/a&gt;&lt;span class="mi"&gt;286&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;addint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fdw&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;lastbf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MAXBUF&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-21" name="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-21" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-21"&gt;&lt;/a&gt;&lt;span class="mi"&gt;452&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="n"&gt;dotext&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;addint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;EOS&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;lastbf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MAXBUF&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-22" name="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-22" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-22"&gt;&lt;/a&gt;&lt;span class="mi"&gt;695&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;addint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;maxsiz&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;NO&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-23" name="rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-23" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_b94c3a7a871e41359dcb2b7d0d1f4c8c-23"&gt;&lt;/a&gt;&lt;span class="mi"&gt;713&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;addint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;maxsiz&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;NO&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Some of the things they're adding to &lt;code class="docutils literal"&gt;buf&lt;/code&gt; are clearly integers
(&lt;code class="docutils literal"&gt;nlines&lt;/code&gt;, and probably &lt;code class="docutils literal"&gt;NOTSTATE&lt;/code&gt; and &lt;code class="docutils literal"&gt;OKSTATE&lt;/code&gt;), but those
&lt;code class="docutils literal"&gt;EOS&lt;/code&gt; are the SWTOOLS VOS equivalent of the C &lt;code class="docutils literal"&gt;'\0'&lt;/code&gt; that ends a
string, so those particular ones definitely hold characters.&lt;/p&gt;
&lt;p&gt;Well, if I want to debug that I'm going to have to rebuild the SWTOOLS
VOS with debugging turned on.  Investigating it turns out that I need
to add &lt;code class="docutils literal"&gt;/DEBUG&lt;/code&gt; to the &lt;span class="command"&gt;macro&lt;/span&gt; and &lt;span class="command"&gt;fortran&lt;/span&gt;
commands in &lt;span class="file"&gt;asmlib.com&lt;/span&gt;, &lt;span class="file"&gt;asmprm.com&lt;/span&gt;, &lt;span class="file"&gt;build.com&lt;/span&gt;,
and &lt;span class="file"&gt;compile.com&lt;/span&gt; in &lt;span class="file"&gt;~bin&lt;/span&gt;, and then execute
&lt;span class="file"&gt;~bin:toolgen.com&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Once that is done I start stepping through various routines.
Eventually I figure out that it &lt;code class="docutils literal"&gt;buf(19)&lt;/code&gt; is the element that ends
up with the 173 hex, and set a watch on it.  And indeed it is getting
passed a 173.  Sigh.&lt;/p&gt;
&lt;p&gt;Doing a &lt;code class="docutils literal"&gt;SHOW STACK&lt;/code&gt; in the &lt;span class="app"&gt;VMS Debugger&lt;/span&gt; shows that the
&lt;code class="docutils literal"&gt;addint()&lt;/code&gt; call that dies is in the subroutine &lt;code class="docutils literal"&gt;compil()&lt;/code&gt;.  Lets
take a look:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_6640ff4515d345d58783c6b2c2e49858-1" name="rest_code_6640ff4515d345d58783c6b2c2e49858-1" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_6640ff4515d345d58783c6b2c2e49858-1"&gt;&lt;/a&gt;DBG&amp;gt; type compil\50:65
&lt;a id="rest_code_6640ff4515d345d58783c6b2c2e49858-2" name="rest_code_6640ff4515d345d58783c6b2c2e49858-2" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_6640ff4515d345d58783c6b2c2e49858-2"&gt;&lt;/a&gt;module COMPIL
&lt;a id="rest_code_6640ff4515d345d58783c6b2c2e49858-3" name="rest_code_6640ff4515d345d58783c6b2c2e49858-3" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_6640ff4515d345d58783c6b2c2e49858-3"&gt;&lt;/a&gt;    50:       STATUS = ADDINT(LINE2, BUF, LASTBF, 20000)
&lt;a id="rest_code_6640ff4515d345d58783c6b2c2e49858-4" name="rest_code_6640ff4515d345d58783c6b2c2e49858-4" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_6640ff4515d345d58783c6b2c2e49858-4"&gt;&lt;/a&gt;    51:       COM = CLOWER(LIN(I))
&lt;a id="rest_code_6640ff4515d345d58783c6b2c2e49858-5" name="rest_code_6640ff4515d345d58783c6b2c2e49858-5" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_6640ff4515d345d58783c6b2c2e49858-5"&gt;&lt;/a&gt;    52:       IF (.NOT.(COM .EQ. 33))GOTO 23068
&lt;a id="rest_code_6640ff4515d345d58783c6b2c2e49858-6" name="rest_code_6640ff4515d345d58783c6b2c2e49858-6" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_6640ff4515d345d58783c6b2c2e49858-6"&gt;&lt;/a&gt;    53:       STATUS = ADDINT(1, BUF, LASTBF, 20000)
&lt;a id="rest_code_6640ff4515d345d58783c6b2c2e49858-7" name="rest_code_6640ff4515d345d58783c6b2c2e49858-7" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_6640ff4515d345d58783c6b2c2e49858-7"&gt;&lt;/a&gt;    54:       I = I+1
&lt;a id="rest_code_6640ff4515d345d58783c6b2c2e49858-8" name="rest_code_6640ff4515d345d58783c6b2c2e49858-8" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_6640ff4515d345d58783c6b2c2e49858-8"&gt;&lt;/a&gt;    55:       CALL SKIPBL(LIN, I)
&lt;a id="rest_code_6640ff4515d345d58783c6b2c2e49858-9" name="rest_code_6640ff4515d345d58783c6b2c2e49858-9" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_6640ff4515d345d58783c6b2c2e49858-9"&gt;&lt;/a&gt;    56:       COM = CLOWER(LIN(I))
&lt;a id="rest_code_6640ff4515d345d58783c6b2c2e49858-10" name="rest_code_6640ff4515d345d58783c6b2c2e49858-10" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_6640ff4515d345d58783c6b2c2e49858-10"&gt;&lt;/a&gt;    57:       GOTO 23069
&lt;a id="rest_code_6640ff4515d345d58783c6b2c2e49858-11" name="rest_code_6640ff4515d345d58783c6b2c2e49858-11" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_6640ff4515d345d58783c6b2c2e49858-11"&gt;&lt;/a&gt;    58: 23068 CONTINUE
&lt;a id="rest_code_6640ff4515d345d58783c6b2c2e49858-12" name="rest_code_6640ff4515d345d58783c6b2c2e49858-12" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_6640ff4515d345d58783c6b2c2e49858-12"&gt;&lt;/a&gt;    59:       STATUS = ADDINT(0, BUF, LASTBF, 20000)
&lt;a id="rest_code_6640ff4515d345d58783c6b2c2e49858-13" name="rest_code_6640ff4515d345d58783c6b2c2e49858-13" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_6640ff4515d345d58783c6b2c2e49858-13"&gt;&lt;/a&gt;    60: 23069 CONTINUE
&lt;a id="rest_code_6640ff4515d345d58783c6b2c2e49858-14" name="rest_code_6640ff4515d345d58783c6b2c2e49858-14" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_6640ff4515d345d58783c6b2c2e49858-14"&gt;&lt;/a&gt;    61:       STATUS = ADDINT(COM, BUF, LASTBF, 20000)
&lt;a id="rest_code_6640ff4515d345d58783c6b2c2e49858-15" name="rest_code_6640ff4515d345d58783c6b2c2e49858-15" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_6640ff4515d345d58783c6b2c2e49858-15"&gt;&lt;/a&gt;    62:       IF (.NOT.(COM .EQ. 97 .AND. FD .NE. 0))GOTO 23070
&lt;a id="rest_code_6640ff4515d345d58783c6b2c2e49858-16" name="rest_code_6640ff4515d345d58783c6b2c2e49858-16" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_6640ff4515d345d58783c6b2c2e49858-16"&gt;&lt;/a&gt;    63:       STATUS = ADDINT(0, BUF, LASTBF, 20000)
&lt;a id="rest_code_6640ff4515d345d58783c6b2c2e49858-17" name="rest_code_6640ff4515d345d58783c6b2c2e49858-17" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_6640ff4515d345d58783c6b2c2e49858-17"&gt;&lt;/a&gt;    64:       STATUS = DOTEXT(FD)
&lt;a id="rest_code_6640ff4515d345d58783c6b2c2e49858-18" name="rest_code_6640ff4515d345d58783c6b2c2e49858-18" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_6640ff4515d345d58783c6b2c2e49858-18"&gt;&lt;/a&gt;    65:       GOTO 23071
&lt;a id="rest_code_6640ff4515d345d58783c6b2c2e49858-19" name="rest_code_6640ff4515d345d58783c6b2c2e49858-19" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_6640ff4515d345d58783c6b2c2e49858-19"&gt;&lt;/a&gt;DBG&amp;gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Line 61 is the one that dies.  Here &lt;code class="docutils literal"&gt;addint()&lt;/code&gt; is being passed the
variable &lt;code class="docutils literal"&gt;COM&lt;/code&gt;.  Lets take a look at the &lt;span class="app"&gt;Ratfor&lt;/span&gt; source for
its definition:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code fortran"&gt;&lt;a id="rest_code_2364b28d08ef4c66858f91743d0eebf1-1" name="rest_code_2364b28d08ef4c66858f91743d0eebf1-1" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_2364b28d08ef4c66858f91743d0eebf1-1"&gt;&lt;/a&gt;&lt;span class="cp"&gt;# compil - "compile" command in lin(i) from file fd, increment i&lt;/span&gt;
&lt;a id="rest_code_2364b28d08ef4c66858f91743d0eebf1-2" name="rest_code_2364b28d08ef4c66858f91743d0eebf1-2" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_2364b28d08ef4c66858f91743d0eebf1-2"&gt;&lt;/a&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="k"&gt;subroutine &lt;/span&gt;&lt;span class="n"&gt;compil&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;lin&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;fd&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_2364b28d08ef4c66858f91743d0eebf1-3" name="rest_code_2364b28d08ef4c66858f91743d0eebf1-3" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_2364b28d08ef4c66858f91743d0eebf1-3"&gt;&lt;/a&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="kt"&gt;character &lt;/span&gt;&lt;span class="n"&gt;lin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;MAXLINE&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Oh, look, &lt;code class="docutils literal"&gt;com&lt;/code&gt; is a character, that gets translated by
&lt;span class="app"&gt;Ratfor&lt;/span&gt; to a &lt;code class="docutils literal"&gt;LOGICAL*1&lt;/code&gt;, and it is a byte, while the integers
that get passed in are longwords, which are 32 bytes long…  Uh,
doesn't Fortran pass everything by reference?  So &lt;code class="docutils literal"&gt;addint()&lt;/code&gt; gets
passed the address of a byte, but interprets it as the address of a
longword, so it picks up 3 extra bytes.  For whatever reason, there is
a 1 in the byte right next to the byte for &lt;code class="docutils literal"&gt;com&lt;/code&gt;, so we get (hex,
remember) 173 instead of 73, which is the ASCII for &lt;code class="docutils literal"&gt;s&lt;/code&gt;, which the s
in our &lt;code class="docutils literal"&gt;sedit "s/H/J/"&lt;/code&gt;!&lt;/p&gt;
&lt;p&gt;Ok, that should be easy to fix: introduce an integer temporary
variable, assign &lt;code class="docutils literal"&gt;com&lt;/code&gt; to it, and pass it instead.&lt;/p&gt;
&lt;p&gt;Here's the VMS diff:&lt;/p&gt;
&lt;pre class="literal-block"&gt;************
File DUA1:[SOFTWARE.SWTOOLS.TMP]SEDIT.R;6
  206      integer comint
  207      integer fd
******
File DUA1:[SOFTWARE.SWTOOLS.TMP]SEDIT.R;1
  206      integer fd
************
************
File DUA1:[SOFTWARE.SWTOOLS.TMP]SEDIT.R;6
  237      comint = com
  238      status = addint(comint, buf, lastbf, MAXBUF)
  239      if (com == APPENDCOM &amp;amp; fd != NO) {
******
File DUA1:[SOFTWARE.SWTOOLS.TMP]SEDIT.R;1
  236      status = addint(com, buf, lastbf, MAXBUF)
  237      if (com == APPENDCOM &amp;amp; fd != NO) {
************

Number of difference sections found: 2
Number of difference records found: 3

DIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=DUA1:[SOFTWARE.SWTOOLS.TMP]SEDIT.DIFF;1-
    DUA1:[SOFTWARE.SWTOOLS.TMP]SEDIT.R;6-
    DUA1:[SOFTWARE.SWTOOLS.TMP]SEDIT.R;1&lt;/pre&gt;
&lt;p&gt;Recompile, lets see:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_fbf273652f434415b74468aef57003d7-1" name="rest_code_fbf273652f434415b74468aef57003d7-1" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_fbf273652f434415b74468aef57003d7-1"&gt;&lt;/a&gt;% echo Hello | sedit "s/H/J/"
&lt;a id="rest_code_fbf273652f434415b74468aef57003d7-2" name="rest_code_fbf273652f434415b74468aef57003d7-2" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_fbf273652f434415b74468aef57003d7-2"&gt;&lt;/a&gt;Jello
&lt;a id="rest_code_fbf273652f434415b74468aef57003d7-3" name="rest_code_fbf273652f434415b74468aef57003d7-3" href="https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/#rest_code_fbf273652f434415b74468aef57003d7-3"&gt;&lt;/a&gt;%
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;That did it!&lt;/p&gt;</description><category>fortran</category><category>lbl tools</category><category>ratfor</category><category>software tools</category><category>software tools virtual operating system</category><category>swtools</category><guid>https://tkurtbond.github.io/posts/2024/07/15/fixing-a-41-year-old-bug-in-the-swtools-vos-sedit-commmand/</guid><pubDate>Mon, 15 Jul 2024 18:09:45 GMT</pubDate></item><item><title>How the LBL Software Tools system organized its source files</title><link>https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/</link><dc:creator>T. Kurt Bond</dc:creator><description>&lt;p&gt;One of the things I've always found interesting about the LBL Software
Tools VOS was how its source files were structured.  I'll include here
page 10 of the release notes from the release on the DECUS LT86 tape:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-1" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-1" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-1"&gt;&lt;/a&gt;                            Release Notes
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-2" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-2" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-2"&gt;&lt;/a&gt;
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-3" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-3" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-3"&gt;&lt;/a&gt;
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-4" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-4" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-4"&gt;&lt;/a&gt;                        Source File Structure
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-5" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-5" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-5"&gt;&lt;/a&gt;
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-6" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-6" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-6"&gt;&lt;/a&gt;The  source  code  for  `tool' is contained in a file [...SRC]tool.tcs
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-7" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-7" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-7"&gt;&lt;/a&gt;(if   the   tool   is   portable   across   operating   systems)    or
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-8" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-8" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-8"&gt;&lt;/a&gt;[...VMS]tool.tcs  (if  it  is  an VMS-specific tool).  This TCS source
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-9" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-9" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-9"&gt;&lt;/a&gt;file contains an edit history of all changes made to the source.   The
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-10" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-10" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-10"&gt;&lt;/a&gt;output  of  the  `get' utility operating on a `.tcs' file results in a
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-11" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-11" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-11"&gt;&lt;/a&gt;file (tool.w) which is all of the  environment  necessary  to  rebuild
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-12" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-12" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-12"&gt;&lt;/a&gt;the  tool,  provided  that the VOS is operational.  The tool.w file is
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-13" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-13" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-13"&gt;&lt;/a&gt;an archive containing:
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-14" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-14" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-14"&gt;&lt;/a&gt;
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-15" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-15" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-15"&gt;&lt;/a&gt;  1. All of the files "included" by the ratfor source code.
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-16" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-16" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-16"&gt;&lt;/a&gt;  2. The ratfor source file, tool.r.
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-17" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-17" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-17"&gt;&lt;/a&gt;  3. The format input for the manual entry, tool.fmt.
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-18" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-18" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-18"&gt;&lt;/a&gt;  4. And optionally,  any  extra  definition  files  needed  to  build
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-19" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-19" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-19"&gt;&lt;/a&gt;     alternate versions of the tool (eg. sh =&amp;gt; hsh).
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-20" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-20" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-20"&gt;&lt;/a&gt;
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-21" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-21" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-21"&gt;&lt;/a&gt;As  an  example,  suppose  that  you  wish  to  change  the subroutine
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-22" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-22" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-22"&gt;&lt;/a&gt;"module" in "tool".  The suggested scenario is as follows:
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-23" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-23" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-23"&gt;&lt;/a&gt;
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-24" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-24" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-24"&gt;&lt;/a&gt;   $ !Fetch the file tool.tcs from the appropriate directory in the container
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-25" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-25" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-25"&gt;&lt;/a&gt;   $ !file on tape into st_src
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-26" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-26" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-26"&gt;&lt;/a&gt;   $ hsh
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-27" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-27" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-27"&gt;&lt;/a&gt;   % get ~src/tool.tcs tool.w
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-28" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-28" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-28"&gt;&lt;/a&gt;   % ar xv tool.w
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-29" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-29" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-29"&gt;&lt;/a&gt;   % ar xv tool.r module
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-30" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-30" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-30"&gt;&lt;/a&gt;   % ed module
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-31" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-31" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-31"&gt;&lt;/a&gt;   (make changes and write file)
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-32" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-32" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-32"&gt;&lt;/a&gt;   % ar uv tool.r module
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-33" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-33" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-33"&gt;&lt;/a&gt;   % rc -v tool.r
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-34" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-34" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-34"&gt;&lt;/a&gt;   % (test out new tool.  repeat last three steps until satisfied.)
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-35" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-35" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-35"&gt;&lt;/a&gt;   % ed tool.fmt
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-36" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-36" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-36"&gt;&lt;/a&gt;   (modify writeup to reflect changes)
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-37" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-37" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-37"&gt;&lt;/a&gt;   % ar uv tool.w tool.r tool.fmt
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-38" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-38" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-38"&gt;&lt;/a&gt;   % cp tool.exe ~usr/tool.exe
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-39" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-39" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-39"&gt;&lt;/a&gt;   % delta tool.w ~src/tool.tcs
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-40" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-40" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-40"&gt;&lt;/a&gt;   (Identify in the comments the reason for the changes,
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-41" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-41" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-41"&gt;&lt;/a&gt;   and which modules changed.)
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-42" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-42" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-42"&gt;&lt;/a&gt;   % format tool.fmt &amp;gt;tool
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-43" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-43" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-43"&gt;&lt;/a&gt;   % ar uv ~man/s1 tool
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-44" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-44" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-44"&gt;&lt;/a&gt;   % asam &amp;lt;~man/s1 | sort &amp;gt;~man/i1
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-45" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-45" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-45"&gt;&lt;/a&gt;
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-46" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-46" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-46"&gt;&lt;/a&gt;Placing tool.exe in ~usr  causes  the  shell  to  find  your  modified
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-47" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-47" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-47"&gt;&lt;/a&gt;version  of  "tool"  rather  than  the  distributed one.  The last two
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-48" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-48" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-48"&gt;&lt;/a&gt;commands  above  cause  the  manual  entry  for  `tool'  to  correctly
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-49" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-49" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-49"&gt;&lt;/a&gt;correspond to the utility itself.
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-50" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-50" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-50"&gt;&lt;/a&gt;
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-51" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-51" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-51"&gt;&lt;/a&gt;
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-52" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-52" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-52"&gt;&lt;/a&gt;
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-53" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-53" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-53"&gt;&lt;/a&gt;
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-54" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-54" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-54"&gt;&lt;/a&gt;
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-55" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-55" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-55"&gt;&lt;/a&gt;
&lt;a id="rest_code_65b83778a43a48629a4e0fd82a6d8312-56" name="rest_code_65b83778a43a48629a4e0fd82a6d8312-56" href="https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/#rest_code_65b83778a43a48629a4e0fd82a6d8312-56"&gt;&lt;/a&gt;                                 -10-
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;(It should be &lt;code&gt;% get ~src/tool.tcs &amp;gt;tool.w&lt;/code&gt; with a “&amp;gt;”
before &lt;code class="file docutils literal"&gt;tool.w&lt;/code&gt; in the above procedure.  Otherwise the contents
are echoed to the terminal instead of being written to &lt;code class="file docutils literal"&gt;tool.w&lt;/code&gt;.)&lt;/p&gt;
&lt;p&gt;So, all the source files (source code &lt;em&gt;and&lt;/em&gt; documentation) are stored
in an archive file, which contains another archive file that has just
the ratfor source, from which you extract the modules you want to work
on, and at the end update the archives in the reverse order!  This
made organizing all the source much simpler, especially considering
some of the porting targets for this software didn't have hierarchical
directory structures, only flat directories.  So when moving around
parts of the system, like when you were preparing the distribution,
you normally only dealt with the top level archives, the &lt;code class="file docutils literal"&gt;.TCS&lt;/code&gt;
files, and only worked directly with the files that were contained
within that archive and its child archives if you had to make a change
to the source files.  Very clever!&lt;/p&gt;
&lt;img alt="Nesting Russian Matroshka dolls" src="https://tkurtbond.github.io/images/Russian-Matroshka.jpg"&gt;
&lt;p&gt;(&lt;a class="reference external" href="https://en.wikipedia.org/wiki/Matryoshka_doll#/media/File:Russian-Matroshka.jpg"&gt;Source 1&lt;/a&gt;)&lt;/p&gt;
&lt;img alt="Nesting Russian Matroshka dolls, opened" src="https://tkurtbond.github.io/images/Russian-Matroshka-opened.jpg"&gt;
&lt;p&gt;(&lt;a class="reference external" href="https://en.wikipedia.org/wiki/Matryoshka_doll#/media/File:Matryoshka_transparent.png"&gt;Source 2&lt;/a&gt;)&lt;/p&gt;</description><category>decus</category><category>lbltools</category><category>lt86 tape</category><category>source file structure</category><category>swtools</category><category>vax</category><category>vms</category><category>vos</category><guid>https://tkurtbond.github.io/posts/2024/07/03/how-the-lbl-software-tools-system-organized-its-source-files/</guid><pubDate>Wed, 03 Jul 2024 20:20:40 GMT</pubDate></item><item><title>Software Tools</title><link>https://tkurtbond.github.io/posts/2024/07/03/software-tools/</link><dc:creator>T. Kurt Bond</dc:creator><description>&lt;p&gt;When I was in college in the 1980s the school I was at used Digital
Equipment Corporation VAXes running VMS, and didn't have any Unix
machines.  I was quite interested in Unix and the Unix philosophy, but
was frustrated by my lack of access to Unix machines.  However,
Brian W. Kernighan and P. J. Plauger wrote a couple of books about
writing tools in the Unix style: &lt;cite&gt;Software Tools&lt;/cite&gt; was in
published in 1976 and used Fortran as its portable implementation
language, while &lt;cite&gt;Software Tools in Pascal&lt;/cite&gt; was published in
1981 and used Pascal.&lt;/p&gt;
&lt;img alt="/images/swtools.jpeg" src="https://tkurtbond.github.io/images/swtools.jpeg"&gt;
&lt;p&gt;Here is a quote repeated on each book's cover:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Good Programming is not learned from generalities, but by seeing
how significant programs can be made clean, easy to read, easy to
maintain and modify, human-engineered, efficient, and reliable, by
the application of common sense and good programming practices.
Careful study and imitation of good programs leads to better
writing.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Both books worked through writing software tools that were simpler but
still useful versions of many of the standard Unix tools.&lt;/p&gt;
&lt;p&gt;I got &lt;cite&gt;Software Tools in Pascal&lt;/cite&gt; because I knew Pascal better
than Fortran and worked through implementing each of the programs on
the college's VAX, which taught me a lot about programming and was
significant influence on me.  I later got &lt;cite&gt;Software Tools&lt;/cite&gt;
because I wanted to read the section on implementing the ratfor
processor which that book used to add additional control structures
unavailable in the Fortran of the day.&lt;/p&gt;
&lt;p&gt;I was not the only person who was influenced by these books.
Deborah K. Scherrer, Dennis E. Hall, and Joseph S. Sventek at Lawrence
Berkeley National Laboratory with help from others greatly expanded
the set of programs from the book into an entire Virtual Operating
System (VOS), and founded the &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Software_Tools_Users_Group"&gt;Software Tools Users Group&lt;/a&gt; in 1976
to distribute it, eventually leading to ports on over 50 operating
systems.&lt;/p&gt;
&lt;p&gt;Luckily for me VAX/VMS was one of those operating systems, and the
port appeared on various tapes distributed by DECUS, the Digital
Equipment Computer Users' Society.  Luckily MPL Corporation, where I
worked at the time, always got the DECUS tapes and had a Fortran
compiler, so I could install it there.  I found it a very useful and
usable computing environment.&lt;/p&gt;
&lt;p&gt;Anyway, I retain a fondness for that software, known variously as
LBLTOOLS, LBL SWTOOLS, and SWTOOLS VOS, and have begun using the version
from the &lt;a class="reference external" href="https://www.digiater.nl/openvms/decus/zips_vms_attributes/lt86a.zip"&gt;DECUS VAX Languages &amp;amp; Tools SIG tape from 1986&lt;/a&gt;
again on the (emulated) VAX I maintain at work.  This gave me the
opportunity create a &lt;a class="reference external" href="https://tkurtbond.github.io/swtoolsman.pdf"&gt;PDF with the documentation&lt;/a&gt;
for that version, which I'm making available here for the curious.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“I really enjoyed that book.  The first computer book I read where
I thought my world was larger after reading it.” — C. Paul Bond&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;em&gt;Last edited: 2024-10-21 15:59:04 EDT&lt;/em&gt;
— Updated PDF with slight changes to structure and better bookmarks.&lt;/p&gt;
&lt;!-- Local Variables:
time-stamp-format: "%Y-%02m-%02d %02H:%02M:%02S %Z"
time-stamp-start: "\\*Last edited:[ \t]+\\\\?"
time-stamp-end: "\\*\\\\?\n"
time-stamp-line-limit: -20
End: --&gt;</description><category>brian w. kernighan</category><category>decus</category><category>fortran</category><category>lbltools</category><category>lt86 tape</category><category>p.j. plauger</category><category>pascal</category><category>ratfor</category><category>software tools</category><category>swtools</category><category>vax</category><category>vms</category><category>vos</category><guid>https://tkurtbond.github.io/posts/2024/07/03/software-tools/</guid><pubDate>Wed, 03 Jul 2024 13:59:31 GMT</pubDate></item><item><title>Fantastic Medieval Campaigns</title><link>https://tkurtbond.github.io/posts/2024/01/21/fantastic-medieval-campaigns/</link><dc:creator>T. Kurt Bond</dc:creator><description>&lt;p&gt;&lt;a class="reference external" href="https://traversefantasy.itch.io/fmc"&gt;Fantastic Medieval Campaigns&lt;/a&gt; (FMC) by Marcia B. is a great
retroclone and restatement of Original D&amp;amp;D: it's clearly written, well
organized, contains a table of contents for the book and then a table
of contents in each section, has a glossary and indices for monsters,
spells, and tables, and uses the color backgrounds of the pages well
to make finding the different sections easy.  The art is charming and
appropriate for a OD&amp;amp;D retroclone, and the layout is clean.  It
includes a retroclone of Chainmail, which is rare.  I like it very
much.  And the PDF is free!  I got the hardback color book and read it
and want to run at least two campaigns with it, the first using its
Chainmail retroclone, “Chain of Command”, and the next with the d20
based combat system.&lt;/p&gt;
&lt;p&gt;But, but, but!  The back cover text says “problematize our
preconceptions of a text (or even a whole genre)” and mentions
“falsehood”.  And the contents of the last page of the text,
which is labeled “This Page Intentionally Left Blank.”, are certainly
not blank, and expresses opinions of D&amp;amp;D that must surely
offend many D&amp;amp;D players.  I'll quote it here:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Fantastic Medieval Campaigns is a recreation of what is at best a
deeply reactionary work of art—if not a fascist one altogether.
We recognize now that the authors, as well as some who were in
their circle, thought quite badly of women, indigenous people, and
others.  However, we should let the text speak for itself because
it speaks loudly.  The book is a guide to fantastic war game
campaigns, where the players take on the roles of
sword-and-sorcery adventurers seeking greatness.  They will begin
in the Underworld simply slaying monsters and retrieving treasure
in the form of gold, legal tender ready to be exchanged on the
open market.  As characters accumulate treasure, they acquire
superhuman abilities and political power to boot.  Heroes,
Thaumaturgists, and Bishops emerge from their colonial katabasis
conquering land by which to become Lords, Wizards, and Patriarchs.
They will establish sanctuaries and, with their vast armies, turn
the tide against the forces of evil chaos they have always
‘resisted' thus far.  The setting in general is one where might
makes right, where the violent extraction of resources is central
to the protagonists activity, and where participation in these
things is rewarded with not only political power bu the sort of
physiological and supernatural power which colonizers and fascists
imagined themselves to have.  It is a mirror to the desires and
fantasies of its original authors, a bunch of white, straight,
cissexual men in the Midwest, just as it is a reflection of boys'
pulp literature at the height of American culture about crushing
one's enemies and driving them before oneself and hearing the
lamentations of their women.  All in all, this work was not
written in a vacuum nor did it spring fully formed from the heads
of its creators.  You can use this book however you like or even
attempt to play it with the mindset of a midcentury American  man,
but do not delude yourself with regards to its content or to the
fantasy which it encodes.  That being said, as the author, I offer
up this work for analysis, critique, and reflection.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Well, that certainly put the coyote in the chicken house!  It is
definitely controversial in OSR circles.  Honestly, though, I'm not
sure &lt;em&gt;that&lt;/em&gt; furor was worth following.&lt;/p&gt;
&lt;p&gt;I just want to point out that, whatever the author's opinions of D&amp;amp;D,
they wrote FMC so they could more easily understand the rules, so
they could better play D&amp;amp;D with their friends, and according to a
&lt;a class="reference external" href="https://www.paperspencils.com/fantastic-medieval-campaigns/"&gt;friend of theirs&lt;/a&gt; they spent over a year working on it.&lt;/p&gt;
&lt;p&gt;Regardless of whether I agree with their views or not, FMC is a well
written game and its author should be proud of it.  It can be used to
run some great games.  If you don't agree with the author's views, just
ignore them and &lt;strong&gt;play the game&lt;/strong&gt;.&lt;/p&gt;</description><category>controversy</category><category>dnd</category><category>fantastic medieval campaigns</category><category>fmc</category><category>odnd</category><guid>https://tkurtbond.github.io/posts/2024/01/21/fantastic-medieval-campaigns/</guid><pubDate>Mon, 22 Jan 2024 04:13:27 GMT</pubDate></item></channel></rss>