From b18347ffc9db9641e215995edea1c04c363b2bdf Mon Sep 17 00:00:00 2001 From: Angelo Rossi Date: Wed, 21 Jun 2023 12:04:16 +0000 Subject: Initial commit. --- sources/freedom.cpp | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 sources/freedom.cpp (limited to 'sources/freedom.cpp') diff --git a/sources/freedom.cpp b/sources/freedom.cpp new file mode 100644 index 0000000..fb65cad --- /dev/null +++ b/sources/freedom.cpp @@ -0,0 +1,64 @@ +//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*- + +// file freedom.cpp + +#include "freedom.hpp" + +namespace freedom { + + template <> bool freeName(int &a) + { + bool bReturnValue = false; + // + return bReturnValue; + } + + template <> bool freeName(double &a) + { + bool bReturnValue = false; + // + ; + return bReturnValue; + } + + bool freeIn(const std::string &sANSI, int32_t &n12) + { + int32_t n8; + double d12; + bool bReturnValue = false; + // + if(n12) { + n8 = 1; + freeFix(sANSI, n8); + std::sscanf(sANSI.substr(0, 80).c_str (), "%lf", &d12); + n12 = (uint32_t) d12; + bReturnValue = true; + } + return bReturnValue; + } + + bool freeIn(const std::string &, int32_t &, int32_t &) + { + bool bReturnValue = false; + // + return bReturnValue; + } + + bool freeFix(const std::string &, int32_t &) + { + bool bReturnValue = false; + // + return bReturnValue; + } + + bool freeOne(double &d) + { + bool bReturnValue = false; + // + //bReturnValue = freeFLD(sANSI, d); + return bReturnValue; + } + +} + +// end of file freedom.cpp -- cgit v1.2.3