diff options
author | Dan Winship <danw@src.gnome.org> | 2000-07-06 09:52:51 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-07-06 09:52:51 +0800 |
commit | 9f381f8245d3de8f05dc3ddc560a635a7ef3f717 (patch) | |
tree | 29949e6322e1ff4b3344cd95c105645907ab7d0f | |
parent | 2bacfabf6f111883a369011bf88faf8847be15f4 (diff) | |
download | gsoc2013-evolution-9f381f8245d3de8f05dc3ddc560a635a7ef3f717.tar.gz gsoc2013-evolution-9f381f8245d3de8f05dc3ddc560a635a7ef3f717.tar.zst gsoc2013-evolution-9f381f8245d3de8f05dc3ddc560a635a7ef3f717.zip |
remove some non-error case debugging messages.
* remove some non-error case debugging messages.
svn path=/trunk/; revision=3904
-rw-r--r-- | camel/ChangeLog | 8 | ||||
-rw-r--r-- | camel/camel-folder-summary.c | 14 | ||||
-rw-r--r-- | camel/camel-session.c | 3 | ||||
-rw-r--r-- | camel/providers/mbox/camel-mbox-folder.c | 4 | ||||
-rw-r--r-- | camel/providers/mbox/camel-mbox-summary.c | 16 | ||||
-rw-r--r-- | filter/ChangeLog | 2 | ||||
-rw-r--r-- | filter/filter-arg-types.c | 4 | ||||
-rw-r--r-- | filter/filter-arg.c | 11 | ||||
-rw-r--r-- | filter/filter-driver.c | 42 | ||||
-rw-r--r-- | filter/filter-druid.c | 22 | ||||
-rw-r--r-- | filter/filter-editor.c | 16 |
11 files changed, 20 insertions, 122 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 7ffdc5e58e..37e7454f1c 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,11 @@ +2000-07-05 Dan Winship <danw@helixcode.com> + + * camel-folder-summary.c: + * camel-session.c: + * providers/mbox/camel-mbox-folder.c: + * providers/mbox/camel-mbox-summary.c: Remove some non-error case + debugging-type messages. + 2000-07-05 Ettore Perazzoli <ettore@helixcode.com> * providers/mbox/camel-mbox-summary.c (d): Define to empty so that diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c index 027984e7ef..18605fb551 100644 --- a/camel/camel-folder-summary.c +++ b/camel/camel-folder-summary.c @@ -306,22 +306,16 @@ camel_folder_summary_load(CamelFolderSummary *s) g_assert(s->summary_path); - printf("loading summary\n"); - in = fopen(s->summary_path, "r"); if ( in == NULL ) { return -1; } - printf("loading header\n"); - if ( ((CamelFolderSummaryClass *)((GtkObject *)s)->klass)->summary_header_load(s, in) == -1) { fclose(in); return -1; } - printf("loading content\n"); - /* now read in each message ... */ /* FIXME: check returns */ for (i=0;i<s->saved_count;i++) { @@ -369,14 +363,8 @@ camel_folder_summary_save(CamelFolderSummary *s) g_assert(s->summary_path); - printf("saving summary? '%s'\n", s->summary_path); - - if ((s->flags & CAMEL_SUMMARY_DIRTY) == 0) { - printf("nup\n"); + if ((s->flags & CAMEL_SUMMARY_DIRTY) == 0) return 0; - } - - printf("yep\n"); fd = open(s->summary_path, O_RDWR|O_CREAT, 0600); if (fd == -1) diff --git a/camel/camel-session.c b/camel/camel-session.c index 3ee5766143..ec99e17964 100644 --- a/camel/camel-session.c +++ b/camel/camel-session.c @@ -244,15 +244,12 @@ camel_session_get_service (CamelSession *session, const char *url_string, } /* Now look up the service in the provider's cache */ - printf ("looking up service in cache: \"%s\"\n", camel_url_to_string (url, FALSE)); service = g_hash_table_lookup (provider->service_cache, url); if (service != NULL) { - printf ("found!!\n"); camel_url_free (url); gtk_object_ref (GTK_OBJECT (service)); return service; } - printf ("not found, creating service\n"); service = camel_service_new (provider->object_types[type], session, url, ex); if (service) { diff --git a/camel/providers/mbox/camel-mbox-folder.c b/camel/providers/mbox/camel-mbox-folder.c index 63d0d2cfb9..d7ee9c2376 100644 --- a/camel/providers/mbox/camel-mbox-folder.c +++ b/camel/providers/mbox/camel-mbox-folder.c @@ -211,9 +211,7 @@ mbox_init (CamelFolder *folder, CamelStore *parent_store, /* if we have no index file, force it */ forceindex = stat(mbox_folder->index_file_path, &st) == -1; - printf("loading ibex\n"); mbox_folder->index = ibex_open(mbox_folder->index_file_path, O_CREAT|O_RDWR, 0600); - printf("loaded ibex\n"); if (mbox_folder->index == NULL) { /* yes, this isn't fatal at all */ g_warning("Could not open/create index file: %s: indexing not performed", @@ -221,7 +219,6 @@ mbox_init (CamelFolder *folder, CamelStore *parent_store, } /* no summary (disk or memory), and we're proverbially screwed */ - printf("loading summary\n"); mbox_folder->summary = camel_mbox_summary_new (mbox_folder->summary_file_path, mbox_folder->folder_file_path, mbox_folder->index); if (mbox_folder->summary == NULL @@ -231,7 +228,6 @@ mbox_init (CamelFolder *folder, CamelStore *parent_store, "Could not create summary"); return; } - printf("summary loaded\n"); } static void diff --git a/camel/providers/mbox/camel-mbox-summary.c b/camel/providers/mbox/camel-mbox-summary.c index 7860d15296..5af28a63e1 100644 --- a/camel/providers/mbox/camel-mbox-summary.c +++ b/camel/providers/mbox/camel-mbox-summary.c @@ -31,12 +31,7 @@ #include <stdlib.h> #define io(x) - -#if 0 -# define d(x) (x) -#else -# define d(x) -#endif +#define d(x) #define CAMEL_MBOX_SUMMARY_VERSION (0x1000) @@ -293,8 +288,6 @@ summary_rebuild (CamelMboxSummary *mbs, off_t offset) int fd; int ok = 0; - printf ("(re)Building summary from %d (%s)\n", (int)offset, mbs->folder_path); - fd = open (mbs->folder_path, O_RDONLY); if (fd == -1) { printf ("%s failed to open: %s", mbs->folder_path, strerror (errno)); @@ -320,7 +313,6 @@ summary_rebuild (CamelMboxSummary *mbs, off_t offset) } else { gtk_object_unref (GTK_OBJECT (mp)); /* end of file - no content? */ - printf("We ran out of file?\n"); return -1; } } @@ -366,10 +358,8 @@ camel_mbox_summary_update (CamelMboxSummary *mbs, off_t offset) if (ret != -1) { if (camel_folder_summary_save((CamelFolderSummary *)mbs) == -1) g_warning("Could not save summary: %s", strerror(errno)); - printf("summary saved\n"); if (mbs->index) ibex_save(mbs->index); - printf("ibex saved\n"); } #endif return ret; @@ -415,7 +405,6 @@ camel_mbox_summary_load (CamelMboxSummary *mbs, int forceindex) #endif /* is the summary uptodate? */ if (st.st_size == mbs->folder_size && st.st_mtime == s->time) { - printf ("Summary time and date match mbox\n"); if (minstart < st.st_size) { /* FIXME: Only clear the messages and reindex from this point forward */ printf ("REBUILDING SUMMARY: Index file is incomplete.\n"); @@ -446,13 +435,10 @@ camel_mbox_summary_load (CamelMboxSummary *mbs, int forceindex) if (ret != -1) { mbs->folder_size = st.st_size; s->time = st.st_mtime; - printf ("saving summary\n"); if (camel_folder_summary_save (s) == -1) g_warning("Could not save summary: %s", strerror (errno)); - printf ("summary saved\n"); if (mbs->index) ibex_save (mbs->index); - printf ("ibex saved\n"); } return ret; diff --git a/filter/ChangeLog b/filter/ChangeLog index 0b22d8753d..943b1736bd 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,5 +1,7 @@ 2000-07-05 Dan Winship <danw@helixcode.com> + * remove some non-error case debugging messages. + * filtertypes.xml: Fix typos and update the "to-address" rule to match To or Cc. * vfoldertypes.xml: Fix typos. diff --git a/filter/filter-arg-types.c b/filter/filter-arg-types.c index 914ab8343a..578eeee64e 100644 --- a/filter/filter-arg-types.c +++ b/filter/filter-arg-types.c @@ -409,8 +409,6 @@ arg_address_get_value_as_string(FilterArg *argin, void *data) { struct filter_arg_address *a = (struct filter_arg_address *)data; - printf("geting address as string : %s %s\n", a->email, a->name); - if (a->email == NULL || a->email[0] == '\0') { if (a->name == NULL @@ -698,8 +696,6 @@ arg_folder_values_add_xml(FilterArg *arg, xmlNodePtr node) { xmlNodePtr n; - printf("adding folder values ...\n"); - n = node->childs; while (n) { if (!strcmp(n->name, "folder")) { diff --git a/filter/filter-arg.c b/filter/filter-arg.c index 8514f26b43..8d659d7af9 100644 --- a/filter/filter-arg.c +++ b/filter/filter-arg.c @@ -324,10 +324,6 @@ filter_arg_edit_add(GtkWidget *w, struct filter_arg_edit *edata) GtkWidget *listitem; int i; - printf("adding new item\n"); - - printf("editing ...\n"); - i = filter_arg_edit_value(edata->arg, -1); if (i>=0) { gtk_list_remove_items_no_unref(edata->list, edata->items); @@ -367,11 +363,8 @@ fill_list(struct filter_arg_edit *edata) gtk_object_set_data((GtkObject *)listitem, "arg_i", filter_arg_get_value(edata->arg, i)); items = g_list_append(items, listitem); gtk_widget_show(GTK_WIDGET(listitem)); - printf("adding item %d\n", i); } - printf("items re-added\n"); - edata->item_current = NULL; edata->items = items; @@ -420,8 +413,6 @@ filter_arg_edit_select(GtkWidget *w, GtkListItem *list, struct filter_arg_edit * { edata->item_current = GTK_WIDGET (list); edit_sensitise(edata); - - printf ("node = %p\n", g_list_find(edata->items, edata->item_current)); } static void @@ -436,12 +427,10 @@ filter_arg_edit_clicked(GnomeDialog *d, int button, struct filter_arg_edit *edat { struct _FilterArgPrivate *p = _PRIVATE(edata->arg); - printf("window finished\n"); if (button == 0) { gtk_signal_emit(GTK_OBJECT(edata->arg), signals[CHANGED]); } else { /* cancel button, restore old values ... */ - printf("cancel button\n"); while (edata->arg->values) { filter_arg_remove(edata->arg, edata->arg->values->data); } diff --git a/filter/filter-driver.c b/filter/filter-driver.c index 9fb3a78d7a..aa26e38f51 100644 --- a/filter/filter-driver.c +++ b/filter/filter-driver.c @@ -193,17 +193,14 @@ filter_driver_new (const char *system, const char *user, FilterFolderFetcher fet p->fetcher = fetcher; - printf("Loading system '%s'\nLoading user '%s'\n", system, user); - #warning "fix leaks, free xml docs here" desc = xmlParseFile(system); p->rules = filter_load_ruleset(desc); filt = xmlParseFile(user); - if (filt == NULL) { - g_warning("Couldn't load filter file %s!", user); + if (filt == NULL) p->options = NULL; - } else + else p->options = filter_load_optionset(filt, p->rules); return new; @@ -249,8 +246,6 @@ expand_variables(GString *out, char *source, GList *args, GHashTable *globals) int len=0; int ok = 0; - printf("expanding %s\n", source); - start = source; while ( (newstart = strstr(start, "${")) && (end = strstr(newstart+2, "}")) ) { @@ -261,27 +256,23 @@ expand_variables(GString *out, char *source, GList *args, GHashTable *globals) } memcpy(name, newstart+2, len); name[len] = 0; - printf("looking for name '%s'\n", name); argl = g_list_find_custom(args, name, (GCompareFunc) filter_find_arg); if (argl) { int i, count; tmp = g_strdup_printf("%.*s", newstart-start, start); - printf("appending: %s\n", tmp); g_string_append(out, tmp); g_free(tmp); arg = argl->data; count = filter_arg_get_count(arg); for (i=0;i<count;i++) { - printf("appending '%s'\n", filter_arg_get_value_as_string(arg, i)); g_string_append(out, " \""); g_string_append(out, filter_arg_get_value_as_string(arg, i)); g_string_append(out, "\""); } } else if ( (val = g_hash_table_lookup(globals, name)) ) { tmp = g_strdup_printf("%.*s", newstart-start, start); - printf("appending: %s\n", tmp); g_string_append(out, tmp); g_free(tmp); g_string_append(out, " \""); @@ -290,7 +281,6 @@ expand_variables(GString *out, char *source, GList *args, GHashTable *globals) } else { ok = 1; tmp = g_strdup_printf("%.*s", end-start+1, start); - printf("appending: '%s'\n", tmp); g_string_append(out, tmp); g_free(tmp); } @@ -318,12 +308,8 @@ filter_driver_expand_option(FilterDriver *d, GString *s, GString *action, struct struct filter_optionrule *or = optionl->data; if (or->rule->type == FILTER_XML_MATCH || or->rule->type == FILTER_XML_EXCEPT) { - if (or->args) { + if (or->args) arg = or->args->data; - if (arg) { - printf("arg = %s\n", arg->name); - } - } expand_variables(s, or->rule->code, or->args, p->globals); } optionl = g_list_next(optionl); @@ -345,11 +331,6 @@ filter_driver_expand_option(FilterDriver *d, GString *s, GString *action, struct } g_string_append(action, ")"); } - - if (s) - printf("combined rule '%s'\n", s->str); - if (action) - printf("combined action '%s'\n", action->str); } static ESExpResult * @@ -401,20 +382,15 @@ do_copy(struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterDriver *d) char *folder = argv[i]->value.string; CamelFolder *outbox; - /* FIXME: this might have to find another store, based on - the folder as a url??? */ - printf("opening outpbox %s\n", folder); outbox = open_folder(d, folder); - if (outbox == NULL) { - g_warning("Cannot open folder: %s", folder); + if (outbox == NULL) continue; - } m = p->matches; while (m) { CamelMimeMessage *mm; - printf("appending message %s\n", (char *)m->data); + printf("appending message %s to %s\n", (char *)m->data, folder); mm = camel_folder_get_message(p->source, m->data, p->ex); camel_folder_append_message(outbox, mm, p->ex); @@ -425,7 +401,6 @@ do_copy(struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterDriver *d) g_hash_table_insert(p->processed, g_strdup(m->data), (void *)1); } - printf(" %s\n", (char *)m->data); m = m->next; } } @@ -480,8 +455,6 @@ close_folder(void *key, void *value, void *data) FilterDriver *d = data; struct _FilterDriverPrivate *p = _PRIVATE(d); - printf("closing folder: %s\n", (char *) key); - g_free(key); camel_folder_sync(f, FALSE, p->ex); camel_folder_thaw(f); @@ -546,7 +519,6 @@ filter_driver_run(FilterDriver *d, CamelFolder *source, CamelFolder *inbox) a = g_string_new(""); filter_driver_expand_option(d, s, a, fo); - printf("searching expression %s\n", s->str); p->matches = camel_folder_search_by_expression (p->source, s->str, p->ex); /* remove uid's for which processing is complete ... */ @@ -554,16 +526,12 @@ filter_driver_run(FilterDriver *d, CamelFolder *source, CamelFolder *inbox) while (m) { GList *n = m->next; - printf("matched: %s\n", (char *) m->data); - if (g_hash_table_lookup(p->terminated, m->data)) { - printf("removing terminated message %s\n", (char *)m->data); p->matches = g_list_remove_link(p->matches, m); } m = n; } - printf("applying actions ... '%s'\n", a->str); e_sexp_input_text(p->eval, a->str, strlen(a->str)); e_sexp_parse(p->eval); r = e_sexp_eval(p->eval); diff --git a/filter/filter-druid.c b/filter/filter-druid.c index 9b0b03749d..f516112d5d 100644 --- a/filter/filter-druid.c +++ b/filter/filter-druid.c @@ -270,8 +270,6 @@ fill_rules(GList *rules, struct filter_option *option, int type) labeltext = filter_description_text(fr->description, NULL); - printf("adding rule %s\n", labeltext); - hbox = gtk_hbox_new(FALSE, 3); checkbox = gnome_pixmap_new_from_xpm_d(state?check_xpm:blank_xpm); gtk_box_pack_start(GTK_BOX(hbox), checkbox, FALSE, FALSE, 0); @@ -333,7 +331,6 @@ select_rule_child(GtkList *list, GtkWidget *child, FilterDruid *f) gtk_object_set_data(GTK_OBJECT(child), "checkstate", (void *)state); if (state) { - printf("adding rule %p\n", fr); rule = filter_optionrule_new_from_rule(fr); f->option_current->options = g_list_append(f->option_current->options, rule); } else { @@ -369,7 +366,6 @@ select_option_child(GtkList *list, GtkWidget *child, FilterDruid *f) } if (f->option_current) { - printf("freeing current option\n"); /* free option_current copy */ optionsl = f->option_current->options; while (optionsl) { @@ -385,8 +381,6 @@ select_option_child(GtkList *list, GtkWidget *child, FilterDruid *f) if (child) { op = gtk_object_get_data(GTK_OBJECT(child), "option"); - printf("option = %p\n", op); - /* clone the option */ new = g_malloc(sizeof(*new)); new->type = op->type; @@ -411,7 +405,6 @@ select_option_child(GtkList *list, GtkWidget *child, FilterDruid *f) static void unselect_option_child(GtkList *list, GtkWidget *child, FilterDruid *f) { - printf("unselect option child\n"); select_option_child(list, NULL, f); } @@ -420,8 +413,6 @@ arg_changed(FilterArg *arg, FilterDruid *f) { FilterArg *orig; - printf("value changed!!!\n"); - orig = gtk_object_get_data(GTK_OBJECT (arg), "origin"); if (orig) { filter_arg_copy(orig, arg); @@ -435,14 +426,11 @@ arg_changed(FilterArg *arg, FilterDruid *f) static void arg_link_clicked(GtkHTML *html, const char *url, FilterDruid *f) { - printf("url clicked: %s\n", url); if (!strncmp(url, "arg:", 4)) { FilterArg *arg; void *dummy; if ((sscanf(url+4, "%p %p", &dummy, &arg) == 2) && arg) { - printf("arg = %p\n", arg); - gtk_signal_connect(GTK_OBJECT (arg), "changed", arg_changed, f); filter_arg_edit_values(arg); } @@ -454,8 +442,6 @@ option_name_changed(GtkEntry *entry, FilterDruid *f) { struct filter_desc *desc; - printf("name changed: %s\n", gtk_entry_get_text(entry)); - if (f->option_current) { /* FIXME: lots of memory leaks */ desc = g_malloc0(sizeof(*desc)); @@ -476,8 +462,6 @@ dialogue_clicked(FilterDruid *d, int button, void *data) struct _FilterDruidPrivate *p = _PRIVATE(d); int initial=0; - printf("button %d clicked ...\n", button); - g_string_free(s, TRUE); switch(button) { @@ -509,14 +493,9 @@ update_display(FilterDruid *f, int initial) { struct _FilterDruidPrivate *p = _PRIVATE(f); - printf("rending page %d options\n", p->page); - switch (p->page) { case 0: - printf("option_current = %p <###################\n", f->option_current); - if (initial) { - printf("adding options\n"); gtk_signal_handler_block_by_data((GtkObject *)p->list0, f); gtk_list_remove_items((GtkList *)p->list0, p->items0); p->items0 = fill_options(f->options); @@ -531,7 +510,6 @@ update_display(FilterDruid *f, int initial) case 2: case 3: if (initial) { - printf("adding rules\n"); gtk_signal_handler_block_by_data((GtkObject *)p->list0, f); gtk_list_remove_items((GtkList *)p->list0, p->items0); p->items0 = fill_rules(f->rules, f->option_current, filter_types[p->page-1]); diff --git a/filter/filter-editor.c b/filter/filter-editor.c index 61ec13732c..3bd239befa 100644 --- a/filter/filter-editor.c +++ b/filter/filter-editor.c @@ -70,7 +70,7 @@ filter_editor_get_type (void) } static void -object_destroy(FilterEditor *obj) +object_destroy(GtkObject *obj) { struct _FilterEditorPrivate *p = _PRIVATE(obj); @@ -114,7 +114,6 @@ sensitise(FilterEditor *e) static void druid_option_selected(FilterDruid *f, struct filter_option *option, FilterEditor *e) { - printf("option selected: %p\n", option); e->option_current = option; sensitise(e); } @@ -137,7 +136,6 @@ druid_dialogue_clicked(GnomeDialog *d, int button, FilterEditor *e) } break; case 2: - printf("Finish!\n"); if (p->druid_druid->option_current) { #warning "what is going on here?" /* FIXME: should this be struct filter_option?? */ @@ -165,7 +163,6 @@ druid_dialogue_clicked(GnomeDialog *d, int button, FilterEditor *e) filter_druid_set_rules(p->druid, e->useroptions, e->rules, or); } case 3: - printf("cancel!\n"); p->druid_dialogue = NULL; gnome_dialog_close(d); return; @@ -199,7 +196,7 @@ add_or_edit(FilterEditor *e, struct filter_option *option) } dialogue = GNOME_DIALOG (gnome_dialog_new (option ? _("Edit Filter") : _("Create filter"), NULL)); - p->druid_dialogue = dialogue; + p->druid_dialogue = GTK_WIDGET (dialogue); { const char *pixmaps[] = { GNOME_STOCK_BUTTON_PREV, @@ -255,16 +252,12 @@ add_or_edit(FilterEditor *e, struct filter_option *option) static void add_clicked(GtkWidget *w, FilterEditor *e) { - printf("add new ...\n"); - add_or_edit(e, NULL); } static void edit_clicked(GtkWidget *w, FilterEditor *e) { - printf("add new ...\n"); - add_or_edit(e, e->option_current); } @@ -367,7 +360,7 @@ void filter_editor_set_rule_files(FilterEditor *e, const char *systemrules, const char *userrules) { GList *rules, *options = NULL, *options2; - xmlDocPtr doc, out, optionset, filteroptions; + xmlDocPtr doc, out; doc = xmlParseFile(systemrules); if( doc == NULL ) { @@ -383,9 +376,6 @@ filter_editor_set_rule_files(FilterEditor *e, const char *systemrules, const cha if (out) options = filter_load_optionset(out, rules); - printf("Loading system rules: %s = %p = %p\n", systemrules, doc, rules); - printf("Loading user rules: %s = %p = %p\n", userrules, out, options); - filter_editor_set_rules(e, rules, options2, options); } |