From 5931e1f77c6671cc7f544c503cff8a6a7f37bc98 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Wed, 21 Jul 2010 01:01:13 +0100 Subject: [PATCH] Clean up final fprintf(stderr) calls. --- calitem_to_ical.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/calitem_to_ical.c b/calitem_to_ical.c index 6fd16a1..06130e0 100644 --- a/calitem_to_ical.c +++ b/calitem_to_ical.c @@ -768,7 +768,7 @@ static const char *ews_tz_to_ical(const char *ewstz) return table[i].ical; } - fprintf(stderr, "Unrecognised TimeZone '%s'\n", ewstz); + g_warning("Unrecognised TimeZone '%s'", ewstz); return NULL; } @@ -786,7 +786,7 @@ icaltimezone *get_timezone(xmlNode *xml_node, GError **error) break; } if (!xml_node) { - fprintf(stderr, "Failed to find TimeZone element; falling back to UTC\n"); + g_warning("Failed to find TimeZone element; falling back to UTC"); return NULL; } @@ -803,8 +803,8 @@ icaltimezone *get_timezone(xmlNode *xml_node, GError **error) if (zone) return zone; - fprintf(stderr, "Failed to load ical timezone for '%s' (%s)\n", tzname, - ews_tzname); + g_warning("Failed to load ical timezone for '%s' (%s)", + tzname, ews_tzname); return NULL; } @@ -821,19 +821,19 @@ gboolean get_baseoffset(xmlNode *xml_node, int *retval, GError **error) } if (!xml_node) { g_set_error(error, EWS_ERROR, EWS_ERROR_PARSE, - " has no \n"); + " has no "); return FALSE; } baseoffset = (const char *)xmlNodeGetContent(xml_node); if (!baseoffset) { g_set_error(error, EWS_ERROR, EWS_ERROR_PARSE, - " is empty\n"); + " is empty"); return FALSE; } ofs = icaldurationtype_from_string(baseoffset); if (icaldurationtype_is_bad_duration(ofs)) { g_set_error(error, EWS_ERROR, EWS_ERROR_PARSE, - "Failed to parse '%s'\n", baseoffset); + "Failed to parse '%s'", baseoffset); return FALSE; } if (ofs.is_neg) @@ -1189,16 +1189,16 @@ icalcomponent *process_timezone_rule(xmlNode *xml_node, icalcomponent_kind kind, } else if (!strcmp((char *)xml_node->name, "AbsoluteDate")) { /* Are there really timezones which change on the same date every year? */ - fprintf(stderr, "Don't know how to handle AbsoluteDate for timezone change: '%s'\n", - xmlNodeGetContent(xml_node)); + g_warning("Don't know how to handle AbsoluteDate for timezone change: '%s'", + xmlNodeGetContent(xml_node)); } else if (!strcmp((char *)xml_node->name, "Time")) { struct icaltimetype dtstart; char *time_string = (char *)xmlNodeGetContent(xml_node); if (strlen(time_string) != 8 || time_string[2] != ':' || time_string[5] != ':') { - fprintf(stderr, "Cannot parse dst change time '%s'\n", - time_string); + g_warning("Cannot parse dst change time '%s'", + time_string); return NULL; } memset(&dtstart, 0, sizeof(dtstart)); @@ -1258,8 +1258,8 @@ icaltimezone *get_meeting_timezone(xmlNode *xml_node, GError **error) ICAL_XDAYLIGHT_COMPONENT, &dst_offset, error); } else { - fprintf(stderr, "Unknown element in MeetingTimeZone: %s\n", - xml_node->name); + g_warning("Unknown element in MeetingTimeZone: %s", + xml_node->name); } } -- 2.49.0