Remove extra whitespace at end of lines in all source files.
* Processed with rstrip-whitespace.py script added to scripts/ directory. * Script run on all .c and .h files in src/ and plugins/ directories. * Also remove more than one newline at the end of files.
This commit is contained in:
parent
182bdc3b17
commit
bd5fba7eb5
@ -805,5 +805,3 @@ void plugin_cleanup(void)
|
||||
if (config_file != NULL)
|
||||
g_free(config_file);
|
||||
}
|
||||
|
||||
|
||||
|
23
scripts/rstrip-whitespace.py
Executable file
23
scripts/rstrip-whitespace.py
Executable file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
|
||||
filenames = sys.argv[1:]
|
||||
|
||||
def backup_file (fn):
|
||||
open ("%s~" % fn, "w").write (open (fn, "r").read ())
|
||||
|
||||
for fn in filenames:
|
||||
#backup_file (fn)
|
||||
contents = open (fn, "r").read ()
|
||||
lines = contents.split ('\n')
|
||||
with open (fn, "w") as fobj:
|
||||
for line in lines:
|
||||
line = line.rstrip ()
|
||||
fobj.write ("%s\n" % line)
|
||||
contents = open (fn, "r").read ()
|
||||
contents.rstrip ()
|
||||
while contents[-1] in " \t\r\n":
|
||||
contents = contents[:-1]
|
||||
open (fn, "w").write ("%s\n" % contents)
|
||||
|
@ -2767,5 +2767,3 @@ void build_init(void)
|
||||
/* set the submenu to the toolbar item */
|
||||
geany_menu_button_action_set_menu(GEANY_MENU_BUTTON_ACTION(widgets.build_action), toolmenu);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1703,5 +1703,3 @@ gint dialogs_show_prompt(GtkWidget *parent,
|
||||
g_free(string);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1736,4 +1736,3 @@ const gchar *filetypes_get_display_name(GeanyFiletype *ft)
|
||||
{
|
||||
return ft->id == GEANY_FILETYPES_NONE ? _("None") : ft->name;
|
||||
}
|
||||
|
||||
|
2
src/gb.c
2
src/gb.c
@ -1811,5 +1811,3 @@ static gboolean gb_on_key_pressed(GtkWidget *widget, GdkEventKey *event, gpointe
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -184,4 +184,3 @@ GtkAction *geany_entry_action_new(const gchar *name, const gchar *label,
|
||||
|
||||
return action;
|
||||
}
|
||||
|
||||
|
@ -369,4 +369,3 @@ GObject *geany_object_new(void)
|
||||
{
|
||||
return g_object_new(GEANY_OBJECT_TYPE, NULL);
|
||||
}
|
||||
|
||||
|
@ -3978,4 +3978,3 @@ gboolean highlighting_is_code_style(gint lexer, gint style)
|
||||
return !(highlighting_is_comment_style(lexer, style) ||
|
||||
highlighting_is_string_style(lexer, style));
|
||||
}
|
||||
|
||||
|
@ -1689,4 +1689,3 @@ static const guint8 save_all_tango_inline[] =
|
||||
"\0\0\0\12\0\0\0\12\0\0\0\12\0\0\0\12\0\0\0\12\0\0\0\12\0\0\0\12\0\0\0"
|
||||
"\7\0\0\0\4\0\0\0\2\377\377\377\0\377\377\377\0\377\377\377\0\377\377"
|
||||
"\377\0"};
|
||||
|
||||
|
@ -5816,4 +5816,3 @@ create_project_dialog (void)
|
||||
|
||||
return project_dialog;
|
||||
}
|
||||
|
||||
|
@ -1209,5 +1209,3 @@ void msgwin_clear_tab(gint tabnum)
|
||||
return;
|
||||
gtk_list_store_clear(store);
|
||||
}
|
||||
|
||||
|
||||
|
@ -505,5 +505,3 @@ on_window_drag_data_received(GtkWidget *widget, GdkDragContext *drag_context,
|
||||
}
|
||||
gtk_drag_finish(drag_context, success, FALSE, event_time);
|
||||
}
|
||||
|
||||
|
||||
|
@ -917,4 +917,3 @@ void printing_print_doc(GeanyDocument *doc)
|
||||
else
|
||||
print_external(doc);
|
||||
}
|
||||
|
||||
|
@ -788,5 +788,3 @@ gint socket_fd_write(gint fd, const gchar *buf, gint len)
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -2202,5 +2202,3 @@ void symbols_finalize(void)
|
||||
g_strfreev(html_entities);
|
||||
g_strfreev(c_tags_ignore);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1114,5 +1114,3 @@ void toolbar_configure(GtkWindow *parent)
|
||||
tb_editor_free_path(tbw);
|
||||
g_free(tbw);
|
||||
}
|
||||
|
||||
|
||||
|
@ -960,5 +960,3 @@ void tools_color_chooser(const gchar *color)
|
||||
gtk_window_present(GTK_WINDOW(ui_widgets.open_colorsel));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user