Revision: 1245 http://svn.sourceforge.net/geany/?rev=1245&view=rev Author: ntrel Date: 2007-02-03 09:01:44 -0800 (Sat, 03 Feb 2007)
Log Message: ----------- Allow Make for files with no extension - prevent Build when the output filename would be the same as the source file.
Modified Paths: -------------- trunk/ChangeLog trunk/src/build.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-02-03 13:24:27 UTC (rev 1244) +++ trunk/ChangeLog 2007-02-03 17:01:44 UTC (rev 1245) @@ -7,6 +7,9 @@ Make anonymous typenames use anon_typename_n instead of typename_anon_n (it seems we can't use <> brackets because of missing scope problem). + * src/build.c: + Allow Make for files with no extension - prevent Build when the + output filename would be the same as the source file.
2007-02-01 Nick Treleaven nick.treleaven@btinternet.com
Modified: trunk/src/build.c =================================================================== --- trunk/src/build.c 2007-02-03 13:24:27 UTC (rev 1244) +++ trunk/src/build.c 2007-02-03 17:01:44 UTC (rev 1245) @@ -334,6 +334,15 @@ locale_filename = utils_get_locale_from_utf8(doc_list[idx].file_name);
executable = utils_remove_ext_from_filename(locale_filename); + // check for filename extension and abort if filename doesn't have one + if (utils_str_equal(locale_filename, executable)) + { + msgwin_status_add(_("Command stopped because the current file has no extension.")); + utils_beep(); + utils_free_pointers(locale_filename, executable); + return (GPid) 1; + } + object_file = g_strdup_printf("%s.o", executable);
// check wether object file (file.o) exists @@ -411,14 +420,6 @@
executable = utils_remove_ext_from_filename(locale_filename);
- // check for filename extension and abort if filename doesn't have one - if (utils_str_equal(locale_filename, executable)) - { - msgwin_status_add(_("Command stopped because the current file has no extension.")); - utils_beep(); - return (GPid) 1; - } - // replace %f and %e in the command string tmp = g_path_get_basename(locale_filename); cmd_string = utils_str_replace(cmd_string, "%f", tmp); @@ -543,7 +544,8 @@ { msgwin_status_add(_("Command stopped because the current file has no extension.")); utils_beep(); - return (GPid) 1; + result_id = (GPid) 1; + goto free_strings; }
// check whether executable exists
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.