[anjuta] build-basic-autotools: Remove trailing spaces



commit d6dce0cb6e8f7073a47c8a8e51e84d9d4c4ca009
Author: SÃbastien Granjoux <seb sfo free fr>
Date:   Sun Nov 11 18:22:30 2012 +0100

    build-basic-autotools: Remove trailing spaces

 plugins/build-basic-autotools/build-options.c      |   74 ++++++++--------
 plugins/build-basic-autotools/build-options.h      |    2 +-
 plugins/build-basic-autotools/configuration-list.c |   90 ++++++++++----------
 plugins/build-basic-autotools/configuration-list.h |    2 +-
 plugins/build-basic-autotools/executer.c           |   64 +++++++-------
 plugins/build-basic-autotools/plugin.h             |   14 ++--
 plugins/build-basic-autotools/program.c            |   66 +++++++-------
 plugins/build-basic-autotools/program.h            |    6 +-
 8 files changed, 159 insertions(+), 159 deletions(-)
---
diff --git a/plugins/build-basic-autotools/build-options.c b/plugins/build-basic-autotools/build-options.c
index cb89da5..588861b 100644
--- a/plugins/build-basic-autotools/build-options.c
+++ b/plugins/build-basic-autotools/build-options.c
@@ -52,16 +52,16 @@ typedef struct _BuildConfigureDialog BuildConfigureDialog;
 struct _BuildConfigureDialog
 {
  	GtkWidget *win;
-	
+
 	GtkWidget *combo;
 	GtkWidget *autogen;
 	GtkWidget *build_dir_chooser;
 	GtkWidget *args;
 	GtkWidget *env_editor;
 	GtkWidget *ok;
-	
+
 	BuildConfigurationList *config_list;
-	
+
 	const gchar *project_uri;
 };
 
@@ -77,7 +77,7 @@ struct _BuildMissingDirectory
 /* Create directory at run time for GtkFileChooserButton
  *---------------------------------------------------------------------------*/
 
-/* Create a directories, including parents if necessary, return 
+/* Create a directories, including parents if necessary, return
  * */
 
 static GFile*
@@ -88,7 +88,7 @@ build_make_directories (GFile *file,
 	GError *path_error = NULL;
 	GList *children = NULL;
 	GFile *parent;
-	
+
 	parent = g_file_get_parent(file);
 
 	for (;;)
@@ -120,10 +120,10 @@ build_make_directories (GFile *file,
 		{
 			g_object_unref (parent);
 			g_propagate_error (error, path_error);
-			
+
 			return NULL;
 		}
-	}				
+	}
 }
 
 static GQuark
@@ -133,7 +133,7 @@ build_gtk_file_chooser_create_directory_get_quark (void)
 
   if (quark == 0)
     quark = g_quark_from_static_string ("gtk-file-chooser-create-directory");
-  
+
   return quark;
 }
 
@@ -144,7 +144,7 @@ on_build_missing_directory_destroyed (BuildMissingDirectory* dir)
 	/* Remove previously created directories */
 	GFile* created_dir;
 	GFile* existing_dir;
-		
+
 	created_dir = g_file_new_for_uri (dir->uri);
 	dir->uri[dir->exist] = '\0';
 	existing_dir = g_file_new_for_uri (dir->uri);
@@ -152,7 +152,7 @@ on_build_missing_directory_destroyed (BuildMissingDirectory* dir)
 	for (;!g_file_equal (created_dir, existing_dir);)
 	{
 		GFile *parent_dir;
-			
+
 		if (!g_file_delete (created_dir, NULL, NULL)) break;
 		parent_dir = g_file_get_parent (created_dir);
 		g_object_unref (created_dir);
@@ -171,7 +171,7 @@ build_gtk_file_chooser_create_and_set_uri (GtkFileChooser *chooser, const gchar
 	GFile *dir;
 	GError *error = NULL;
 	GFile *parent;
-	
+
 	dir = g_file_new_for_uri (uri);
 	parent = build_make_directories (dir, NULL, &error);
 	if (parent != NULL)
@@ -182,25 +182,25 @@ build_gtk_file_chooser_create_and_set_uri (GtkFileChooser *chooser, const gchar
 
 		len = strlen (uri);
 		dir = (BuildMissingDirectory *)g_new (char, sizeof (BuildMissingDirectory) + len);
-		
+
 		memcpy (dir->uri, uri, len + 1);
 		last = g_file_get_uri (parent);
 		dir->exist = strlen (last);
-		
+
 		g_object_set_qdata_full (G_OBJECT (chooser),
 								 GTK_FILE_CHOOSER_CREATE_DIRECTORY_QUARK,
 								 dir,
-								 (GDestroyNotify)on_build_missing_directory_destroyed);		
+								 (GDestroyNotify)on_build_missing_directory_destroyed);
 	}
 	else
 	{
-		g_object_set_qdata (G_OBJECT (chooser), 
+		g_object_set_qdata (G_OBJECT (chooser),
 							GTK_FILE_CHOOSER_CREATE_DIRECTORY_QUARK,
 							NULL);
 		g_error_free (error);
 	}
 	g_object_unref (dir);
-	
+
 	return gtk_file_chooser_set_current_folder_uri (chooser, uri);
 }
 
@@ -210,12 +210,12 @@ build_gtk_file_chooser_keep_folder (GtkFileChooser *chooser, const char *uri)
 {
 	BuildMissingDirectory* dir;
 
-	dir = g_object_steal_qdata (G_OBJECT (chooser), GTK_FILE_CHOOSER_CREATE_DIRECTORY_QUARK);	
+	dir = g_object_steal_qdata (G_OBJECT (chooser), GTK_FILE_CHOOSER_CREATE_DIRECTORY_QUARK);
 	if (dir != NULL)
 	{
 		GFile *created_dir;
 		GFile *needed_dir;
-	
+
 		needed_dir = g_file_new_for_uri (uri);
 		created_dir = g_file_new_for_uri (dir->uri);
 		if (!g_file_equal (created_dir, needed_dir))
@@ -245,14 +245,14 @@ on_select_configuration (GtkComboBox *widget, gpointer user_data)
 
 	if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (dlg->combo), &iter))
 	{
-		gtk_tree_model_get (gtk_combo_box_get_model (GTK_COMBO_BOX (dlg->combo)), &iter, 1, &name, -1);			
+		gtk_tree_model_get (gtk_combo_box_get_model (GTK_COMBO_BOX (dlg->combo)), &iter, 1, &name, -1);
 	}
 	else
 	{
 		GtkWidget* entry = gtk_bin_get_child (GTK_BIN (dlg->combo));
 		name = g_strdup(gtk_entry_get_text (GTK_ENTRY (entry)));
 	}
-	
+
 	if (*name == '\0')
 	{
 		/* Configuration name is mandatory disable Ok button */
@@ -262,19 +262,19 @@ on_select_configuration (GtkComboBox *widget, gpointer user_data)
 	{
 		BuildConfiguration *cfg;
 		gchar *uri;
-		
+
 		gtk_widget_set_sensitive (dlg->ok, TRUE);
-	
+
 		cfg = build_configuration_list_select (dlg->config_list, name);
-		
+
 		if (cfg != NULL)
 		{
 			const gchar *args;
 			GList *item;
 
-			args = build_configuration_get_args (cfg); 
+			args = build_configuration_get_args (cfg);
 			gtk_entry_set_text (GTK_ENTRY (dlg->args), args == NULL ? "" : args);
-		
+
 			uri = build_configuration_list_get_build_uri (dlg->config_list, cfg);
 			build_gtk_file_chooser_create_and_set_uri (GTK_FILE_CHOOSER (dlg->build_dir_chooser), uri);
 			g_free (uri);
@@ -289,7 +289,7 @@ on_select_configuration (GtkComboBox *widget, gpointer user_data)
 	g_free (name);
 }
 
-static void 
+static void
 fill_dialog (BuildConfigureDialog *dlg)
 {
 	GtkListStore* store = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_STRING);
@@ -297,11 +297,11 @@ fill_dialog (BuildConfigureDialog *dlg)
 
 	gtk_combo_box_set_model (GTK_COMBO_BOX(dlg->combo), GTK_TREE_MODEL(store));
 	gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX (dlg->combo), 0);
-	
+
 	for (cfg = build_configuration_list_get_first (dlg->config_list); cfg != NULL; cfg = build_configuration_next (cfg))
 	{
 		GtkTreeIter iter;
-		
+
 		gtk_list_store_append (store, &iter);
 		gtk_list_store_set (store, &iter, 0, build_configuration_get_translated_name (cfg), 1, build_configuration_get_name (cfg), -1);
 	}
@@ -320,7 +320,7 @@ build_dialog_configure (GtkWindow* parent, const gchar *project_root_uri, BuildC
 	BuildConfigureDialog dlg;
 	BuildConfiguration *cfg = NULL;
 	gint response;
-	
+
 	/* Get all dialog widgets */
 	bxml = anjuta_util_builder_new (BUILDER_FILE, NULL);
 	if (bxml == NULL) return FALSE;
@@ -334,17 +334,17 @@ build_dialog_configure (GtkWindow* parent, const gchar *project_root_uri, BuildC
 	    OK_BUTTON, &dlg.ok,
 	    NULL);
 	g_object_unref (bxml);
-	
+
 	dlg.config_list = config_list;
 	dlg.project_uri = project_root_uri;
 
-	/* Set run autogen option */	
+	/* Set run autogen option */
 	if (*run_autogen) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dlg.autogen), TRUE);
 
 	g_signal_connect (dlg.combo, "changed", G_CALLBACK (on_select_configuration), &dlg);
-	
+
 	fill_dialog(&dlg);
-	
+
 	response = gtk_dialog_run (GTK_DIALOG (dlg.win));
 
 	if (response == GTK_RESPONSE_OK)
@@ -356,10 +356,10 @@ build_dialog_configure (GtkWindow* parent, const gchar *project_root_uri, BuildC
 		gchar **mod_var;
 
 		*run_autogen = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dlg.autogen));
-		
+
 		if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (dlg.combo), &iter))
 		{
-			gtk_tree_model_get (gtk_combo_box_get_model (GTK_COMBO_BOX (dlg.combo)), &iter, 1, &name, -1);			
+			gtk_tree_model_get (gtk_combo_box_get_model (GTK_COMBO_BOX (dlg.combo)), &iter, 1, &name, -1);
 		}
 		else
 		{
@@ -368,10 +368,10 @@ build_dialog_configure (GtkWindow* parent, const gchar *project_root_uri, BuildC
 		}
 		cfg = build_configuration_list_create (config_list, name);
 		g_free (name);
-		
+
 		args = gtk_entry_get_text (GTK_ENTRY (dlg.args));
 		build_configuration_set_args (cfg, args);
-		
+
 		uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (dlg.build_dir_chooser));
 		build_configuration_list_set_build_uri (dlg.config_list, cfg, uri);
 		build_gtk_file_chooser_keep_folder (GTK_FILE_CHOOSER (dlg.build_dir_chooser), uri);
diff --git a/plugins/build-basic-autotools/build-options.h b/plugins/build-basic-autotools/build-options.h
index aa381e9..eaf26d3 100644
--- a/plugins/build-basic-autotools/build-options.h
+++ b/plugins/build-basic-autotools/build-options.h
@@ -17,7 +17,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */
- 
+
 #ifndef BUILD_OPTIONS_H
 #define BUILD_OPTIONS_H
 
diff --git a/plugins/build-basic-autotools/configuration-list.c b/plugins/build-basic-autotools/configuration-list.c
index dd2c604..6a2c68f 100644
--- a/plugins/build-basic-autotools/configuration-list.c
+++ b/plugins/build-basic-autotools/configuration-list.c
@@ -82,15 +82,15 @@ build_escape_string (const char *unescaped)
 {
  	static const gchar hex[16] = "0123456789ABCDEF";
 	GString *esc;
-	
+
  	g_return_val_if_fail (unescaped != NULL, NULL);
 
-	esc = g_string_sized_new (strlen (unescaped) + 16);	
-  
+	esc = g_string_sized_new (strlen (unescaped) + 16);
+
 	for (; *unescaped != '\0'; unescaped++)
 	{
 		guchar c = *unescaped;
-		
+
 		if (g_ascii_isalnum (c) || (c == '_') || (c == '-') || (c == '.'))
 		{
 			g_string_append_c (esc, c);
@@ -102,7 +102,7 @@ build_escape_string (const char *unescaped)
 	  		g_string_append_c (esc, hex[c & 0xf]);
 		}
 	}
-	
+
 	return g_string_free (esc, FALSE);
 }
 
@@ -111,10 +111,10 @@ build_unescape_string (const gchar *escaped)
 {
 	gchar *unesc;
 	gchar *end;
-  
+
  	if (escaped == NULL)
 		return NULL;
-  
+
 	unesc = g_new (gchar, strlen (escaped) + 1);
 	end = unesc;
 
@@ -132,7 +132,7 @@ build_unescape_string (const gchar *escaped)
 		}
 	}
 	*end = '\0';
-	
+
 	return unesc;
 }
 
@@ -143,11 +143,11 @@ static void
 build_configuration_list_free_list (BuildConfigurationList *list)
 {
 	BuildConfiguration *cfg;
-	
+
 	for (cfg = list->cfg; cfg != NULL;)
 	{
 		BuildConfiguration *next = cfg->next;
-		
+
 		if (cfg->args) g_free (cfg->args);
 		g_list_foreach (cfg->env, (GFunc)g_free, NULL);
 		g_list_free (cfg->env);
@@ -156,19 +156,19 @@ build_configuration_list_free_list (BuildConfigurationList *list)
 		g_free (cfg);
 		cfg = next;
 	}
-	list->cfg = NULL;	
+	list->cfg = NULL;
 }
 
 static BuildConfiguration *
 build_configuration_list_untranslated_get (BuildConfigurationList *list, const gchar *name)
 {
 	BuildConfiguration *cfg;
-		
+
 	for (cfg = build_configuration_list_get_first (list); cfg != NULL; cfg = build_configuration_next (cfg))
 	{
 		if (strcmp (cfg->name, name) == 0) return cfg;
 	}
-	
+
 	return NULL;
 }
 
@@ -191,12 +191,12 @@ BuildConfiguration *
 build_configuration_list_get (BuildConfigurationList *list, const gchar *name)
 {
 	BuildConfiguration *cfg;
-		
+
 	for (cfg = build_configuration_list_get_first (list); cfg != NULL; cfg = build_configuration_next (cfg))
 	{
 		if (strcmp (cfg->name, name) == 0) return cfg;
 	}
-	
+
 	return NULL;
 }
 
@@ -211,13 +211,13 @@ build_configuration_list_get_position (BuildConfigurationList *list, BuildConfig
 {
 	BuildConfiguration *node;
 	gint position = 0;
-	
+
 	for (node = build_configuration_list_get_first (list); node != NULL; node = node->next)
 	{
 		if (node == cfg) return position;
 		position++;
 	}
-	
+
 	return -1;
 }
 
@@ -228,7 +228,7 @@ build_configuration_list_select (BuildConfigurationList *list, const gchar *name
 
 	if (name != NULL) cfg = build_configuration_list_get (list, name);
 	list->selected = cfg;
-	
+
 	return list->selected;
 }
 
@@ -239,7 +239,7 @@ build_configuration_list_create (BuildConfigurationList *list, const gchar *name
 	BuildConfiguration *prev;
 
 	if (name == NULL) return NULL;
-	
+
 	cfg = build_configuration_list_get (list, name);
 	if (cfg == NULL)
 	{
@@ -256,43 +256,43 @@ build_configuration_list_create (BuildConfigurationList *list, const gchar *name
 		}
 	}
 	list->selected = cfg;
-	
+
 	return list->selected;
 }
 
-void 
+void
 build_configuration_list_from_string_list (BuildConfigurationList *list, GList *str_list)
 {
 	GList *node;
 	BuildConfiguration *prev = NULL;
 	const DefaultBuildConfiguration *dcfg;
-	
+
 	build_configuration_list_free_list (list);
-	
+
 	/* Read all configurations from list */
 	for (node = str_list; node != NULL; node = g_list_next(node))
 	{
 		BuildConfiguration *cfg = g_new0 (BuildConfiguration, 1);
 		gchar *str = (gchar *)node->data;
 		gchar *end;
-		
+
 		cfg->translate = *str == '1';
 		str += 2;
 		end = strchr (str, ':');
 		if (end != NULL)
 		{
 			gchar *name;
-			
+
 			*end = '\0';
 			name = build_unescape_string (str);
 			cfg->name = name;
 			str = end + 1;
-			
+
 			cfg->build_uri = *str == '\0' ? NULL : g_strdup (str);
-			
+
 			cfg->args = NULL;
 			cfg->env = NULL;
-			
+
 			cfg->next = NULL;
 			cfg->prev = prev;
 			if (prev == NULL)
@@ -310,12 +310,12 @@ build_configuration_list_from_string_list (BuildConfigurationList *list, GList *
 			g_free (cfg);
 		}
 	}
-	
+
 	/* Add default entry if missing */
 	for (dcfg = default_config; dcfg->name != NULL; dcfg++)
 	{
 		BuildConfiguration *cfg;
-		
+
 		cfg = build_configuration_list_untranslated_get (list, dcfg->name);
 		if (cfg == NULL)
 		{
@@ -352,20 +352,20 @@ build_configuration_list_from_string_list (BuildConfigurationList *list, GList *
 			}
 			cfg->env = g_list_reverse (cfg->env);
 		}
-	}	
+	}
 }
 
-GList * 
+GList *
 build_configuration_list_to_string_list (BuildConfigurationList *list)
 {
 	GList *str_list = NULL;
 	BuildConfiguration *cfg;
-	
+
 	for (cfg = build_configuration_list_get_first (list); cfg != NULL; cfg = build_configuration_next (cfg))
 	{
 		gchar *esc_name = build_escape_string (cfg->name);
 		str_list = g_list_prepend (str_list, g_strdup_printf("%c:%s:%s", cfg->translate ? '1' : '0', esc_name, cfg->build_uri == NULL ? "" : cfg->build_uri));
-		g_free (esc_name);							   
+		g_free (esc_name);
 	}
 	str_list = g_list_reverse (str_list);
 
@@ -394,18 +394,18 @@ build_configuration_get_name (BuildConfiguration *cfg)
 	return cfg->name;
 }
 
-gboolean 
+gboolean
 build_configuration_list_set_build_uri (BuildConfigurationList *list, BuildConfiguration *cfg, const gchar *build_uri)
 {
 	GFile *root;
 	GFile *build;
 	gchar *rel_uri;
 	gboolean ok;
-	
+
 	g_free (cfg->build_uri);
 	root = g_file_new_for_uri (list->project_root_uri);
 	build = g_file_new_for_uri (build_uri);
-	
+
 	rel_uri = g_file_get_relative_path (root, build);
 	/* rel_uri could be NULL if root == build */
 	cfg->build_uri = rel_uri;
@@ -424,15 +424,15 @@ build_configuration_list_get_build_uri (BuildConfigurationList *list, BuildConfi
 		GFile *root;
 		GFile *build;
 		gchar *uri;
-	
+
 		root = g_file_new_for_uri (list->project_root_uri);
 		build = g_file_resolve_relative_path (root, cfg->build_uri);
-	
+
 		uri = g_file_get_uri (build);
-	
+
 		g_object_unref (root);
 		g_object_unref (build);
-		
+
 		return uri;
 	}
 	else
@@ -480,7 +480,7 @@ build_configuration_set_variable (BuildConfiguration *cfg, const gchar *var)
 	{
 		len = equal - var;
 	}
-	
+
 	/* Check if variable already exist */
 	for (item = cfg->env; item != NULL; item = g_list_next (item))
 	{
@@ -510,7 +510,7 @@ build_configuration_list_free (BuildConfigurationList *list)
 	g_free (list->project_root_uri);
 
 	build_configuration_list_free_list (list);
-	
+
 	g_free (list);
 }
 
@@ -518,8 +518,8 @@ BuildConfigurationList*
 build_configuration_list_new (void)
 {
 	BuildConfigurationList *list;
-	
+
 	list = g_new0 (BuildConfigurationList, 1);
-	
+
 	return list;
 }
diff --git a/plugins/build-basic-autotools/configuration-list.h b/plugins/build-basic-autotools/configuration-list.h
index 9f9ddc1..a138a55 100644
--- a/plugins/build-basic-autotools/configuration-list.h
+++ b/plugins/build-basic-autotools/configuration-list.h
@@ -17,7 +17,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */
- 
+
 #ifndef CONFIGURATION_LIST_H
 #define CONFIGURATION_LIST_H
 
diff --git a/plugins/build-basic-autotools/executer.c b/plugins/build-basic-autotools/executer.c
index a6273c4..eabe5bb 100644
--- a/plugins/build-basic-autotools/executer.c
+++ b/plugins/build-basic-autotools/executer.c
@@ -53,14 +53,14 @@ get_program_parameters (BasicAutotoolsPlugin *plugin,
 	GList *exec_targets;
 	IAnjutaProjectManager *pm;
 	gboolean success = FALSE;
-	
+
 	if (plugin->project_root_dir)
 	{
 		pm = anjuta_shell_get_interface (ANJUTA_PLUGIN (plugin)->shell,
 										 IAnjutaProjectManager, NULL);
 		g_return_val_if_fail (pm != NULL, FALSE);
 		exec_targets =
-		ianjuta_project_manager_get_targets (pm, 
+		ianjuta_project_manager_get_targets (pm,
 							ANJUTA_PROJECT_TARGET | ANJUTA_PROJECT_EXECUTABLE,
                             NULL);
 		if (!exec_targets)
@@ -85,7 +85,7 @@ get_program_parameters (BasicAutotoolsPlugin *plugin,
 	    "program_arguments", &arguments_entry,
 	    NULL);
 	g_object_unref (bxml);
-	
+
 	gtk_window_set_transient_for (GTK_WINDOW (dlg),
 								  GTK_WINDOW (ANJUTA_PLUGIN(plugin)->shell));
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (use_terminal_check),
@@ -93,7 +93,7 @@ get_program_parameters (BasicAutotoolsPlugin *plugin,
 	if (plugin->program_args)
 		gtk_entry_set_text (GTK_ENTRY (arguments_entry),
 							plugin->program_args);
-	
+
 	if (g_list_length (exec_targets) > 0)
 	{
 		/* Populate treeview */
@@ -112,19 +112,19 @@ get_program_parameters (BasicAutotoolsPlugin *plugin,
             gchar *uri;
 
 			rel_path = g_file_get_relative_path (plugin->project_root_dir, (GFile *)node->data);
-			
+
             uri = g_file_get_uri ((GFile *)node->data);
 			gtk_list_store_append (store, &iter);
 			gtk_list_store_set (store, &iter, 0, rel_path, 1,
 								uri, -1);
-      
+
       if (plugin->last_exec_uri && g_str_equal (plugin->last_exec_uri, uri))
-      { 
+      {
 				GtkTreePath* path = gtk_tree_model_get_path (GTK_TREE_MODEL (store), &iter);
         gtk_tree_selection_select_iter (selection, &iter);
 
 				gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (treeview), path, NULL, FALSE, 0, 0);
-				
+
 				gtk_tree_path_free (path);
         g_free (plugin->last_exec_uri);
         plugin->last_exec_uri = NULL;
@@ -136,7 +136,7 @@ get_program_parameters (BasicAutotoolsPlugin *plugin,
 			node = g_list_next (node);
 		}
 		g_list_free (exec_targets);
-		
+
 		column = gtk_tree_view_column_new ();
 		gtk_tree_view_column_set_sizing (column,
 										 GTK_TREE_VIEW_COLUMN_AUTOSIZE);
@@ -148,7 +148,7 @@ get_program_parameters (BasicAutotoolsPlugin *plugin,
 											0);
 		gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column);
 		gtk_tree_view_set_expander_column (GTK_TREE_VIEW (treeview), column);
-                   
+
     if (!gtk_tree_selection_get_selected (selection, NULL, &iter))
     {
       gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter);
@@ -160,7 +160,7 @@ get_program_parameters (BasicAutotoolsPlugin *plugin,
 		gtk_widget_hide (treeview_frame);
 		gtk_window_set_default_size (GTK_WINDOW (dlg), 400, -1);
 	}
-	
+
 	/* Run dialog */
 	gtk_dialog_set_default_response (GTK_DIALOG(dlg), GTK_RESPONSE_OK);
   response = gtk_dialog_run (GTK_DIALOG (dlg));
@@ -169,7 +169,7 @@ get_program_parameters (BasicAutotoolsPlugin *plugin,
 		GtkTreeSelection *sel;
 		GtkTreeModel *model;
 		gchar *target = NULL;
-		
+
 		if (exec_targets)
 		{
 			sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
@@ -201,7 +201,7 @@ get_program_parameters (BasicAutotoolsPlugin *plugin,
 		}
 	}
 	gtk_widget_destroy (dlg);
-	
+
 	return success;
 }
 
@@ -214,7 +214,7 @@ execute_program (BasicAutotoolsPlugin* plugin, const gchar *pre_select_uri)
 	g_return_if_fail (pre_select_uri != NULL ||
 					  plugin->project_root_dir != NULL ||
 					  plugin->current_editor_file != NULL);
-	
+
 	error_condition = FALSE;
 	if (pre_select_uri)
 	{
@@ -245,7 +245,7 @@ execute_program (BasicAutotoolsPlugin* plugin, const gchar *pre_select_uri)
 			else
 			{
 				gchar *ext;
-				
+
 				target = g_file_get_path (plugin->current_editor_file);
 				ext = strrchr (target, '.');
 				if (ext)
@@ -260,7 +260,7 @@ execute_program (BasicAutotoolsPlugin* plugin, const gchar *pre_select_uri)
 			}
 		}
 	}
-	
+
 	/* Doing some checks before actualing starting */
 	if (!error_condition)
 	{
@@ -271,10 +271,10 @@ execute_program (BasicAutotoolsPlugin* plugin, const gchar *pre_select_uri)
 			plugin->program_args = g_strdup (args);
 		}
 		plugin->run_in_terminal = run_in_terminal;
-		
+
 		/* Check if target is local */
 		gchar *local_uri;
-		
+
 		local_uri = anjuta_util_get_local_path_from_uri (target);
 		if (local_uri == NULL)
 		{
@@ -289,7 +289,7 @@ execute_program (BasicAutotoolsPlugin* plugin, const gchar *pre_select_uri)
 			target = local_uri;
 		}
 	}
-	
+
 	if (!error_condition &&
 		g_file_test (target, G_FILE_TEST_EXISTS) == FALSE)
 	{
@@ -297,7 +297,7 @@ execute_program (BasicAutotoolsPlugin* plugin, const gchar *pre_select_uri)
 		anjuta_util_dialog_error (GTK_WINDOW (ANJUTA_PLUGIN (plugin)->shell),
 								  _("Program '%s' does not exist"), target);
 	}
-	
+
 	if (!error_condition &&
 		g_file_test (target, G_FILE_TEST_IS_EXECUTABLE) == FALSE)
 	{
@@ -306,7 +306,7 @@ execute_program (BasicAutotoolsPlugin* plugin, const gchar *pre_select_uri)
 								  _("Program '%s' does not have execution permission"),
 								  target);
 	}
-	
+
 	if (!error_condition &&
 		plugin->project_root_dir == NULL &&
 		pre_select_uri == NULL)
@@ -316,10 +316,10 @@ execute_program (BasicAutotoolsPlugin* plugin, const gchar *pre_select_uri)
 		gint s_re, e_re;
 		struct stat s_stat, e_stat;
 		IAnjutaEditor *te;
-		
+
 		anjuta_shell_get (ANJUTA_PLUGIN (plugin)->shell, "current_editor",
 						  G_TYPE_OBJECT, &te, NULL);
-		
+
 		filename = anjuta_util_get_local_path_from_uri (target);
 		prog = NULL;
 		prog = g_strdup (filename);
@@ -330,7 +330,7 @@ execute_program (BasicAutotoolsPlugin* plugin, const gchar *pre_select_uri)
 		e_re = stat (prog, &e_stat);
 		g_free (prog);
 		g_free (filename);
-		
+
 		if ((e_re != 0) || (s_re != 0))
 		{
 			error_condition = TRUE;
@@ -346,15 +346,15 @@ execute_program (BasicAutotoolsPlugin* plugin, const gchar *pre_select_uri)
 			/* But continue execution */
 		}
 	}
-	
+
 	if (error_condition)
 	{
 		g_free (target);
 		g_free (args);
 		return;
 	}
-	
-	
+
+
 	if (args && strlen (args) > 0)
 		cmd = g_strconcat (target, " ", args, NULL);
 	else
@@ -365,12 +365,12 @@ execute_program (BasicAutotoolsPlugin* plugin, const gchar *pre_select_uri)
 	if (run_in_terminal)
 	{
 		IAnjutaTerminal *term;
-		
+
 		term = anjuta_shell_get_interface (ANJUTA_PLUGIN (plugin)->shell,
 										   IAnjutaTerminal, NULL);
 		if (term)
 		{
-			
+
 
 			if (plugin->commands[IANJUTA_BUILDABLE_COMMAND_EXECUTE])
 			{
@@ -386,7 +386,7 @@ execute_program (BasicAutotoolsPlugin* plugin, const gchar *pre_select_uri)
 				if (launcher_path != NULL)
 				{
 					gchar* oldcmd = cmd;
-				
+
 					cmd = g_strconcat ("anjuta-launcher ", oldcmd, NULL);
 
 					g_free (oldcmd);
@@ -396,7 +396,7 @@ execute_program (BasicAutotoolsPlugin* plugin, const gchar *pre_select_uri)
 				{
 					DEBUG_PRINT("%s", "Missing anjuta-launcher");
 				}
-				
+
 			}
 
 			ianjuta_terminal_execute_command (term, dir, cmd, NULL, NULL);
@@ -410,7 +410,7 @@ execute_program (BasicAutotoolsPlugin* plugin, const gchar *pre_select_uri)
 	{
 		anjuta_util_execute_shell (dir, cmd);
 	}
-	
+
 	g_free (dir);
 	g_free (cmd);
 	g_free (target);
diff --git a/plugins/build-basic-autotools/plugin.h b/plugins/build-basic-autotools/plugin.h
index 865420f..6dbf8f5 100644
--- a/plugins/build-basic-autotools/plugin.h
+++ b/plugins/build-basic-autotools/plugin.h
@@ -43,7 +43,7 @@ typedef struct _BasicAutotoolsPluginClass BasicAutotoolsPluginClass;
 
 struct _BasicAutotoolsPlugin{
 	AnjutaPlugin parent;
-	
+
 	/* Build contexts pool */
 	GList *contexts_pool;
 
@@ -53,7 +53,7 @@ struct _BasicAutotoolsPlugin{
 	gint project_root_watch_id;
 	gint project_build_watch_id;
 	gint editor_watch_id;
-	
+
 	/* Watched values */
 	GFile *fm_current_file;
 	GFile *pm_current_file;
@@ -61,24 +61,24 @@ struct _BasicAutotoolsPlugin{
 	GFile *project_root_dir;
 	GFile *project_build_dir;
 	IAnjutaEditor *current_editor;
-	
+
 	/* UI */
 	gint build_merge_id;
 	GtkActionGroup *build_action_group;
 	GtkActionGroup *build_popup_action_group;
 	GtkWidget *configuration_menu;
-	
+
 	/* commands overrides */
 	gchar *commands[IANJUTA_BUILDABLE_N_COMMANDS];
-	
+
 	/* Build parameters */
 	BuildConfigurationList *configurations;
-	
+
 	/* Execution parameters */
 	gchar *program_args;
 	gboolean run_in_terminal;
 	gchar *last_exec_uri;
-	
+
 	/* Editors that have been created so far */
 	GHashTable *editors_created;
 
diff --git a/plugins/build-basic-autotools/program.c b/plugins/build-basic-autotools/program.c
index 6599bc3..6882f7b 100644
--- a/plugins/build-basic-autotools/program.c
+++ b/plugins/build-basic-autotools/program.c
@@ -52,7 +52,7 @@ build_strv_insert_before (gchar ***pstrv, gint pos)
 {
 	gsize count;
 	gchar **strv = *pstrv;
-	
+
 	if (strv == NULL)
 	{
 		/* First argument, allocate memory */
@@ -63,7 +63,7 @@ build_strv_insert_before (gchar ***pstrv, gint pos)
 	else
 	{
 		gchar **new_strv;
-		
+
 		/* Increase array */
 		count = g_strv_length (strv);
 
@@ -77,10 +77,10 @@ build_strv_insert_before (gchar ***pstrv, gint pos)
 		strv = new_strv;
 		count++;
 	}
-	
+
 	strv[count] = NULL;
 	*pstrv = strv;
-	
+
 	return &strv[pos];
 }
 
@@ -88,20 +88,20 @@ static gboolean
 build_strv_remove (gchar **strv, gint pos)
 {
 	gsize count = g_strv_length (strv);
-	
+
 	g_return_val_if_fail (pos >= 0, FALSE);
 
 	if (pos >= count)
 	{
 		/* Argument does not exist */
-		
+
 		return FALSE;
 	}
 	else
 	{
 		g_free (strv[pos]);
 		memcpy (&strv[pos], &strv[pos + 1], sizeof(gchar *) * (count - pos));
-		
+
 		return TRUE;
 	}
 }
@@ -117,7 +117,7 @@ build_program_find_env (BuildProgram *prog, const gchar *name)
 		gint i;
 		gchar **envp = prog->envp;
 		gsize len = strlen (name);
-		
+
 		/* Look for an already existing variable */
 		for (i = 0; envp[i] != NULL; i++)
 		{
@@ -127,7 +127,7 @@ build_program_find_env (BuildProgram *prog, const gchar *name)
 			}
 		}
 	}
-	
+
 	return -1;
 }
 
@@ -139,22 +139,22 @@ build_program_set_command (BuildProgram *prog, const gchar *command)
 {
 	gboolean ok;
 	gchar **arg;
-	
+
 	g_return_val_if_fail (prog != NULL, FALSE);
 
 	if (prog->argv) g_strfreev (prog->argv);
-	
+
 	/* Store args and environment variables as string array */
 	ok = g_shell_parse_argv (command, NULL, &prog->argv, NULL) ? TRUE : FALSE;
 	for (arg = prog->argv; *arg != NULL; arg++)
 	{
 		gchar *new_arg;
-		
+
 		new_arg = anjuta_util_shell_expand (*arg);
 		g_free (*arg);
 		*arg = new_arg;
 	}
-	
+
 	return TRUE;
 }
 
@@ -162,11 +162,11 @@ const gchar *
 build_program_get_basename (BuildProgram *prog)
 {
 	const gchar *base;
-	
+
 	if ((prog->argv == NULL) || (prog->argv[0] == NULL)) return NULL;
 
 	base = strrchr (prog->argv[0], G_DIR_SEPARATOR);
-	
+
 	return base == NULL ? prog->argv[0] : base;
 }
 
@@ -175,7 +175,7 @@ void
 build_program_set_working_directory (BuildProgram *prog, GFile *directory)
 {
 	g_free (prog->work_dir);
-	
+
 	prog->work_dir = g_file_get_path (directory);
 }
 
@@ -184,10 +184,10 @@ gboolean
 build_program_insert_arg (BuildProgram *prog, gint pos, const gchar *arg)
 {
 	gchar **parg;
-	
+
 	parg = build_strv_insert_before (&prog->argv, pos);
 	*parg = anjuta_util_shell_expand (arg);
-	
+
 	return TRUE;
 }
 
@@ -203,7 +203,7 @@ build_program_replace_arg (BuildProgram *prog, gint pos, const gchar *arg)
 		g_free (prog->argv[pos]);
 		prog->argv[pos] = anjuta_util_shell_expand (arg);
 	}
-	
+
 	return TRUE;
 }
 
@@ -237,7 +237,7 @@ build_program_add_env_list (BuildProgram *prog, GList *vars)
 		{
 			value = NULL;
 		}
-		
+
 		ok = ok && build_program_add_env (prog, name, value);
 		g_free (name);
 	}
@@ -251,7 +251,7 @@ build_program_add_env (BuildProgram *prog, const gchar *name, const gchar *value
 {
 	gint found = build_program_find_env (prog, name);
 	gchar *name_and_value = g_strconcat (name, "=", value, NULL);
-	
+
 	if (found == -1)
 	{
 		/* Append variable */
@@ -261,7 +261,7 @@ build_program_add_env (BuildProgram *prog, const gchar *name, const gchar *value
 	{
 		g_free (prog->envp[found]);
 		prog->envp[found] = name_and_value;
-	}		
+	}
 	return TRUE;
 }
 
@@ -285,9 +285,9 @@ build_program_override (BuildProgram *prog, IAnjutaEnvironment *env)
 {
 	gboolean ok;
 	GError* error = NULL;
-	
+
 	if (env == NULL) return TRUE;
-	
+
 	ok = ianjuta_environment_override (env, &prog->work_dir, &prog->argv, &prog->envp, &error);
 	if (!ok && error)
 	{
@@ -304,7 +304,7 @@ build_program_override (BuildProgram *prog, IAnjutaEnvironment *env)
 		g_error_free (error);
 	}
 	return ok;
-}	
+}
 
 void
 build_program_set_callback (BuildProgram *prog, IAnjutaBuilderCallback callback, gpointer user_data)
@@ -326,17 +326,17 @@ void build_program_callback (BuildProgram *prog, GObject *sender, IAnjutaBuilder
 /* Constructor & Destructor
  *---------------------------------------------------------------------------*/
 
-BuildProgram* 
+BuildProgram*
 build_program_new (void)
 {
 	BuildProgram *prog ;
-	
+
 	prog = g_new0 (BuildProgram, 1);
-	
+
 	return prog;
 }
 
-BuildProgram* 
+BuildProgram*
 build_program_new_with_command (GFile *directory, const gchar *command,...)
 {
 	BuildProgram *prog;
@@ -354,9 +354,9 @@ build_program_new_with_command (GFile *directory, const gchar *command,...)
 	va_start (args, command);
 	full_command = g_strdup_vprintf (command, args);
 	va_end (args);
-	build_program_set_command (prog, full_command);	
+	build_program_set_command (prog, full_command);
 	g_free (full_command);
-	
+
 	return prog;
 }
 
@@ -366,13 +366,13 @@ build_program_free (BuildProgram *prog)
 	if (prog->callback != NULL)
 	{
 		GError *err;
-		
+
 		/* Emit command-finished signal abort */
 		err = g_error_new_literal (ianjuta_builder_error_quark (),
 								   IANJUTA_BUILDER_ABORTED,
 								   _("Command aborted"));
 		prog->callback (NULL, NULL, err, prog->user_data);
-		g_error_free (err);		
+		g_error_free (err);
 	}
 	g_free (prog->work_dir);
 	if (prog->argv) g_strfreev (prog->argv);
diff --git a/plugins/build-basic-autotools/program.h b/plugins/build-basic-autotools/program.h
index a3caeac..bfedd84 100644
--- a/plugins/build-basic-autotools/program.h
+++ b/plugins/build-basic-autotools/program.h
@@ -17,7 +17,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */
- 
+
 #ifndef PROGRAM_H
 #define PROGRAM_H
 
@@ -33,7 +33,7 @@ struct _BuildProgram
 	gchar *work_dir;
 	gchar **argv;
 	gchar **envp;
-	
+
 	IAnjutaBuilderCallback callback;
 	gpointer user_data;
 };
@@ -58,6 +58,6 @@ gboolean build_program_remove_env (BuildProgram *proc, const gchar *name);
 gboolean build_program_override (BuildProgram *proc, IAnjutaEnvironment *env);
 
 void build_program_set_callback (BuildProgram *proc, IAnjutaBuilderCallback callback, gpointer user_data);
-void build_program_callback (BuildProgram *proc, GObject *sender, IAnjutaBuilderHandle handle, GError *err); 
+void build_program_callback (BuildProgram *proc, GObject *sender, IAnjutaBuilderHandle handle, GError *err);
 
 #endif /* PROGRAM_H */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]