[med-svn] [Git][med-team/simrisc][upstream] New upstream version 15.03.01

Frank B. Brokken (@fbb-guest) gitlab at salsa.debian.org
Sat Oct 28 15:42:33 BST 2023



Frank B. Brokken pushed to branch upstream at Debian Med / simrisc


Commits:
253bbec8 by Frank B. Brokken at 2023-10-28T16:42:05+02:00
New upstream version 15.03.01
- - - - -


15 changed files:

- INSTALL.im
- VERSION
- − c++std
- changelog
- documentation/man/include/changes.yo
- documentation/man/simriscparams.yo
- err/msg2.cc
- icmconf
- icmconf.lib
- oxref/replace
- scenario/checkcumdeath.cc
- scenario/scenario.h
- scenario/scenario.ih
- scenario/setdeath.cc
- + scenario/showlineinfo.cc


Changes:

=====================================
INSTALL.im
=====================================
@@ -1,5 +1,3 @@
-#include "c++std"
-
     // Specify the name of the project:
 #define PROGRAM             "simrisc"
 
@@ -7,10 +5,8 @@
 #define CXX                 "g++"
 
     // The compiler options to use:
-#define CXXFLAGS    ${CPPSTD} " -Wall -Werror -O2 -fdiagnostics-color=never"
-
-// #define CXXFLAGS    ${CPPSTD} " -Wall -Werror -O2 -pthread " \<-- note !!
-//                                 "-fdiagnostics-color=never"
+#define CXXFLAGS    "-Wall -Werror -O2 -fdiagnostics-color=never"
+// #define CXXFLAGS    "-Wall -Werror -O2 -pthread -fdiagnostics-color=never"
 
     // Flags passed to the linker:
 //#define LDFLAGS             "-lpthread"


=====================================
VERSION
=====================================
@@ -1,3 +1,3 @@
 #define AUTHOR  "Frank B. Brokken (f.b.brokken at rug.nl)";
-#define VERSION "15.03.00"
+#define VERSION "15.03.01"
 #define YEARS "2020-2023"


=====================================
c++std deleted
=====================================
@@ -1 +0,0 @@
-#define CPPSTD "--std=c++23"


=====================================
changelog
=====================================
@@ -1,3 +1,18 @@
+simrisc (15.03.01)
+
+  * When reading the cumulative death proportions errors in the specification
+    of the cumulative death proportions are checked (like lines broken at a
+    final '='-character).
+
+  * Changed the copyright to the Gnu GPL
+
+  * Cosmetics on the simrisc.xref
+
+  * The c++std file is no longer used. Instead the ICMAKE_CXXFLAGS environment
+    variable is inspected.
+
+ -- Frank B. Brokken <f.b.brokken at rug.nl>  Sat, 28 Oct 2023 15:08:19 +0200
+  
 simrisc (15.03.00)
 
   * Repaired survival/cptvsdrow: d_vsdRow was set to S3's row instead of


=====================================
documentation/man/include/changes.yo
=====================================
@@ -1,11 +1,11 @@
+COMMENT(
+
 manpagesection(Changes introduced in version 15.01.00)
 
     itemization(
     it()
     )
 
-COMMENT(
-
 manpagesection(Changes introduced in version 15.00.00)
 
     itemization(


=====================================
documentation/man/simriscparams.yo
=====================================
@@ -138,7 +138,7 @@ configuration file contains the following specifications:
        which are the 101 cumulative death proportions used for breast cancer
         simulations.
 
-       If the 101 cumulative death proportions aee available in, e.g., the
+       If the 101 cumulative death proportions are available in, e.g., the
         user's tt(.config/) directory as the file tt(cumdeath) then the
         specification could have been:
        verb(


=====================================
err/msg2.cc
=====================================
@@ -1,8 +1,6 @@
 #define XERR
 #include "err.ih"
 
-//#include <iostream>
-
                                 // line context available
 ostream &Err::msg(Context err)
 {


=====================================
icmconf
=====================================
@@ -3,14 +3,11 @@
 
 #include "INSTALL.im"
 
-// #undef  CXXFLAGS
-// #define CXXFLAGS            "-Wall -O2 -pthread"
-
 #define MAIN                "main.cc"
 #define ADD_LIBRARIES       "bobcat"
 #define ADD_LIBRARY_PATHS  ""
 #define REFRESH
-#define LIBRARY             "modules"
+#define LIBRARY             "ofiles"
 #define IH                  ".ih"
 #define SHAREDREQ           ""
 #define SOURCES             "*.cc"


=====================================
icmconf.lib
=====================================
@@ -1,5 +1,3 @@
-#include "c++std"
-
 #define PRECOMP             "-x c++-header"
 
 #define CLS
@@ -9,8 +7,7 @@
 #define USE_ECHO              ON
 #define IH                  ".ih"
 #define CXX                 "g++"
-#define CXXFLAGS            ${CPPSTD} " -Wall -Werror -O2 " \
-                                " -fdiagnostics-color=never "
+#define CXXFLAGS            "-Wall -Werror -O2 -fdiagnostics-color=never"
 #define ADD_LIBRARIES       "bobcat"
 #define ADD_LIBRARY_PATHS   ""
 


=====================================
oxref/replace
=====================================
@@ -17,3 +17,7 @@
 #, std::allocator<Parser::OptionInfo> ##
 #, std::allocator<std::pair<std::string const, Parser*> > ##
 #, std::allocator<std::unordered_map<std::string, Parser*>*> ##
+#, std::allocator<AgeGroupVSD> ##
+#, std::allocator<ProbGroup> ##
+#, std::allocator<VSD> ##
+#, std::allocator<LineInfo> ##


=====================================
scenario/checkcumdeath.cc
=====================================
@@ -1,10 +1,12 @@
 //#define XERR
 #include "scenario.ih"
 
-void Scenario::checkCumDeath(string const &source) const
+void Scenario::checkCumDeath(string const &source,
+                             LineInfo const *previous) const
 {
     if (size_t size = d_cumDeathProportions.size(); size != END_AGE)
     {
+        previous = showLineInfo(previous);
         Err::msg(Err::CUM_DEATH) <<  source << "): " <<
                                     END_AGE << " proportions required, " <<
                                     size << " specified" << endl;
@@ -16,8 +18,11 @@ void Scenario::checkCumDeath(string const &source) const
                 ++iter, ++next)
     {
         if (*next < *iter)
+        {
+            previous = showLineInfo(previous);
             Err::msg(Err::CUM_DEATH) << source << ") proportions decrease: " <<
                     (next - begin) << " (" << *next << ") less than " <<
                     (iter - begin) << " (" << *iter << ')' << endl;
+        }
     }
 }


=====================================
scenario/scenario.h
=====================================
@@ -25,6 +25,12 @@
 
 class Scenario
 {
+    struct DLine    // offending Death Line specification in case of errors
+    {
+        std::string const *line;
+        size_t lineNr;
+    };
+
     StringVect d_base;
 
     GeneratorType d_generatorType;
@@ -51,7 +57,8 @@ class Scenario
 
     private:
         bool appendCumDeath(std::string const &line);
-        void checkCumDeath(std::string const &source) const;
+        void checkCumDeath(std::string const &source, 
+                           LineInfo const *previous) const;
         void readCumDeath(std::string const &fname);
 
         void setDeath();                    // set the cum. death proportions
@@ -63,6 +70,7 @@ class Scenario
 
         static int find(StringVect const &haystack,     // must succeed or
                         std::string const &needle);     // Err::specification
+        static LineInfo const *showLineInfo(LineInfo const *ptr);
 };
 
 #include "scenario.f"


=====================================
scenario/scenario.ih
=====================================
@@ -1,6 +1,7 @@
 #include "scenario.h"
 #include "../xerr/xerr.ih"
 
+#include <iostream>
 #include <sstream>
 #include <algorithm>
 
@@ -13,3 +14,4 @@
 
 using namespace std;
 using namespace FBB;
+


=====================================
scenario/setdeath.cc
=====================================
@@ -3,7 +3,7 @@
 
 void Scenario::setDeath()
 {
-    bool ok = true;
+    LineInfo const *previous = 0;
 
     string cumDeath;
     if (cumDeath = Options::instance().cumDeathFile(); not cumDeath.empty())
@@ -19,12 +19,12 @@ void Scenario::setDeath()
         else
         {
             cumDeath = "analysis specification";
-            lines.get();                        // skip the first (empty) line
-            while (LineInfo const *ptr = lines.get())
-                ok = appendCumDeath(ptr->tail) and ok;
+            LineInfo const *ptr = lines.get();  // skip the first (empty) line
+            do
+                previous = ptr;                 // keep the previous line
+            while ((ptr = lines.get()) and appendCumDeath(ptr->tail));
         }
     }
 
-    if (ok)
-        checkCumDeath(cumDeath);
+    checkCumDeath(cumDeath, previous);
 }


=====================================
scenario/showlineinfo.cc
=====================================
@@ -0,0 +1,11 @@
+//#define XERR
+#include "scenario.ih"
+
+// static
+LineInfo const *Scenario::showLineInfo(LineInfo const *ptr)
+{
+    if (ptr != 0)
+        cout << "[Error]    At line " << ptr->lineNr << 
+                " `" << ptr->tail << '\'' << endl;
+    return 0;
+}



View it on GitLab: https://salsa.debian.org/med-team/simrisc/-/commit/253bbec8759f1739977e4f21252dd15ea5ea8280

-- 
View it on GitLab: https://salsa.debian.org/med-team/simrisc/-/commit/253bbec8759f1739977e4f21252dd15ea5ea8280
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20231028/f50c506d/attachment-0001.htm>


More information about the debian-med-commit mailing list