aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-folder-map.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2007-11-15 06:04:21 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2007-11-15 06:04:21 +0800
commit9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91 (patch)
tree2e1e96f33404781354c422a7e9beaf458ebeb655 /e-util/e-folder-map.c
parent7e8f8bb9e5167b0219b48ab3e8062080d3740b0a (diff)
downloadgsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.tar
gsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.tar.gz
gsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.tar.bz2
gsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.tar.lz
gsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.tar.xz
gsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.tar.zst
gsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.zip
** Remove trailing whitespace from source code.
2007-11-14 Matthew Barnes <mbarnes@redhat.com> ** Remove trailing whitespace from source code. svn path=/trunk/; revision=34537
Diffstat (limited to 'e-util/e-folder-map.c')
-rw-r--r--e-util/e-folder-map.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/e-util/e-folder-map.c b/e-util/e-folder-map.c
index 31ae5ffb8e..6c6e07e263 100644
--- a/e-util/e-folder-map.c
+++ b/e-util/e-folder-map.c
@@ -45,25 +45,25 @@ is_type_folder (const char *metadata, const char *search_type)
xmlNodePtr node;
xmlDocPtr doc;
char *type;
-
+
doc = e_xml_parse_file (metadata);
if (!doc) {
g_warning ("Cannot parse `%s'", metadata);
return FALSE;
}
-
+
if (!(node = xmlDocGetRootElement (doc))) {
g_warning ("`%s' corrupt: document contains no root node", metadata);
xmlFreeDoc (doc);
return FALSE;
}
-
+
if (!node->name || strcmp ((char *)node->name, "efolder") != 0) {
g_warning ("`%s' corrupt: root node is not 'efolder'", metadata);
xmlFreeDoc (doc);
return FALSE;
}
-
+
node = node->children;
while (node != NULL) {
if (node->name && !strcmp ((char *)node->name, "type")) {
@@ -71,20 +71,20 @@ is_type_folder (const char *metadata, const char *search_type)
if (!strcmp (type, search_type)) {
xmlFreeDoc (doc);
xmlFree (type);
-
+
return TRUE;
}
-
+
xmlFree (type);
-
+
break;
}
-
+
node = node->next;
}
-
+
xmlFreeDoc (doc);
-
+
return FALSE;
}
@@ -101,7 +101,7 @@ e_folder_map_dir (const char *dirname, const char *type, GSList **dir_list)
g_free (path);
return;
}
-
+
if (!is_type_folder (path, type)) {
g_free (path);
goto try_subdirs;
@@ -109,8 +109,8 @@ e_folder_map_dir (const char *dirname, const char *type, GSList **dir_list)
d(g_message ("Found '%s'", dirname));
*dir_list = g_slist_prepend (*dir_list, g_strdup (dirname));
-
- g_free (path);
+
+ g_free (path);
try_subdirs:
@@ -119,32 +119,32 @@ e_folder_map_dir (const char *dirname, const char *type, GSList **dir_list)
g_free (path);
return;
}
-
+
if (!(dir = g_dir_open (path, 0, &error))) {
g_warning ("cannot open `%s': %s", path, error->message);
g_error_free (error);
g_free (path);
return;
}
-
+
while ((name = g_dir_read_name (dir))) {
char *full_path;
-
+
if (*name == '.')
continue;
-
+
full_path = g_build_filename (path, name, NULL);
if (!g_file_test (full_path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) {
g_free (full_path);
continue;
}
-
+
e_folder_map_dir (full_path, type, dir_list);
g_free (full_path);
}
-
+
g_dir_close (dir);
-
+
g_free (path);
}
@@ -152,34 +152,34 @@ GSList *
e_folder_map_local_folders (char *local_dir, char *type)
{
const char *name;
- GDir *dir;
+ GDir *dir;
GSList *dir_list = NULL;
GError *error = NULL;
-
+
if (!(dir = g_dir_open (local_dir, 0, &error))) {
g_warning ("cannot open `%s': %s", local_dir, error->message);
g_error_free (error);
return NULL;
}
-
+
while ((name = g_dir_read_name (dir))) {
char *full_path;
-
+
if (*name == '.')
continue;
-
+
full_path = g_build_filename (local_dir, name, NULL);
d(g_message ("Looking in %s", full_path));
if (!g_file_test (full_path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) {
g_free (full_path);
continue;
}
-
+
e_folder_map_dir (full_path, type, &dir_list);
g_free (full_path);
}
-
+
g_dir_close (dir);
return dir_list;