diff --git a/libgimpbase/gimpchecks.h b/libgimpbase/gimpchecks.h index fa02aa35a5..53e6e72911 100644 --- a/libgimpbase/gimpchecks.h +++ b/libgimpbase/gimpchecks.h @@ -16,16 +16,14 @@ * . */ +#pragma once + #if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_CHECKS_H__ -#define __GIMP_CHECKS_H__ - G_BEGIN_DECLS - /** * GIMP_CHECK_SIZE: * @@ -139,7 +137,4 @@ void gimp_checks_get_colors (GimpCheckType type, GeglColor **color1, GeglColor **color2); - G_END_DECLS - -#endif /* __GIMP_CHECKS_H__ */ diff --git a/libgimpbase/gimpchoice.h b/libgimpbase/gimpchoice.h index b1e53e3774..ee87079cfb 100644 --- a/libgimpbase/gimpchoice.h +++ b/libgimpbase/gimpchoice.h @@ -19,17 +19,14 @@ * . */ +#pragma once + #if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION) #error "Only can be included directly." #endif - -#ifndef __GIMP_CHOICE_H__ -#define __GIMP_CHOICE_H__ - G_BEGIN_DECLS - /* For information look into the C source or the html documentation */ @@ -88,7 +85,4 @@ GParamSpec * gimp_param_spec_choice (const gchar *name, GimpChoice * gimp_param_spec_choice_get_choice (GParamSpec *pspec); const gchar * gimp_param_spec_choice_get_default (GParamSpec *pspec); - G_END_DECLS - -#endif /* __GIMP_CHOICE_H__ */ diff --git a/libgimpbase/gimpcompatenums.h b/libgimpbase/gimpcompatenums.h index eb8cb044fe..d5448c29b6 100644 --- a/libgimpbase/gimpcompatenums.h +++ b/libgimpbase/gimpcompatenums.h @@ -16,9 +16,7 @@ * . */ -#ifndef __GIMP_COMPAT_ENUMS_H__ -#define __GIMP_COMPAT_ENUMS_H__ - +#pragma once G_BEGIN_DECLS @@ -48,7 +46,4 @@ typedef enum /*< skip >*/ } GimpAddMaskTypeCompat; #endif - G_END_DECLS - -#endif /* __GIMP_COMPAT_ENUMS_H__ */ diff --git a/libgimpbase/gimpcpuaccel.h b/libgimpbase/gimpcpuaccel.h index 73495bd317..27ff4458ff 100644 --- a/libgimpbase/gimpcpuaccel.h +++ b/libgimpbase/gimpcpuaccel.h @@ -16,16 +16,14 @@ * . */ +#pragma once + #if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_CPU_ACCEL_H__ -#define __GIMP_CPU_ACCEL_H__ - G_BEGIN_DECLS - /** * GimpCpuAccelFlags: * @GIMP_CPU_ACCEL_NONE: None @@ -66,7 +64,4 @@ typedef enum GimpCpuAccelFlags gimp_cpu_accel_get_support (void); - G_END_DECLS - -#endif /* __GIMP_CPU_ACCEL_H__ */ diff --git a/libgimpbase/gimpenv-private.h b/libgimpbase/gimpenv-private.h index fae7a86f4a..03d878e90d 100644 --- a/libgimpbase/gimpenv-private.h +++ b/libgimpbase/gimpenv-private.h @@ -18,8 +18,7 @@ * . */ -#ifndef __GIMP_ENV_PRIVATE_H__ -#define __GIMP_ENV_PRIVATE_H__ +#pragma once G_BEGIN_DECLS @@ -28,7 +27,4 @@ G_BEGIN_DECLS void gimp_env_init (gboolean plug_in); - G_END_DECLS - -#endif /* __GIMP_ENV_PRIVATE_H__ */ diff --git a/libgimpbase/gimpenv.h b/libgimpbase/gimpenv.h index e2eaad76e9..78a91977e8 100644 --- a/libgimpbase/gimpenv.h +++ b/libgimpbase/gimpenv.h @@ -19,13 +19,12 @@ * . */ +#pragma once + #if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_ENV_H__ -#define __GIMP_ENV_H__ - G_BEGIN_DECLS /* For information look into the C source or the html documentation */ @@ -77,7 +76,4 @@ void gimp_path_free (GList *path); gchar * gimp_path_get_user_writable_dir (GList *path) G_GNUC_MALLOC; - G_END_DECLS - -#endif /* __GIMP_ENV_H__ */ diff --git a/libgimpbase/gimpexportoptions.h b/libgimpbase/gimpexportoptions.h index f8ddbc64f2..5be237d2f4 100644 --- a/libgimpbase/gimpexportoptions.h +++ b/libgimpbase/gimpexportoptions.h @@ -18,17 +18,14 @@ * along with this program. If not, see . */ +#pragma once + #if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION) #error "Only can be included directly." #endif - -#ifndef __GIMP_EXPORT_OPTIONS_H__ -#define __GIMP_EXPORT_OPTIONS_H__ - G_BEGIN_DECLS - /* For information look into the C source or the html documentation */ @@ -37,7 +34,6 @@ G_BEGIN_DECLS G_DECLARE_FINAL_TYPE (GimpExportOptions, gimp_export_options, GIMP, EXPORT_OPTIONS, GObject) - /* * GIMP_TYPE_PARAM_EXPORT_OPTIONS */ @@ -53,7 +49,4 @@ GParamSpec * gimp_param_spec_export_options (const gchar *name, const gchar *blurb, GParamFlags flags); - G_END_DECLS - -#endif /* __GIMP_EXPORT_OPTIONS_H__ */ diff --git a/libgimpbase/gimplimits.h b/libgimpbase/gimplimits.h index 75a08b9fa7..d9bbe873a0 100644 --- a/libgimpbase/gimplimits.h +++ b/libgimpbase/gimplimits.h @@ -19,16 +19,14 @@ * . */ +#pragma once + #if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_LIMITS_H__ -#define __GIMP_LIMITS_H__ - G_BEGIN_DECLS - /** * SECTION: gimplimits * @title: gimplimits @@ -91,7 +89,4 @@ G_BEGIN_DECLS * and must be < G_MAXDOUBLE */ - G_END_DECLS - -#endif /* __GIMP_LIMITS_H__ */ diff --git a/libgimpbase/gimpmemsize.h b/libgimpbase/gimpmemsize.h index cdfd9c0120..4fd1aa49e9 100644 --- a/libgimpbase/gimpmemsize.h +++ b/libgimpbase/gimpmemsize.h @@ -16,16 +16,14 @@ * . */ +#pragma once + #if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_MEMSIZE_H__ -#define __GIMP_MEMSIZE_H__ - G_BEGIN_DECLS - /** * GIMP_TYPE_MEMSIZE: * @@ -59,7 +57,4 @@ GParamSpec * gimp_param_spec_memsize (const gchar *name, guint64 default_value, GParamFlags flags); - G_END_DECLS - -#endif /* __GIMP_MEMSIZE_H__ */ diff --git a/libgimpbase/gimpmetadata.h b/libgimpbase/gimpmetadata.h index 8f7b028612..02860c907b 100644 --- a/libgimpbase/gimpmetadata.h +++ b/libgimpbase/gimpmetadata.h @@ -19,16 +19,17 @@ * . */ -#ifndef __GIMP_METADATA_H__ -#define __GIMP_METADATA_H__ - -G_BEGIN_DECLS +#pragma once #include +G_BEGIN_DECLS #define GIMP_TYPE_METADATA (gimp_metadata_get_type ()) -G_DECLARE_FINAL_TYPE (GimpMetadata, gimp_metadata, GIMP, METADATA, GExiv2Metadata) +G_DECLARE_FINAL_TYPE (GimpMetadata, + gimp_metadata, + GIMP, METADATA, + GExiv2Metadata) /** @@ -154,5 +155,3 @@ gboolean gimp_metadata_is_tag_supported (const gchar *tag, const gchar *mime_type); G_END_DECLS - -#endif /* __GIMP_METADATA_H__ */ diff --git a/libgimpbase/gimpparamspecs.h b/libgimpbase/gimpparamspecs.h index b920d5c0a1..7dd70b3e52 100644 --- a/libgimpbase/gimpparamspecs.h +++ b/libgimpbase/gimpparamspecs.h @@ -18,13 +18,12 @@ * . */ +#pragma once + #if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_PARAM_SPECS_H__ -#define __GIMP_PARAM_SPECS_H__ - G_BEGIN_DECLS /* For information look into the C source or the html documentation */ @@ -410,7 +409,4 @@ GParamSpec * gimp_param_spec_core_object_array (const gchar * GType gimp_param_spec_core_object_array_get_object_type (GParamSpec *pspec); - G_END_DECLS - -#endif /* __GIMP_PARAM_SPECS_H__ */ diff --git a/libgimpbase/gimpparasite.h b/libgimpbase/gimpparasite.h index f471976c18..b741a73c6d 100644 --- a/libgimpbase/gimpparasite.h +++ b/libgimpbase/gimpparasite.h @@ -19,13 +19,12 @@ * . */ +#pragma once + #if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_PARASITE_H__ -#define __GIMP_PARASITE_H__ - G_BEGIN_DECLS /* For information look into the C source or the html documentation */ @@ -109,5 +108,3 @@ gconstpointer gimp_parasite_get_data (const GimpParasite *parasite, guint32 *num_bytes); G_END_DECLS - -#endif /* __GIMP_PARASITE_H__ */ diff --git a/libgimpbase/gimpparasiteio.h b/libgimpbase/gimpparasiteio.h index 0ade6b44c8..2cc51d4de1 100644 --- a/libgimpbase/gimpparasiteio.h +++ b/libgimpbase/gimpparasiteio.h @@ -19,8 +19,7 @@ * . */ -#ifndef __GIMP_PARASITE_IO_H__ -#define __GIMP_PARASITE_IO_H__ +#pragma once G_BEGIN_DECLS @@ -83,5 +82,3 @@ gchar * gimp_pixpipe_params_build (GimpPixPipeParams *params) G_GNUC_MALLOC; void gimp_pixpipe_params_free (GimpPixPipeParams *params); G_END_DECLS - -#endif /* __GIMP_PARASITE_IO_H__ */ diff --git a/libgimpbase/gimpprotocol.h b/libgimpbase/gimpprotocol.h index 0fccb5b42f..c5427991f5 100644 --- a/libgimpbase/gimpprotocol.h +++ b/libgimpbase/gimpprotocol.h @@ -16,8 +16,7 @@ * . */ -#ifndef __GIMP_PROTOCOL_H__ -#define __GIMP_PROTOCOL_H__ +#pragma once G_BEGIN_DECLS @@ -417,7 +416,4 @@ gboolean gp_extension_ack_write (GIOChannel *channel, gboolean gp_has_init_write (GIOChannel *channel, gpointer user_data); - G_END_DECLS - -#endif /* __GIMP_PROTOCOL_H__ */ diff --git a/libgimpbase/gimprectangle.h b/libgimpbase/gimprectangle.h index 8ace674df1..3e8d6eff9b 100644 --- a/libgimpbase/gimprectangle.h +++ b/libgimpbase/gimprectangle.h @@ -16,13 +16,12 @@ * . */ +#pragma once + #if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_RECTANGLE_H__ -#define __GIMP_RECTANGLE_H__ - G_BEGIN_DECLS /* For information look into the C source or the html documentation */ @@ -54,7 +53,4 @@ void gimp_rectangle_union (gint x1, gint *dest_width, gint *dest_height); - G_END_DECLS - -#endif /* __GIMP_RECTANGLE_H__ */ diff --git a/libgimpbase/gimpreloc.h b/libgimpbase/gimpreloc.h index a7af912d3c..81ede8ff3d 100644 --- a/libgimpbase/gimpreloc.h +++ b/libgimpbase/gimpreloc.h @@ -10,12 +10,10 @@ * more information and how to use this. */ -#ifndef __GIMP_RELOC_H__ -#define __GIMP_RELOC_H__ +#pragma once G_BEGIN_DECLS - /* These error codes can be returned from _gimp_reloc_init() or * _gimp_reloc_init_lib(). */ @@ -40,7 +38,4 @@ G_GNUC_INTERNAL gboolean _gimp_reloc_init_lib (GError **error); G_GNUC_INTERNAL gchar * _gimp_reloc_find_prefix (const gchar *default_prefix); - G_END_DECLS - -#endif /* _GIMPRELOC_H_ */ diff --git a/libgimpbase/gimpsignal.h b/libgimpbase/gimpsignal.h index 978a39408e..6ed321621f 100644 --- a/libgimpbase/gimpsignal.h +++ b/libgimpbase/gimpsignal.h @@ -16,8 +16,7 @@ * . */ -#ifndef __GIMP_SIGNAL_H__ -#define __GIMP_SIGNAL_H__ +#pragma once #include @@ -38,11 +37,9 @@ G_BEGIN_DECLS **/ typedef void (* GimpSignalHandlerFunc) (gint signum); + GimpSignalHandlerFunc gimp_signal_private (gint signum, GimpSignalHandlerFunc handler, gint flags); - G_END_DECLS - -#endif /* __GIMP_SIGNAL_H__ */ diff --git a/libgimpbase/gimputils.h b/libgimpbase/gimputils.h index 612e3150bd..5ea4159e33 100644 --- a/libgimpbase/gimputils.h +++ b/libgimpbase/gimputils.h @@ -16,16 +16,14 @@ * . */ +#pragma once + #if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_UTILS_H__ -#define __GIMP_UTILS_H__ - G_BEGIN_DECLS - gchar * gimp_utf8_strtrim (const gchar *str, gint max_chars) G_GNUC_MALLOC; gchar * gimp_any_to_utf8 (const gchar *str, @@ -92,5 +90,3 @@ void gimp_bind_text_domain (const gchar *domain_ const gchar *dir_name); G_END_DECLS - -#endif /* __GIMP_UTILS_H__ */ diff --git a/libgimpbase/gimpvaluearray.h b/libgimpbase/gimpvaluearray.h index b293e4f646..d13e16f094 100644 --- a/libgimpbase/gimpvaluearray.h +++ b/libgimpbase/gimpvaluearray.h @@ -18,13 +18,12 @@ * . */ +#pragma once + #if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_VALUE_ARRAY_H__ -#define __GIMP_VALUE_ARRAY_H__ - G_BEGIN_DECLS /** @@ -97,7 +96,4 @@ GParamSpec * gimp_param_spec_value_array (const gchar *name, GParamSpec * gimp_param_spec_value_array_get_element_spec (GParamSpec *pspec); - G_END_DECLS - -#endif /* __GIMP_VALUE_ARRAY_H__ */ diff --git a/libgimpbase/gimpversion.h.in b/libgimpbase/gimpversion.h.in index 2f182da87d..7865c415be 100644 --- a/libgimpbase/gimpversion.h.in +++ b/libgimpbase/gimpversion.h.in @@ -1,5 +1,4 @@ -#ifndef __GIMP_VERSION_H__ -#define __GIMP_VERSION_H__ +#pragma once /* gimpversion.h.in -> gimpversion.h * This file is configured by Meson. Please modify meson.build files. @@ -62,7 +61,4 @@ G_BEGIN_DECLS (GIMP_MAJOR_VERSION == (major) && GIMP_MINOR_VERSION == (minor) && \ GIMP_MICRO_VERSION >= (micro))) - G_END_DECLS - -#endif /* __GIMP_VERSION_H__ */ diff --git a/libgimpbase/gimpwin32-io.h b/libgimpbase/gimpwin32-io.h index 45a3104a75..eed5d13f28 100644 --- a/libgimpbase/gimpwin32-io.h +++ b/libgimpbase/gimpwin32-io.h @@ -19,15 +19,13 @@ * . */ -#ifndef __GIMP_WIN32_IO_H__ -#define __GIMP_WIN32_IO_H__ +#pragma once #include #include G_BEGIN_DECLS - #define mkdir(n,a) _mkdir(n) #define chmod(n,f) _chmod(n,f) #define access(f,p) _access(f,p) @@ -95,5 +93,3 @@ G_BEGIN_DECLS #endif G_END_DECLS - -#endif /* __GIMP_WIN32_IO_H__ */ diff --git a/libgimpbase/gimpwire.h b/libgimpbase/gimpwire.h index 57f4c6c796..8237b20750 100644 --- a/libgimpbase/gimpwire.h +++ b/libgimpbase/gimpwire.h @@ -16,8 +16,7 @@ * . */ -#ifndef __GIMP_WIRE_H__ -#define __GIMP_WIRE_H__ +#pragma once G_BEGIN_DECLS @@ -146,7 +145,4 @@ G_GNUC_INTERNAL gboolean gint count, gpointer user_data); - G_END_DECLS - -#endif /* __GIMP_WIRE_H__ */