[gcalctool/gcalctool-newui2] ..



commit 15b3b829dacfa695230bcb1195193f30c8cc2067
Author: Robert Ancell <robert ancell gmail com>
Date:   Tue Sep 8 18:06:35 2009 +1000

    ..

 src/mp-equation-private.h |   55 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 55 insertions(+), 0 deletions(-)
---
diff --git a/src/mp-equation-private.h b/src/mp-equation-private.h
new file mode 100644
index 0000000..16bf6ec
--- /dev/null
+++ b/src/mp-equation-private.h
@@ -0,0 +1,55 @@
+
+/*  $Header$
+ *
+ *  Copyright (C) 2004-2008 Sami Pietila
+ *  Copyright (c) 2008-2009 Robert Ancell
+ *
+ *  This program 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.
+ *
+ *  This program 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., 59 Temple Place - Suite 330, Boston, MA
+ *  02111-1307, USA.
+ */
+
+#ifndef MP_EQUATION_PRIVATE_H
+#define MP_EQUATION_PRIVATE_H
+
+#include "mp-equation.h"
+
+typedef struct MPEquationParserState MPEquationParserState;
+
+/* State for parser */
+struct MPEquationParserState {
+    /* User provided options */
+    MPEquationOptions *options;
+    
+    /* Function to get variable values */
+    int (*get_variable)(MPEquationParserState *state, const char *name, MPNumber *z);
+         
+    /* Function to set variable values */
+    void (*set_variable)(MPEquationParserState *state, const char *name, const MPNumber *x);
+    
+    /* Function to solve functions */
+    int (*get_function)(MPEquationParserState *state, const char *name, const MPNumber *x, MPNumber *z);
+
+    // FIXME: get_operator??
+
+    /* Error returned from parser */
+    int error;
+
+    /* Value returned from parser */
+    MPNumber ret;
+};
+
+int _mp_equation_error(void *yylloc, MPEquationParserState *state, char *text);
+
+#endif



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]