summaryrefslogtreecommitdiffstats
path: root/includes
diff options
context:
space:
mode:
authorAngelo Rossi <angelo.rossi.homelab@gmail.com>2023-06-21 12:04:16 +0000
committerAngelo Rossi <angelo.rossi.homelab@gmail.com>2023-06-21 12:04:16 +0000
commitb18347ffc9db9641e215995edea1c04c363b2bdf (patch)
treef3908dc911399f1a21e17d950355ee56dc0919ee /includes
Initial commit.
Diffstat (limited to 'includes')
-rw-r--r--includes/algebra.hpp64
-rw-r--r--includes/blkcom.hpp260
-rw-r--r--includes/comlock.hpp22
-rw-r--r--includes/comlock.hpp~21
-rw-r--r--includes/datain.hpp36
-rw-r--r--includes/dekplt.hpp381
-rw-r--r--includes/dekplt.hpp~381
-rw-r--r--includes/dekspy.hpp158
-rw-r--r--includes/emtp.hpp75
-rw-r--r--includes/emtp.hpp~55
-rw-r--r--includes/freedom.hpp30
-rw-r--r--includes/lab02.hpp~22
-rw-r--r--includes/labcom.hpp117
-rw-r--r--includes/labl02.hpp50
-rw-r--r--includes/labl29.hpp48
-rw-r--r--includes/linemodel.hpp23
-rw-r--r--includes/location.hpp27
-rw-r--r--includes/main.hpp62
-rw-r--r--includes/movecopy.hpp29
-rw-r--r--includes/newmods.hpp63
-rw-r--r--includes/over1.hpp71
-rw-r--r--includes/over1.hpp~70
-rw-r--r--includes/over20.hpp67
-rw-r--r--includes/over51.hpp199
-rw-r--r--includes/over51.hpp~200
-rw-r--r--includes/plot.hpp41
-rw-r--r--includes/plot.hpp~17
-rw-r--r--includes/random.hpp26
-rw-r--r--includes/strcom.hpp22
-rw-r--r--includes/tacsar.hpp60
-rw-r--r--includes/tacsar.hpp~60
-rw-r--r--includes/time.hpp33
-rw-r--r--includes/umdeck.hpp42
-rw-r--r--includes/umdeck.hpp~17
-rw-r--r--includes/utilities.hpp67
-rw-r--r--includes/vardim.hpp41
-rw-r--r--includes/vardim.hpp~41
-rw-r--r--includes/volt45.hpp22
38 files changed, 3020 insertions, 0 deletions
diff --git a/includes/algebra.hpp b/includes/algebra.hpp
new file mode 100644
index 0000000..d16c61b
--- /dev/null
+++ b/includes/algebra.hpp
@@ -0,0 +1,64 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file algebra.hpp
+
+#ifndef _ALGEBRA_HPP
+#define _ALGEBRA_HPP
+
+// System includes.
+
+#include <iostream>
+#include <iomanip>
+#include <cmath>
+
+// Local includes.
+
+#include "blkcom.hpp"
+#include "utilities.hpp"
+#include "movecopy.hpp"
+
+namespace algebra {
+
+ bool cdivz(std::vector<double> &, \
+ std::vector<double> &, \
+ const double &, \
+ const double &, \
+ const double &, \
+ const double &, \
+ const long int &);
+ bool cmultz(std::vector<double> &, \
+ std::vector<double> &, \
+ const double &, \
+ const double &, \
+ const double &, \
+ const double &, \
+ const long int &);
+ bool trgwnd(const double &, double *);
+ bool addmxd(std::vector<double> &, \
+ const double &, \
+ std::vector<double> &, \
+ const size_t &);
+ bool multmx(std::vector<double> &, \
+ std::vector<double> &, \
+ std::vector<double> &, \
+ std::vector<double> &, \
+ const size_t &);
+ bool mult(std::vector<double> &, \
+ std::vector<double> &, \
+ std::vector<double> &, \
+ const size_t &, \
+ long int &);
+ void dgelg(std::vector<double> &, \
+ std::vector<double> &, \
+ const size_t &, \
+ const size_t &, \
+ const float &, \
+ long int &);
+ void matmul(float [ 3 ][ 3 ], float [ 3 ][ 3 ]);
+ void matvec(float [ 3 ][ 3 ], float [ 15 ]);
+
+}
+
+#endif // _ALGEBRA_HPP
+
+// end of file algebra.hpp
diff --git a/includes/blkcom.hpp b/includes/blkcom.hpp
new file mode 100644
index 0000000..b5fed96
--- /dev/null
+++ b/includes/blkcom.hpp
@@ -0,0 +1,260 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file blkcom.hpp
+
+#ifndef _BLKCOM_HPP
+#define _BLKCOM_HPP
+
+#include <iostream>
+#include <iomanip>
+#include <string>
+#include <fstream>
+#include <ostream>
+#include <sstream>
+#include <cstdlib>
+#include <cstdint>
+#include <cinttypes>
+#include <vector>
+
+//#include "volt45.hpp"
+
+#define BLANK " "
+
+namespace comthl {
+
+ extern int nSwTpe;
+ //
+ extern double nAngTpe;
+
+}
+
+namespace comld {
+
+ extern int nNewTAC;
+
+}
+
+namespace blkcom {
+
+ // Structures.
+ struct tagMonCar {
+ long int m_nKnt; // moncar(1)
+ long int m_nKBase; // moncar(2)
+ long int m_nLTDelt; // moncar(3)
+ long int m_nISW; // moncar(4)
+ long int m_nIDist; // moncar(5)
+ long int m_nITest; // moncar(6)
+ long int m_nUserSST; // moncar(7)
+ long int m_nJSeedR; // moncar(8)
+ long int m_nKLoaEP; // moncar(9)
+ void *m_pMTape; // moncar(10)
+ //
+ long int m_nISize; // moncar(24)
+ long int m_nRsize; // moncar(27)
+ //
+ long int m_nCSize; // moncar(29)
+ //
+ long int m_nKiTACs; // moncar(32)
+ //
+ long int m_nLSwtch; // moncar(61)
+ };
+
+ typedef struct tagMonCar tMonCar;
+
+ struct tagIPrsOv {
+ int m_nN13; // position 1
+ int m_nIPoint; // position 35
+ union {
+ int m_nIUpper; // position 36
+ int m_nLocZ11;
+ };
+ int m_nNMAuto; // position 39
+ };
+
+ typedef struct tagIPrsOv tIPrsOv;
+
+ struct tagStat {
+ long int m_nBus;
+ long int m_nBranch;
+ long int m_nData;
+ long int m_nExct;
+ long int m_nYMat;
+ long int m_nSwitch;
+ long int m_nSize7;
+ long int m_nPast;
+ long int m_nNOnL;
+ long int m_nChar;
+ long int m_nSMOut;
+ long int m_nSize12;
+ long int m_nFDep;
+ long int m_nWT;
+ long int m_nTails;
+ long int m_nIMass;
+ long int m_nSyn;
+ long int m_nMaxPE;
+ long int m_nTACST;
+ long int m_nFSem;
+ long int m_nFD;
+ long int m_nHist;
+ long int m_nSize23;
+ long int m_nComp;
+ long int m_nSPCum;
+ long int m_nSize26;
+ long int m_nSize27;
+ long int m_nSize28;
+ long int m_nTLabl;
+ } __attribute__ ((packed));
+
+ typedef struct tagStat tStat;
+
+ // Variables
+ extern char cCSepar;
+ //
+ extern void *pIAlter;
+ extern void *pIDistX;
+ extern void *pInEcho;
+ extern void *pKFile6;
+ extern void *pLFiles[ 24 ];
+ extern void *pLFilesSave[ 24 ];
+ extern void *pMFilesSave[ 24 ];
+ //
+ extern long int nChain;
+ extern long int nEnerg;
+ extern long int nIAdd;
+ extern long int nIAverg;
+ extern long int nIBr;
+ extern long int nICat;
+ extern long int nIFDep;
+ extern long int nIFDep2;
+ extern long int nIFSem;
+ extern long int nIFX;
+ extern long int nIndStp;
+ extern long int nINOnL;
+ extern long int nIofbnd;
+ extern long int nIoffd;
+ extern long int nIofgnd;
+ extern long int nIPlot;
+ extern long int nIsPlot;
+ extern long int nIsPrin;
+ extern long int nIprsUp;
+ extern long int nIPunch;
+ extern long int nIStep;
+ extern long int nIt;
+ extern long int nIt1;
+ extern long int nIt2;
+ extern long int nIType;
+ extern long int nJFLSOS;
+ extern long int nJST;
+ extern long int nJST1;
+ extern long int nKPartB;
+ extern long int nLBrnch;
+ extern long int nLBus;
+ extern long int nKanal;
+ extern long int nKBurro;
+ extern long int nKCount;
+ extern long int nKill;
+ extern long int nKol132;
+ extern long int nKolBeg;
+ extern long int nKSwtch;
+ extern long int nKTab;
+ extern long int nKTRef;
+ extern long int nKWTSpy;
+ extern long int nLastOV;
+ extern long int nLHist;
+ extern long int nLLBuff;
+ extern long int nLTLabl;
+ extern long int nM4Plot;
+ extern long int nMax99m;
+ extern long int nMaxBus;
+ extern long int nMaxZNO;
+ extern long int nMemSav;
+ extern long int nMolDat;
+ extern long int nModOut;
+ extern long int nNComp;
+ extern long int nNFrFld;
+ extern long int nNRight;
+ extern long int nNSTACS;
+ extern long int nNum99;
+ extern long int nNumDCD;
+ extern long int nNumOut;
+ extern long int nNumSM;
+ extern long int nNumUM;
+ extern long int nNWord1;
+ extern long int nNWord2;
+ extern long int nNTCSex;
+ extern long int nNOutPR;
+ extern long int nTot;
+ //
+ extern long int pIpnTV[ 11 ];
+ extern long int pIprsOV[ 39 ];
+ extern long int pLoopSS[ 13 ];
+ extern long int pKPrChg[ 6 ];
+ extern long int pKTRLSW[ 8 ];
+ extern long int pNByte[ 6 ];
+ extern long int pVoltBC[ 50 ];
+ //
+ extern double nAIncr;
+ extern double nAngle;
+ extern double nCI1;
+ extern double nCK1;
+ extern double nCOpt;
+ extern double nDegMin;
+ extern double nDegMax;
+ extern double nDelta2;
+ extern double nDeltaT;
+ extern double nEpsilon;
+ extern double nEpStop;
+ extern double nEpsZNo;
+ extern double nEpWarn;
+ extern double nFMaxFS;
+ extern double nOmega;
+ extern double nOneHaf;
+ extern double nSglFir;
+ extern double nStatFR;
+ extern double nT;
+ extern double nTEnerg;
+ extern double nTenM3;
+ extern double nTenM6;
+ extern double nTMax;
+ extern double nTolMat;
+ extern double nUnity;
+ extern double nXMaxMX;
+ extern double nXOpt;
+ //
+ extern double pBegMax[ 6 ];
+ extern double pPeakND[ 3 ];
+ extern double pZNoLim[ 2 ];
+ //
+ extern std::vector<long int> sLStat;
+ //
+ extern std::vector<double> sFLStat;
+ //
+ extern std::string sBlank;
+ extern std::string sBranch;
+ extern std::string sBus1;
+ extern std::string sBus2;
+ extern std::string sBus3;
+ extern std::string sBus4;
+ extern std::string sBus5;
+ extern std::string sBus6;
+ extern std::string sChCont;
+ extern std::string sChCopy;
+ extern std::string sCopy;
+ extern std::string sTerra;
+ extern std::string sTexCol;
+ extern std::string sTrash;
+ extern std::string sUserID;
+ extern std::string pDate1[ 2 ];
+ extern std::string pTClock[ 2 ];
+ extern std::string pTextA6[ 15 ];
+ //
+ extern std::stringstream sABuff;
+ //
+ extern tMonCar sMonCar;
+ extern tStat *pSStat;
+
+}
+
+#endif // _BLKCOM_HPP
+
+// end of file blkcom.hpp
diff --git a/includes/comlock.hpp b/includes/comlock.hpp
new file mode 100644
index 0000000..d5b7d16
--- /dev/null
+++ b/includes/comlock.hpp
@@ -0,0 +1,22 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file comlock.hpp
+
+#ifndef _COMLOCK_HPP
+#define _COMLOCK_HPP
+
+#include <iostream>
+#include <iomanip>
+#include <cstddef>
+#include <string>
+#include <vector>
+
+namespace comlock {
+
+ extern std::string pLocker[ 2 ];
+
+}
+
+#endif // _COMLOCK_HPP
+
+// end of file comlock.hpp
diff --git a/includes/comlock.hpp~ b/includes/comlock.hpp~
new file mode 100644
index 0000000..e1014fa
--- /dev/null
+++ b/includes/comlock.hpp~
@@ -0,0 +1,21 @@
+//-*- mode: c++; indent-tabs-mode-nil; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file comlock.hpp
+
+#ifndef _COMLOCK_HPP
+#define _COMLOCK_HPP
+
+#include <iostream>
+#include <iomanip>
+#include <cstddef>
+#include <vector>
+
+namespace comlock {
+
+ extern int pLocker[ 2 ];
+
+}
+
+#endif // _COMLOCK_HPP
+
+// end of file comlock.hpp
diff --git a/includes/datain.hpp b/includes/datain.hpp
new file mode 100644
index 0000000..1fd3741
--- /dev/null
+++ b/includes/datain.hpp
@@ -0,0 +1,36 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file datain.hpp
+
+#ifndef _DATAIN_HPP
+#define _DATAIN_HPP
+
+// System includes.
+
+#include <iostream>
+#include <iomanip>
+#include <fstream>
+#include <string>
+
+// Local includes.
+
+#include "utilities.hpp"
+#include "blkcom.hpp"
+//#include "labcom.hpp"
+#include "dekspy.hpp"
+#include "over20.hpp"
+#include "linemodel.hpp"
+#include "freedom.hpp"
+#include "movecopy.hpp"
+#include "strcom.hpp"
+#include "time.hpp"
+
+namespace datain {
+
+ void datain (void);
+
+}
+
+#endif // _DATAIN_HPP
+
+// end of file datain.hpp
diff --git a/includes/dekplt.hpp b/includes/dekplt.hpp
new file mode 100644
index 0000000..378442b
--- /dev/null
+++ b/includes/dekplt.hpp
@@ -0,0 +1,381 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file dekplt.hpp
+
+#ifndef _DEKPLT_HPP
+#define _DEKPLT_HPP
+
+#include <iostream>
+
+namespace dekplt {
+
+ // Structures.
+ struct tagFVCom {
+ double m_nVMin;
+ double m_nVMax;
+ double m_nHMin;
+ double m_nHMax;
+ double m_nHA;
+ double m_nTAxisL;
+ double m_nTolrce;
+ double m_nHTax;
+ double m_nXTit;
+ double m_nYTit;
+ double m_nSizTit;
+ double m_nXSuper;
+ double m_nYSuper;
+ double m_nSizSup;
+ double m_nFLine;
+ double m_nSizID;
+ double m_nXID;
+ double m_nYID;
+ double m_nFact;
+ double m_nDXGrd1;
+ double m_nDYGrd1;
+ double m_nDXGrd2;
+ double m_nDYGrd2;
+ double m_nFill1;
+ double m_nFill2;
+ double m_nVS;
+ double m_nVL;
+ double m_nVH;
+ double m_nPapMax;
+ double m_nTimBeg;
+ double m_nTimEnd;
+ double m_nFHTax;
+ double m_nFXSup;
+ double m_nFYSup;
+ double m_nFXTit;
+ double m_nFYTit;
+ double m_nFXID;
+ double m_nFYID;
+ double m_nFTCarr;
+ double m_nVAxisL;
+ double m_nFXNumV;
+ double m_nFXNumH;
+ double m_FVXAxtt;
+ double m_FXVert;
+ double m_nFSymb;
+ double m_nPapLim;
+ };
+
+ typedef struct tagFVCom tFVCom;
+
+ struct tagIVCom {
+ int m_nKlevl;
+ int m_nKextr;
+ int m_nIHS;
+ int m_nLu7Plt;
+ int m_nIprsrt;
+ int m_nLimCol;
+ int m_nLinePR;
+ int m_nIBaud;
+ int m_nLTek;
+ int m_nNumTit;
+ int m_nMaxSym;
+ int m_nMTit;
+ int m_nMaxISX;
+ int m_nMaxISY;
+ int m_nGrid1;
+ int m_nGrid2;
+ int m_nMSuper;
+ int m_nMid;
+ int m_nMLine;
+ int m_nCut1;
+ int m_nCut2;
+ int m_nSmPlt;
+ int m_nLSymb;
+ int m_nXMax;
+ int m_nYMax;
+ int m_nLChId;
+ int m_nXInch;
+ int m_nYInch;
+ int m_nXOff;
+ int m_nYOff;
+ int m_nLook;
+ int m_nLChSup;
+ int m_nLChTit;
+ int m_nLChXax;
+ int m_nLCHYax;
+ int m_nITerm;
+ int m_nLTic;
+ int m_nIzTit;
+ int m_nIZGr1;
+ int m_nIZGr2;
+ int m_nLdShg1;
+ int m_nLdShg2;
+ int m_nIZXax;
+ int m_nIZYax;
+ int m_nXId6;
+ int m_nYId6;
+ int m_nXEnd;
+ int m_nYEnd;
+ int m_nIZId;
+ int m_nXVern;
+ int m_nIChRef;
+ int m_nIChEnd;
+ int m_nInchPx;
+ int m_nInchPy;
+ int m_nInWait;
+ int m_nNoLabl;
+ int m_nLChFil;
+ int m_nLChLim;
+ int m_nMu6Std;
+ };
+
+ typedef struct tagIVCom tIVCom;
+
+ struct tagANPLT {
+ char m_pChoice[ 8 ];
+ char m_pStop[ 8 ];
+ char m_pPurge[ 8 ];
+ char m_pOut[ 8 ];
+ char m_pHelp[ 8 ];
+ char m_pSmooth[ 8 ];
+ char m_pSize[ 8 ];
+ char m_pShow[ 8 ];
+ char m_pLineZZ[ 8 ];
+ char m_pPhoto[ 8 ];
+ char m_pRepeat[ 8 ];
+ char m_pFlush[ 8 ];
+ char m_pPlayBA[ 8 ];
+ char m_pPen[ 8 ];
+ char m_pMultiP[ 8 ];
+ char m_pOffset[ 8 ];
+ char m_pLimits[ 8 ];
+ char m_pDebug[ 8 ];
+ char m_pTEK[ 8 ];
+ char m_pStack[ 8 ];
+ char m_pPrintE[ 8 ];
+ char m_pMetric[ 8 ];
+ char m_pAllTim[ 8 ];
+ char m_pColumn[ 8 ];
+ char m_pSetCol[ 8 ];
+ char m_pLonger[ 8 ];
+ char m_pAverag[ 8 ];
+ char m_pInner[ 8 ];
+ char m_pRescal[ 8 ];
+ char m_pLastPL[ 8 ];
+ char m_pBatch[ 8 ];
+ char m_pPunch[ 8 ];
+ char m_pExtrem[ 8 ];
+ char m_pLevel[ 8 ];
+ char m_pNoPlot[ 8 ];
+ char m_pMessag[ 8 ];
+ char m_pEnd[ 8 ];
+ char m_pTimeSP[ 8 ];
+ char m_pLabel[ 8 ];
+ char m_pTimeUN[ 8 ];
+ char m_pCursor[ 8 ];
+ char m_pXYPlot[ 8 ];
+ char m_pSlope[ 8 ];
+ char m_pBack[ 8 ];
+ char m_pReFile[ 8 ];
+ char m_pTEXBlk[ 8 ];
+ char m_pSetDat[ 8 ];
+ };
+
+ typedef struct tagANPLT tANPLT;
+
+ // Variables.
+ extern char pBBus[ 300 ];
+ extern char pBusLst[ 1000 ];
+ //
+ extern int nIBaud;
+ extern int nIBrnch;
+ extern int nIBsOut;
+ extern int nICHEnd;
+ extern int nICHRef;
+ extern int nICP;
+ extern int nICurse;
+ extern int nIHS;
+ extern int nInchPX;
+ extern int nInchPY;
+ extern int nInd1;
+ extern int nIndExp;
+ extern int nInWait;
+ extern int nIPrsrt;
+ extern int nITerm;
+ extern int nIZgr1;
+ extern int nIZgr2;
+ extern int nIZid;
+ extern int nZtit;
+ extern int nIzxax;
+ extern int nIzyax;
+ extern int nL4Plot;
+ extern int nLchfil;
+ extern int nLchid;
+ extern int nLchlim;
+ extern int nLchsup;
+ extern int nLchtit;
+ extern int nLchxax;
+ extern int nLchyax;
+ extern int nLdshg1;
+ extern int nLdshg2;
+ extern int nLimCol;
+ extern int nLimFix;
+ extern int nLook;
+ extern int nLSymb;
+ extern int nLTic;
+ extern int nLu7Plt;
+ extern int nLinePR;
+ extern int nLTek;
+ extern int nMaxEv;
+ extern int nMaxEw;
+ extern int nMaxIp;
+ extern int nMaxIsx;
+ extern int nMaxIsy;
+ extern int nMaxSym;
+ extern int nMFake;
+ extern int nMGrid1;
+ extern int nMGrid2;
+ extern int nMid;
+ extern int nMLine;
+ extern int nMSuper;
+ extern int nMTit;
+ extern int nMu6Sav;
+ extern int nMu6Std;
+ extern int nMxypl;
+ extern int nNamVar;
+ extern int nNc;
+ extern int nChSup;
+ extern int nChVer;
+ extern int nCut;
+ extern int nCut1;
+ extern int nCut2;
+ extern int nNewFil;
+ extern int nNoLabl;
+ extern int nSmplt;
+ extern int nNT2;
+ extern int nNumBrn;
+ extern int nNumFlt;
+ extern int nNumNVO;
+ extern int nNumOut;
+ extern int nNumRaw;
+ extern int nNumTek;
+ extern int nNumTit;
+ extern int nV;
+ extern int nXEnd;
+ extern int nXId6;
+ extern int nXInch;
+ extern int nXMax;
+ extern int nXOff;
+ extern int nXVern;
+ extern int nYEnd;
+ extern int nYId6;
+ extern int nYInch;
+ extern int nYMax;
+ extern int nYOff;
+ extern int pLabrtm[ 20 ];
+ extern int pMCurve[ 20 ];
+ extern int pMLevel[ 20 ];
+ extern int pMMM[ 20 ];
+ extern int nMPlot[ 20 ];
+ extern int pMStart[ 20 ];
+ extern int pMSymbT[ 20 ];
+ extern int pNumPts[ 20 ];
+ //
+ extern double nDX;
+ extern double nDXGrd1;
+ extern double nDXGrd2;
+ extern double nDY;
+ extern double nDYGrd1;
+ extern double nDYGrd2;
+ extern double nEvnByt;
+ extern double nFact;
+ extern double nFHTax;
+ extern double nFill;
+ extern double nFill1;
+ extern double nFill2;
+ extern double nFinFin;
+ extern double nFLine;
+ extern double nFSymb;
+ extern double nFTCarr;
+ extern double nFVAxtt;
+ extern double nFXId;
+ extern double nFXNumH;
+ extern double nFXNumV;
+ extern double nFXSup;
+ extern double nFXTit;
+ extern double nFXVert;
+ extern double nFYId;
+ extern double nFYSup;
+ extern double nFYTit;
+ extern double nGMax;
+ extern double nGMin;
+ extern double nHA;
+ extern double nHMax;
+ extern double nHMin;
+ extern double nHPI;
+ extern double nHTax;
+ extern double nPapLim;
+ extern double nPapMax;
+ extern double nSizID;
+ extern double nSizSup;
+ extern double nSizTit;
+ extern double nTAxisL;
+ extern double nTimeBeg;
+ extern double nTimeEnd;
+ extern double nTMult;
+ extern double nTolrce;
+ extern double nTStep;
+ extern double nVaxIsl;
+ extern double nVH;
+ extern double nVL;
+ extern double nVMax;
+ extern double nVMaxR;
+ extern double nVMin;
+ extern double nVMinR;
+ extern double nVS;
+ extern double nXId;
+ extern double nXSuper;
+ extern double nXTit;
+ extern double nYId;
+ extern double nYSuper;
+ extern double nYTit;
+ extern double pAAA[ 20 ];
+ extern double pBBB[ 20 ];
+ extern double pBX[ 150 ];
+ extern double pDatePL[ 2 ];
+ extern double pDYOld[ 20 ];
+ extern double pEV[ 15000 ];
+ extern double pEW[ 15000 ];
+ extern double pFVCom[ 50 ];
+ extern double pFXRef[ 25 ];
+ extern double pFYRef[ 25 ];
+ extern double pTClop[ 2 ];
+ extern double pTTLev[ 20 ];
+ extern double pTTMax[ 20 ];
+ extern double pTTMin[ 20 ];
+ extern double pYLevel[ 20 ];
+ extern double pYYMax[ 20 ];
+ extern double pYYMin[ 20 ];
+ //
+ extern std::string sFilNam;
+ extern std::string sAlpha;
+ extern std::string sBuffIn;
+ extern std::string sVertL;
+ extern std::string sHeadL;
+ extern std::string sXYTitl;
+ extern std::string sTextD1;
+ extern std::string sTextD2;
+ extern std::string sCurren;
+ extern std::string sVoltag;
+ extern std::string sBrClas;
+ extern std::string sDate;
+ extern std::string sTime;
+ extern std::string sANSI;
+ extern std::string sBuffIn;
+ extern std::string pSlot1[ 20 ];
+ extern std::string pSext[ 6 ];
+ extern std::string pHorzL[ 8 ];
+ extern std::string pIBuff[ 20 ];
+ extern std::string pABuff77[ 10 ];
+ extern std::string pAnPlt[];
+ //
+ extern tFVCom sFVCom;
+ extern tIVCom sIVCom;
+
+}
+
+#endif // _DEKPLT_HPP
diff --git a/includes/dekplt.hpp~ b/includes/dekplt.hpp~
new file mode 100644
index 0000000..7f7596a
--- /dev/null
+++ b/includes/dekplt.hpp~
@@ -0,0 +1,381 @@
+//-*- mode: c++; syntax: c++; indent-tabs-mode-nil; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file dekplt.hpp
+
+#ifndef _DEKPLT_HPP
+#define _DEKPLT_HPP
+
+#include <iostream>
+
+namespace dekplt {
+
+ // Structures.
+ struct tagFVCom {
+ double m_nVMin;
+ double m_nVMax;
+ double m_nHMin;
+ double m_nHMax;
+ double m_nHA;
+ double m_nTAxisL;
+ double m_nTolrce;
+ double m_nHTax;
+ double m_nXTit;
+ double m_nYTit;
+ double m_nSizTit;
+ double m_nXSuper;
+ double m_nYSuper;
+ double m_nSizSup;
+ double m_nFLine;
+ double m_nSizID;
+ double m_nXID;
+ double m_nYID;
+ double m_nFact;
+ double m_nDXGrd1;
+ double m_nDYGrd1;
+ double m_nDXGrd2;
+ double m_nDYGrd2;
+ double m_nFill1;
+ double m_nFill2;
+ double m_nVS;
+ double m_nVL;
+ double m_nVH;
+ double m_nPapMax;
+ double m_nTimBeg;
+ double m_nTimEnd;
+ double m_nFHTax;
+ double m_nFXSup;
+ double m_nFYSup;
+ double m_nFXTit;
+ double m_nFYTit;
+ double m_nFXID;
+ double m_nFYID;
+ double m_nFTCarr;
+ double m_nVAxisL;
+ double m_nFXNumV;
+ double m_nFXNumH;
+ double m_FVXAxtt;
+ double m_FXVert;
+ double m_nFSymb;
+ double m_nPapLim;
+ };
+
+ typedef struct tagFVCom tFVCom;
+
+ struct tagIVCom {
+ int m_nKlevl;
+ int m_nKextr;
+ int m_nIHS;
+ int m_nLu7Plt;
+ int m_nIprsrt;
+ int m_nLimCol;
+ int m_nLinePR;
+ int m_nIBaud;
+ int m_nLTek;
+ int m_nNumTit;
+ int m_nMaxSym;
+ int m_nMTit;
+ int m_nMaxISX;
+ int m_nMaxISY;
+ int m_nGrid1;
+ int m_nGrid2;
+ int m_nMSuper;
+ int m_nMid;
+ int m_nMLine;
+ int m_nCut1;
+ int m_nCut2;
+ int m_nSmPlt;
+ int m_nLSymb;
+ int m_nXMax;
+ int m_nYMax;
+ int m_nLChId;
+ int m_nXInch;
+ int m_nYInch;
+ int m_nXOff;
+ int m_nYOff;
+ int m_nLook;
+ int m_nLChSup;
+ int m_nLChTit;
+ int m_nLChXax;
+ int m_nLCHYax;
+ int m_nITerm;
+ int m_nLTic;
+ int m_nIzTit;
+ int m_nIZGr1;
+ int m_nIZGr2;
+ int m_nLdShg1;
+ int m_nLdShg2;
+ int m_nIZXax;
+ int m_nIZYax;
+ int m_nXId6;
+ int m_nYId6;
+ int m_nXEnd;
+ int m_nYEnd;
+ int m_nIZId;
+ int m_nXVern;
+ int m_nIChRef;
+ int m_nIChEnd;
+ int m_nInchPx;
+ int m_nInchPy;
+ int m_nInWait;
+ int m_nNoLabl;
+ int m_nLChFil;
+ int m_nLChLim;
+ int m_nMu6Std;
+ };
+
+ typedef struct tagIVCom tIVCom;
+
+ struct tagANPLT {
+ char m_pChoice[ 8 ];
+ char m_pStop[ 8 ];
+ char m_pPurge[ 8 ];
+ char m_pOut[ 8 ];
+ char m_pHelp[ 8 ];
+ char m_pSmooth[ 8 ];
+ char m_pSize[ 8 ];
+ char m_pShow[ 8 ];
+ char m_pLineZZ[ 8 ];
+ char m_pPhoto[ 8 ];
+ char m_pRepeat[ 8 ];
+ char m_pFlush[ 8 ];
+ char m_pPlayBA[ 8 ];
+ char m_pPen[ 8 ];
+ char m_pMultiP[ 8 ];
+ char m_pOffset[ 8 ];
+ char m_pLimits[ 8 ];
+ char m_pDebug[ 8 ];
+ char m_pTEK[ 8 ];
+ char m_pStack[ 8 ];
+ char m_pPrintE[ 8 ];
+ char m_pMetric[ 8 ];
+ char m_pAllTim[ 8 ];
+ char m_pColumn[ 8 ];
+ char m_pSetCol[ 8 ];
+ char m_pLonger[ 8 ];
+ char m_pAverag[ 8 ];
+ char m_pInner[ 8 ];
+ char m_pRescal[ 8 ];
+ char m_pLastPL[ 8 ];
+ char m_pBatch[ 8 ];
+ char m_pPunch[ 8 ];
+ char m_pExtrem[ 8 ];
+ char m_pLevel[ 8 ];
+ char m_pNoPlot[ 8 ];
+ char m_pMessag[ 8 ];
+ char m_pEnd[ 8 ];
+ char m_pTimeSP[ 8 ];
+ char m_pLabel[ 8 ];
+ char m_pTimeUN[ 8 ];
+ char m_pCursor[ 8 ];
+ char m_pXYPlot[ 8 ];
+ char m_pSlope[ 8 ];
+ char m_pBack[ 8 ];
+ char m_pReFile[ 8 ];
+ char m_pTEXBlk[ 8 ];
+ char m_pSetDat[ 8 ];
+ };
+
+ typedef struct tagANPLT tANPLT;
+
+ // Variables.
+ extern char pBBus[ 300 ];
+ extern char pBusLst[ 1000 ];
+ //
+ extern int nIBaud;
+ extern int nIBrnch;
+ extern int nIBsOut;
+ extern int nICHEnd;
+ extern int nICHRef;
+ extern int nICP;
+ extern int nICurse;
+ extern int nIHS;
+ extern int nInchPX;
+ extern int nInchPY;
+ extern int nInd1;
+ extern int nIndExp;
+ extern int nInWait;
+ extern int nIPrsrt;
+ extern int nITerm;
+ extern int nIZgr1;
+ extern int nIZgr2;
+ extern int nIZid;
+ extern int nZtit;
+ extern int nIzxax;
+ extern int nIzyax;
+ extern int nL4Plot;
+ extern int nLchfil;
+ extern int nLchid;
+ extern int nLchlim;
+ extern int nLchsup;
+ extern int nLchtit;
+ extern int nLchxax;
+ extern int nLchyax;
+ extern int nLdshg1;
+ extern int nLdshg2;
+ extern int nLimCol;
+ extern int nLimFix;
+ extern int nLook;
+ extern int nLSymb;
+ extern int nLTic;
+ extern int nLu7Plt;
+ extern int nLinePR;
+ extern int nLTek;
+ extern int nMaxEv;
+ extern int nMaxEw;
+ extern int nMaxIp;
+ extern int nMaxIsx;
+ extern int nMaxIsy;
+ extern int nMaxSym;
+ extern int nMFake;
+ extern int nMGrid1;
+ extern int nMGrid2;
+ extern int nMid;
+ extern int nMLine;
+ extern int nMSuper;
+ extern int nMTit;
+ extern int nMu6Sav;
+ extern int nMu6Std;
+ extern int nMxypl;
+ extern int nNamVar;
+ extern int nNc;
+ extern int nChSup;
+ extern int nChVer;
+ extern int nCut;
+ extern int nCut1;
+ extern int nCut2;
+ extern int nNewFil;
+ extern int nNoLabl;
+ extern int nSmplt;
+ extern int nNT2;
+ extern int nNumBrn;
+ extern int nNumFlt;
+ extern int nNumNVO;
+ extern int nNumOut;
+ extern int nNumRaw;
+ extern int nNumTek;
+ extern int nNumTit;
+ extern int nV;
+ extern int nXEnd;
+ extern int nXId6;
+ extern int nXInch;
+ extern int nXMax;
+ extern int nXOff;
+ extern int nXVern;
+ extern int nYEnd;
+ extern int nYId6;
+ extern int nYInch;
+ extern int nYMax;
+ extern int nYOff;
+ extern int pLabrtm[ 20 ];
+ extern int pMCurve[ 20 ];
+ extern int pMLevel[ 20 ];
+ extern int pMMM[ 20 ];
+ extern int nMPlot[ 20 ];
+ extern int pMStart[ 20 ];
+ extern int pMSymbT[ 20 ];
+ extern int pNumPts[ 20 ];
+ //
+ extern double nDX;
+ extern double nDXGrd1;
+ extern double nDXGrd2;
+ extern double nDY;
+ extern double nDYGrd1;
+ extern double nDYGrd2;
+ extern double nEvnByt;
+ extern double nFact;
+ extern double nFHTax;
+ extern double nFill;
+ extern double nFill1;
+ extern double nFill2;
+ extern double nFinFin;
+ extern double nFLine;
+ extern double nFSymb;
+ extern double nFTCarr;
+ extern double nFVAxtt;
+ extern double nFXId;
+ extern double nFXNumH;
+ extern double nFXNumV;
+ extern double nFXSup;
+ extern double nFXTit;
+ extern double nFXVert;
+ extern double nFYId;
+ extern double nFYSup;
+ extern double nFYTit;
+ extern double nGMax;
+ extern double nGMin;
+ extern double nHA;
+ extern double nHMax;
+ extern double nHMin;
+ extern double nHPI;
+ extern double nHTax;
+ extern double nPapLim;
+ extern double nPapMax;
+ extern double nSizID;
+ extern double nSizSup;
+ extern double nSizTit;
+ extern double nTAxisL;
+ extern double nTimeBeg;
+ extern double nTimeEnd;
+ extern double nTMult;
+ extern double nTolrce;
+ extern double nTStep;
+ extern double nVaxIsl;
+ extern double nVH;
+ extern double nVL;
+ extern double nVMax;
+ extern double nVMaxR;
+ extern double nVMin;
+ extern double nVMinR;
+ extern double nVS;
+ extern double nXId;
+ extern double nXSuper;
+ extern double nXTit;
+ extern double nYId;
+ extern double nYSuper;
+ extern double nYTit;
+ extern double pAAA[ 20 ];
+ extern double pBBB[ 20 ];
+ extern double pBX[ 150 ];
+ extern double pDatePL[ 2 ];
+ extern double pDYOld[ 20 ];
+ extern double pEV[ 15000 ];
+ extern double pEW[ 15000 ];
+ extern double pFVCom[ 50 ];
+ extern double pFXRef[ 25 ];
+ extern double pFYRef[ 25 ];
+ extern double pTClop[ 2 ];
+ extern double pTTLev[ 20 ];
+ extern double pTTMax[ 20 ];
+ extern double pTTMin[ 20 ];
+ extern double pYLevel[ 20 ];
+ extern double pYYMax[ 20 ];
+ extern double pYYMin[ 20 ];
+ //
+ extern std::string sFilNam;
+ extern std::string sAlpha;
+ extern std::string sBuffIn;
+ extern std::string sVertL;
+ extern std::string sHeadL;
+ extern std::string sXYTitl;
+ extern std::string sTextD1;
+ extern std::string sTextD2;
+ extern std::string sCurren;
+ extern std::string sVoltag;
+ extern std::string sBrClas;
+ extern std::string sDate;
+ extern std::string sTime;
+ extern std::string sANSI;
+ extern std::string sBuffIn;
+ extern std::string pSlot1[ 20 ];
+ extern std::string pSext[ 6 ];
+ extern std::string pHorzL[ 8 ];
+ extern std::string pIBuff[ 20 ];
+ extern std::string pABuff77[ 10 ];
+ extern std::string pAnPlt[];
+ //
+ extern tFVCom sFVCom;
+ extern tIVCom sIVCom;
+
+}
+
+#endif // _DEKPLT_HPP
diff --git a/includes/dekspy.hpp b/includes/dekspy.hpp
new file mode 100644
index 0000000..f944f67
--- /dev/null
+++ b/includes/dekspy.hpp
@@ -0,0 +1,158 @@
+//-*- mode: c++; indent-tabs-mode-nil; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file dekspy.hpp
+
+#ifndef _DEKSPY_HPP
+#define _DEKSPY_HPP
+
+#include <iostream>
+#include <iomanip>
+#include <sstream>
+#include <string>
+#include <list>
+#include <vector>
+
+extern char *cFilByt;
+extern double *pPltBuf;
+extern double pForByt[ 600 ];
+extern bool bLogVar;
+
+namespace spycom {
+
+ extern void *pMFiles[ 16 ];
+ //
+ extern char cChar1;
+ extern char pByteBuf[ 20 ];
+ extern char pDigit[ 10 ];
+ //
+ extern long int nITExp;
+ extern long int nNumSym;
+ extern long int nJJRoll;
+ extern long int nMaxArg;
+ extern long int nKilPer;
+ extern long int nKFile5;
+ extern long int nKLevel;
+ extern long int nKVerfy;
+ extern long int nJWord;
+ extern long int nIBegCL;
+ extern long int nIEndCL;
+ extern long int nLIdnt1;
+ extern long int nLIdnt2;
+ extern long int nNBreak;
+ extern long int nLinNow;
+ extern long int nLinSPN;
+ extern long int nNumKey;
+ extern long int nIndBuf;
+ extern long int nIndBeg;
+ extern long int nMFlush;
+ extern long int nNewVec;
+ extern long int nMaxFLG;
+ extern long int nKSPSav;
+ extern long int nMemKAR;
+ extern long int nNoBack;
+ extern long int nLSerLC;
+ extern long int nKSerLC;
+ extern long int nKBRSer;
+ extern long int nLockBR;
+ extern long int nKErase;
+ extern long int nKomAdd;
+ extern long int nIprSpy;
+ extern long int nMonitR;
+ extern long int nMonitS;
+ extern long int nKBreak;
+ extern long int nLimBuf;
+ extern long int nKOLOut;
+ extern long int nNexMod;
+ extern long int nNextSN;
+ extern long int nIncHlp;
+ extern long int nKSymbl;
+ extern long int nKopyIt;
+ extern long int nKSlowR;
+ extern long int nKWTSpy;
+ extern long int nNumRMP;
+ extern long int nLUntSP;
+ extern long int nLogVar;
+ extern long int nNumex;
+ //
+ extern long int pIASCII[ 1000 ];
+ extern long int pIndXRP[ 20 ];
+ extern long int pIVec[ 1000 ];
+ extern long int pLabels[ 15];
+ extern long int pKYRamp[ 20 ];
+ extern long int pLocate[ 1000 ];
+ extern long int pKSMSpy[ 3 ];
+ extern long int pNLine[ 1000 ];
+ extern long int pLimArr[ 4 ];
+ extern long int pIMin[ 55 ];
+ extern long int pIMax[ 55 ];
+ extern long int pLocOut[ 55 ];
+ extern long int pIntOut[ 55 ];
+ extern long int pLoopRP[ 20 ];
+ extern long int pN10RMP[ 20 ];
+ extern long int pKonTAC[ 14 ];
+ extern long int pKonAdd[ 14 ];
+ extern long int pKBegTX[ 85 ];
+ extern long int pKar1[ 1 ];
+ extern long int pKar2[ 2 ];
+ //
+ extern double *pFKar1;
+ extern double *pFKar2;
+ extern double *pPltBuf;
+ // equivalence (kar1, fkar1), (kar2, fkar2)
+ extern double nTMinRP;
+ extern double nTMaxRP;
+ extern double nTBreak;
+ extern double nEPSKOn[ 14 ];
+ extern double pFBegRP[ 20 ];
+ extern double pFEndRP[ 20 ];
+ extern double pForByt[ 600 ];
+ extern double pRampCN[ 20 ];
+ extern double pRampSL[ 20 ];
+ extern double pTBegRP[ 20 ];
+ extern double pTEndRP[ 20 ];
+ //
+ extern long int nLimCRD;
+ extern long int nNumCRD;
+ //
+ extern std::vector<long int> sMemRMP;
+}
+
+namespace spyf77 {
+
+ extern char cChar1;
+ extern char pDigit[ 10 ];
+ extern char pCol[ 25 ];
+ extern char pFilExt[ 10 ];
+ //
+ extern std::string sANSW80;
+ extern std::string sBlan80;
+ extern std::string sBroBus;
+ extern std::string sBuff77;
+ extern std::string sBytBuf;
+ extern std::string sBytFnd;
+ extern std::string sOutLin;
+ extern std::string pSymb[ 1000 ];
+ extern std::string sSymbRP[ 20 ];
+ extern std::string sABufSV;
+ extern std::string sJunker;
+ extern std::string pFile6B[ 20 ];
+ extern std::string sProm80;
+ extern std::string pTexPar[ 10 ];
+ extern std::string sSpyCD2;
+ //
+ extern std::stringstream sANSI8;
+ extern std::stringstream sANSI16;
+ extern std::stringstream sANSI32;
+ extern std::stringstream sMFile6;
+ extern std::stringstream sOutSav;
+ extern std::stringstream sHeding;
+ extern std::string pTexSpy[ 1250 ];
+ //
+ extern std::vector<std::string> sSpyKWD;
+ //
+ extern std::vector<std::string> sFile6;
+}
+
+#endif // _DEKSPY_HPP
+
+// end of file dekspy.hpp
diff --git a/includes/emtp.hpp b/includes/emtp.hpp
new file mode 100644
index 0000000..f0f7639
--- /dev/null
+++ b/includes/emtp.hpp
@@ -0,0 +1,75 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file emtp.hpp
+
+#ifndef _EMTP_HPP
+#define _EMTP_HPP
+
+#include <iostream>
+#include <iomanip>
+#include <functional>
+#include <utility>
+
+// Local includes.
+#include "blkcom.hpp"
+#include "dekspy.hpp"
+#include "utilities.hpp"
+#include "datain.hpp"
+
+// Macros.
+#define CHARC "c"
+#define TEXT4 "9"
+#define CHTACS "tacs"
+#define TEXT5 "blank"
+
+namespace emtp {
+
+ // types.
+
+ struct tagWords {
+ std::string sTextAY;
+ std::string sTextAX;
+ size_t mJptr;
+ };
+
+ typedef struct tagWords tWords;
+
+ struct tagRequest {
+ std::string m_sShortName;
+ std::string m_sLongName;
+ int m_nPointer;
+ std::function<void(void)> m_sRequest;
+ };
+
+ typedef struct tagRequest tRequest;
+
+ // Global variables.
+ extern const long int nLL34;
+ extern tWords pWords[];
+ extern std::string sSizesFileName;
+
+ // function prototypes.
+ void ioerr(const long int &);
+ void caterr(const long int &, const long int &);
+ void nextcard(void);
+ void cimage(void);
+ void dummy(void);
+ void tapsav(char *, std::fstream &, const long int &, const long int &);
+ void main10(void);
+ void subr10(void);
+ void namea6(const std::string &, long int *);
+ void tables(void);
+ void csup(const long int &);
+ void erexit(void);
+ void stoptp(void);
+ void setmar(int *);
+ void chrsiz(int *);
+ void setplt(void);
+ void setstd(void);
+ void interp(void);
+
+}
+
+#endif // _EMTP_HPP
+
+// end of file emtp.hpp
diff --git a/includes/emtp.hpp~ b/includes/emtp.hpp~
new file mode 100644
index 0000000..5fb528f
--- /dev/null
+++ b/includes/emtp.hpp~
@@ -0,0 +1,55 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file main00.hpp
+
+#ifndef _MAIN00_HPP
+#define _MAIN00_HPP
+
+// Local includes.
+
+#include "main.hpp"
+
+// Macros.
+
+#define CHARC "c"
+#define TEXT4 "9"
+#define CHTACS "tacs"
+#define TEXT5 "blank"
+
+namespace kwtcom {
+
+ extern int nKWTVAX;
+
+}
+
+namespace emtp {
+
+ // types.
+
+ struct tagWords {
+ std::string sTextAY;
+ std::string sTextAX;
+ size_t mJptr;
+ };
+
+ typedef struct tagWords tWords;
+
+ // Global variables.
+
+ extern const int nLL34;
+ extern tWords pWords[ 24 ];
+
+ // Prototypes.
+ void erexit(void);
+ void stoptp(void);
+ void setmar(int *);
+ void chrsiz(int *);
+ void setplt(void);
+ void setstd(void);
+ void interp(void);
+
+}
+
+#endif // _MAIN00_HPP
+
+// end of file main00.hpp
diff --git a/includes/freedom.hpp b/includes/freedom.hpp
new file mode 100644
index 0000000..83292b4
--- /dev/null
+++ b/includes/freedom.hpp
@@ -0,0 +1,30 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file freedom.hpp
+
+#ifndef _FREEDOM_HPP
+#define _FREEDOM_HPP
+
+#include <iostream>
+#include <iomanip>
+#include <string>
+#include <cstdio>
+#include <cstddef>
+#include <cstdint>
+
+#include "blkcom.hpp"
+#include "dekspy.hpp"
+
+namespace freedom {
+
+ template <class T> bool freeName(T &);
+ bool freeIn(const std::string &, int32_t &);
+ bool freeIn(const std::string &, int32_t &, int32_t &);
+ bool freeFix(const std::string &, int32_t &);
+ bool freeOne(double &);
+
+}
+
+#endif // _FREEDOM_HPP
+
+// end of file freedom.hpp
diff --git a/includes/lab02.hpp~ b/includes/lab02.hpp~
new file mode 100644
index 0000000..a1ec164
--- /dev/null
+++ b/includes/lab02.hpp~
@@ -0,0 +1,22 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file labl02.hpp
+
+
+
+namespace com29 {
+#ifndef _LAB29_HPP
+#define _LAB29_HPP
+
+#include <iostream>
+#include <iomanip>
+#include <string>
+#include <fstream>
+#include <ostream>
+#include <sstream>
+#include <cstdlib>
+#include <cstdint>
+#include <cinttypes>
+#include <vector>
+
+namespace com29 {
diff --git a/includes/labcom.hpp b/includes/labcom.hpp
new file mode 100644
index 0000000..c62a1b5
--- /dev/null
+++ b/includes/labcom.hpp
@@ -0,0 +1,117 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file labcom.hpp
+
+#ifndef _LABCOM_HPP
+#define _LABCOM_HPP
+
+#include <iostream>
+#include <iomanip>
+#include <cstddef>
+#include <vector>
+
+#include "emtp.hpp"
+
+// Namespaces.
+
+namespace labcom {
+
+ extern char *pKArray;
+ extern char *pNArray;
+ extern char *pSpace;
+ //
+ extern int *pKPSour;
+ extern int *pKSSFrq;
+ //
+ extern size_t *pKode;
+ //
+ extern double *pX;
+ extern double *pYkm;
+ //
+ extern std::vector<int> sIARDUB;
+ extern std::vector<int> sIBSOut;
+ extern std::vector<int> sIModel;
+ extern std::vector<int> sIndHst;
+ extern std::vector<int> sISkip;
+ extern std::vector<int> sISourc;
+ extern std::vector<int> sIWTent;
+ extern std::vector<int> sKBegSw;
+ extern std::vector<int> sKBus;
+ extern std::vector<int> sKDEPSw;
+ extern std::vector<int> sKENTNB;
+ extern std::vector<int> sKM;
+ extern std::vector<int> sKMSwit;
+ extern std::vector<int> sKode;
+ extern std::vector<int> sKodeBR;
+ extern std::vector<int> sKodSem;
+ extern std::vector<int> sKOutVP;
+ extern std::vector<int> sKPos;
+ extern std::vector<int> sKSWTyp;
+ extern std::vector<int> sLastSw;
+ extern std::vector<int> sLength;
+ extern std::vector<int> sMBus;
+ extern std::vector<int> sModSwt;
+ extern std::vector<int> sNameNL;
+ extern std::vector<int> sNBHDSw;
+ extern std::vector<int> sNextSw;
+ extern std::vector<int> sNHist;
+ extern std::vector<int> sNLType;
+ extern std::vector<int> sNOnLAD;
+ extern std::vector<int> sNOnLE;
+ extern std::vector<int> sNOnLK;
+ extern std::vector<int> sNOnLM;
+ //
+ extern std::vector<double> sADelay;
+ extern std::vector<double> sANOnL;
+ extern std::vector<double> sARDUBE;
+ extern std::vector<double> sBNRG;
+ extern std::vector<double> sBValue;
+ extern std::vector<double> sCChar;
+ extern std::vector<double> sCIK;
+ extern std::vector<double> sCI;
+ extern std::vector<double> sCK;
+ extern std::vector<double> sCNVHst;
+ extern std::vector<double> sCOn1;
+ extern std::vector<double> sCOptBR;
+ extern std::vector<double> sCrit;
+ extern std::vector<double> sCurr;
+ extern std::vector<double> sE;
+ extern std::vector<double> sEnergy;
+ extern std::vector<double> sEta;
+ extern std::vector<double> sGSlope;
+ extern std::vector<double> sHSFD;
+ extern std::vector<double> sQFD;
+ extern std::vector<double> sSCOnST;
+ extern std::vector<double> sSemAux;
+ extern std::vector<double> sSPTACS;
+ extern std::vector<double> sStailK;
+ extern std::vector<double> sStailM;
+ extern std::vector<double> sTClose;
+ extern std::vector<double> sTDNS;
+ extern std::vector<double> sTOpen;
+ extern std::vector<double> sVChar;
+ extern std::vector<double> sVecNL1;
+ extern std::vector<double> sVecNL2;
+ extern std::vector<double> sVoltI;
+ extern std::vector<double> sVOnL;
+ extern std::vector<double> sVZero;
+ extern std::vector<double> sWeight;
+ extern std::vector<double> sX;
+ extern std::vector<double> sXK;
+ extern std::vector<double> sXM;
+ extern std::vector<double> sYKM;
+ extern std::vector<double> sXMax;
+ extern std::vector<double> sXOptBR;
+ extern std::vector<double> sZInf;
+
+ //
+ extern std::vector<size_t> sNR;
+ //
+ extern std::vector<std::string> sBus;
+ extern std::vector<std::string> sTexVec;
+
+}
+
+#endif // _LABCOM_HPP
+
+// end of file labcom.hpp
diff --git a/includes/labl02.hpp b/includes/labl02.hpp
new file mode 100644
index 0000000..1112021
--- /dev/null
+++ b/includes/labl02.hpp
@@ -0,0 +1,50 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file labl02.hpp
+
+#ifndef _LABL02_HPP
+#define _LABL02_HPP
+
+#include <iostream>
+#include <iomanip>
+#include <string>
+#include <fstream>
+#include <ostream>
+#include <sstream>
+#include <cstdlib>
+#include <cstdint>
+#include <cinttypes>
+#include <vector>
+
+namespace com2 {
+
+ extern int nN1;
+ extern int nN2;
+ extern int nN3;
+ extern int nN4;
+ extern int nLCount;
+ extern int nModel;
+ extern int nL27Dep;
+ extern int nIBR1;
+ extern int nNRecur;
+ extern int nKGroup;
+ extern int nNC4;
+ extern int nNC5;
+ extern int nIFQ;
+ extern int nN13;
+ extern int nIDA;
+ extern int nIFKC;
+ extern int nIDY;
+ extern int nIDM;
+ extern int nIDQ;
+ extern int nIDU;
+ extern int nIDT;
+ extern int nIQ;
+ extern int nNC6;
+ extern int nNC3;
+
+}
+
+#endif // _LABL02_HPP
+
+// end of file labl02.hpp
diff --git a/includes/labl29.hpp b/includes/labl29.hpp
new file mode 100644
index 0000000..0eed3ce
--- /dev/null
+++ b/includes/labl29.hpp
@@ -0,0 +1,48 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file lab29.hpp.hpp
+
+#ifndef _LAB29_HPP
+#define _LAB29_HPP
+
+#include <iostream>
+#include <iomanip>
+#include <string>
+#include <fstream>
+#include <ostream>
+#include <sstream>
+#include <cstdlib>
+#include <cstdint>
+#include <cinttypes>
+#include <vector>
+
+namespace com29 {
+
+ // Variables.
+ extern int nLimInc;
+ extern int nIOFArr;
+ extern int nVar;
+ extern int nKey;
+ extern int nMaxo29;
+ //
+ extern double nPer;
+ extern double nXmean1;
+ extern double nXVar1;
+ extern double nStDev1;
+ extern double nVMax;
+
+ // subroutine guts29.
+
+ void guts29(std::string &, \
+ std::vector<int> &, \
+ std::vector<int> &, \
+ int &, \
+ int &, \
+ double &, \
+ std::vector<double> &, \
+ std::vector<double> &, \
+ std::vector<double> &);
+
+#endif // _LAB29_HPP
+
+// end of file lab29.hpp
diff --git a/includes/linemodel.hpp b/includes/linemodel.hpp
new file mode 100644
index 0000000..2042ad7
--- /dev/null
+++ b/includes/linemodel.hpp
@@ -0,0 +1,23 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file linemodel.hpp
+
+#ifndef __LINEMODEL_HPP
+#define __LINEMODEL_HPP
+
+// System includes.
+
+#include <iostream>
+#include <iomanip>
+#include <fstream>
+#include <string>
+
+// Local includes.
+
+namespace linemodel {
+ ;
+};
+
+#endif // __LINEMODEL_HPP
+
+// end of file linemodel.hpp
diff --git a/includes/location.hpp b/includes/location.hpp
new file mode 100644
index 0000000..9ca57a5
--- /dev/null
+++ b/includes/location.hpp
@@ -0,0 +1,27 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file location.hpp
+
+#ifndef _LOCATION_HPP
+#define _LOCATION_HPP
+
+// System includes.
+
+#include <iostream>
+#include <cstdint>
+#include <vector>
+
+#include "blkcom.hpp"
+
+namespace location {
+
+ extern std::vector<size_t> sLocate;
+ //
+ void locatn(void);
+ template <class T> size_t index(T *);
+
+}
+
+#endif // _LOCATION_HPP
+
+// end of file location.hpp
diff --git a/includes/main.hpp b/includes/main.hpp
new file mode 100644
index 0000000..4c8ae34
--- /dev/null
+++ b/includes/main.hpp
@@ -0,0 +1,62 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file main.hpp
+
+#ifndef _MAIN_HPP
+#define _MAIN_HPP
+
+// System includes.
+
+#include <iostream>
+#include <iomanip>
+#include <exception>
+#include <stdexcept>
+#include <fstream>
+#include <sstream>
+#include <string>
+#include <cstdlib>
+#include <ctime>
+#include <cmath>
+#include <functional>
+#include <utility>
+
+// UNIX/Linux specifics.
+#include <unistd.h>
+#include <getopt.h>
+#include <err.h>
+
+// local includes.
+#include "blkcom.hpp"
+#include "labcom.hpp"
+//#include "volt45.hpp"
+#include "datain.hpp"
+#include "emtp.hpp"
+
+#ifdef WITH_OVER1
+#include "over1.hpp"
+#endif
+
+#ifdef WITH_OVER20
+#include "over20.hpp"
+#endif
+
+#ifdef WITH_OVER51
+#include "over51.hpp"
+#endif
+
+#include "newmods.hpp"
+
+//#include "location.hpp"
+//#include "strcom.hpp"
+//#include "movecopy.hpp"
+//#include "time.hpp"
+
+extern int opterr;
+extern int optind;
+extern char *optarg;
+
+int main(int, char *[]);
+
+#endif // _MAIN_HPP
+
+// end of file main.hpp
diff --git a/includes/movecopy.hpp b/includes/movecopy.hpp
new file mode 100644
index 0000000..b1a115b
--- /dev/null
+++ b/includes/movecopy.hpp
@@ -0,0 +1,29 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file movecopy.hpp
+
+#ifndef _MOVECOPY_HPP
+#define _MOVECOPY_HPP
+
+#include <iostream>
+#include <string>
+#include <cstdlib>
+#include <cstdint>
+#include <vector>
+
+// Functions.
+
+namespace movecopy {
+
+ template <class T> size_t copy(const T &, T *, const size_t &);
+ template <class T> size_t move(const T [], T *, const size_t &);
+ template <class T> size_t move0(T *, const size_t &);
+ template <class T> size_t copy(const T &, std::vector<T> &, const size_t &);
+ template <class T> size_t move(const std::vector<T> &, std::vector<T> &, const size_t &);
+ template <class T> size_t move0(std::vector<T> &, const size_t &);
+
+}
+
+#endif // _MOVECOPY_HPP
+
+// end of file movecopy.hpp
diff --git a/includes/newmods.hpp b/includes/newmods.hpp
new file mode 100644
index 0000000..c871e46
--- /dev/null
+++ b/includes/newmods.hpp
@@ -0,0 +1,63 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file newmods.hpp
+
+#ifndef _NEWMODS_HPP
+#define _NEWMODS_HPP
+
+// System includes.
+
+#include <iostream>
+#include <iomanip>
+#include <fstream>
+#include <string>
+#include <cstdint>
+#include <vector>
+
+// Local includes.
+
+#include "blkcom.hpp"
+#include "labcom.hpp"
+#include "emtp.hpp"
+
+// Macros.
+#define NUMLST 28
+#define NUMKEX 7
+
+// Types.
+namespace emtp {
+
+ enum tagJBLTypes {
+ JBLTYPE_NULL = 0x00,
+ JBLTYPE_STRING = 0x01,
+ JBLTYPE_INTEGER = 0x04,
+ JBLTYPE_DOUBLE = 0x08,
+ JBLTYPE_COMPLEX_DOUBLE = 0x10
+ };
+
+ typedef enum tagJBLTypes tJBLTypes;
+
+ struct tagVariable {
+ std::string m_sName;
+ std::string m_sNameSpace;
+ int m_nSize;
+ tJBLTypes m_sType;
+ };
+
+ typedef struct tagVariable tVariable;
+
+ // Global variables.
+
+ extern tVariable pVariables[];
+
+ // Prototypes.
+
+ bool vardim(const std::string &, std::vector<long int> &);
+ bool dimens(std::vector<long int> &, const int &, std::string &, std::string &);
+ bool cleanup(void);
+
+}
+
+#endif // _NEWMODS_HPP
+
+// end of file newmods.hpp
diff --git a/includes/over1.hpp b/includes/over1.hpp
new file mode 100644
index 0000000..8c8e432
--- /dev/null
+++ b/includes/over1.hpp
@@ -0,0 +1,71 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file over1.hpp
+
+#ifndef _OVER1_HPP
+#define _OVER1_HPP
+
+// System includes.
+
+#include <iostream>
+#include <cstdlib>
+#include <cstring>
+#include <thread>
+#include <chrono>
+#include <limits>
+#include <vector>
+
+// Local includes.
+
+#include "blkcom.hpp"
+#include "dekspy.hpp"
+#include "dekplt.hpp"
+#include "comlock.hpp"
+#include "labcom.hpp"
+#include "random.hpp"
+#include "main.hpp"
+#include "newmods.hpp"
+#include "utilities.hpp"
+#include "strcom.hpp"
+#include "location.hpp"
+#include "time.hpp"
+#include "umdeck.hpp"
+#include "labl02.hpp"
+
+#define LL1 1
+#define LL6 6
+#define LL8 8
+#define LL11 11
+#define LL20 20
+#define LL24 24
+#define LL25 25
+#define LL30 30
+#define LL40 40
+#define LL60 60
+#define LL64 64
+#define LL80 80
+#define SPEEDL 2.997925e8
+
+// Prototypes.
+
+namespace over1 {
+
+ void over1(void);
+ void tacs1c(void);
+ void swmodf(void);
+ void reques(void);
+ void sysdep(void);
+ void midov1(void);
+ void nmincr(std::string &, int &);
+ void tacs1(void);
+ void tacs1a(void);
+ void tacs1b(void);
+ void expchk(int &, int &, int &);
+ void intchk(int &, int &, int &);
+ void pfatch(void);
+
+}
+
+#endif // _OVER1_HPP
+
+// end of file over1.hpp
diff --git a/includes/over1.hpp~ b/includes/over1.hpp~
new file mode 100644
index 0000000..c37af28
--- /dev/null
+++ b/includes/over1.hpp~
@@ -0,0 +1,70 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file over1.hpp
+
+#ifndef _OVER1_HPP
+#define _OVER1_HPP
+
+// System includes.
+
+#include <iostream>
+#include <cstdlib>
+#include <cstring>
+#include <thread>
+#include <chrono>
+#include <limits>
+#include <vector>
+
+// Local includes.
+
+#include "blkcom.hpp"
+#include "dekspy.hpp"
+#include "dekplt.hpp"
+#include "comlock.hpp"
+#include "labcom.hpp"
+#include "random.hpp"
+#include "main.hpp"
+#include "newmods.hpp"
+#include "utilities.hpp"
+#include "strcom.hpp"
+#include "location.hpp"
+#include "time.hpp"
+#include "umdeck.hpp"
+
+#define LL1 1
+#define LL6 6
+#define LL8 8
+#define LL11 11
+#define LL20 20
+#define LL24 24
+#define LL25 25
+#define LL30 30
+#define LL40 40
+#define LL60 60
+#define LL64 64
+#define LL80 80
+#define SPEEDL 2.997925e8
+
+// Prototypes.
+
+namespace over1 {
+
+ void over1(void);
+ void tacs1c(void);
+ void swmodf(void);
+ void reques(void);
+ void sysdep(void);
+ void midov1(void);
+ void nmincr(std::string &, int &);
+ void tacs1(void);
+ void tacs1a(void);
+ void tacs1b(void);
+ void expchk(int &, int &, int &);
+ void intchk(int &, int &, int &);
+ void pfatch(void);
+
+}
+
+#endif // _OVER1_HPP
+
+// end of file over1.hpp
diff --git a/includes/over20.hpp b/includes/over20.hpp
new file mode 100644
index 0000000..2fb2941
--- /dev/null
+++ b/includes/over20.hpp
@@ -0,0 +1,67 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file over20.hpp
+
+#ifndef _OVER20_HPP
+#define _OVER20_HPP
+
+// System includes.
+
+#include <iostream>
+#include <cstdlib>
+#include <cstring>
+#include <thread>
+#include <chrono>
+#include <limits>
+#include <vector>
+
+// Local includes.
+
+#include "blkcom.hpp"
+#include "dekspy.hpp"
+#include "dekplt.hpp"
+#include "comlock.hpp"
+#include "labcom.hpp"
+#include "random.hpp"
+#include "main.hpp"
+#include "newmods.hpp"
+#include "utilities.hpp"
+#include "strcom.hpp"
+#include "location.hpp"
+#include "time.hpp"
+#include "plot.hpp"
+
+// Prototypes.
+
+namespace over20 {
+
+ void over20(void);
+ void katalg(void);
+ void emtspy(void);
+ void spying(void);
+ void spyink(void);
+ void initsp(void);
+ void kwiter(int[ 3 ]);
+ void percnt(std::string *, const int &);
+ void numchk(std::string *, const int &, int &);
+ void getnum(int &);
+ void spylin(void);
+ void spyout(const int &, const int &);
+ void examin(void);
+ void deposi(const int &, int &, int &, double &);
+ void append(void);
+ void intpar(const int &, int &, int &, int &);
+ void sosrng(int &);
+ void locatn(void);
+ void stopin(void);
+ void helper(int &);
+ void timval(void);
+ void back14(void);
+ void setrtm(void);
+ void flatbd(void);
+
+}
+
+#endif // _OVER20_HPP
+
+// end of file over20.hpp
diff --git a/includes/over51.hpp b/includes/over51.hpp
new file mode 100644
index 0000000..c3d0a85
--- /dev/null
+++ b/includes/over51.hpp
@@ -0,0 +1,199 @@
+//-*- mode: c++; indent-tabs-mode: nil; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file over51.hpp
+
+#ifndef _OVER51_HPP
+#define _OVER51_HPP
+
+#include <iostream>
+#include <iomanip>
+#include <string>
+#include <sstream>
+#include <limits>
+#include <exception>
+#include <stdexcept>
+
+#include "blkcom.hpp"
+#include "time.hpp"
+
+namespace emtp {
+
+ // Classes.
+ class storage_exceeded_error : public std::runtime_error
+ {
+ public:
+ storage_exceeded_error () : std::runtime_error ("")
+ {
+ }
+
+ public:
+ const char *what (void) const noexcept
+ {
+ std::stringstream ss;
+ //
+ ss << std::string (5, ' ');
+ ss << "Storage exceeded for list number ";
+ ss << std::setw(2) << std::setfill('0') << blkcom::sLStat[ 15 ];
+ ss << ". See dimensioned limit in tabulation below.\n";
+ ss << std::string(5, '-');
+ ss << "The problem being inputted is simply too big for the program as currently dimensioned. Since there usually are\n";
+ ss << std::string(5, ' ');
+ ss << "ways of circumventing this difficulty, it is suggested that the user consult his friendly neighborhood program\n";
+ ss << std::string(5, ' ');
+ ss << "maintenance man.\n";
+ return ss.str().c_str();
+ }
+ };
+
+ class time_error : public std::runtime_error
+ {
+ public:
+ time_error () : std::runtime_error ("")
+ {
+ }
+
+ public:
+ const char *what (void) const noexcept
+ {
+ std::stringstream ss;
+ //
+ if (blkcom::nT >= 0.0) {
+ ss << std::string (5, '-');
+ ss << "Time-step size 'deltat' as read from columns 1-8 of the first miscellaneous data card is not positive. The\n";
+ ss << std::string (5, '-');
+ ss << "user punched a value of ";
+ ss << std::setw (14) << std::setprecision (4) << blkcom::sFLStat[ 15 ];
+ ss << ". Unlike Jules Verne, you are not allowed to stop or decrease time during\n";
+ ss << std::string (5, '-');
+ ss << "a simulation, my friend. Don't try riding out of an active volcano on a raft floating on molten lava, either,\n";
+ ss << std::string (5, '-');
+ ss << "although that's another story.\n";
+ } else {
+ ss << std::string (5, '-');
+ ss << "The starting time 't' as read from the floating-point miscellaneous data card is negative, which is\n";
+ ss << std::string (5, '-');
+ ss << "illegal. A value of";
+ ss << std::setw (15) << std::setprecision (5) << blkcom::nT;
+ ss << " was read from the data field of columns 49-56.\n";
+ }
+ return ss.str ().c_str ();
+ }
+ };
+
+ class branch_card_illegal_type_code_error : public std::runtime_error
+ {
+ public:
+ branch_card_illegal_type_code_error () : std::runtime_error ("")
+ {
+ }
+
+ public:
+ const char *what (void) const noexcept
+ {
+ std::stringstream ss;
+ //
+ ss << std::string (5, '-');
+ ss << "Illegal type code read from columns 1-2 of last branch card. The user punched a value of ";
+ ss << std::setw (2) << blkcom::sLStat[ 15 ];
+ ss << ". Either\n";
+ ss << std::string (5, '-');
+ ss << "the punched number itself is patently illegal (always an error, under any circumstances), or the card in question\n";
+ ss << std::string (5, '-');
+ ss << "his out of sequence in relation to the preceding data card which was inputted. As an example of the latter\n";
+ ss << std::string (5, '-');
+ ss << "case, consider a '-3' punch, with the preceeding card not bearing a '-2' punch. In any case, open up the user's\n";
+ ss << std::string (5, ' ');
+ ss << "manual, and reread the rules for the data type that you have been trying to input, my friend.\n";
+ ss << std::string (5, ' ');
+ ss << "Yet, in case this general advice does not seem to apply, consider the possible trouble which can arise from a\n";
+ ss << std::string (5, ' ');
+ ss << "preceding faulty use of the reference-branch capability. This feature has the EMTP looking for a certain number\n";
+ ss << std::string (5, ' ');
+ ss << "and type of branch cards, based on properties of the component to which reference has been made. If the user's\n";
+ ss << std::string (5, ' ');
+ ss << "data cards do not in structure match those of the reference component, an error stop of the present type may very";
+ ss << std::string (5, ' ');
+ ss << "be expected. Remember that in cases where two or more branches from reference bus 'bus3' to reference bus\n";
+ ss << std::string (5, ' ');
+ ss << "'bus4' (ordered pair of names, read from columns 15-24 as 2a6 information) exist, the EMTP will always pick\n";
+ ss << std::string (5, ' ');
+ ss << "the first one that it finds (in order of branch input) for reference purposes.\n";
+ return ss.str ().c_str ();
+ }
+ };
+
+ class last_branch_zero_impedance_error : public std::runtime_error
+ {
+ public:
+ last_branch_zero_impedance_error () :std::runtime_error ("")
+ {
+ }
+
+ public:
+ const char *what (void) const noexcept
+ {
+ std::stringstream ss;
+ //
+ ss << std::string (5, ' ');
+ ss << "Last branch was zero impedance (R, L, C fields of columns 27-44 were all zero). If you really want a short\n";
+ ss << std::string (5, ' ');
+ ss << "circuit, you must punch a very small value for R or L. Or better yet, why not do away with one of the node\n";
+ ss << std::string (5, ' ');
+ ss << "names of this branch, treating both ends as the same bus (a perfect short circuit).\n";
+ return ss.str ().c_str ();
+ }
+ };
+
+ class non_monotone_increasing_characteristic_error : public std::runtime_error
+ {
+ public:
+ non_monotone_increasing_characteristic_error () : std::runtime_error ("")
+ {
+ }
+
+ public:
+ const char *what (void) const noexcept
+ {
+ std::stringstream ss;
+ //
+ ss << std::string (5, ' ');
+ ss << "The user has been inputting pairs of points which define a nonlinear (or pseudo-nonlinear) element characteristic.\n";
+ ss << std::string (5, ' ');
+ ss << "These must be in order, moving ever to the right and upward in the x-y plane. But the user's just-inputted\n";
+ ss << std::string (5, ' ');
+ ss << "characteristic is not monotone increasing as it should be. A decrease in one of the two coordinate points\n";
+ ss << std::string (5, ' ');
+ ss << "has been detected on the last data card which was read. Shape up or ship out, Jack.\n";
+ return ss.str ().c_str ();
+ }
+ };
+
+ class dummy_function_called_error : public std::runtime_error
+ {
+ public:
+ dummy_function_called_error () : std::runtime_error ("")
+ {
+ }
+
+ public:
+ const char *what (void) const noexcept
+ {
+ std::stringstream ss;
+ //
+ ss << std::string (5, ' ');
+ ss << "Dummy function is called, something wrong with this version of EMTP++.\n";
+ return ss.str ().c_str ();
+ }
+ };
+
+}
+
+namespace over51 {
+
+ // Prototypes.
+ void subr51(void);
+ void over51(void);
+
+}
+
+#endif // _OVER51_HPP
diff --git a/includes/over51.hpp~ b/includes/over51.hpp~
new file mode 100644
index 0000000..30de526
--- /dev/null
+++ b/includes/over51.hpp~
@@ -0,0 +1,200 @@
+//-*- mode: c++; indent-tabs-mode: nil; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file over51.hpp
+
+#ifndef _OVER51_HPP
+#define _OVER51_HPP
+
+#include <iostream>
+#include <iomanip>
+#include <string>
+#include <sstream>
+#include <limits>
+#include <exception>
+#include <stdexcept>
+
+#include "blkcom.hpp"
+#include "time.hpp"
+#include "main00.hpp"
+
+namespace emtp {
+
+ // Classes.
+ class storage_exceeded_error : public std::runtime_error
+ {
+ public:
+ storage_exceeded_error () : std::runtime_error ("")
+ {
+ }
+
+ public:
+ const char *what (void) const noexcept
+ {
+ std::stringstream ss;
+ //
+ ss << std::string (5, ' ');
+ ss << "Storage exceeded for list number ";
+ ss << std::setw (2) << std::setfill ('0') << blkcom::sLStat[ 15 ];
+ ss << ". See dimensioned limit in tabulation below.\n";
+ ss << std::string (5, '-');
+ ss << "The problem being inputted is simply too big for the program as currently dimensioned. Since there usually are\n";
+ ss << std::string (5, ' ');
+ ss << "ways of circumventing this difficulty, it is suggested that the user consult his friendly neighborhood program\n";
+ ss << std::string (5, ' ');
+ ss << "maintenance man.\n";
+ return ss.str ().c_str ();
+ }
+ };
+
+ class time_error : public std::runtime_error
+ {
+ public:
+ time_error () : std::runtime_error ("")
+ {
+ }
+
+ public:
+ const char *what (void) const noexcept
+ {
+ std::stringstream ss;
+ //
+ if (blkcom::nT >= 0.0) {
+ ss << std::string (5, '-');
+ ss << "Time-step size 'deltat' as read from columns 1-8 of the first miscellaneous data card is not positive. The\n";
+ ss << std::string (5, '-');
+ ss << "user punched a value of ";
+ ss << std::setw (14) << std::setprecision (4) << blkcom::pFLStat[ 15 ];
+ ss << ". Unlike Jules Verne, you are not allowed to stop or decrease time during\n";
+ ss << std::string (5, '-');
+ ss << "a simulation, my friend. Don't try riding out of an active volcano on a raft floating on molten lava, either,\n";
+ ss << std::string (5, '-');
+ ss << "although that's another story.\n";
+ } else {
+ ss << std::string (5, '-');
+ ss << "The starting time 't' as read from the floating-point miscellaneous data card is negative, which is\n";
+ ss << std::string (5, '-');
+ ss << "illegal. A value of";
+ ss << std::setw (15) << std::setprecision (5) << blkcom::nT;
+ ss << " was read from the data field of columns 49-56.\n";
+ }
+ return ss.str ().c_str ();
+ }
+ };
+
+ class branch_card_illegal_type_code_error : public std::runtime_error
+ {
+ public:
+ branch_card_illegal_type_code_error () : std::runtime_error ("")
+ {
+ }
+
+ public:
+ const char *what (void) const noexcept
+ {
+ std::stringstream ss;
+ //
+ ss << std::string (5, '-');
+ ss << "Illegal type code read from columns 1-2 of last branch card. The user punched a value of ";
+ ss << std::setw (2) << blkcom::sLStat[ 15 ];
+ ss << ". Either\n";
+ ss << std::string (5, '-');
+ ss << "the punched number itself is patently illegal (always an error, under any circumstances), or the card in question\n";
+ ss << std::string (5, '-');
+ ss << "his out of sequence in relation to the preceding data card which was inputted. As an example of the latter\n";
+ ss << std::string (5, '-');
+ ss << "case, consider a '-3' punch, with the preceeding card not bearing a '-2' punch. In any case, open up the user's\n";
+ ss << std::string (5, ' ');
+ ss << "manual, and reread the rules for the data type that you have been trying to input, my friend.\n";
+ ss << std::string (5, ' ');
+ ss << "Yet, in case this general advice does not seem to apply, consider the possible trouble which can arise from a\n";
+ ss << std::string (5, ' ');
+ ss << "preceding faulty use of the reference-branch capability. This feature has the EMTP looking for a certain number\n";
+ ss << std::string (5, ' ');
+ ss << "and type of branch cards, based on properties of the component to which reference has been made. If the user's\n";
+ ss << std::string (5, ' ');
+ ss << "data cards do not in structure match those of the reference component, an error stop of the present type may very";
+ ss << std::string (5, ' ');
+ ss << "be expected. Remember that in cases where two or more branches from reference bus 'bus3' to reference bus\n";
+ ss << std::string (5, ' ');
+ ss << "'bus4' (ordered pair of names, read from columns 15-24 as 2a6 information) exist, the EMTP will always pick\n";
+ ss << std::string (5, ' ');
+ ss << "the first one that it finds (in order of branch input) for reference purposes.\n";
+ return ss.str ().c_str ();
+ }
+ };
+
+ class last_branch_zero_impedance_error : public std::runtime_error
+ {
+ public:
+ last_branch_zero_impedance_error () :std::runtime_error ("")
+ {
+ }
+
+ public:
+ const char *what (void) const noexcept
+ {
+ std::stringstream ss;
+ //
+ ss << std::string (5, ' ');
+ ss << "Last branch was zero impedance (R, L, C fields of columns 27-44 were all zero). If you really want a short\n";
+ ss << std::string (5, ' ');
+ ss << "circuit, you must punch a very small value for R or L. Or better yet, why not do away with one of the node\n";
+ ss << std::string (5, ' ');
+ ss << "names of this branch, treating both ends as the same bus (a perfect short circuit).\n";
+ return ss.str ().c_str ();
+ }
+ };
+
+ class non_monotone_increasing_characteristic_error : public std::runtime_error
+ {
+ public:
+ non_monotone_increasing_characteristic_error () : std::runtime_error ("")
+ {
+ }
+
+ public:
+ const char *what (void) const noexcept
+ {
+ std::stringstream ss;
+ //
+ ss << std::string (5, ' ');
+ ss << "The user has been inputting pairs of points which define a nonlinear (or pseudo-nonlinear) element characteristic.\n";
+ ss << std::string (5, ' ');
+ ss << "These must be in order, moving ever to the right and upward in the x-y plane. But the user's just-inputted\n";
+ ss << std::string (5, ' ');
+ ss << "characteristic is not monotone increasing as it should be. A decrease in one of the two coordinate points\n";
+ ss << std::string (5, ' ');
+ ss << "has been detected on the last data card which was read. Shape up or ship out, Jack.\n";
+ return ss.str ().c_str ();
+ }
+ };
+
+ class dummy_function_called_error : public std::runtime_error
+ {
+ public:
+ dummy_function_called_error () : std::runtime_error ("")
+ {
+ }
+
+ public:
+ const char *what (void) const noexcept
+ {
+ std::stringstream ss;
+ //
+ ss << std::string (5, ' ');
+ ss << "Dummy function is called, something wrong with this version of EMTP++.\n";
+ return ss.str ().c_str ();
+ }
+ };
+
+}
+
+namespace over51 {
+
+ // Prototypes.
+ void subr51(void);
+ void over51(void);
+
+}
+
+#endif // _OVER51_HPP
diff --git a/includes/plot.hpp b/includes/plot.hpp
new file mode 100644
index 0000000..7069357
--- /dev/null
+++ b/includes/plot.hpp
@@ -0,0 +1,41 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file plot.hpp
+
+#ifndef _PLOT_HPP
+#define _PLOT_HPP
+
+#ifdef WITH_OVER20
+
+#include <iostream>
+#include <iomanip>
+#include <fstream>
+#include <vector>
+
+#include "utilities.hpp"
+#include "blkcom.hpp"
+#include "dekspy.hpp"
+#include "labcom.hpp"
+#include "emtp.hpp"
+#include "over20.hpp"
+
+namespace plot
+{
+
+ void sysplt(void *);
+ void rtmplt(void);
+ void tpplot(void);
+ void pltvar(void);
+ void chrplt(void);
+ void tekplt(void);
+ void tgrid(int, int, int, int, int, int, int);
+ void pltfil(const long int &);
+ void pltlu2(double *, std::vector<double> *);
+
+}
+
+#endif // WITH_OVER20
+
+#endif // _PLOT_HPP
+
+// end of file plot.hpp
diff --git a/includes/plot.hpp~ b/includes/plot.hpp~
new file mode 100644
index 0000000..727998c
--- /dev/null
+++ b/includes/plot.hpp~
@@ -0,0 +1,17 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file plot.hpp
+
+#ifndef _PLOT_HPP
+#define _PLOT_HPP
+
+namespace plot
+{
+
+
+
+}
+
+#endif // _PLOT_HPP
+
+// end of file plot.hpp
diff --git a/includes/random.hpp b/includes/random.hpp
new file mode 100644
index 0000000..1969082
--- /dev/null
+++ b/includes/random.hpp
@@ -0,0 +1,26 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file random.hpp
+
+#ifndef _RANDOM_HPP
+#define _RANDOM_HPP
+
+#include <iostream>
+#include <string>
+
+#include "blkcom.hpp"
+#include "dekspy.hpp"
+
+namespace randomize {
+ // Variables.
+
+ //Prototypes.
+ double seedy(std::string *);
+ double randnm(const double &);
+ double sandnm(const double &);
+
+}
+
+#endif // _RANDOM_HPP
+
+// end of file random.hpp
diff --git a/includes/strcom.hpp b/includes/strcom.hpp
new file mode 100644
index 0000000..bdab939
--- /dev/null
+++ b/includes/strcom.hpp
@@ -0,0 +1,22 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file strcom.hpp
+
+#ifndef _STRCOM_HPP
+#define _STRCOM_HPP
+
+#include <iostream>
+#include <iomanip>
+#include <string>
+#include <algorithm>
+
+namespace strcom {
+
+ std::string toLower (const std::string &);
+ std::string toUpper (const std::string &);
+
+}
+
+#endif // _STRCOM_HPP
+
+// end of file __STRCOM_HPP
diff --git a/includes/tacsar.hpp b/includes/tacsar.hpp
new file mode 100644
index 0000000..eaed1cf
--- /dev/null
+++ b/includes/tacsar.hpp
@@ -0,0 +1,60 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file tacsar.hpp
+
+#ifndef _TACSAR_HPP
+#define _TACSAR_HPP
+
+#include <iostream>
+#include <iomanip>
+#include <cstddef>
+#include <vector>
+
+namespace tacsar {
+
+ extern int nIColCS;
+ extern int nIlnTab;
+ extern int nInSup;
+ extern int nIsBlk;
+ extern int nIuty;
+ extern int nIVarB;
+ extern int nJOut;
+ extern int nKaliu;
+ extern int nKalksu;
+ extern int nKatcs;
+ extern int nkawkcs;
+ extern int nKColCS;
+ extern int nKInSup;
+ extern int nKIsBlk;
+ extern int nKiuty;
+ extern int nKIVarB;
+ extern int nKJOut;
+ extern int nKksus;
+ extern int nKlnTab;
+ extern int nKofsce;
+ extern int nKoncur;
+ extern int nKonsce;
+ extern int nKOnSup;
+ extern int nKOnTot;
+ extern int nKPRSup;
+ extern int nKRSBlk;
+ extern int nKSPVar;
+ extern int nKsus;
+ extern int nKud1;
+ extern int nKxar;
+ extern int nKxtcs;
+ //
+ extern double nAtcs;
+ extern double nAwks;
+ extern double nParsup;
+ extern double nRsblk;
+ extern double nSptacs;
+ extern double nUd1;
+ extern double nXar;
+ extern double nXtcs;
+
+}
+
+#endif // _TACSAR_HPP
+
+// end of file tacsar.hpp
diff --git a/includes/tacsar.hpp~ b/includes/tacsar.hpp~
new file mode 100644
index 0000000..fc17cf8
--- /dev/null
+++ b/includes/tacsar.hpp~
@@ -0,0 +1,60 @@
+//-*- mode: c++; indent-tabs-mode-nil; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file tacsar.hpp
+
+#ifndef _TACSAR_HPP
+#define _TACSAR_HPP
+
+#include <iostream>
+#include <iomanip>
+#include <cstddef>
+#include <vector>
+
+namespace tacsar {
+
+ extern int nIColCS;
+ extern int nIlnTab;
+ extern int nInSup;
+ extern int nIsBlk;
+ extern int nIuty;
+ extern int nIVarB;
+ extern int nJOut;
+ extern int nKaliu;
+ extern int nKalksu;
+ extern int nKatcs;
+ extern int nkawkcs;
+ extern int nKColCS;
+ extern int nKInSup;
+ extern int nKIsBlk;
+ extern int nKiuty;
+ extern int nKIVarB;
+ extern int nKJOut;
+ extern int nKksus;
+ extern int nKlnTab;
+ extern int nKofsce;
+ extern int nKoncur;
+ extern int nKonsce;
+ extern int nKOnSup;
+ extern int nKOnTot;
+ extern int nKPRSup;
+ extern int nKRSBlk;
+ extern int nKSPVar;
+ extern int nKsus;
+ extern int nKud1;
+ extern int nKxar;
+ extern int nKxtcs;
+ //
+ extern double nAtcs;
+ extern double nAwks;
+ extern double nParsup;
+ extern double nRsblk;
+ extern double nSptacs;
+ extern double nUd1;
+ extern double nXar;
+ extern double nXtcs;
+
+}
+
+#endif // _TACSAR_HPP
+
+// end of file tacsar.hpp
diff --git a/includes/time.hpp b/includes/time.hpp
new file mode 100644
index 0000000..783d043
--- /dev/null
+++ b/includes/time.hpp
@@ -0,0 +1,33 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file time.hpp
+
+#ifndef _TIME_HPP
+#define _TIME_HPP
+
+#include <iostream>
+#include <iomanip>
+#include <ctime>
+#include <cmath>
+#include <sstream>
+
+#include "utilities.hpp"
+#include "dekspy.hpp"
+
+namespace date_time {
+
+ extern std::clock_t nCPUTime;
+
+ // Functions.
+
+ bool date44(std::string *);
+ bool time44(std::string *);
+ void settym(void);
+ void runtym(double &, double &);
+ void tdelay(int &);
+
+}
+
+#endif // _TIME_HPP
+
+// end of file time.hpp
diff --git a/includes/umdeck.hpp b/includes/umdeck.hpp
new file mode 100644
index 0000000..020faa4
--- /dev/null
+++ b/includes/umdeck.hpp
@@ -0,0 +1,42 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file umdeck.hpp
+
+#ifndef _UMDECK_HPP
+#define _UMDECK_HPP
+
+#include <iostream>
+#include <string>
+#include <fstream>
+#include <ostream>
+#include <sstream>
+#include <cstdlib>
+
+namespace umcom {
+
+ extern int nSRoot2;
+ extern int nSRoot3;
+ extern int nOmegRF;
+ extern int nInpu;
+ extern int nNumBus;
+ extern int nNCLTot;
+ extern int nInitUM;
+ //
+ extern int pPTheta[ 3 ][ 3 ];
+ extern int pZTheVR[ 3 ][ 3 ];
+ extern int pVInp[ 40 ];
+ extern int pZTheVs[ 40 ];
+ extern int pUmCur[ 40 ];
+ extern int pCon[ 10 ];
+ extern int pDumVec[ 40 ];
+ extern int pDumMat[ 3 ][ 3 ];
+ extern int pDate[ 2 ];
+ extern int pClock[ 2 ];
+ extern int pNDum[ 40 ];
+ //
+ extern std::string pBUSUM[ 50 ];
+}
+
+#endif // __UMDECK_HPP
+
+// end of file umdeck.hpp
diff --git a/includes/umdeck.hpp~ b/includes/umdeck.hpp~
new file mode 100644
index 0000000..42e9b68
--- /dev/null
+++ b/includes/umdeck.hpp~
@@ -0,0 +1,17 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file umdeck.hpp
+
+#ifndef _UMDECK_HPP
+#define _UMDECK_HPP
+
+#include <iostream>
+#include <string>
+#include <fstream>
+#include <ostream>
+#include <sstream>
+#include <cstdlib>
+
+#endif // __UMDECK_HPP
+
+// end of file umdeck.hpp
diff --git a/includes/utilities.hpp b/includes/utilities.hpp
new file mode 100644
index 0000000..958c9ea
--- /dev/null
+++ b/includes/utilities.hpp
@@ -0,0 +1,67 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file utilities.hpp
+
+#ifndef _UTILITIES_HPP
+#define _UTILITIES_HPP
+
+#include <iostream>
+#include <iomanip>
+#include <fstream>
+#include <sstream>
+#include <cstdio>
+#include <cstdarg>
+#include <string>
+#include <fstream>
+#include <vector>
+
+// UNIX includes.
+#include <unistd.h>
+#include <sys/ioctl.h>
+#include <sys/stat.h>
+
+#include "blkcom.hpp"
+#include "dekspy.hpp"
+#include "time.hpp"
+#include "strcom.hpp"
+#include "emtp.hpp"
+
+// Macros.
+#define FOREVER for(;;)
+
+namespace kwtcom {
+
+ extern long int nKWTVAX;
+
+}
+
+namespace utilities
+{
+ // Types
+
+ // Prototypes.
+ bool exists (const char *);
+ std::string format (const std::string &, ...);
+ void quiter(void);
+ void window(std::ostream &, std::stringstream &);
+ void honker(const long int &);
+ void flager(void);
+ void prompt(std::ostream &, const std::string &);
+ bool openFile(std::fstream *, \
+ std::string &, \
+ const std::ios::openmode &);
+ bool closeFile(std::fstream *);
+ bool copyFile(std::fstream *, \
+ std::fstream *, \
+ const std::string &);
+ bool deleteFile(const std::string &);
+ struct winsize getTerminalSize(void);
+ void expchk(long int &, \
+ long int &, \
+ long int &);
+
+}
+
+#endif // _UTILITIES_HPP
+
+// end of file utilities.hpp
diff --git a/includes/vardim.hpp b/includes/vardim.hpp
new file mode 100644
index 0000000..df97a0f
--- /dev/null
+++ b/includes/vardim.hpp
@@ -0,0 +1,41 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file vardim.hpp
+
+#ifndef _VARDIM_HPP
+#define _VARDIM_HPP
+
+#include <iostream>
+#include <fstream>
+#include <ostream>
+#include <sstream>
+#include <cstdlib>
+#include <exception>
+#include <stdexcept>
+#include <string>
+
+#include "blkcom.hpp"
+
+namespace vardim {
+
+ struct tagVariables {
+ std::string m_sCBlock;
+ int m_nNCB;
+ std::string m_sCBLSer;
+ int m_nJBLType;
+ };
+
+ typedef struct tagVariables tVariables;
+
+ // Default dimensions.
+ extern int pLstDef[ 28 ];
+ extern tVariables pVariables[];
+
+ // Functions.
+ bool vardim(void);
+
+}
+
+#endif // _VARDIM_HPP
+
+// end of file vardim.hpp
diff --git a/includes/vardim.hpp~ b/includes/vardim.hpp~
new file mode 100644
index 0000000..c97f11b
--- /dev/null
+++ b/includes/vardim.hpp~
@@ -0,0 +1,41 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file vardim.hpp
+
+#ifndef _VARDIM_HPP
+#define _VARDIM_HPP
+
+#include <iostream>
+#include <fstream>
+#include <ostream>
+#include <sstream>
+#include <cstdlib>
+#include <exception>
+#include <stdexcept>
+#include <string>
+
+#include "blkcom.hpp"
+
+namespace vardim {
+
+ struct tagVariables {
+ std::string m_sCBlock;
+ int m_nCB;
+ std::string m_sCBLSer;
+ int m_nJBLType;
+ };
+
+ typedef struct tagVariables tVariables;
+
+ // Default dimensions.
+ extern int pLstDef[ 28 ];
+ extern tVariables pVariables[];
+
+ // Functions.
+ bool vardim(void);
+
+}
+
+#endif // _VARDIM_HPP
+
+// end of file vardim.hpp
diff --git a/includes/volt45.hpp b/includes/volt45.hpp
new file mode 100644
index 0000000..8154e2e
--- /dev/null
+++ b/includes/volt45.hpp
@@ -0,0 +1,22 @@
+//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
+
+// file volt45.hpp
+
+#ifndef _VOLT45_HPP
+#define _VOLT45_HPP
+
+#include <iostream>
+#include <string>
+#include <cstdlib>
+
+namespace volpri {
+
+ extern double pVoltI[ 50 ];
+ extern double pVoltK[ 50 ];
+ extern double pVIM[ 50 ];
+
+}
+
+#endif // _VOLT45_HPP
+
+// end of file volt45.hpp