/* $Id: evaluator.h 1092 2010-01-23 12:04:55Z volker $ * $URL: https://ssl.bulix.org/svn/lcd4linux/trunk/evaluator.h $ * * expression evaluation * * Copyright (C) 2003 Michael Reinelt * Copyright (C) 2004 The LCD4Linux Team * * This file is part of LCD4Linux. * * LCD4Linux is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * LCD4Linux is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #ifndef _EVALUATOR_H_ #define _EVALUATOR_H_ /* RESULT bitmask */ #define R_NUMBER 1 #define R_STRING 2 typedef struct { int type; int size; double number; char *string; } RESULT; /* strndup() may be not available on several platforms */ #ifndef HAVE_STRNDUP #include char *strndup(const char *source, size_t len); #endif int SetVariable(const char *name, RESULT * value); int SetVariableNumeric(const char *name, const double value); int SetVariableString(const char *name, const char *value); int AddFunction(const char *name, const int argc, void (*func) ()); void DeleteVariables(void); void DeleteFunctions(void); void DelResult(RESULT * result); RESULT *SetResult(RESULT ** result, const int type, const void *value); RESULT *CopyResult(RESULT ** result, RESULT * value); double R2N(RESULT * result); char *R2S(RESULT * result); int Compile(const char *expression, void **tree); int Eval(void *tree, RESULT * result); void DelTree(void *tree); #endif dden' name='id' value='faee0d2042cade1a1a875330c204ec5fac9cd9aa'/>
AgeCommit message (Expand)AuthorFilesLines
2012-02-11Fix typo in libconfig++dev.examplesJonathan McCrohan1-3/+3
2012-02-11Update changelog.Jonathan McCrohan1-2/+5
2012-02-11Remove forced install of examples in rules.Jonathan McCrohan1-2/+2
2012-02-11Fix Examples.Jonathan McCrohan6-34/+17
2012-02-11Remove makefile.Jonathan McCrohan1-7/+0
2012-02-11Move *.docs, *.install and *.examples to -dev.Jonathan McCrohan7-2/+2
2012-02-11Move to single -dev package.Jonathan McCrohan2-14/+12
2012-02-08Update package changelog.Jonathan McCrohan1-1/+1
2012-02-08Partial manual revert of move to libconfig*8.Jonathan McCrohan4-12/+12
2012-02-08Add my name to debian copyright.Jonathan McCrohan1-2/+3
2012-02-08Atomic commit. Rollback to libconfig8 packaging names.Jonathan McCrohan10-8/+8
2012-02-07Rename libconfig9 to libconfig8 to aid release teamJonathan McCrohan1-14/+14
2012-02-07Fix "closes typo"Jonathan McCrohan1-1/+1
2012-02-07Revert "Add symbols"Jonathan McCrohan3-739/+1
2012-02-07Revert "Fix b0rked symbol file."Jonathan McCrohan1-1/+1
2012-02-07Revert "Second attempt"Jonathan McCrohan2-0/+194
2012-01-29Second attemptJonathan McCrohan2-194/+0
2012-01-29Fix b0rked symbol file.Jonathan McCrohan1-1/+1
2012-01-29Add symbolsJonathan McCrohan3-1/+739
2012-01-26add examples properlyJonathan McCrohan1-0/+2
2012-01-26Update changelogJonathan McCrohan1-3/+6
2012-01-26fix typoJonathan McCrohan1-1/+1
2012-01-26fix accidental description changesJonathan McCrohan1-2/+2
2012-01-26more fucking around to please lintianJonathan McCrohan1-5/+2
2012-01-25Linitan fixesJonathan McCrohan2-3/+2
2012-01-25Split out debug packagesJonathan McCrohan2-1/+6
2011-12-31Fix debian/rulesJonathan McCrohan1-1/+1
2011-12-31Remove shlibsJonathan McCrohan1-2/+0
2011-12-31Remove NMU from changelogJonathan McCrohan1-1/+0
2011-12-31Lintian FixesJonathan McCrohan1-2/+4
2011-12-31Remove Makefile patchJonathan McCrohan1-1/+0
2011-12-31Update MakefilesJonathan McCrohan10-248/+8222
2011-12-31Updated makefilesJonathan McCrohan1-0/+1