diff options
author | Federico Mena Quintero <federico@ximian.com> | 2001-04-04 00:04:53 +0800 |
---|---|---|
committer | Federico Mena Quintero <federico@src.gnome.org> | 2001-04-04 00:04:53 +0800 |
commit | 004034cf32130d9cc42233de1ebdfdeb1671cb5a (patch) | |
tree | 33fd446a46d798a67b9b8c43c5ee37cd34bb696a /e-util/e-sexp.h | |
parent | 0cebe028cbf4d2292740c2b4cfb71efe57b3087e (diff) | |
download | gsoc2013-evolution-004034cf32130d9cc42233de1ebdfdeb1671cb5a.tar gsoc2013-evolution-004034cf32130d9cc42233de1ebdfdeb1671cb5a.tar.gz gsoc2013-evolution-004034cf32130d9cc42233de1ebdfdeb1671cb5a.tar.bz2 gsoc2013-evolution-004034cf32130d9cc42233de1ebdfdeb1671cb5a.tar.lz gsoc2013-evolution-004034cf32130d9cc42233de1ebdfdeb1671cb5a.tar.xz gsoc2013-evolution-004034cf32130d9cc42233de1ebdfdeb1671cb5a.tar.zst gsoc2013-evolution-004034cf32130d9cc42233de1ebdfdeb1671cb5a.zip |
Added ESEXP_RES_TIME for time values. (ESExpResult): Added a "time_t
2001-04-03 Federico Mena Quintero <federico@ximian.com>
* e-sexp.h (ESExpResultType): Added ESEXP_RES_TIME for time
values.
(ESExpResult): Added a "time_t value.time" field.
(ESExpTermType): Added ESEXP_TERM_TIME.
(ESExpTerm): Added a "time_t value.time" field.
* e-sexp.c (e_sexp_result_free): Deal with time values. Also, be
more paranoid; added a default clause with g_assert_not_reached().
(term_eval_lt): Deal with time values.
(term_eval_gt): Likewise.
(term_eval_eq): Likewise.
(term_eval_plus): Likewise.
(term_eval_sub): Likewise.
(e_sexp_term_eval): Likewise.
(eval_dump_result): Likewise.
(parse_dump_term): Likewise.
(parse_term_free): Likewise.
svn path=/trunk/; revision=9130
Diffstat (limited to 'e-util/e-sexp.h')
-rw-r--r-- | e-util/e-sexp.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/e-util/e-sexp.h b/e-util/e-sexp.h index 668788f788..d4b8795c3e 100644 --- a/e-util/e-sexp.h +++ b/e-util/e-sexp.h @@ -5,6 +5,7 @@ #define _E_SEXP_H #include <setjmp.h> +#include <time.h> #include <glib.h> #ifdef E_SEXP_IS_GTK_OBJECT @@ -42,6 +43,7 @@ enum _ESExpResultType { ESEXP_RES_INT, /* type is a number */ ESEXP_RES_STRING, /* type is a pointer to a single string */ ESEXP_RES_BOOL, /* boolean type */ + ESEXP_RES_TIME, /* time_t type */ ESEXP_RES_UNDEFINED /* unknown type */ }; @@ -52,6 +54,7 @@ struct _ESExpResult { int number; char *string; int bool; + time_t time; } value; }; @@ -59,6 +62,7 @@ enum _ESExpTermType { ESEXP_TERM_INT = 0, /* integer literal */ ESEXP_TERM_BOOL, /* boolean literal */ ESEXP_TERM_STRING, /* string literal */ + ESEXP_TERM_TIME, /* time_t literal (number of seconds past the epoch) */ ESEXP_TERM_FUNC, /* normal function, arguments are evaluated before calling */ ESEXP_TERM_IFUNC, /* immediate function, raw terms are arguments */ ESEXP_TERM_VAR, /* variable reference */ @@ -80,6 +84,7 @@ struct _ESExpTerm { char *string; int number; int bool; + time_t time; struct { struct _ESExpSymbol *sym; struct _ESExpTerm **terms; |