Revision: 4267 http://geany.svn.sourceforge.net/geany/?rev=4267&view=rev Author: ntrel Date: 2009-09-29 13:57:43 +0000 (Tue, 29 Sep 2009)
Log Message: ----------- Use foreach_dir().
Modified Paths: -------------- trunk/src/filetypes.c
Modified: trunk/src/filetypes.c =================================================================== --- trunk/src/filetypes.c 2009-09-29 13:56:37 UTC (rev 4266) +++ trunk/src/filetypes.c 2009-09-29 13:57:43 UTC (rev 4267) @@ -708,6 +708,7 @@ static void init_custom_filetypes(const gchar *path) { GDir *dir; + const gchar *filename;
g_return_if_fail(path);
@@ -715,14 +716,10 @@ if (dir == NULL) return;
- while (1) + foreach_dir(filename, dir) { const gchar prefix[] = "filetypes."; - const gchar *filename = g_dir_read_name(dir);
- if (filename == NULL) - break; - if (g_str_has_prefix(filename, prefix) && g_str_has_suffix(filename + strlen(prefix), ".conf")) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.