From b10fcf21b1ef49dd3d6297ac657434ece3b23578 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Tue, 6 Dec 2022 20:44:48 -0600 Subject: Reformat all the *.[ch] files with clang-format I ran this on each directory with C files: clang-format -i *.[ch] "-i" is the in-place option. I also adjusted the order of #includes for some files which failed to build after that: Clang-format reorders blocks of #include directives alphabetically, but they can be grouped and separated by blank lines. If there is a blank line between blocks, like #include "zork.h" #include "bar.h" #include "foo.h" then it will not put zork.h after the other two. The last two header files will be sorted alphabetically. We can adjust the formatting of chunks of code by hand with comments like these: /* clang-format off */ this code { is, formatted, by, hand; } /* clang-format on */ See https://clang.llvm.org/docs/ClangFormat.html for the general manual and https://clang.llvm.org/docs/ClangFormatStyleOptions.html for the style options and the comments described above. --- atspi/atspi-hypertext.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'atspi/atspi-hypertext.c') diff --git a/atspi/atspi-hypertext.c b/atspi/atspi-hypertext.c index ffe20f21..c08c8bfe 100644 --- a/atspi/atspi-hypertext.c +++ b/atspi/atspi-hypertext.c @@ -77,7 +77,7 @@ atspi_hypertext_get_link (AtspiHypertext *obj, gint link_index, GError **error) { dbus_int32_t d_link_index = link_index; DBusMessage *reply; - + g_return_val_if_fail (obj != NULL, NULL); reply = _atspi_dbus_call_partial (obj, atspi_interface_hypertext, "GetLink", error, "i", d_link_index); @@ -99,7 +99,7 @@ atspi_hypertext_get_link (AtspiHypertext *obj, gint link_index, GError **error) **/ int atspi_hypertext_get_link_index (AtspiHypertext *obj, - gint character_offset, + gint character_offset, GError **error) { dbus_int32_t d_character_offset = character_offset; @@ -122,16 +122,15 @@ atspi_hypertext_get_type (void) { static GType type = 0; - if (!type) { - static const GTypeInfo tinfo = + if (!type) { - sizeof (AtspiHypertext), - (GBaseInitFunc) atspi_hypertext_base_init, - (GBaseFinalizeFunc) NULL, - }; - - type = g_type_register_static (G_TYPE_INTERFACE, "AtspiHypertext", &tinfo, 0); - - } + static const GTypeInfo tinfo = { + sizeof (AtspiHypertext), + (GBaseInitFunc) atspi_hypertext_base_init, + (GBaseFinalizeFunc) NULL, + }; + + type = g_type_register_static (G_TYPE_INTERFACE, "AtspiHypertext", &tinfo, 0); + } return type; } -- cgit v1.2.1