Updated OpenC++ links.

Pascal J. Bourguignon [2018-11-14 12:45]
Updated OpenC++ links.
Filename
com.informatimago.www/articles/life-saver.html
diff --git a/com.informatimago.www/articles/life-saver.html b/com.informatimago.www/articles/life-saver.html
index 3894b4e..4537ee5 100644
--- a/com.informatimago.www/articles/life-saver.html
+++ b/com.informatimago.www/articles/life-saver.html
@@ -6,7 +6,7 @@
   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">

   <link rel="icon"          href="/favicon.ico" type="image/x-icon">
-  <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+  <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
   <link rel="stylesheet"    href="../default.css"  type="text/css">

     <style type="text/css">
@@ -64,13 +64,13 @@
         text-decoration: underline;
       }

-img.floatLeft {
-    float: left;
-    margin: 4px;
+img.floatLeft {
+    float: left;
+    margin: 4px;
 }
-img.floatRight {
-    float: right;
-    margin: 4px;
+img.floatRight {
+    float: right;
+    margin: 4px;
 }

     -->
@@ -78,7 +78,7 @@ img.floatRight {


   <META NAME="author"             CONTENT="Pascal J. Bourguignon">
-  <META HTTP-EQUIV="Description"
+  <META HTTP-EQUIV="Description"
         NAME="description"        CONTENT="Libraries and trick to help Lisp programmer survive in a C++ environment.">
   <META NAME="keywords"           CONTENT="Lisp, Common Lisp, Scheme, C++, C, Life saver, library">
   <title>Life Saver -- How a Lisp programmer can survive in a C++ environment</title>
@@ -142,14 +142,14 @@ href="http://www.gnu.org/software/emacs">GNU emacs</a>
 <br><hr><br><a name="openc++">
 <h2>Metaprogramming: OpenC++</h2>

-<p><a href="http://www.csg.is.titech.ac.jp/~chiba/openc++.html">OpenC++</a>
+<p><a href="http://opencxx.sourceforge.net">OpenC++</a>
 is a pre-processor to C++, which extends C++ with a Meta Object
 Protocol (MOP), which allow you to do metaprogramming in a sane way
 (nothing to do with templates and boost hell).</p>


 <center>
-<img src="http://www.csg.is.titech.ac.jp/~chiba/opencxx/html/occ.gif"
+<img src="http://opencxx.sourceforge.net/opencxx/html/occ.gif"
      alt="[metal-level program .cc] --> <OpenC++ compiler> --> <C++ compiler> --> [C++ module .so],[base-level program .cc] --> [OpenC++ compiler] --> [C++ compiler] --> [object .o]">
 </center>

@@ -259,7 +259,7 @@ tree of a C++ source in a processable form!</p>
 % myocc -s person.cc
 [<span class="keyword">typedef</span> [<span class="type">char</span>] [* __gnuc_va_list] ;]
     :
-    :
+    :
 [metaclass VerboseClass Person nil ;]
 [[[class Person nil [{ [
                         [public :]
@@ -296,7 +296,7 @@ tree of a C++ source in a processable form!</p>
 <p><a href="http://www.interhack.net/projects/lpp/">Lpp</a> is a C++
 library of Lisp-like functions and macros, providing the various data
 types commonly found in Lisp, such as symbols, lists, hash-tables,
-etc.
+etc.

 <blockquote>
 <em>Unfortunately, the latest versions of <b>Lpp</b> (1.21.2 and
@@ -309,9 +309,9 @@ extern declarations...</em>

      <span class="comment-delimiter">/////////////////////////////////////////////////////////////////</span><span class="comment">
 </span>     <span class="comment-delimiter">// </span><span class="comment">main.cc = Introduction Simple Data Base example.
-</span>
+</span>
 <span class="preprocessor">     #include</span> <span class="string">&lt;Lpp.hh&gt;</span>
-
+
      <span class="comment-delimiter">// </span><span class="comment">Data Base class.
 </span>     <span class="keyword">class</span> <span class="type">DataBase</span> {
        <span class="type">int</span> <span class="variable-name">size</span>;
@@ -322,16 +322,16 @@ extern declarations...</em>
        <span class="type">void</span> <span class="function-name">addEntity</span>(<span class="type">let</span>);
        <span class="type">void</span> <span class="function-name">setValue</span>(<span class="type">let</span>, <span class="type">let</span>, <span class="type">let</span>);
        <span class="type">let</span> <span class="function-name">getValue</span>(<span class="type">let</span>, <span class="type">let</span>);};
-
+
      <span class="comment-delimiter">// </span><span class="comment">Data Base constructor.
 </span>     <span class="constant">DataBase</span>::<span class="function-name">DataBase</span>() {size = 0; contents = makeHashTable();}
-
+
      <span class="comment-delimiter">// </span><span class="comment">Add an entity to the Data Base.
 </span>     <span class="type">void</span> <span class="constant">DataBase</span>::<span class="function-name">addEntity</span>(<span class="type">let</span> <span class="variable-name">entity</span>) {
        <span class="keyword">if</span> (<span class="negation-char">!</span>gethash(entity, contents)) {
          puthash(entity, contents, 0);
          size++;}}
-
+
      <span class="comment-delimiter">// </span><span class="comment">Set the value of an attribute for given entity.
 </span>     <span class="type">void</span> <span class="constant">DataBase</span>::<span class="function-name">setValue</span>(<span class="type">let</span> <span class="variable-name">entity</span>, <span class="type">let</span> <span class="variable-name">attribute</span>, <span class="type">let</span> <span class="variable-name">value</span>) {
        <span class="type">let</span> <span class="variable-name">attributes</span> = gethash(entity, contents);
@@ -340,7 +340,7 @@ extern declarations...</em>
        <span class="keyword">else</span> {
          push(cons(attribute, value), attributes);
          puthash(entity, contents, attributes);}}
-
+
      <span class="comment-delimiter">// </span><span class="comment">Return the value of an attribute for given entity.
 </span>     <span class="type">let</span> <span class="constant">DataBase</span>::<span class="function-name">getValue</span>(<span class="type">let</span> <span class="variable-name">entity</span>, <span class="type">let</span> <span class="variable-name">attribute</span>) {
        <span class="keyword">return</span> cdr(assoc(attribute, gethash(entity, contents)));}
@@ -355,7 +355,7 @@ extern declarations...</em>
 <br><hr><br><a name="sexp">
 <h2>Writing Sexp-formated data in C: Rivest's SEXP</h2>

-<p>Ronald L. Rivest's <a href="http://people.csail.mit.edu/rivest/sexp.html">SEXP</a>
+<p>Ronald L. Rivest's <a href="http://people.csail.mit.edu/rivest/sexp.html">SEXP</a>
 format writes and reads data in a sexp-like format, with some provision for binary data.

 <p>It may be a nice alternative to JSON or XML.   Of course, one can
@@ -409,18 +409,18 @@ to Lisp syntax, without any preprocessing.<p>
    <span class="comment-delimiter">////////////////////////////////////////////////</span><span class="comment">
 </span>   <span class="comment-delimiter">//</span><span class="comment">
 </span>   (L|DEFUN, ISOMORPHIC, (L|TREE1, TREE2),
-     (L|COND,
+     (L|COND,
        (L|(L|ATOM, TREE1), (L|ATOM, TREE2)),
        (L|(L|ATOM, TREE2), NIL),
        (L|T, (L|AND,
-         (L|ISOMORPHIC, (L|CAR, TREE1),
+         (L|ISOMORPHIC, (L|CAR, TREE1),
                         (L|CAR, TREE2)),
-         (L|ISOMORPHIC, (L|CDR, TREE1),
+         (L|ISOMORPHIC, (L|CDR, TREE1),
                         (L|CDR, TREE2))
    )))).Evaluate();
    <span class="comment-delimiter">//</span><span class="comment">
 </span>   <span class="comment-delimiter">////////////////////////////////////////////////</span><span class="comment">
-</span> }
+</span> }
  <span class="comment-delimiter">//      </span><span class="comment">end of file
 </span>
 </pre>
@@ -435,12 +435,12 @@ to Lisp syntax, without any preprocessing.<p>
 <span class="preprocessor"> #include</span> <span class="string">&lt;intelib/sexpress/sexpress.hpp&gt;</span>
 <span class="preprocessor"> #include</span> <span class="string">&lt;intelib/sexpress/sstring.hpp&gt;</span>
 <span class="preprocessor"> #include</span> <span class="string">&lt;intelib/lisp/lsymbol.hpp&gt;</span>
-
+
  <span class="keyword">extern</span> <span class="type">LSymbol</span> <span class="variable-name">ISOMORPHIC</span>;
  <span class="type">void</span> <span class="function-name">LispInit_isomorphic</span>();
-
+
  <span class="keyword">static</span> <span class="type">LListConstructor</span> <span class="variable-name">L</span>;
-
+
  <span class="type">void</span> <span class="function-name">call_isomorph</span>(<span class="keyword">const</span> <span class="type">SReference</span> &amp;<span class="variable-name">l1</span>, <span class="keyword">const</span> <span class="type">SReference</span> &amp;<span class="variable-name">l2</span>)
  {
      <span class="type">SReference</span> <span class="variable-name">res</span> = (L|ISOMORPHIC, ~l1, ~l2).Evaluate();
@@ -449,7 +449,7 @@ to Lisp syntax, without any preprocessing.<p>
             l2-&gt;TextRepresentation().c_str(),
             res-&gt;TextRepresentation().c_str());
  }
-
+
  <span class="type">int</span> <span class="function-name">main</span>(<span class="type">int</span> <span class="variable-name">argc</span>, <span class="type">char</span> *<span class="variable-name">argv</span>[])
  {
      LispInit_isomorphic();
ViewGit