aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-sexp.h
diff options
context:
space:
mode:
Diffstat (limited to 'e-util/e-sexp.h')
-rw-r--r--e-util/e-sexp.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/e-util/e-sexp.h b/e-util/e-sexp.h
index 5cf2740fc1..cfedaea98b 100644
--- a/e-util/e-sexp.h
+++ b/e-util/e-sexp.h
@@ -5,6 +5,7 @@
#define _E_SEXP_H
#include <glib.h>
+#include <setjmp.h>
#ifdef E_SEXP_IS_GTK_OBJECT
#include <gtk/gtk.h>
@@ -98,6 +99,10 @@ struct _ESExp {
#endif
GScanner *scanner; /* for parsing text version */
ESExpTerm *tree; /* root of expression tree */
+
+ /* private stuff */
+ jmp_buf failenv;
+ char *error;
};
struct _ESExpClass {
@@ -124,7 +129,7 @@ void e_sexp_input_text (ESExp *f, const char *text, int len);
void e_sexp_input_file (ESExp *f, int fd);
-void e_sexp_parse (ESExp *f);
+int e_sexp_parse (ESExp *f);
ESExpResult *e_sexp_eval (ESExp *f);
ESExpResult *e_sexp_term_eval (struct _ESExp *f, struct _ESExpTerm *t);
@@ -135,4 +140,8 @@ void e_sexp_result_free (struct _ESExpResult *t);
void e_sexp_encode_bool(GString *s, gboolean state);
void e_sexp_encode_string(GString *s, const char *string);
+/* only to be called from inside a callback to signal a fatal execution error */
+void e_sexp_fatal_error(struct _ESExp *f, char *why, ...);
+const char *e_sexp_error(struct _ESExp *f);
+
#endif /* _E_SEXP_H */