diff options
author | Jan-Michael Brummer <jan.brummer@tabos.org> | 2021-02-21 11:42:59 +0100 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@gnome.org> | 2021-02-21 14:29:43 +0000 |
commit | d56057f3d634da5cb17ed53276fcbf75dc04db15 (patch) | |
tree | bf12402153e84ffc449693c353a0ac27223142ad | |
parent | 964d1398f59daa9a6a98b4e9fd5821a3b55fd586 (diff) | |
download | epiphany-d56057f3d634da5cb17ed53276fcbf75dc04db15.tar.gz |
Update code style with new rule set
-rw-r--r-- | embed/ephy-reader-handler.c | 5 | ||||
-rw-r--r-- | lib/ephy-smaps.c | 57 | ||||
-rw-r--r-- | lib/ephy-sqlite-connection.c | 3 | ||||
-rw-r--r-- | lib/sync/ephy-password-import.c | 3 | ||||
-rw-r--r-- | lib/widgets/ephy-downloads-popover.c | 3 | ||||
-rw-r--r-- | lib/widgets/ephy-downloads-progress-icon.c | 3 | ||||
-rw-r--r-- | lib/widgets/ephy-security-popover.c | 11 | ||||
-rw-r--r-- | src/bookmarks/ephy-bookmarks-import.c | 7 | ||||
-rw-r--r-- | src/bookmarks/ephy-bookmarks-manager.c | 5 | ||||
-rw-r--r-- | src/search-provider/ephy-search-provider-main.c | 5 | ||||
-rw-r--r-- | src/webextension/ephy-web-extension-manager.c | 3 | ||||
-rw-r--r-- | src/webextension/ephy-web-extension.c | 5 | ||||
-rw-r--r-- | src/window-commands.c | 7 |
13 files changed, 71 insertions, 46 deletions
diff --git a/embed/ephy-reader-handler.c b/embed/ephy-reader-handler.c index e10604dd8..ef1422537 100644 --- a/embed/ephy-reader-handler.c +++ b/embed/ephy-reader-handler.c @@ -123,8 +123,9 @@ enum_nick (GType enum_type, } static -char *readability_get_property_string (WebKitJavascriptResult *js_result, - char *property) +char * +readability_get_property_string (WebKitJavascriptResult *js_result, + char *property) { JSCValue *jsc_value; char *result = NULL; diff --git a/lib/ephy-smaps.c b/lib/ephy-smaps.c index 0e229ccb6..ab85ae1e1 100644 --- a/lib/ephy-smaps.c +++ b/lib/ephy-smaps.c @@ -67,7 +67,8 @@ typedef enum { EPHY_PROCESS_OTHER } EphyProcess; -static const char *get_ephy_process_name (EphyProcess process) +static const char * +get_ephy_process_name (EphyProcess process) { switch (process) { case EPHY_PROCESS_EPIPHANY: @@ -84,7 +85,8 @@ static const char *get_ephy_process_name (EphyProcess process) return NULL; } -static void vma_free (VMA_t *vma) +static void +vma_free (VMA_t *vma) { g_free (vma->start); g_free (vma->end); @@ -105,13 +107,15 @@ static void vma_free (VMA_t *vma) g_free (vma); } -static void perm_entry_free (PermEntry *entry) +static void +perm_entry_free (PermEntry *entry) { g_free (entry); } -static void add_to_perm_entry (GHashTable *hash, - VMA_t *entry) +static void +add_to_perm_entry (GHashTable *hash, + VMA_t *entry) { const char *perms = entry->perms; PermEntry *value; @@ -138,8 +142,9 @@ static void add_to_perm_entry (GHashTable *hash, g_hash_table_insert (hash, g_strdup (perms), value); } -static void add_to_totals (PermEntry *entry, - PermEntry *totals) +static void +add_to_totals (PermEntry *entry, + PermEntry *totals) { totals->shared_clean += entry->shared_clean; totals->shared_dirty += entry->shared_dirty; @@ -147,9 +152,10 @@ static void add_to_totals (PermEntry *entry, totals->private_dirty += entry->private_dirty; } -static void print_vma_table (GString *str, - GHashTable *hash, - const char *caption) +static void +print_vma_table (GString *str, + GHashTable *hash, + const char *caption) { PermEntry *pentry, totals; @@ -192,10 +198,11 @@ static void print_vma_table (GString *str, g_string_append (str, "</table>"); } -static void ephy_smaps_pid_to_html (EphySMaps *smaps, - GString *str, - pid_t pid, - EphyProcess process) +static void +ephy_smaps_pid_to_html (EphySMaps *smaps, + GString *str, + pid_t pid, + EphyProcess process) { GFileInputStream *stream; GDataInputStream *data_stream; @@ -324,7 +331,8 @@ out: g_hash_table_unref (mapped_hash); } -static pid_t get_pid_from_proc_name (const char *name) +static pid_t +get_pid_from_proc_name (const char *name) { guint i; char *end_ptr = NULL; @@ -343,7 +351,8 @@ static pid_t get_pid_from_proc_name (const char *name) return pid; } -static pid_t get_parent_pid (pid_t pid) +static pid_t +get_parent_pid (pid_t pid) { char *path; char *data; @@ -381,7 +390,8 @@ static pid_t get_parent_pid (pid_t pid) return ppid; } -static EphyProcess get_ephy_process (pid_t pid) +static EphyProcess +get_ephy_process (pid_t pid) { char *path; char *data; @@ -414,9 +424,10 @@ static EphyProcess get_ephy_process (pid_t pid) return process; } -static void ephy_smaps_pid_children_to_html (EphySMaps *smaps, - GString *str, - pid_t parent_pid) +static void +ephy_smaps_pid_children_to_html (EphySMaps *smaps, + GString *str, + pid_t parent_pid) { GDir *proc; const char *name; @@ -447,7 +458,8 @@ static void ephy_smaps_pid_children_to_html (EphySMaps *smaps, g_dir_close (proc); } -char *ephy_smaps_to_html (EphySMaps *smaps) +char * +ephy_smaps_to_html (EphySMaps *smaps) { GString *str = g_string_new (""); pid_t pid = getpid (); @@ -492,7 +504,8 @@ ephy_smaps_class_init (EphySMapsClass *smaps_class) gobject_class->finalize = ephy_smaps_finalize; } -EphySMaps *ephy_smaps_new (void) +EphySMaps * +ephy_smaps_new (void) { return EPHY_SMAPS (g_object_new (EPHY_TYPE_SMAPS, NULL)); } diff --git a/lib/ephy-sqlite-connection.c b/lib/ephy-sqlite-connection.c index 18f1ab220..5a326c111 100644 --- a/lib/ephy-sqlite-connection.c +++ b/lib/ephy-sqlite-connection.c @@ -107,7 +107,8 @@ ephy_sqlite_connection_init (EphySQLiteConnection *self) self->database = NULL; } -GQuark ephy_sqlite_error_quark (void) +GQuark +ephy_sqlite_error_quark (void) { return g_quark_from_static_string ("ephy-sqlite"); } diff --git a/lib/sync/ephy-password-import.c b/lib/sync/ephy-password-import.c index 29ea4eb04..d7c30271e 100644 --- a/lib/sync/ephy-password-import.c +++ b/lib/sync/ephy-password-import.c @@ -41,7 +41,8 @@ typedef enum { PASSWORDS_IMPORT_ERROR_PASSWORDS = 1001 } PasswordsImportErrorCode; -const SecretSchema *libsecret_get_schema (void) +const SecretSchema * +libsecret_get_schema (void) { static const SecretSchema the_schema = { "chrome_libsecret_os_crypt_password_v2", diff --git a/lib/widgets/ephy-downloads-popover.c b/lib/widgets/ephy-downloads-popover.c index 6f558ba95..9711c0070 100644 --- a/lib/widgets/ephy-downloads-popover.c +++ b/lib/widgets/ephy-downloads-popover.c @@ -247,7 +247,8 @@ ephy_downloads_popover_init (EphyDownloadsPopover *popover) gtk_widget_show (vbox); } -GtkWidget *ephy_downloads_popover_new (GtkWidget *relative_to) +GtkWidget * +ephy_downloads_popover_new (GtkWidget *relative_to) { return GTK_WIDGET (g_object_new (EPHY_TYPE_DOWNLOADS_POPOVER, "relative-to", relative_to, NULL)); } diff --git a/lib/widgets/ephy-downloads-progress-icon.c b/lib/widgets/ephy-downloads-progress-icon.c index 1c403c891..376a34480 100644 --- a/lib/widgets/ephy-downloads-progress-icon.c +++ b/lib/widgets/ephy-downloads-progress-icon.c @@ -88,7 +88,8 @@ ephy_downloads_progress_icon_init (EphyDownloadsProgressIcon *icon) gtk_widget_set_halign (GTK_WIDGET (icon), GTK_ALIGN_CENTER); } -GtkWidget *ephy_downloads_progress_icon_new (void) +GtkWidget * +ephy_downloads_progress_icon_new (void) { return GTK_WIDGET (g_object_new (EPHY_TYPE_DOWNLOADS_PROGRESS_ICON, NULL)); } diff --git a/lib/widgets/ephy-security-popover.c b/lib/widgets/ephy-security-popover.c index 68a8be9c5..627477755 100644 --- a/lib/widgets/ephy-security-popover.c +++ b/lib/widgets/ephy-security-popover.c @@ -582,11 +582,12 @@ ephy_security_popover_init (EphySecurityPopover *popover) gtk_widget_show_all (popover->grid); } -GtkWidget *ephy_security_popover_new (GtkWidget *relative_to, - const char *address, - GTlsCertificate *certificate, - GTlsCertificateFlags tls_errors, - EphySecurityLevel security_level) +GtkWidget * +ephy_security_popover_new (GtkWidget *relative_to, + const char *address, + GTlsCertificate *certificate, + GTlsCertificateFlags tls_errors, + EphySecurityLevel security_level) { g_assert (address != NULL); diff --git a/src/bookmarks/ephy-bookmarks-import.c b/src/bookmarks/ephy-bookmarks-import.c index b1194681f..9ea8dacc3 100644 --- a/src/bookmarks/ephy-bookmarks-import.c +++ b/src/bookmarks/ephy-bookmarks-import.c @@ -310,9 +310,10 @@ out: return ret; } -void replace_str (char **src, - char *find, - char *replace) +void +replace_str (char **src, + char *find, + char *replace) { g_auto (GStrv) split = g_strsplit (*src, find, -1); g_free (*src); diff --git a/src/bookmarks/ephy-bookmarks-manager.c b/src/bookmarks/ephy-bookmarks-manager.c index 95d631804..c7a68e3ba 100644 --- a/src/bookmarks/ephy-bookmarks-manager.c +++ b/src/bookmarks/ephy-bookmarks-manager.c @@ -417,8 +417,9 @@ ephy_bookmarks_manager_remove_bookmark_internal (EphyBookmarksManager *self, g_object_unref (bookmark); } -void ephy_bookmarks_manager_remove_bookmark (EphyBookmarksManager *self, - EphyBookmark *bookmark) +void +ephy_bookmarks_manager_remove_bookmark (EphyBookmarksManager *self, + EphyBookmark *bookmark) { g_assert (EPHY_IS_BOOKMARKS_MANAGER (self)); g_assert (EPHY_IS_BOOKMARK (bookmark)); diff --git a/src/search-provider/ephy-search-provider-main.c b/src/search-provider/ephy-search-provider-main.c index 14a014a26..117375cf1 100644 --- a/src/search-provider/ephy-search-provider-main.c +++ b/src/search-provider/ephy-search-provider-main.c @@ -27,8 +27,9 @@ #include <glib/gi18n.h> #include <locale.h> -gint main (gint argc, - gchar **argv) +gint +main (gint argc, + gchar **argv) { EphySearchProvider *search_provider; int status; diff --git a/src/webextension/ephy-web-extension-manager.c b/src/webextension/ephy-web-extension-manager.c index 26fae0900..4cf80a6b6 100644 --- a/src/webextension/ephy-web-extension-manager.c +++ b/src/webextension/ephy-web-extension-manager.c @@ -194,7 +194,8 @@ ephy_web_extension_manager_init (EphyWebExtensionManager *self) { } -EphyWebExtensionManager *ephy_web_extension_manager_new (void) +EphyWebExtensionManager * +ephy_web_extension_manager_new (void) { return g_object_new (EPHY_TYPE_WEB_EXTENSION_MANAGER, NULL); } diff --git a/src/webextension/ephy-web-extension.c b/src/webextension/ephy-web-extension.c index 0a76f0550..6da0035c9 100644 --- a/src/webextension/ephy-web-extension.c +++ b/src/webextension/ephy-web-extension.c @@ -1120,8 +1120,9 @@ ephy_web_extension_browser_action_get_tooltip (EphyWebExtension *self) return self->browser_action->title; } -WebExtensionCustomCSS *web_extension_custom_css_new (EphyWebExtension *self, - const char *code) +WebExtensionCustomCSS * +web_extension_custom_css_new (EphyWebExtension *self, + const char *code) { WebExtensionCustomCSS *css = g_malloc0 (sizeof (WebExtensionCustomCSS)); diff --git a/src/window-commands.c b/src/window-commands.c index ac6da6309..8353008a9 100644 --- a/src/window-commands.c +++ b/src/window-commands.c @@ -1255,9 +1255,10 @@ window_cmd_reload_bypass_cache (GSimpleAction *action, webkit_web_view_reload_bypass_cache (view); } -void window_cmd_combined_stop_reload (GSimpleAction *action, - GVariant *parameter, - gpointer user_data) +void +window_cmd_combined_stop_reload (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { GActionGroup *action_group; GAction *gaction; |