/usr/include/yacas/lispglobals.h is in yacas 1.3.6-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | /** \file lispglobals.h
* Storage of globals in a associated hash
*
*/
#ifndef YACAS_LISPGLOBALS_H
#define YACAS_LISPGLOBALS_H
#include "yacasbase.h"
#include "lispobject.h"
#include "lisphash.h"
/// Value of a Lisp global variable.
/// The only special feature of this class is the attribute
/// #iEvalBeforeReturn, which defaults to #false. If this
/// attribute is set to #true, the value in #iValue needs to be
/// evaluated to get the value of the Lisp variable.
/// \sa LispEnvironment::GetVariable()
class LispGlobalVariable : public YacasBase
{
public:
LispGlobalVariable(const LispGlobalVariable& aOther);
LispGlobalVariable(LispPtr& aValue): iValue(aValue), iEvalBeforeReturn(false) {}
LispGlobalVariable& operator=(const LispGlobalVariable& aOther);
void SetEvalBeforeReturn(bool aEval);
LispPtr iValue;
bool iEvalBeforeReturn;
};
typedef std::unordered_map<LispStringSmartPtr, LispGlobalVariable, std::hash<const LispString*> > LispGlobal;
inline
LispGlobalVariable::LispGlobalVariable(const LispGlobalVariable& aOther):
iValue(aOther.iValue),
iEvalBeforeReturn(false)
{
}
inline
void LispGlobalVariable::SetEvalBeforeReturn(bool aEval)
{
iEvalBeforeReturn = aEval;
}
inline
LispGlobalVariable& LispGlobalVariable::operator=(const LispGlobalVariable& aOther)
{
iValue = aOther.iValue;
return *this;
}
#endif
|