wmshutdown: Destroy dialog window before shutting down. This is especially useful...
[dockapps.git] / wmsupermon / expr.h
blob4d1104521aeabfbb3270561489a1813bd5b9fedc
1 /* Copyright (C) 2006 Sergei Golubchik
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License version 2
5 as published by the Free Software Foundation
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
12 You should have received a copy of the GNU General Public License
13 along with this program; if not, write to the Free Software
14 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
16 #include <regex.h>
18 #define MAX_VAR 10
20 typedef struct {
21 char *str;
22 regmatch_t *pmatch;
23 double *diff_old, *diff_new, *sum_acc;
24 } Econtext;
26 typedef struct st_expr Expr;
27 struct st_expr {
28 double (*eval)(Expr *, Econtext *);
29 union { int var; double num; Expr *arg[3]; } val;
32 extern char *yy_err, *yy_str;
33 extern Expr *yy_expr;
34 extern int yy_nsum, yy_ndiff;
36 int yyparse(void);