Revision: 1577 http://svn.sourceforge.net/geany/?rev=1577&view=rev Author: eht16 Date: 2007-05-26 02:23:44 -0700 (Sat, 26 May 2007)
Log Message: ----------- Better to use setptr macro.
Modified Paths: -------------- trunk/src/filetypes.c
Modified: trunk/src/filetypes.c =================================================================== --- trunk/src/filetypes.c 2007-05-26 09:03:02 UTC (rev 1576) +++ trunk/src/filetypes.c 2007-05-26 09:23:44 UTC (rev 1577) @@ -654,15 +654,14 @@ filetype *filetypes_detect_from_filename(const gchar *utf8_filename) { GPatternSpec *pattern; + gchar *base_filename; gint i, j;
// to match against the basename of the file(because of Makefile*) + base_filename = g_path_get_basename(utf8_filename); #ifdef G_OS_WIN32 - gchar *tmp = g_path_get_basename(utf8_filename); - gchar *base_filename = g_utf8_strdown(tmp, -1); - g_free(tmp); -#else - gchar *base_filename = g_path_get_basename(utf8_filename); + // use lower case basename + setptr(base_filename, g_utf8_strdown(base_filename, -1)); #endif
for(i = 0; i < GEANY_MAX_FILE_TYPES; i++)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.