/usr/include/yacas/lispevalhash.h is in yacas 1.3.6-2.
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 | /** \file lispevalhash.h
* Storage of executable commands
*
*/
#ifndef YACAS_LISPEVALHASH_H
#define YACAS_LISPEVALHASH_H
#include "yacasbase.h"
#include "lispobject.h"
#include "evalfunc.h"
#include <unordered_map>
// new-style evaluator, passing arguments onto the stack in LispEnvironment
typedef void (*YacasEvalCaller)(LispEnvironment& aEnvironment,LispInt aStackTop);
class YacasEvaluator: public EvalFuncBase
{
public:
// FunctionFlags can be orred when passed to the constructor of this function
enum FunctionFlags
{
Function=0, // Function: evaluate arguments
Macro=1, // Function: don't evaluate arguments
Fixed = 0, // fixed number of arguments
Variable = 2 // variable number of arguments
};
YacasEvaluator(YacasEvalCaller aCaller,LispInt aNrArgs, LispInt aFlags)
: iCaller(aCaller), iNrArgs(aNrArgs), iFlags(aFlags)
{
}
void Evaluate(LispPtr& aResult,
LispEnvironment& aEnvironment,
LispPtr& aArguments);
private:
YacasEvalCaller iCaller;
LispInt iNrArgs;
LispInt iFlags;
};
typedef std::unordered_map<LispStringSmartPtr, YacasEvaluator, std::hash<const LispString*> > YacasCoreCommands;
#endif
|