diff options
author | Not Zed <NotZed@Ximian.com> | 2001-01-24 08:32:35 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-01-24 08:32:35 +0800 |
commit | 1ec2a37465e2d1785ace8df19f1af5bbebdff1d0 (patch) | |
tree | 70d2fd711e57a148c99c0911564a348c2c9f2535 /e-util/e-sexp.h | |
parent | 8b35e075d2d3b7234216b0fcc86c98efef07cf64 (diff) | |
download | gsoc2013-evolution-1ec2a37465e2d1785ace8df19f1af5bbebdff1d0.tar.gz gsoc2013-evolution-1ec2a37465e2d1785ace8df19f1af5bbebdff1d0.tar.zst gsoc2013-evolution-1ec2a37465e2d1785ace8df19f1af5bbebdff1d0.zip |
Removed some redundant debug printfs. (e_sexp_term_eval): Dont allocate
2001-01-24 Not Zed <NotZed@Ximian.com>
* e-sexp.c: Removed some redundant debug printfs.
(e_sexp_term_eval): Dont allocate result till we have it. so we
can have a fatal error, and not leak it.
(term_eval_plus): If we have to abort, free our arguments.
(term_eval_sub): Same.
(parse_new_term): Renamed to parse_term_new for consistency.
Fixed callers.
svn path=/trunk/; revision=7766
Diffstat (limited to 'e-util/e-sexp.h')
-rw-r--r-- | e-util/e-sexp.h | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/e-util/e-sexp.h b/e-util/e-sexp.h index cfedaea98b..3584abcaf5 100644 --- a/e-util/e-sexp.h +++ b/e-util/e-sexp.h @@ -123,25 +123,30 @@ void e_sexp_add_function (ESExp *f, int scope, char *name, ESExpFunc *func, v void e_sexp_add_ifunction (ESExp *f, int scope, char *name, ESExpIFunc *func, void *data); void e_sexp_add_variable (ESExp *f, int scope, char *name, ESExpTerm *value); void e_sexp_remove_symbol (ESExp *f, int scope, char *name); -int e_sexp_set_scope (ESExp *f, int scope); +int e_sexp_set_scope (ESExp *f, int scope); -void e_sexp_input_text (ESExp *f, const char *text, int len); -void e_sexp_input_file (ESExp *f, int fd); +void e_sexp_input_text (ESExp *f, const char *text, int len); +void e_sexp_input_file (ESExp *f, int fd); int e_sexp_parse (ESExp *f); ESExpResult *e_sexp_eval (ESExp *f); -ESExpResult *e_sexp_term_eval (struct _ESExp *f, struct _ESExpTerm *t); +ESExpResult *e_sexp_term_eval (struct _ESExp *f, struct _ESExpTerm *t); ESExpResult *e_sexp_result_new (int type); -void e_sexp_result_free (struct _ESExpResult *t); +void e_sexp_result_free (struct _ESExpResult *t); + +/* used in normal functions if they have to abort, to free their arguments */ +void e_sexp_resultv_free (struct _ESExp *f, int argc, struct _ESExpResult **argv); /* utility functions for creating s-exp strings. */ -void e_sexp_encode_bool(GString *s, gboolean state); -void e_sexp_encode_string(GString *s, const char *string); +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); +void e_sexp_fatal_error (struct _ESExp *f, char *why, ...); + +/* return the error string */ +const char *e_sexp_error (struct _ESExp *f); #endif /* _E_SEXP_H */ |