Skip to content

Commit 281a2de

Browse files
committed
Apply clang-format
1 parent de534a9 commit 281a2de

File tree

8 files changed

+18
-18
lines changed

8 files changed

+18
-18
lines changed

zathura/callbacks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ void cb_page_widget_image_selected(ZathuraPage* page, GdkPixbuf* pixbuf, void* d
632632
g_return_if_fail(pixbuf != NULL);
633633
g_return_if_fail(data != NULL);
634634

635-
zathura_t* zathura = data;
635+
zathura_t* zathura = data;
636636
g_autofree GdkAtom* selection = get_selection(zathura);
637637

638638
if (selection != NULL) {

zathura/commands.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ bool cmd_export(girara_session_t* session, girara_list_t* argument_list) {
496496
}
497497

498498
static const size_t attachment_len = 11; // length of attachment-
499-
static const size_t image_len = 7; // length of image-p
499+
static const size_t image_len = 7; // length of image-p
500500

501501
/* attachment */
502502
if (strncmp(file_identifier, "attachment-", attachment_len) == 0) {

zathura/config.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ static void cb_color(girara_session_t* session, const char* name, girara_setting
4646
girara_template_set_variable_value(csstemplate, name, colorstr);
4747
}
4848

49-
5049
static void cb_color_change(girara_session_t* session, const char* name, girara_setting_type_t UNUSED(type),
5150
const void* value, void* UNUSED(data)) {
5251
g_return_if_fail(value != NULL);
@@ -709,7 +708,7 @@ void config_load_default(zathura_t* zathura) {
709708

710709
void config_load_files(zathura_t* zathura) {
711710
/* load global configuration files */
712-
g_autofree char* config_path = girara_get_xdg_path(XDG_CONFIG_DIRS);
711+
g_autofree char* config_path = girara_get_xdg_path(XDG_CONFIG_DIRS);
713712
if (config_path != NULL && config_path[0] != '\0') {
714713
char** config_dirs = g_strsplit(config_path, ":", 0);
715714
ssize_t size = g_strv_length(config_dirs) - 1;

zathura/dbus-interface.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ static void bus_acquired(GDBusConnection* connection, const gchar* name, void* d
105105
ZathuraDbus* dbus = data;
106106
ZathuraDbusPrivate* priv = zathura_dbus_get_instance_private(dbus);
107107

108-
g_autoptr(GError) error = NULL;
109-
priv->registration_id = g_dbus_connection_register_object(
108+
g_autoptr(GError) error = NULL;
109+
priv->registration_id = g_dbus_connection_register_object(
110110
connection, DBUS_OBJPATH, priv->introspection_data->interfaces[0], &interface_vtable, dbus, NULL, &error);
111111
if (priv->registration_id == 0) {
112112
girara_warning("Failed to register object on D-Bus connection: %s", error->message);
@@ -140,7 +140,7 @@ ZathuraDbus* zathura_dbus_new(zathura_t* zathura) {
140140
return NULL;
141141
}
142142

143-
g_autoptr(GError) error = NULL;
143+
g_autoptr(GError) error = NULL;
144144
priv->introspection_data = g_dbus_node_info_new_for_xml((const char*)g_bytes_get_data(xml_data, NULL), &error);
145145

146146
if (priv->introspection_data == NULL) {
@@ -192,7 +192,7 @@ void zathura_dbus_edit(zathura_t* zathura, unsigned int page, unsigned int x, un
192192
static void handle_open_document(zathura_t* zathura, GVariant* parameters, GDBusMethodInvocation* invocation) {
193193
g_autofree gchar* filename = NULL;
194194
g_autofree gchar* password = NULL;
195-
gint page = ZATHURA_PAGE_NUMBER_UNSPECIFIED;
195+
gint page = ZATHURA_PAGE_NUMBER_UNSPECIFIED;
196196
g_variant_get(parameters, "(ssi)", &filename, &password, &page);
197197

198198
document_close(zathura, false);
@@ -259,8 +259,8 @@ static void synctex_highlight_rects_idle(zathura_t* zathura, girara_list_t** rec
259259
static void handle_highlight_rects(zathura_t* zathura, GVariant* parameters, GDBusMethodInvocation* invocation) {
260260
const unsigned int number_of_pages = zathura_document_get_number_of_pages(zathura_get_document(zathura));
261261

262-
guint page = 0;
263-
g_autoptr(GVariantIter) iter = NULL;
262+
guint page = 0;
263+
g_autoptr(GVariantIter) iter = NULL;
264264
g_autoptr(GVariantIter) secondary_iter = NULL;
265265
g_variant_get(parameters, "(ua(dddd)a(udddd))", &page, &iter, &secondary_iter);
266266

@@ -382,7 +382,7 @@ static void handle_execute_command(zathura_t* zathura, GVariant* parameters, GDB
382382
g_autofree gchar* input = NULL;
383383
g_variant_get(parameters, "(s)", &input);
384384

385-
const bool ret = girara_command_run(zathura->ui.session, input);
385+
const bool ret = girara_command_run(zathura->ui.session, input);
386386
GVariant* result = g_variant_new("(b)", ret);
387387
g_dbus_method_invocation_return_value(invocation, result);
388388
}

zathura/document.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static bool hash_file_sha256(uint8_t* dst, const char* path) {
8282
return false;
8383
}
8484

85-
uint8_t buf[MAX(BUFSIZ,4096)];
85+
uint8_t buf[MAX(BUFSIZ, 4096)];
8686
gssize read;
8787
while ((read = g_input_stream_read(G_INPUT_STREAM(stream), buf, sizeof(buf), NULL, NULL)) > 0) {
8888
g_checksum_update(checksum, buf, read);

zathura/main.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ static int run_synctex_forward(const char* synctex_fwd, const char* filename, in
3838
return -1;
3939
}
4040

41-
int line = 0;
42-
int column = 0;
41+
int line = 0;
42+
int column = 0;
4343
g_autofree char* input_file = NULL;
4444
if (synctex_parse_input(synctex_fwd, &input_file, &line, &column) == false) {
4545
girara_error("Failed to parse argument to --synctex-forward.");
@@ -238,7 +238,8 @@ GIRARA_VISIBLE int main(int argc, char* argv[]) {
238238
gtk_init(&argc, &argv);
239239

240240
/* Create zathura session */
241-
g_autoptr(zathura_t) zathura = init_zathura(config_dir, data_dir, cache_dir, plugin_path, argv, synctex_editor, embed);
241+
g_autoptr(zathura_t) zathura =
242+
init_zathura(config_dir, data_dir, cache_dir, plugin_path, argv, synctex_editor, embed);
242243
if (zathura == NULL) {
243244
girara_error("Could not initialize zathura.");
244245
return -1;

zathura/synctex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ girara_list_t* synctex_rectangles_from_position(zathura_t* zathura, const char*
192192

193193
if (secondary_rects != NULL) {
194194
*secondary_rects = other_rects;
195-
other_rects = NULL;
195+
other_rects = NULL;
196196
}
197197

198198
return flatten_rectangles(hitlist);

zathura/utils.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ gboolean search_equal_func_index(GtkTreeModel* model, gint column, const gchar*
190190
}
191191

192192
static GtkTreeView* get_tree_view(zathura_t* zathura) {
193-
g_autoptr(GList) index_children = gtk_container_get_children(GTK_CONTAINER(zathura->ui.index));
194-
GtkTreeView* tree_view = index_children->data;
193+
g_autoptr(GList) index_children = gtk_container_get_children(GTK_CONTAINER(zathura->ui.index));
194+
GtkTreeView* tree_view = index_children->data;
195195
return tree_view;
196196
}
197197

0 commit comments

Comments
 (0)