From 5252a6f7b1ea8d88feebb120f9de05befc9e9c3c Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (o)" <j.wuttke@fz-juelich.de>
Date: Tue, 24 Jan 2017 12:55:44 +0100
Subject: [PATCH] inserted include guards; includes hand-repaired; compiles.

---
 pub/lib/commands.cpp    |  1 +
 pub/lib/commands.hpp    |  5 +++++
 pub/lib/coord.hpp       |  5 ++++-
 pub/lib/curve.cpp       |  2 +-
 pub/lib/curve.hpp       |  5 +++++
 pub/lib/defs.hpp        |  2 +-
 pub/lib/edif.cpp        |  2 +-
 pub/lib/edif.hpp        |  5 +++++
 pub/lib/expr.hpp        |  8 ++++++++
 pub/lib/file_in.hpp     |  6 +++++-
 pub/lib/file_out.hpp    |  6 +++++-
 pub/lib/fit.hpp         |  5 +++++
 pub/lib/fregistry.hpp   |  6 ++++++
 pub/lib/fsel.hpp        |  9 +++++++++
 pub/lib/func.hpp        |  5 +++++
 pub/lib/genus.cpp       |  3 ++-
 pub/lib/genus.hpp       |  5 +++++
 pub/lib/import.hpp      |  5 +++++
 pub/lib/jsel.hpp        |  5 +++++
 pub/lib/loop.cpp        |  4 +++-
 pub/lib/loop.hpp        |  9 +++++++++
 pub/lib/manip.hpp       |  5 +++++
 pub/lib/mem.hpp         | 10 ++++++++++
 pub/lib/node.hpp        |  5 +++++
 pub/lib/obj.hpp         |  7 +++++++
 pub/lib/olf.hpp         |  5 +++++
 pub/lib/opr.hpp         |  6 +++++-
 pub/lib/plot.hpp        |  6 +++++-
 pub/lib/ptr.hpp         |  5 +++++
 pub/lib/reduce_curv.hpp |  5 +++++
 pub/lib/reduce_spec.hpp |  5 +++++
 pub/lib/rssm.hpp        |  5 +++++
 pub/lib/slice.hpp       |  5 +++++
 pub/lib/special.hpp     |  5 +++++
 pub/lib/toplevel.hpp    |  5 +++++
 pub/lib/variables.hpp   |  8 ++++++++
 pub/lib/xax_lex.hpp     |  5 +++++
 37 files changed, 185 insertions(+), 10 deletions(-)

diff --git a/pub/lib/commands.cpp b/pub/lib/commands.cpp
index 464a7866..216be01e 100644
--- a/pub/lib/commands.cpp
+++ b/pub/lib/commands.cpp
@@ -38,6 +38,7 @@
 #include "reduce_spec.hpp"
 #include "rssm.hpp"
 #include "special.hpp"
+#include "commands.hpp"
 
 
 //! Executes cmd if is a Frida command, and returns true when successful.
diff --git a/pub/lib/commands.hpp b/pub/lib/commands.hpp
index 1546b3d9..0dc8e792 100644
--- a/pub/lib/commands.hpp
+++ b/pub/lib/commands.hpp
@@ -7,4 +7,9 @@
 //! \file  commands.hpp
 //! \brief Function fridaCommand: executes one main-level command.
 
+#ifndef COMMANDS_H
+#define COMMANDS_H
+
 bool frida_command(string cmd);
+
+#endif // COMMANDS_H
diff --git a/pub/lib/coord.hpp b/pub/lib/coord.hpp
index 3a0c7a6c..42249cbc 100644
--- a/pub/lib/coord.hpp
+++ b/pub/lib/coord.hpp
@@ -7,6 +7,8 @@
 //! \file  coord.hpp
 //! \brief Coordinates CCoord, numeric parameters CParam.
 
+#ifndef COORD_H
+#define COORD_H
 
 //! A coordinate, consisting of a name and a unit.
 
@@ -56,4 +58,5 @@ public:
         : Co(CCoord(_name, _unit)), val(_val), dval(_dval)
     {
     }
-};
\ No newline at end of file
+};
+#endif // COORD_H
diff --git a/pub/lib/curve.cpp b/pub/lib/curve.cpp
index f4c6c3cd..e170a546 100644
--- a/pub/lib/curve.cpp
+++ b/pub/lib/curve.cpp
@@ -13,7 +13,6 @@
 
 #include "../readplus/ask.hpp"
 
-#include "curve.hpp"
 #include "expr.hpp"
 #include "fsel.hpp"
 #include "loop.hpp"
@@ -23,6 +22,7 @@
 #include "opr.hpp"
 #include "slice.hpp"
 #include "xax_lex.hpp"
+#include "curve.hpp"
 
 using boost::format;
 
diff --git a/pub/lib/curve.hpp b/pub/lib/curve.hpp
index f8c9461b..9b0c781b 100644
--- a/pub/lib/curve.hpp
+++ b/pub/lib/curve.hpp
@@ -7,6 +7,9 @@
 //! \file  curve.hpp
 //! \brief NCurveFile: Methods to create, inspect, modify curve files.
 
+#ifndef CURVE_H
+#define CURVE_H
+
 class CSpec;
 
 //! Methods to create, inspect, modify curve files.
@@ -30,3 +33,5 @@ void set_par_attr(char attr);
 
 void get_conv(const CSpec** sv, int* kv, int* jv, int k, int j);
 }
+
+#endif // CURVE_H
diff --git a/pub/lib/defs.hpp b/pub/lib/defs.hpp
index 043855bd..0b6e3696 100644
--- a/pub/lib/defs.hpp
+++ b/pub/lib/defs.hpp
@@ -13,8 +13,8 @@
 #include <iostream>
 #include <map>
 #include <vector>
-
 #include "../trivia/string_convs.hpp"
+
 #define S(a) triv::strg((a))
 
 #define SQR(a) ((a) * (a))
diff --git a/pub/lib/edif.cpp b/pub/lib/edif.cpp
index 8b37097d..2267999b 100644
--- a/pub/lib/edif.cpp
+++ b/pub/lib/edif.cpp
@@ -17,7 +17,6 @@
 #include "../trivia/string_ops.hpp"
 #include "../trivia/vector_ops.hpp"
 
-#include "edif.hpp"
 #include "fsel.hpp"
 #include "genus.hpp"
 #include "loop.hpp"
@@ -25,6 +24,7 @@
 #include "obj.hpp"
 #include "olf.hpp"
 #include "slice.hpp"
+#include "edif.hpp"
 
 using boost::format;
 
diff --git a/pub/lib/edif.hpp b/pub/lib/edif.hpp
index 591adbb1..97f6a141 100644
--- a/pub/lib/edif.hpp
+++ b/pub/lib/edif.hpp
@@ -7,6 +7,9 @@
 //! \file  edif.hpp
 //! \brief NEdif: Methods to inspect and edit data and metadata.
 
+#ifndef EDIF_H
+#define EDIF_H
+
 
 //! Methods to inspect and edit data and metadata.
 
@@ -23,3 +26,5 @@ void edit_coord(string which);
 void edit_doc();
 void del_numpar();
 }
+
+#endif // EDIF_H
diff --git a/pub/lib/expr.hpp b/pub/lib/expr.hpp
index 618cf9e1..d5a1ff19 100644
--- a/pub/lib/expr.hpp
+++ b/pub/lib/expr.hpp
@@ -7,6 +7,12 @@
 //! \file  expr.hpp
 //! \brief Expressions are parsed into CRef, CContext, CObj, virtual CNode.
 
+#ifndef EXPR_H
+#define EXPR_H
+
+#include "coord.hpp"
+#include "ptr.hpp"
+
 //! The context in which a CNode shall be evaluated.
 
 class CContext
@@ -104,3 +110,5 @@ public:
 
     static RObj eval(string expr);
 };
+
+#endif // EXPR_H
diff --git a/pub/lib/file_in.hpp b/pub/lib/file_in.hpp
index 4be81539..15387637 100644
--- a/pub/lib/file_in.hpp
+++ b/pub/lib/file_in.hpp
@@ -7,10 +7,14 @@
 //! \file  file_in.hpp
 //! \brief NFileIn: load files
 
+#ifndef FILE_IN_H
+#define FILE_IN_H
+
 
 //! Method to load files, with support for various old formats.
 
 namespace NFileIn
 {
 void load();
-}
\ No newline at end of file
+}
+#endif // FILE_IN_H
diff --git a/pub/lib/file_out.hpp b/pub/lib/file_out.hpp
index e6377f8a..fcfca02c 100644
--- a/pub/lib/file_out.hpp
+++ b/pub/lib/file_out.hpp
@@ -7,10 +7,14 @@
 //! \file  file_out.hpp
 //! \brief NFileOut: write files.
 
+#ifndef FILE_OUT_H
+#define FILE_OUT_H
+
 
 //! Method to save files.
 
 namespace NFileOut
 {
 void save(string fmt, bool allow_overwrite = false);
-}
\ No newline at end of file
+}
+#endif // FILE_OUT_H
diff --git a/pub/lib/fit.hpp b/pub/lib/fit.hpp
index 9c1ccd9f..94876d72 100644
--- a/pub/lib/fit.hpp
+++ b/pub/lib/fit.hpp
@@ -7,6 +7,9 @@
 //! \file  fit.hpp
 //! \brief NCurveFit: fit a curve file to a data file
 
+#ifndef FIT_H
+#define FIT_H
+
 
 //! Methods related to fitting.
 
@@ -15,3 +18,5 @@ namespace NCurveFit
 void set_fit_tuning_pars(string which);
 void fit(bool _allow_slow_conv);
 }
+
+#endif // FIT_H
diff --git a/pub/lib/fregistry.hpp b/pub/lib/fregistry.hpp
index 4b06d440..93a6288f 100644
--- a/pub/lib/fregistry.hpp
+++ b/pub/lib/fregistry.hpp
@@ -7,6 +7,10 @@
 //! \file  fregistry.hpp
 //! \brief Registration of CFunc's.
 
+#ifndef FREGISTRY_H
+#define FREGISTRY_H
+
+#include "func.hpp"
 #include "registry.hpp"
 
 //  Low-level function types.
@@ -193,3 +197,5 @@ public:
         register_fct_template(_m, "e", "eee", (funcPtr)_f);
     }
 };
+
+#endif // FREGISTRY_H
diff --git a/pub/lib/fsel.hpp b/pub/lib/fsel.hpp
index 0b2a9090..7d40e930 100644
--- a/pub/lib/fsel.hpp
+++ b/pub/lib/fsel.hpp
@@ -7,8 +7,15 @@
 //! \file  fsel.hpp
 //! \brief Declare online file selection
 
+#ifndef FSEL_H
+#define FSEL_H
+
+#include "fsel.hpp"
+#include "ptr.hpp"
 #include "registry.hpp"
 
+class COlo;
+
 //! Online memory and the default file selection.
 
 class SFSel : public triv::ISingleton<SFSel>
@@ -33,3 +40,5 @@ public:
     void sel_collect_end();
     void sel_increment(int step);
 };
+
+#endif // FSEL_H
diff --git a/pub/lib/func.hpp b/pub/lib/func.hpp
index c29efc51..cb8cfa33 100644
--- a/pub/lib/func.hpp
+++ b/pub/lib/func.hpp
@@ -7,6 +7,9 @@
 //! \file  func.hpp
 //! \brief Function wrapper classes CTypedFunc and CFunc.
 
+#ifndef FUNC_H
+#define FUNC_H
+
 //! A wrapper holding a function with given input and output types.
 
 typedef void (*funcPtr)(void); // generic pointer-to-function type
@@ -59,3 +62,5 @@ public:
     class CCoord coord(const CCoord& co1, const CCoord& co2) const;
     class CCoord coord(const CCoord& co1, const CCoord& co2, const CCoord& co3) const;
 };
+
+#endif // FUNC_H
diff --git a/pub/lib/genus.cpp b/pub/lib/genus.cpp
index 2ade5f7e..5365c482 100644
--- a/pub/lib/genus.cpp
+++ b/pub/lib/genus.cpp
@@ -7,9 +7,10 @@
 //! \file  genus.cpp
 //! \brief Variable reference CGenus.
 
-#include "genus.hpp"
 #include "defs.hpp"
 
+#include "genus.hpp"
+
 
 //**************************************************************************************************
 //*  class CGenus
diff --git a/pub/lib/genus.hpp b/pub/lib/genus.hpp
index 14e4a677..252fdccf 100644
--- a/pub/lib/genus.hpp
+++ b/pub/lib/genus.hpp
@@ -7,6 +7,9 @@
 //! \file  genus.hpp
 //! \brief Variable reference CGenus.
 
+#ifndef GENUS_H
+#define GENUS_H
+
 
 //! Variable category.
 
@@ -62,3 +65,5 @@ public:
 private:
     static int request_num(string s, int pos);
 };
+
+#endif // GENUS_H
diff --git a/pub/lib/import.hpp b/pub/lib/import.hpp
index 1fbbe285..a83e0931 100644
--- a/pub/lib/import.hpp
+++ b/pub/lib/import.hpp
@@ -7,6 +7,9 @@
 //! \file  import.hpp
 //! \brief NImport: import tables or make data ex nihilo
 
+#ifndef IMPORT_H
+#define IMPORT_H
+
 
 //! Import tables or make data ex nihilo.
 
@@ -15,3 +18,5 @@ namespace NImport
 void read_tab(string qualif);
 void make_grid();
 }
+
+#endif // IMPORT_H
diff --git a/pub/lib/jsel.hpp b/pub/lib/jsel.hpp
index 9fd893f7..ea3a637f 100644
--- a/pub/lib/jsel.hpp
+++ b/pub/lib/jsel.hpp
@@ -7,5 +7,10 @@
 //! \file  jsel.hpp
 //! \brief Selection of spec/curve index j.
 
+#ifndef JSEL_H
+#define JSEL_H
+
 
 void JSelAsk(string quest, vector<int>& JSel);
+
+#endif // JSEL_H
diff --git a/pub/lib/loop.cpp b/pub/lib/loop.cpp
index c53be658..4bed01fe 100644
--- a/pub/lib/loop.cpp
+++ b/pub/lib/loop.cpp
@@ -7,11 +7,13 @@
 //! \file  loop.cpp
 //! \brief Implements iterator over file selection.
 
-#include "loop.hpp"
 #include "defs.hpp"
+
 #include "mem.hpp"
 #include "olf.hpp"
 
+#include "loop.hpp"
+
 FileIterator::FileIterator(const vector<int>& _Sel, bool tolerate_empty)
 {
     Sel = _Sel;
diff --git a/pub/lib/loop.hpp b/pub/lib/loop.hpp
index cbb52bd9..49d185d5 100644
--- a/pub/lib/loop.hpp
+++ b/pub/lib/loop.hpp
@@ -7,6 +7,13 @@
 //! \file  loop.hpp
 //! \brief Declares iterator over file selection.
 
+#ifndef LOOP_H
+#define LOOP_H
+
+class COlo;
+class COld;
+class COlc;
+
 
 //! Iterate over all files in selection.
 
@@ -42,3 +49,5 @@ public:
         return currentC();
     }
 };
+
+#endif // LOOP_H
diff --git a/pub/lib/manip.hpp b/pub/lib/manip.hpp
index 0e169e07..73a672f2 100644
--- a/pub/lib/manip.hpp
+++ b/pub/lib/manip.hpp
@@ -7,6 +7,9 @@
 //! \file  manip.hpp
 //! \brief NManip: manipulate data (select, bin, sort, ...)
 
+#ifndef MANIP_H
+#define MANIP_H
+
 //! Manipulate data (select, bin, sort, ...)
 
 namespace NManip
@@ -37,3 +40,5 @@ void files_merge(const string& opts);
 void files_merge_pointwise();
 void interpolate();
 }
+
+#endif // MANIP_H
diff --git a/pub/lib/mem.hpp b/pub/lib/mem.hpp
index 6be9b845..33722c79 100644
--- a/pub/lib/mem.hpp
+++ b/pub/lib/mem.hpp
@@ -7,8 +7,16 @@
 //! \file  mem.hpp
 //! \brief Declare online memory
 
+#ifndef MEM_H
+#define MEM_H
+
+#include "ptr.hpp"
 #include "registry.hpp"
 
+class COlo;
+class COld;
+class COlc;
+
 //! Online memory and the default file selection.
 
 class SMem : public triv::ISingleton<SMem>
@@ -32,3 +40,5 @@ public:
     void mem_xchange();
     void mem_copy();
 };
+
+#endif // MEM_H
diff --git a/pub/lib/node.hpp b/pub/lib/node.hpp
index d32103db..230dcd22 100644
--- a/pub/lib/node.hpp
+++ b/pub/lib/node.hpp
@@ -7,6 +7,9 @@
 //! \file  node.hpp
 //! \brief nodes within expression trees, inheriting from virtual base CNode
 
+#ifndef NODE_H
+#define NODE_H
+
 //! Base class CNode is declared elsewhere (expr.hpp).
 
 
@@ -568,3 +571,5 @@ public:
     CCoord node_coord(int k) const;
     string tree_info() const { return "resol(" + shift->tree_info() + ")"; }
 };
+
+#endif // NODE_H
diff --git a/pub/lib/obj.hpp b/pub/lib/obj.hpp
index e1d2e20a..00c0008b 100644
--- a/pub/lib/obj.hpp
+++ b/pub/lib/obj.hpp
@@ -7,7 +7,12 @@
 //! \file  obj.hpp
 //! \brief Data containers: CObj and its children.
 
+#ifndef OBJ_H
+#define OBJ_H
+
 #include <cmath>
+#include "defs.hpp"
+#include "ptr.hpp"
 
 //! Generic data container, pure virtual base class.
 
@@ -212,3 +217,5 @@ public:
     inline double to_dr(int i) const { return dv[i]; }
     string to_s(int maxlen = 12, int minlen = 1, int prec = 6) const;
 };
+
+#endif // OBJ_H
diff --git a/pub/lib/olf.hpp b/pub/lib/olf.hpp
index 77c4481a..1f292bbd 100644
--- a/pub/lib/olf.hpp
+++ b/pub/lib/olf.hpp
@@ -7,6 +7,9 @@
 //! \file  olf.hpp
 //! \brief COlo, COld, COld online files
 
+#ifndef OLF_H
+#define OLF_H
+
 #include "coord.hpp"
 #include "ptr.hpp"
 
@@ -160,3 +163,5 @@ public:
     RObj eval_curve_scalar(double arg, int k, int j, bool want_error) const;
     virtual string type() const { return "curve"; }
 };
+
+#endif // OLF_H
diff --git a/pub/lib/opr.hpp b/pub/lib/opr.hpp
index 0b47d44f..2e51d999 100644
--- a/pub/lib/opr.hpp
+++ b/pub/lib/opr.hpp
@@ -7,6 +7,9 @@
 //! \file  opr.hpp
 //! \brief NOperate: functional operations.
 
+#ifndef OPR_H
+#define OPR_H
+
 
 //! Functional operations.
 
@@ -18,4 +21,5 @@ void Pointwise(string llabel);
 void Integral();
 void IntXY(string mode);
 void Functional(const string& subcmd);
-}
\ No newline at end of file
+}
+#endif // OPR_H
diff --git a/pub/lib/plot.hpp b/pub/lib/plot.hpp
index 5ff09a88..74849502 100644
--- a/pub/lib/plot.hpp
+++ b/pub/lib/plot.hpp
@@ -7,10 +7,14 @@
 //! \file  plot.hpp
 //! \brief NPlot: plot data and curves.
 
+#ifndef PLOT_H
+#define PLOT_H
+
 
 //! Plot data and curves.
 
 namespace NPlot
 {
 void plot(class CPlot* plot, bool add, const string& mode = "ask");
-}
\ No newline at end of file
+}
+#endif // PLOT_H
diff --git a/pub/lib/ptr.hpp b/pub/lib/ptr.hpp
index 7dbbd262..d2a260ff 100644
--- a/pub/lib/ptr.hpp
+++ b/pub/lib/ptr.hpp
@@ -7,6 +7,9 @@
 //! \file  ptr.hpp
 //! \brief pointer forward declarations POlo, PNode, and so on (.h file only)
 
+#ifndef PTR_H
+#define PTR_H
+
 #include <memory>
 
 #define PCAST std::dynamic_pointer_cast
@@ -39,3 +42,5 @@ using PCurve = std::unique_ptr<class CCurve>;
 
 using RNode = std::shared_ptr<const class CNode>;
 using RRef = std::shared_ptr<const class CRef1>;
+
+#endif // PTR_H
diff --git a/pub/lib/reduce_curv.hpp b/pub/lib/reduce_curv.hpp
index 5233bc26..fdb91034 100644
--- a/pub/lib/reduce_curv.hpp
+++ b/pub/lib/reduce_curv.hpp
@@ -7,6 +7,9 @@
 //! \file  reduce_curv.hpp
 //! \brief NCurveIntegral: integrate a curve file
 
+#ifndef REDUCE_CURV_H
+#define REDUCE_CURV_H
+
 #include "registry.hpp"
 
 //!  Function type: Evaluate curve functional
@@ -49,3 +52,5 @@ public:
     void display_entries() const;
     static void initialize();
 };
+
+#endif // REDUCE_CURV_H
diff --git a/pub/lib/reduce_spec.hpp b/pub/lib/reduce_spec.hpp
index 31fdf90e..eda55bb9 100644
--- a/pub/lib/reduce_spec.hpp
+++ b/pub/lib/reduce_spec.hpp
@@ -7,6 +7,9 @@
 //! \file  reduce_spec.hpp
 //! \brief Collection NGeni of generalized integral wrappers CGeni.
 
+#ifndef REDUCE_SPEC_H
+#define REDUCE_SPEC_H
+
 #include "registry.hpp"
 
 //!  Function type: Evaluate generalized integral for given vector(s).
@@ -44,3 +47,5 @@ public:
     void display_entries() const;
     static void initialize();
 };
+
+#endif // REDUCE_SPEC_H
diff --git a/pub/lib/rssm.hpp b/pub/lib/rssm.hpp
index fba21d18..2db43f87 100644
--- a/pub/lib/rssm.hpp
+++ b/pub/lib/rssm.hpp
@@ -7,6 +7,9 @@
 //! \file  rssm.hpp
 //! \brief NRSSM: directly read SPHERES raw data
 
+#ifndef RSSM_H
+#define RSSM_H
+
 //! Directly read SPHERES raw data.
 
 namespace NRSSM
@@ -15,3 +18,5 @@ void read_spec(int flag);
 void read_series(int flag);
 void read_series_to_histogram(int flag);
 }
+
+#endif // RSSM_H
diff --git a/pub/lib/slice.hpp b/pub/lib/slice.hpp
index 527eb889..3f2fada8 100644
--- a/pub/lib/slice.hpp
+++ b/pub/lib/slice.hpp
@@ -7,6 +7,9 @@
 //! \file  slice.hpp
 //! \brief CSlice handles z dependent data, is base class for CSpec, CCurve.
 
+#ifndef SLICE_H
+#define SLICE_H
+
 
 //! Virtual base class for CSpec and CCurve. Holds z dependent data.
 
@@ -66,3 +69,5 @@ public:
     bool has_global_par() const;
     string info_line() const;
 };
+
+#endif // SLICE_H
diff --git a/pub/lib/special.hpp b/pub/lib/special.hpp
index 66bd9609..192da96e 100644
--- a/pub/lib/special.hpp
+++ b/pub/lib/special.hpp
@@ -7,6 +7,9 @@
 //! \file  special.hpp
 //! \brief NSpecial: this and that, written ad hoc.
 
+#ifndef SPECIAL_H
+#define SPECIAL_H
+
 //  What falls out of use goes to ../../arch/one-time-routines/
 
 #include <complex>
@@ -32,3 +35,5 @@ template <typename T> complex<T> ff_test(T a, T b)
     return complex<T>(T(1.L) / b, T(0.L)) * (pssc(a + b) - pssc(a - b));
 }
 }
+
+#endif // SPECIAL_H
diff --git a/pub/lib/toplevel.hpp b/pub/lib/toplevel.hpp
index 1e2fffcd..2e347a0b 100644
--- a/pub/lib/toplevel.hpp
+++ b/pub/lib/toplevel.hpp
@@ -7,6 +7,9 @@
 //! \file  toplevel.hpp
 //! \brief Execution context CFrida.
 
+#ifndef TOPLEVEL_H
+#define TOPLEVEL_H
+
 
 //! Execution context.
 
@@ -25,3 +28,5 @@ public:
     void execute_file(const std::string fname);
     void interactive();
 };
+
+#endif // TOPLEVEL_H
diff --git a/pub/lib/variables.hpp b/pub/lib/variables.hpp
index 4334ab42..96b3a743 100644
--- a/pub/lib/variables.hpp
+++ b/pub/lib/variables.hpp
@@ -7,8 +7,14 @@
 //! \file  variables.hpp
 //! \brief Declares class SVariRegistry.
 
+#ifndef VARIABLES_H
+#define VARIABLES_H
+
 #include "../trivia/singleton.hpp"
 
+#include "defs.hpp"
+#include "ptr.hpp"
+
 //! Registry for variable objects.
 
 class SVariRegistry : public triv::ISingleton<SVariRegistry>
@@ -25,3 +31,5 @@ public:
     void register_scalar(string key, PObj val);
     bool undef(string key);
 };
+
+#endif // VARIABLES_H
diff --git a/pub/lib/xax_lex.hpp b/pub/lib/xax_lex.hpp
index 30ef61e2..af3b7de3 100644
--- a/pub/lib/xax_lex.hpp
+++ b/pub/lib/xax_lex.hpp
@@ -7,4 +7,9 @@
 //! \file  xax_lex.hpp
 //! \brief Declares user_xaxparse, the parser call implented in xax_lex.lpp.
 
+#ifndef XAX_LEX_H
+#define XAX_LEX_H
+
 RNode user_xaxparse(const char* lin);
+
+#endif // XAX_LEX_H
-- 
GitLab