[evolution-patches] e-book spew diff
- From: Chris Toshok <toshok ximian com>
- To: evolution-patches ximian com
- Subject: [evolution-patches] e-book spew diff
- Date: Mon, 23 Feb 2004 14:18:17 -0800
coulda sworn i sent this already, but couldn't find the mail.
Chris
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/ChangeLog,v
retrieving revision 1.91
diff -u -r1.91 ChangeLog
--- ChangeLog 23 Feb 2004 17:43:28 -0000 1.91
+++ ChangeLog 23 Feb 2004 22:17:09 -0000
@@ -1,5 +1,38 @@
2004-02-23 Chris Toshok <toshok ximian com>
+ * libebook/e-vcard.c (parse): wrap spew in "#define d(x)".
+ (e_vcard_attribute_add_value_decoded): same.
+ (_evc_base64_encode_close): same.
+ (_evc_base64_encode_step): same.
+
+ * libebook/e-contact.c (e_contact_set_property): wrap spew in
+ "#define d(x)".
+ (e_contact_set): same.
+
+ * libebook/e-book.c (e_book_add_contact): wrap spew in "#define
+ d(x)" and reindent.
+ (e_book_response_add_contact): same.
+ (e_book_response_get_contact): same.
+ (e_book_response_get_book_view): same.
+ (e_book_response_get_contacts): reindent.
+ (e_book_response_get_changes): same.
+ (e_book_response_generic): same.
+ (e_book_response_open): same.
+ (e_book_response_remove): same.
+
+ * libebook/e-book-view-listener.c
+ (impl_BookViewListener_notify_contacts_added): wrap spew in
+ "#define d(x)".
+ (impl_BookViewListener_notify_contacts_removed): same.
+ (impl_BookViewListener_notify_contacts_changed): same.
+ (impl_BookViewListener_notify_sequence_complete): same.
+ (impl_BookViewListener_notify_progress): same.
+
+ * libebook/e-book-listener.c (impl_BookListener_respond_get_view):
+ wrap spew in "#define d(x)".
+
+2004-02-23 Chris Toshok <toshok ximian com>
+
* tests/ebook/test-search.c: add a utility so we can perform
searches against addressbooks without having to bring up a gui.
Index: libebook/e-vcard.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/libebook/e-vcard.c,v
retrieving revision 1.8
diff -u -r1.8 e-vcard.c
--- libebook/e-vcard.c 3 Feb 2004 20:11:51 -0000 1.8
+++ libebook/e-vcard.c 23 Feb 2004 22:17:09 -0000
@@ -26,6 +26,8 @@
#include <ctype.h>
#include "e-vcard.h"
+#define d(x)
+
#define CRLF "\r\n"
typedef enum {
@@ -523,16 +525,13 @@
*end = '\0';
}
-#if DEBUG_FOLDING
- printf ("BEFORE FOLDING:\n");
- printf (str);
-#endif
buf = fold_lines (buf);
-#if DEBUG_FOLDING
- printf ("\n\nAFTER FOLDING:\n");
- printf (buf);
-#endif
+ d(printf ("BEFORE FOLDING:\n"));
+ d(printf (str));
+ d(printf ("\n\nAFTER FOLDING:\n"));
+ d(printf (buf));
+
p = buf;
attr = read_attribute (&p);
@@ -958,8 +957,8 @@
/* make sure the decoded list is up to date */
e_vcard_attribute_get_values_decoded (attr);
- printf ("base64 encoded value: %s\n", b64_data);
- printf ("original length: %d\n", len);
+ d(printf ("base64 encoded value: %s\n", b64_data));
+ d(printf ("original length: %d\n", len));
attr->values = g_list_append (attr->values, b64_data);
attr->decoded_values = g_list_append (attr->decoded_values, decoded);
@@ -1243,12 +1242,10 @@
c1 = ((unsigned char *)save)[1];
c2 = ((unsigned char *)save)[2];
-#if 0
d(printf("mode = %d\nc1 = %c\nc2 = %c\n",
(int)((char *)save)[0],
(int)((char *)save)[1],
(int)((char *)save)[2]));
-#endif
switch (((char *)save)[0]) {
case 2:
@@ -1289,9 +1286,7 @@
inptr = in;
outptr = out;
-#if 0
d(printf("we have %d chars, and %d saved chars\n", len, ((char *)save)[0]));
-#endif
if (len + ((char *)save)[0] > 2) {
unsigned char *inend = in+len-2;
@@ -1329,11 +1324,9 @@
*state = already;
}
-#if 0
d(printf("state = %d, len = %d\n",
(int)((char *)save)[0],
len));
-#endif
if (len>0) {
register char *saveout;
@@ -1349,12 +1342,10 @@
((char *)save)[0]+=len;
}
-#if 0
d(printf("mode = %d\nc1 = %c\nc2 = %c\n",
(int)((char *)save)[0],
(int)((char *)save)[1],
(int)((char *)save)[2]));
-#endif
return outptr-out;
}
Index: libebook/e-contact.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/libebook/e-contact.c,v
retrieving revision 1.22
diff -u -r1.22 e-contact.c
--- libebook/e-contact.c 4 Feb 2004 17:34:45 -0000 1.22
+++ libebook/e-contact.c 23 Feb 2004 22:17:10 -0000
@@ -30,6 +30,8 @@
#include "e-book.h"
#include "e-name-western.h"
+#define d(x)
+
struct _EContactPrivate {
};
@@ -822,7 +824,7 @@
if (!sval || !*sval)
return;
- printf ("adding new %s\n", info->vcard_field_name);
+ d(printf ("adding new %s\n", info->vcard_field_name));
attr = e_vcard_attribute_new (NULL, info->vcard_field_name);
e_vcard_add_attribute (E_VCARD (contact), attr);
@@ -883,7 +885,7 @@
void *data = info->t & E_CONTACT_FIELD_TYPE_STRUCT ? g_value_get_boxed (value) : (char*)g_value_get_string (value);
if (attr && data) {
- printf ("overwriting existing %s\n", info->vcard_field_name);
+ d(printf ("overwriting existing %s\n", info->vcard_field_name));
/* remove all existing values and parameters.
the setter will add the correct ones */
e_vcard_attribute_remove_values (attr);
@@ -892,7 +894,7 @@
info->struct_setter (contact, attr, data);
}
else if (data) {
- printf ("adding new %s\n", info->vcard_field_name);
+ d(printf ("adding new %s\n", info->vcard_field_name));
attr = e_vcard_attribute_new (NULL, info->vcard_field_name);
e_vcard_add_attribute (E_VCARD (contact), attr);
@@ -900,7 +902,7 @@
info->struct_setter (contact, attr, data);
}
else if (attr) {
- printf ("removing %s\n", info->vcard_field_name);
+ d(printf ("removing %s\n", info->vcard_field_name));
e_vcard_remove_attribute (E_VCARD (contact), attr);
}
@@ -911,7 +913,7 @@
/* first we search for an attribute we can overwrite */
attr = e_contact_get_first_attr (contact, info->vcard_field_name);
if (attr) {
- printf ("setting %s to `%s'\n", info->vcard_field_name, g_value_get_string (value));
+ d(printf ("setting %s to `%s'\n", info->vcard_field_name, g_value_get_string (value)));
e_vcard_attribute_remove_values (attr);
e_vcard_attribute_add_value (attr, g_value_get_boolean (value) ? "TRUE" : "FALSE");
}
@@ -929,7 +931,7 @@
/* first we search for an attribute we can overwrite */
attr = e_contact_get_first_attr (contact, info->vcard_field_name);
if (attr) {
- printf ("setting %s to `%s'\n", info->vcard_field_name, sval);
+ d(printf ("setting %s to `%s'\n", info->vcard_field_name, sval));
e_vcard_attribute_remove_values (attr);
if (sval)
e_vcard_attribute_add_value (attr, sval);
@@ -1401,7 +1403,7 @@
void
e_contact_set (EContact *contact, EContactField field_id, gpointer value)
{
- printf ("e_contact_set (%p, %d, %p)\n", contact, field_id, value);
+ d(printf ("e_contact_set (%p, %d, %p)\n", contact, field_id, value));
g_return_if_fail (contact && E_IS_CONTACT (contact));
g_return_if_fail (field_id >= 1 && field_id <= E_CONTACT_FIELD_LAST);
Index: libebook/e-book.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/libebook/e-book.c,v
retrieving revision 1.26
diff -u -r1.26 e-book.c
--- libebook/e-book.c 12 Feb 2004 22:41:19 -0000 1.26
+++ libebook/e-book.c 23 Feb 2004 22:17:11 -0000
@@ -21,6 +21,8 @@
#include "e-book-marshal.h"
#include "e-book-listener.h"
+#define d(x)
+
GMainContext *_ebook_context;
static GObjectClass *parent_class;
@@ -201,7 +203,7 @@
CORBA_Environment ev;
char *vcard_str;
- printf ("e_book_add_contact\n");
+ d(printf ("e_book_add_contact\n"));
e_return_error_if_fail (book && E_IS_BOOK (book), E_BOOK_ERROR_INVALID_ARG);
e_return_error_if_fail (contact && E_IS_CONTACT (contact), E_BOOK_ERROR_INVALID_ARG);
@@ -277,13 +279,13 @@
{
EBookOp *op;
- printf ("e_book_response_add_contact\n");
+ d(printf ("e_book_response_add_contact\n"));
op = e_book_get_op (book);
if (op == NULL) {
- g_warning ("e_book_response_add_contact: Cannot find operation ");
- return;
+ g_warning ("e_book_response_add_contact: Cannot find operation ");
+ return;
}
g_mutex_lock (op->mutex);
@@ -472,8 +474,8 @@
op = e_book_get_op (book);
if (op == NULL) {
- g_warning ("e_book_response_get_supported_fields: Cannot find operation ");
- return;
+ g_warning ("e_book_response_get_supported_fields: Cannot find operation ");
+ return;
}
g_mutex_lock (op->mutex);
@@ -576,8 +578,8 @@
op = e_book_get_op (book);
if (op == NULL) {
- g_warning ("e_book_response_get_supported_auth_methods: Cannot find operation ");
- return;
+ g_warning ("e_book_response_get_supported_auth_methods: Cannot find operation ");
+ return;
}
g_mutex_lock (op->mutex);
@@ -768,13 +770,13 @@
{
EBookOp *op;
- printf ("e_book_response_get_contact\n");
+ d(printf ("e_book_response_get_contact\n"));
op = e_book_get_op (book);
if (op == NULL) {
- g_warning ("e_book_response_get_contact: Cannot find operation ");
- return;
+ g_warning ("e_book_response_get_contact: Cannot find operation ");
+ return;
}
g_mutex_lock (op->mutex);
@@ -1046,13 +1048,13 @@
EBookOp *op;
- printf ("e_book_response_get_book_view\n");
+ d(printf ("e_book_response_get_book_view\n"));
op = e_book_get_op (book);
if (op == NULL) {
- g_warning ("e_book_response_get_book_view: Cannot find operation ");
- return;
+ g_warning ("e_book_response_get_book_view: Cannot find operation ");
+ return;
}
g_mutex_lock (op->mutex);
@@ -1167,8 +1169,8 @@
op = e_book_get_op (book);
if (op == NULL) {
- g_warning ("e_book_response_get_contacts: Cannot find operation ");
- return;
+ g_warning ("e_book_response_get_contacts: Cannot find operation ");
+ return;
}
g_mutex_lock (op->mutex);
@@ -1264,8 +1266,8 @@
op = e_book_get_op (book);
if (op == NULL) {
- g_warning ("e_book_response_get_contacts: Cannot find operation ");
- return;
+ g_warning ("e_book_response_get_contacts: Cannot find operation ");
+ return;
}
g_mutex_lock (op->mutex);
@@ -1303,8 +1305,8 @@
op = e_book_get_op (book);
if (op == NULL) {
- g_warning ("e_book_response_generic: Cannot find operation ");
- return;
+ g_warning ("e_book_response_generic: Cannot find operation ");
+ return;
}
g_mutex_lock (op->mutex);
@@ -1402,8 +1404,8 @@
op = e_book_get_op (book);
if (op == NULL) {
- g_warning ("e_book_response_open: Cannot find operation ");
- return;
+ g_warning ("e_book_response_open: Cannot find operation ");
+ return;
}
g_mutex_lock (op->mutex);
@@ -1496,13 +1498,13 @@
{
EBookOp *op;
- printf ("e_book_response_remove\n");
+ d(printf ("e_book_response_remove\n"));
op = e_book_get_op (book);
if (op == NULL) {
- g_warning ("e_book_response_remove: Cannot find operation ");
- return;
+ g_warning ("e_book_response_remove: Cannot find operation ");
+ return;
}
g_mutex_lock (op->mutex);
Index: libebook/e-book-view-listener.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/libebook/e-book-view-listener.c,v
retrieving revision 1.4
diff -u -r1.4 e-book-view-listener.c
--- libebook/e-book-view-listener.c 11 Feb 2004 17:34:20 -0000 1.4
+++ libebook/e-book-view-listener.c 23 Feb 2004 22:17:11 -0000
@@ -16,6 +16,8 @@
#include "e-contact.h"
#include "e-book-marshal.h"
+#define d(x)
+
static EBookViewStatus e_book_view_listener_convert_status (GNOME_Evolution_Addressbook_CallStatus status);
enum {
@@ -198,7 +200,7 @@
{
EBookViewListener *listener = E_BOOK_VIEW_LISTENER (bonobo_object (servant));
- printf ("impl_BookViewListener_notify_contacts_added\n");
+ d(printf ("impl_BookViewListener_notify_contacts_added\n"));
e_book_view_listener_queue_sequence_event (
listener, ContactsAddedEvent, vcards);
@@ -211,7 +213,7 @@
{
EBookViewListener *listener = E_BOOK_VIEW_LISTENER (bonobo_object (servant));
- printf ("impl_BookViewListener_notify_contacts_removed\n");
+ d(printf ("impl_BookViewListener_notify_contacts_removed\n"));
e_book_view_listener_queue_idlist_event (listener, ContactsRemovedEvent, ids);
}
@@ -223,7 +225,7 @@
{
EBookViewListener *listener = E_BOOK_VIEW_LISTENER (bonobo_object (servant));
- printf ("impl_BookViewListener_notify_contacts_changed\n");
+ d(printf ("impl_BookViewListener_notify_contacts_changed\n"));
e_book_view_listener_queue_sequence_event (
listener, ContactsModifiedEvent, vcards);
@@ -236,7 +238,7 @@
{
EBookViewListener *listener = E_BOOK_VIEW_LISTENER (bonobo_object (servant));
- printf ("impl_BookViewListener_notify_sequence_complete\n");
+ d(printf ("impl_BookViewListener_notify_sequence_complete\n"));
e_book_view_listener_queue_status_event (listener, SequenceCompleteEvent,
e_book_view_listener_convert_status (status));
@@ -250,7 +252,7 @@
{
EBookViewListener *listener = E_BOOK_VIEW_LISTENER (bonobo_object (servant));
- printf ("impl_BookViewListener_notify_progress\n");
+ d(printf ("impl_BookViewListener_notify_progress\n"));
e_book_view_listener_queue_message_event (listener, StatusMessageEvent, message);
}
Index: libebook/e-book-listener.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/libebook/e-book-listener.c,v
retrieving revision 1.7
diff -u -r1.7 e-book-listener.c
--- libebook/e-book-listener.c 12 Feb 2004 22:41:19 -0000 1.7
+++ libebook/e-book-listener.c 23 Feb 2004 22:17:12 -0000
@@ -15,6 +15,8 @@
#include "e-book-listener.h"
#include "e-book-marshal.h"
+#define d(x)
+
extern GMainContext *_ebook_context;
static EBookStatus e_book_listener_convert_status (GNOME_Evolution_Addressbook_CallStatus status);
@@ -160,7 +162,7 @@
EBookListener *listener = E_BOOK_LISTENER (bonobo_object (servant));
EBookListenerResponse response;
- printf ("impl_BookListener_respond_get_view\n");
+ d(printf ("impl_BookListener_respond_get_view\n"));
if (listener->priv->stopped)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]