aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-sexp.c
Commit message (Collapse)AuthorAgeFilesLines
* removed, code moved into camel-net-utils.[ch].Not Zed2004-12-031-1381/+0
| | | | | | | | | | | | | | | | 2004-11-16 Not Zed <NotZed@Ximian.com> * e-host-utils.[ch]: removed, code moved into camel-net-utils.[ch]. 2004-11-15 Not Zed <NotZed@Ximian.com> * e-trie.[ch], e-memory.[ch], e-sexp.[ch], e-msgport.[ch]: Moved to eds/libedataserver. * e-path.[ch]: removed & deleted. svn path=/trunk/; revision=28050
* Added some debug stuff.Not Zed2004-03-041-2/+4
| | | | | | | | 2004-03-04 Not Zed <NotZed@Ximian.com> * e-sexp.c: Added some debug stuff. svn path=/trunk/; revision=24956
* Use glib macros for pointer/int conversion.Jeremy Katz2003-05-171-2/+4
| | | | | | | | | 2003-05-16 Jeremy Katz <katzj@redhat.com> * e-sexp.c (term_eval_and): Use glib macros for pointer/int conversion. svn path=/trunk/; revision=21221
* Finished an #if 0'd out port to GObject from an #if 0'd out GtkObjectJeffrey Stedfast2003-04-171-9/+7
| | | | | | | | | 2003-04-14 Jeffrey Stedfast <fejj@ximian.com> * e-sexp.c: Finished an #if 0'd out port to GObject from an #if 0'd out GtkObject subclassing. svn path=/trunk/; revision=20864
* Make sure any old symbol with the same name as the one being added, isHans Petter Jansson2003-04-161-0/+4
| | | | | | | | | | 2003-04-15 Hans Petter Jansson <hpj@ximian.com> * e-sexp.c (e_sexp_add_function) (e_sexp_add_ifunction): Make sure any old symbol with the same name as the one being added, is removed first. svn path=/trunk/; revision=20852
* argh, make that IS_E_SEXPJeffrey Stedfast2003-03-201-9/+9
| | | | svn path=/trunk/; revision=20362
* s/FILTER_IS_SEXP/E_IS_SEXPJeffrey Stedfast2003-03-201-15/+15
| | | | svn path=/trunk/; revision=20361
* Fix ESExpClass to never be an empty struct. Also make ESExp optionally aJeffrey Stedfast2003-03-201-23/+31
| | | | | | | | | | | | | | | 2003-03-19 Jeffrey Stedfast <fejj@ximian.com> * e-sexp.h: Fix ESExpClass to never be an empty struct. Also make ESExp optionally a subclass of GObject rather than GtkObject (not that we'll probably ever make it so, but for completeness sake?). 2003-03-18 Jeffrey Stedfast <fejj@ximian.com> * e-trie.c (trie_utf8_getc): Don't use __inline__ as it is not always defined. svn path=/trunk/; revision=20360
* Cast to a string type. (term_eval_castint): Cast to an int type.Not Zed2002-07-161-0/+64
| | | | | | | | | | | | 2002-07-15 Not Zed <NotZed@Ximian.com> * e-sexp.c (term_eval_caststring): Cast to a string type. (term_eval_castint): Cast to an int type. (symbols[]): Add to symbol table. * e-memory.c: Some more profiling for epoolv's. svn path=/trunk/; revision=17474
* Handle parsing negative integers.Jeffrey Stedfast2002-04-121-7/+19
| | | | | | | | 2002-04-11 Jeffrey Stedfast <fejj@ximian.com> * e-sexp.c (parse_value): Handle parsing negative integers. svn path=/trunk/; revision=16441
* Fixing the license text.Ettore Perazzoli2001-10-281-1/+0
| | | | svn path=/trunk/; revision=14212
* Update the licensing information to require version 2 of the GPLEttore Perazzoli2001-10-271-2/+2
| | | | | | (instead of version 2 or any later version). svn path=/trunk/; revision=14190
* When ANDing two bools, don't use a bitwise AND.Jeffrey Stedfast2001-06-261-3/+3
| | | | | | | | | 2001-06-25 Jeffrey Stedfast <fejj@ximian.com> * e-sexp.c (term_eval_and): When ANDing two bools, don't use a bitwise AND. svn path=/trunk/; revision=10499
* Update the copyrights, replacing Helix Code with Ximian andEttore Perazzoli2001-06-231-2/+2
| | | | | | helixcode.com with ximian.com all over the place. svn path=/trunk/; revision=10440
* REmove a silly hardcoded term limit, oops forgot about that.Not Zed2001-06-151-10/+19
| | | | | | | | | 2001-06-15 Not Zed <NotZed@Ximian.com> * e-sexp.c (parse_values): REmove a silly hardcoded term limit, oops forgot about that. svn path=/trunk/; revision=10248
* Added #include <glib.h> and move corresponding local headers to the top toKjartan Maraas2001-04-241-2/+3
| | | | | | | | | | 2001-04-24 Kjartan Maraas <kmaraas@gnome.org> * e-gui-utils.c, e-memory, e-msgport.c, e-pilot-map, e-sexp.c: Added #include <glib.h> and move corresponding local headers to the top to catch missing includes in them. Tip from clahey. svn path=/trunk/; revision=9537
* Start parsing the sexp with parse_value(), not parse_list(), because weFederico Mena Quintero2001-04-161-1/+1
| | | | | | | | | | 2001-04-15 Federico Mena Quintero <federico@ximian.com> * e-sexp.c (e_sexp_parse): Start parsing the sexp with parse_value(), not parse_list(), because we may have immediate values (e.g. "#f") as the whole sexp. svn path=/trunk/; revision=9332
* Added a question mark to the set of valid characters for symbol names.Federico Mena Quintero2001-04-061-14/+31
| | | | | | | | | | | 2001-04-06 Federico Mena Quintero <federico@ximian.com> * e-sexp.c (scanner_config): Added a question mark to the set of valid characters for symbol names. (parse_value): Fixed parsing of boolean values. (parse_term_free): Added missing clause for ESEXP_TERM_BOOL. svn path=/trunk/; revision=9198
* Added ESEXP_RES_TIME for time values. (ESExpResult): Added a "time_tFederico Mena Quintero2001-04-041-2/+67
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Remove #include <glib.h> Shuffle some headers. Remove #includeKjartan Maraas2001-03-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-03-29 Kjartan Maraas <kmaraas@gnome.org> * e-corba-utils.h: Remove #include <glib.h> * e-dialog-widgets.c: Shuffle some headers. * e-dialog-widgets.h: Remove #include <libgnomeui/gnome-propertybox.h> * e-gtk-utils.c: #include <gtk/gtksignal.h> * e-gtk-utils.h: Replace #include <gtk/gtk.h> * e-gui-utils.c: Replace #include <gnome.h> * e-html-utils.c: Shuffle headers. * e-iterator.c: Replace #include <gtk/gtk.h> * e-iterator.h: Replace #include <gtk/gtk.h> * e-list-iterator.c: Remove #include <gtk/gtk.h> * e-list-iterator.h: Replace #include <gtk/gtk.h> * e-list.c: Remove #include <gtk/gtk.h> * e-list.h: Replace #include <gtk/gtk.h> * e-memory.c: #include <string.h> and <stdlib.h> * e-msgport.c: Move around some includes. s/%d/%ld/g in a printf() call to fix a warning. * e-pilot-map.c: #include <string.h>. Replace #include <gnome.h> * e-pilot-util.c: Remove #include <gnome.h> * e-sexp.c: Remove #include <glib.h> * e-sexp.h: Replace #include <gtk/gtk.h> * e-time-utils.c: #include <string.h> * md5-utils.c: Shuffle headers. * test-ename-western-gtk.c: Replace #include <gnome.h> * test-ename-western.c: Same here. svn path=/trunk/; revision=9016
* Make it handle a NULL string as an empty string.Not Zed2001-03-021-1/+4
| | | | | | | | | 2001-03-01 Not Zed <NotZed@Ximian.com> * e-sexp.c (e_sexp_encode_string): Make it handle a NULL string as an empty string. svn path=/trunk/; revision=8448
* Add chunk allocators.Not Zed2001-01-251-56/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | 2001-01-24 Not Zed <NotZed@Ximian.com> * e-sexp.h (ESExp): Add chunk allocators. * 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. (e_sexp_result_new): Add the esexp as an argument. Ouch, lots of code to change for this. Allocate blocks from an ememchunk. Fixed all callers. (e_sexp_result_free): Same as above, free blocks from the ememchunk. Fixed all callers. (parse_term_new): (parse_term_free): Similarly, add the esexp to the argument, and alloc/free from memchunks. Fixed all local callers. (e_sexp_init): Setup the memory chunk allocators. (e_sexp_finalise): Destroy memchunk allocators. svn path=/trunk/; revision=7795
* Removed some redundant debug printfs. (e_sexp_term_eval): Dont allocateNot Zed2001-01-241-48/+40
| | | | | | | | | | | | | | 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
* Setup error return and return error on parse error. (parse_list): Fail ifNot Zed2001-01-231-13/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-01-23 Not Zed <NotZed@Ximian.com> * e-sexp.c (e_sexp_parse): Setup error return and return error on parse error. (parse_list): Fail if we have a problem. (parse_value): Here too. (fatal_error): Fatal error handling function, jumps back to the top caller. (term_eval_and): (e_sexp_term_eval): (term_eval_sub): (term_eval_plus): (term_eval_gt): (term_eval_lt): (term_eval_or): Fail on error. (e_sexp_term_eval): Added a comment about where this can be called, which is only from inside e_sexp_eval(). (e_sexp_eval): Setup setjmp error handler. (e_sexp_error): Error accessor function. * e-sexp.h: Added a longjmp environment to the structure, and an error return to parse. svn path=/trunk/; revision=7738
* Merge from camel-mt-branch.Not Zed2000-12-241-64/+35
| | | | | | | | 2000-12-24 Not Zed <NotZed@HelixCode.com> * Merge from camel-mt-branch. svn path=/trunk/; revision=7152
* Plug a memleak, need to free results from term_eval(). (term_eval_gt):Not Zed2000-11-291-0/+6
| | | | | | | | | | | | | | | | | 2000-11-29 Not Zed <NotZed@HelixCode.com> * e-sexp.c (term_eval_lt): Plug a memleak, need to free results from term_eval(). (term_eval_gt): (term_eval_eq): 2000-11-27 Not Zed <NotZed@HelixCode.com> * e-memory.c (e_mempool_new): Added some locking to global data. This should make the interfaces mt-safe, although each object is only per-thread safe. svn path=/trunk/; revision=6710
* #include <string.h> to quench warning. #include <stdlib.h> for sameKjartan Maraas2000-10-311-0/+1
| | | | | | | | | 200-10-30 Kjartan Maraas <kmaraas@gnome.org> * e-dialog-widgets.c: #include <string.h> to quench warning. * e-sexp.c: #include <stdlib.h> for same reason. svn path=/trunk/; revision=6288
* Infrastructure for date-based queriesPeter Williams2000-08-151-1/+1
| | | | svn path=/trunk/; revision=4838
* Warning cleanup: `#if 0' an unused function and add a missing publicEttore Perazzoli2000-07-111-1/+2
| | | | | | function prototype. svn path=/trunk/; revision=4060
* Kill debugging messageDan Winship2000-07-061-3/+0
| | | | | | * e-sexp.c (e_sexp_parse): Kill debugging message svn path=/trunk/; revision=3905
* g_return_val_if_fail to prevent a crash.Christopher James Lahey2000-06-021-0/+2
| | | | | | | | 2000-06-01 Christopher James Lahey <clahey@helixcode.com> * e-sexp.c (e_sexp_term_eval): g_return_val_if_fail to prevent a crash. svn path=/trunk/; revision=3337
* Utility function to build a bool as part of an expression string.Not Zed2000-05-311-0/+42
| | | | | | | | | | 2000-05-30 Not Zed <NotZed@HelixCode.com> * e-sexp.c (e_sexp_encode_bool): Utility function to build a bool as part of an expression string. (e_sexp_encode_string): Likewise for strings. svn path=/trunk/; revision=3300
* Destroy the g_scanner when cleaning up. (e_sexp_finalise): Free symbolNotZed2000-05-121-0/+12
| | | | | | | | | 2000-05-11 NotZed <NotZed@HelixCode.com> * e-sexp.c (e_sexp_finalise): Destroy the g_scanner when cleaning up. (e_sexp_finalise): Free symbol table on finalise. svn path=/trunk/; revision=2988
* Free the parse tree if we have one. (e_sexp_parse): If we already have aNotZed2000-05-031-0/+21
| | | | | | | | | 2000-05-02 NotZed <NotZed@HelixCode.com> * e-sexp.c (e_sexp_finalise): Free the parse tree if we have one. (e_sexp_parse): If we already have a parse tree, free it. svn path=/trunk/; revision=2757
* Formatting cleanup.NotZed2000-03-241-1/+1
| | | | | | | | 2000-03-22 NotZed <NotZed@HelixCode.com> * e-util/e-sexp.h: Formatting cleanup. svn path=/trunk/; revision=2154
* Added. moved from filter-sexp.[ch]NotZed2000-02-291-0/+1088
2000-02-28 NotZed <NotZed@HelixCode.com> * e-util/e-sexp.[ch]: Added. moved from filter-sexp.[ch] * e-util/Makefile.am (libeutil_a_SOURCES): Add e-sexp. (noinst_LTLIBRARIES): Changed to a libtool library. * Makefile.am (SUBDIRS): Build e-util before other stuff. (SUBDIRS): Build filter after camel. svn path=/trunk/; revision=1980