summaryrefslogtreecommitdiff
path: root/eel
diff options
context:
space:
mode:
authorAlexandru Fazakas <alex.fazakas97@yahoo.com>2018-03-15 21:17:27 +0200
committerAlexandru Fazakas <alex.fazakas97@yahoo.com>2018-03-19 14:43:38 +0200
commit95ecfc8ea0629801ae1f8119f3be0b3526e6b147 (patch)
tree27dc3f769f9a4e43fb340cff2eaf4a8c0cf9ff54 /eel
parentb1be1fc680d95264f7be6e0a1e3a45f597da6b80 (diff)
downloadnautilus-95ecfc8ea0629801ae1f8119f3be0b3526e6b147.tar.gz
general: Remove include guards in favor of pragma once
The traditional include guards are not as easy to handle and require extra thought into the names. Pragma once is an easier, more contributor friendly approach. Closes https://gitlab.gnome.org/GNOME/nautilus/issues/294 general: Remove include guards in favor of pragma once The traditional include guards are not as easy to handle and require extra thought into the names. Pragma once is an easier, more contributor friendly approach. Closes https://gitlab.gnome.org/GNOME/nautilus/issues/294
Diffstat (limited to 'eel')
-rw-r--r--eel/eel-accessibility.h7
-rw-r--r--eel/eel-art-extensions.h7
-rw-r--r--eel/eel-canvas.h7
-rw-r--r--eel/eel-debug.h7
-rw-r--r--eel/eel-glib-extensions.h7
-rw-r--r--eel/eel-graphic-effects.h7
-rw-r--r--eel/eel-gtk-extensions.h7
-rw-r--r--eel/eel-lib-self-check-functions.h2
-rw-r--r--eel/eel-self-checks.h51
-rw-r--r--eel/eel-stock-dialogs.h7
-rw-r--r--eel/eel-string.h7
-rw-r--r--eel/eel-vfs-extensions.h5
-rw-r--r--eel/eel.h7
13 files changed, 47 insertions, 81 deletions
diff --git a/eel/eel-accessibility.h b/eel/eel-accessibility.h
index 3176f41c3..740719ded 100644
--- a/eel/eel-accessibility.h
+++ b/eel/eel-accessibility.h
@@ -19,8 +19,7 @@
Authors: Anders Carlsson <andersca@gnu.org>
*/
-#ifndef EEL_ACCESSIBILITY_H
-#define EEL_ACCESSIBILITY_H
+#pragma once
#include <glib-object.h>
#include <atk/atkobject.h>
@@ -74,6 +73,4 @@ typedef struct {
PangoLayout *(*get_layout) (GObject *text);
} EelAccessibleTextIface;
-GType eel_accessible_text_get_type (void);
-
-#endif /* EEL_ACCESSIBILITY_H */
+GType eel_accessible_text_get_type (void); \ No newline at end of file
diff --git a/eel/eel-art-extensions.h b/eel/eel-art-extensions.h
index df6643d2c..b9dde534e 100644
--- a/eel/eel-art-extensions.h
+++ b/eel/eel-art-extensions.h
@@ -21,8 +21,7 @@
Ramiro Estrugo <ramiro@eazel.com>
*/
-#ifndef EEL_ART_EXTENSIONS_H
-#define EEL_ART_EXTENSIONS_H
+#pragma once
#include <glib.h>
@@ -59,6 +58,4 @@ void eel_drect_union (EelDRect *dest,
const EelDRect *src1,
const EelDRect *src2);
-G_END_DECLS
-
-#endif /* EEL_ART_EXTENSIONS_H */
+G_END_DECLS \ No newline at end of file
diff --git a/eel/eel-canvas.h b/eel/eel-canvas.h
index 5f104f045..62e50a857 100644
--- a/eel/eel-canvas.h
+++ b/eel/eel-canvas.h
@@ -32,8 +32,7 @@
* Raph Levien <raph@gimp.org>
*/
-#ifndef EEL_CANVAS_H
-#define EEL_CANVAS_H
+#pragma once
#include <gtk/gtk.h>
#include <gtk/gtk-a11y.h>
@@ -495,6 +494,4 @@ struct _EelCanvasItemAccessibleClass
GtkAccessibleClass parent_class;
};
-G_END_DECLS
-
-#endif
+G_END_DECLS \ No newline at end of file
diff --git a/eel/eel-debug.h b/eel/eel-debug.h
index 0abc1a07d..5d659322b 100644
--- a/eel/eel-debug.h
+++ b/eel/eel-debug.h
@@ -19,8 +19,7 @@
Author: Darin Adler <darin@eazel.com>
*/
-#ifndef EEL_DEBUG_H
-#define EEL_DEBUG_H
+#pragma once
#include <glib.h>
@@ -38,6 +37,4 @@ void eel_debug_call_at_shutdown (EelFunction function);
void eel_debug_call_at_shutdown_with_data (GFreeFunc function,
gpointer data);
-G_END_DECLS
-
-#endif /* EEL_DEBUG_H */
+G_END_DECLS \ No newline at end of file
diff --git a/eel/eel-glib-extensions.h b/eel/eel-glib-extensions.h
index 73249f14a..8b09cbd10 100644
--- a/eel/eel-glib-extensions.h
+++ b/eel/eel-glib-extensions.h
@@ -22,8 +22,7 @@
Authors: John Sullivan <sullivan@eazel.com>
*/
-#ifndef EEL_GLIB_EXTENSIONS_H
-#define EEL_GLIB_EXTENSIONS_H
+#pragma once
#include <glib.h>
@@ -36,6 +35,4 @@ gboolean eel_g_lists_sort_and_check_for_intersection (GList **
/* NULL terminated string arrays (strv). */
gboolean eel_g_strv_equal (char **a,
- char **b);
-
-#endif /* EEL_GLIB_EXTENSIONS_H */
+ char **b); \ No newline at end of file
diff --git a/eel/eel-graphic-effects.h b/eel/eel-graphic-effects.h
index 850ba7605..b67a754a3 100644
--- a/eel/eel-graphic-effects.h
+++ b/eel/eel-graphic-effects.h
@@ -19,8 +19,7 @@
Authors: Andy Hertzfeld <andy@eazel.com>
*/
-#ifndef EEL_GRAPHIC_EFFECTS_H
-#define EEL_GRAPHIC_EFFECTS_H
+#pragma once
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gdk/gdk.h>
@@ -30,6 +29,4 @@ GdkPixbuf *eel_create_spotlight_pixbuf (GdkPixbuf *source_pixbuf);
/* return a pixbuf colorized with the color specified by the parameters */
GdkPixbuf* eel_create_colorized_pixbuf (GdkPixbuf *source_pixbuf,
- GdkRGBA *color);
-
-#endif /* EEL_GRAPHIC_EFFECTS_H */
+ GdkRGBA *color); \ No newline at end of file
diff --git a/eel/eel-gtk-extensions.h b/eel/eel-gtk-extensions.h
index 1efb9b3d8..0a5eac1dc 100644
--- a/eel/eel-gtk-extensions.h
+++ b/eel/eel-gtk-extensions.h
@@ -23,8 +23,7 @@
Ramiro Estrugo <ramiro@eazel.com>
*/
-#ifndef EEL_GTK_EXTENSIONS_H
-#define EEL_GTK_EXTENSIONS_H
+#pragma once
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gtk/gtk.h>
@@ -35,6 +34,4 @@ char * eel_gtk_window_get_geometry_string (GtkWindow
/* GtkMenu and GtkMenuItem */
GtkMenuItem * eel_gtk_menu_append_separator (GtkMenu *menu);
GtkMenuItem * eel_gtk_menu_insert_separator (GtkMenu *menu,
- int index);
-
-#endif /* EEL_GTK_EXTENSIONS_H */
+ int index); \ No newline at end of file
diff --git a/eel/eel-lib-self-check-functions.h b/eel/eel-lib-self-check-functions.h
index da8fd43f0..3a2143004 100644
--- a/eel/eel-lib-self-check-functions.h
+++ b/eel/eel-lib-self-check-functions.h
@@ -20,6 +20,8 @@
Author: Darin Adler <darin@eazel.com>
*/
+#pragma once
+
#include "eel-self-checks.h"
void eel_run_lib_self_checks (void);
diff --git a/eel/eel-self-checks.h b/eel/eel-self-checks.h
index ba5d07695..1b7a0da80 100644
--- a/eel/eel-self-checks.h
+++ b/eel/eel-self-checks.h
@@ -19,63 +19,60 @@
Author: Darin Adler <darin@eazel.com>
*/
-#ifndef EEL_SELF_CHECKS_H
-#define EEL_SELF_CHECKS_H
+#pragma once
#include <glib.h>
#include <eel/eel-art-extensions.h>
#define EEL_CHECK_RESULT(type, expression, expected_value) \
G_STMT_START { \
- eel_before_check (#expression, __FILE__, __LINE__); \
- eel_check_##type##_result (expression, expected_value); \
+ eel_before_check (#expression, __FILE__, __LINE__); \
+ eel_check_##type##_result (expression, expected_value); \
} G_STMT_END
#define EEL_CHECK_BOOLEAN_RESULT(expression, expected_value) \
- EEL_CHECK_RESULT(boolean, expression, expected_value)
+ EEL_CHECK_RESULT(boolean, expression, expected_value)
#define EEL_CHECK_INTEGER_RESULT(expression, expected_value) \
- EEL_CHECK_RESULT(integer, expression, expected_value)
+ EEL_CHECK_RESULT(integer, expression, expected_value)
#define EEL_CHECK_DOUBLE_RESULT(expression, expected_value) \
- EEL_CHECK_RESULT(double, expression, expected_value)
+ EEL_CHECK_RESULT(double, expression, expected_value)
#define EEL_CHECK_STRING_RESULT(expression, expected_value) \
- EEL_CHECK_RESULT(string, expression, expected_value)
+ EEL_CHECK_RESULT(string, expression, expected_value)
#define EEL_CHECK_RECTANGLE_RESULT(expression, expected_x0, expected_y0, expected_x1, expected_y1) \
G_STMT_START { \
- eel_before_check (#expression, __FILE__, __LINE__); \
- eel_check_rectangle_result (expression, expected_x0, expected_y0, expected_x1, expected_y1); \
+ eel_before_check (#expression, __FILE__, __LINE__); \
+ eel_check_rectangle_result (expression, expected_x0, expected_y0, expected_x1, expected_y1); \
} G_STMT_END
void eel_exit_if_self_checks_failed (void);
void eel_before_check_function (const char *name);
void eel_after_check_function (void);
void eel_before_check (const char *expression,
- const char *file_name,
- int line_number);
+ const char *file_name,
+ int line_number);
void eel_after_check (void);
/* Both 'result' and 'expected' get freed with g_free */
void eel_report_check_failure (char *result,
- char *expected);
+ char *expected);
void eel_check_boolean_result (gboolean result,
- gboolean expected_value);
+ gboolean expected_value);
void eel_check_integer_result (long result,
- long expected_value);
+ long expected_value);
void eel_check_double_result (double result,
- double expected_value);
+ double expected_value);
void eel_check_rectangle_result (EelIRect result,
- int expected_x0,
- int expected_y0,
- int expected_x1,
- int expected_y1);
+ int expected_x0,
+ int expected_y0,
+ int expected_x1,
+ int expected_y1);
void eel_check_string_result (char *result,
- const char *expected_value);
+ const char *expected_value);
#define EEL_SELF_CHECK_FUNCTION_PROTOTYPE(function) \
- void function (void);
+ void function (void);
#define EEL_CALL_SELF_CHECK_FUNCTION(function) \
- eel_before_check_function (#function); \
- function (); \
- eel_after_check_function ();
-
-#endif /* EEL_SELF_CHECKS_H */
+ eel_before_check_function (#function); \
+ function (); \
+ eel_after_check_function ();
diff --git a/eel/eel-stock-dialogs.h b/eel/eel-stock-dialogs.h
index 25ab1ca2f..792686152 100644
--- a/eel/eel-stock-dialogs.h
+++ b/eel/eel-stock-dialogs.h
@@ -20,8 +20,7 @@
Authors: Darin Adler <darin@eazel.com>
*/
-#ifndef EEL_STOCK_DIALOGS_H
-#define EEL_STOCK_DIALOGS_H
+#pragma once
#include <gtk/gtk.h>
@@ -73,6 +72,4 @@ GtkDialog *eel_create_question_dialog (const char *primary_text,
int response_one,
const char *answer_two,
int response_two,
- GtkWindow *parent);
-
-#endif /* EEL_STOCK_DIALOGS_H */
+ GtkWindow *parent); \ No newline at end of file
diff --git a/eel/eel-string.h b/eel/eel-string.h
index 91c370aa1..63147d1cc 100644
--- a/eel/eel-string.h
+++ b/eel/eel-string.h
@@ -20,8 +20,7 @@
Authors: Darin Adler <darin@eazel.com>
*/
-#ifndef EEL_STRING_H
-#define EEL_STRING_H
+#pragma once
#include <glib.h>
#include <string.h>
@@ -86,6 +85,4 @@ eel_ref_str eel_ref_str_get_unique (const char *string);
eel_ref_str eel_ref_str_ref (eel_ref_str str);
void eel_ref_str_unref (eel_ref_str str);
-#define eel_ref_str_peek(__str) ((const char *)(__str))
-
-#endif /* EEL_STRING_H */
+#define eel_ref_str_peek(__str) ((const char *)(__str)) \ No newline at end of file
diff --git a/eel/eel-vfs-extensions.h b/eel/eel-vfs-extensions.h
index 7de2bc0b8..b2687af26 100644
--- a/eel/eel-vfs-extensions.h
+++ b/eel/eel-vfs-extensions.h
@@ -24,8 +24,7 @@
John Sullivan <sullivan@eazel.com>
*/
-#ifndef EEL_VFS_EXTENSIONS_H
-#define EEL_VFS_EXTENSIONS_H
+#pragma once
#include <glib.h>
@@ -48,5 +47,3 @@ void eel_filename_get_rename_region (const char *
char * eel_filename_get_extension_offset (const char *filename);
G_END_DECLS
-
-#endif /* EEL_VFS_EXTENSIONS_H */
diff --git a/eel/eel.h b/eel/eel.h
index 1ce635bf1..cf3cddac5 100644
--- a/eel/eel.h
+++ b/eel/eel.h
@@ -20,8 +20,7 @@
Authors: Maciej Stachowiak <mjs@eazel.com>
*/
-#ifndef EEL_H
-#define EEL_H
+#pragma once
#include <eel/eel-art-extensions.h>
#include <eel/eel-glib-extensions.h>
@@ -30,6 +29,4 @@
#include <eel/eel-self-checks.h>
#include <eel/eel-stock-dialogs.h>
#include <eel/eel-string.h>
-#include <eel/eel-vfs-extensions.h>
-
-#endif /* EEL_H */
+#include <eel/eel-vfs-extensions.h> \ No newline at end of file