[Spice-devel] [spice-server] Unify header guards

Jonathon Jongsma jjongsma at redhat.com
Thu Mar 30 15:53:53 UTC 2017


No objections here.


On Thu, 2017-03-30 at 17:39 +0200, Christophe Fergeau wrote:
> This changes the header guards in all .h files to follow this format:
> 
> /*
>  * Licensing block
>  */
> 
> #ifndef FILE_NAME_H_
> #define FILE_NAME_H_
> 
> /* ... */
> 
> #endif /* FILE_NAME_H_ */
> ---
>  server/agent-msg-filter.h         | 6 +++---
>  server/cache-item.h               | 3 ++-
>  server/char-device.h              | 3 ++-
>  server/common-graphics-channel.h  | 6 +++---
>  server/cursor-channel-client.h    | 3 ++-
>  server/cursor-channel.h           | 3 ++-
>  server/dcc-private.h              | 1 +
>  server/dcc.h                      | 3 ++-
>  server/demarshallers.h            | 7 ++++---
>  server/dispatcher.h               | 7 ++++---
>  server/display-channel.h          | 1 +
>  server/display-limits.h           | 1 +
>  server/glib-compat.h              | 1 +
>  server/glz-encoder-dict.h         | 2 +-
>  server/glz-encoder-priv.h         | 2 +-
>  server/glz-encoder.h              | 6 +++---
>  server/image-cache.h              | 3 ++-
>  server/image-encoders.h           | 1 +
>  server/inputs-channel-client.h    | 6 +++---
>  server/inputs-channel.h           | 6 +++---
>  server/jpeg-encoder.h             | 8 +++++---
>  server/lz4-encoder.h              | 8 +++++---
>  server/main-channel-client.h      | 7 ++++---
>  server/main-channel.h             | 6 +++---
>  server/main-dispatcher.h          | 7 ++++---
>  server/migration-protocol.h       | 6 +++---
>  server/pixmap-cache.h             | 7 ++++---
>  server/red-channel-capabilities.h | 2 +-
>  server/red-channel-client.h       | 6 +++---
>  server/red-channel.h              | 6 +++---
>  server/red-client.h               | 6 +++---
>  server/red-common.h               | 6 +++---
>  server/red-parse-qxl.h            | 6 +++---
>  server/red-pipe-item.h            | 7 ++++---
>  server/red-qxl.h                  | 6 +++---
>  server/red-record-qxl.h           | 6 +++---
>  server/red-worker.h               | 6 +++---
>  server/reds-private.h             | 7 ++++---
>  server/reds-stream.h              | 6 +++---
>  server/reds.h                     | 6 +++---
>  server/smartcard-channel-client.h | 6 +++---
>  server/smartcard.h                | 7 ++++---
>  server/sound.h                    | 2 +-
>  server/spice-bitmap-utils.h       | 1 +
>  server/spice-core.h               | 1 -
>  server/spice-experimental.h       | 7 ++++---
>  server/spice-replay.h             | 3 ++-
>  server/stat-file.h                | 1 +
>  server/stat.h                     | 6 +++---
>  server/stream.h                   | 3 ++-
>  server/tree.h                     | 3 ++-
>  server/utils.h                    | 3 ++-
>  server/video-encoder.h            | 6 +++---
>  server/zlib-encoder.h             | 8 +++++---
>  54 files changed, 142 insertions(+), 111 deletions(-)
> 
> diff --git a/server/agent-msg-filter.h b/server/agent-msg-filter.h
> index b4d8e72..bd124ea 100644
> --- a/server/agent-msg-filter.h
> +++ b/server/agent-msg-filter.h
> @@ -18,8 +18,8 @@
>          hdegoede at redhat.com
>  */
>  
> -#ifndef _H_AGENT_MSG_FILTER
> -#define _H_AGENT_MSG_FILTER
> +#ifndef AGENT_MSG_FILTER_H_
> +#define AGENT_MSG_FILTER_H_
>  
>  #include <inttypes.h>
>  #include <glib.h>
> @@ -51,4 +51,4 @@ void agent_msg_filter_config(AgentMsgFilter
> *filter,
>  AgentMsgFilterResult agent_msg_filter_process_data(AgentMsgFilter
> *filter,
>                                                     const uint8_t
> *data, uint32_t len);
>  
> -#endif
> +#endif /* AGENT_MSG_FILTER_H_ */
> diff --git a/server/cache-item.h b/server/cache-item.h
> index 58af7ba..f0002a8 100644
> --- a/server/cache-item.h
> +++ b/server/cache-item.h
> @@ -15,8 +15,9 @@
>     You should have received a copy of the GNU Lesser General Public
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
> +
>  #ifndef CACHE_ITEM_H_
> -# define CACHE_ITEM_H_
> +#define CACHE_ITEM_H_
>  
>  #include <common/ring.h>
>  
> diff --git a/server/char-device.h b/server/char-device.h
> index 26360e1..7854086 100644
> --- a/server/char-device.h
> +++ b/server/char-device.h
> @@ -15,6 +15,7 @@
>     You should have received a copy of the GNU Lesser General Public
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
> +
>  #ifndef CHAR_DEVICE_H_
>  #define CHAR_DEVICE_H_
>  
> @@ -238,4 +239,4 @@ void spicevmc_device_disconnect(RedsState *reds,
>  
>  SpiceCharDeviceInterface
> *spice_char_device_get_interface(SpiceCharDeviceInstance *instance);
>  
> -#endif // CHAR_DEVICE_H_
> +#endif /* CHAR_DEVICE_H_ */
> diff --git a/server/common-graphics-channel.h b/server/common-
> graphics-channel.h
> index 5f45c2c..c478b31 100644
> --- a/server/common-graphics-channel.h
> +++ b/server/common-graphics-channel.h
> @@ -15,8 +15,8 @@
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
>  
> -#ifndef _COMMON_GRAPHICS_CHANNEL_H
> -#define _COMMON_GRAPHICS_CHANNEL_H
> +#ifndef COMMON_GRAPHICS_CHANNEL_H_
> +#define COMMON_GRAPHICS_CHANNEL_H_
>  
>  #include <glib-object.h>
>  
> @@ -104,4 +104,4 @@ GType
> common_graphics_channel_client_get_type(void) G_GNUC_CONST;
>  
>  G_END_DECLS
>  
> -#endif /* _COMMON_GRAPHICS_CHANNEL_H */
> +#endif /* COMMON_GRAPHICS_CHANNEL_H_ */
> diff --git a/server/cursor-channel-client.h b/server/cursor-channel-
> client.h
> index de2c9d6..8261265 100644
> --- a/server/cursor-channel-client.h
> +++ b/server/cursor-channel-client.h
> @@ -15,8 +15,9 @@
>     You should have received a copy of the GNU Lesser General Public
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
> +
>  #ifndef CURSOR_CHANNEL_CLIENT_H_
> -# define CURSOR_CHANNEL_CLIENT_H_
> +#define CURSOR_CHANNEL_CLIENT_H_
>  
>  #include <glib-object.h>
>  
> diff --git a/server/cursor-channel.h b/server/cursor-channel.h
> index 6bf8486..9f3ef52 100644
> --- a/server/cursor-channel.h
> +++ b/server/cursor-channel.h
> @@ -15,8 +15,9 @@
>     You should have received a copy of the GNU Lesser General Public
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
> +
>  #ifndef CURSOR_CHANNEL_H_
> -# define CURSOR_CHANNEL_H_
> +#define CURSOR_CHANNEL_H_
>  
>  #include "common-graphics-channel.h"
>  #include "red-parse-qxl.h"
> diff --git a/server/dcc-private.h b/server/dcc-private.h
> index 242af10..c466220 100644
> --- a/server/dcc-private.h
> +++ b/server/dcc-private.h
> @@ -15,6 +15,7 @@
>     You should have received a copy of the GNU Lesser General Public
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
> +
>  #ifndef DCC_PRIVATE_H_
>  #define DCC_PRIVATE_H_
>  
> diff --git a/server/dcc.h b/server/dcc.h
> index 0be2081..e34e836 100644
> --- a/server/dcc.h
> +++ b/server/dcc.h
> @@ -15,8 +15,9 @@
>     You should have received a copy of the GNU Lesser General Public
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
> +
>  #ifndef DCC_H_
> -# define DCC_H_
> +#define DCC_H_
>  
>  #include <glib-object.h>
>  
> diff --git a/server/demarshallers.h b/server/demarshallers.h
> index dc35645..a2222e8 100644
> --- a/server/demarshallers.h
> +++ b/server/demarshallers.h
> @@ -14,8 +14,9 @@
>     You should have received a copy of the GNU Lesser General Public
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
> -#ifndef _H_DEMARSHAL
> -#define _H_DEMARSHAL
> +
> +#ifndef DEMARSHALLERS_H_
> +#define DEMARSHALLERS_H_
>  
>  #include <stddef.h>
>  #include <inttypes.h>
> @@ -26,4 +27,4 @@ typedef uint8_t *
> (*spice_parse_channel_func_t)(uint8_t *message_start, uint8_t
>  
>  spice_parse_channel_func_t spice_get_client_channel_parser(uint32_t
> channel, unsigned int *max_message_type);
>  
> -#endif
> +#endif /* DEMARSHALLERS_H_ */
> diff --git a/server/dispatcher.h b/server/dispatcher.h
> index 07b1137..41b7389 100644
> --- a/server/dispatcher.h
> +++ b/server/dispatcher.h
> @@ -15,8 +15,9 @@
>     You should have received a copy of the GNU Lesser General Public
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
> -#ifndef DISPATCHER_H
> -#define DISPATCHER_H
> +
> +#ifndef DISPATCHER_H_
> +#define DISPATCHER_H_
>  
>  #include <glib-object.h>
>  
> @@ -139,4 +140,4 @@ void dispatcher_set_opaque(Dispatcher
> *dispatcher, void *opaque);
>  
>  pthread_t dispatcher_get_thread_id(Dispatcher *self);
>  
> -#endif //DISPATCHER_H
> +#endif /* DISPATCHER_H_ */
> diff --git a/server/display-channel.h b/server/display-channel.h
> index 4414de1..796b020 100644
> --- a/server/display-channel.h
> +++ b/server/display-channel.h
> @@ -15,6 +15,7 @@
>     You should have received a copy of the GNU Lesser General Public
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
> +
>  #ifndef DISPLAY_CHANNEL_H_
>  # define DISPLAY_CHANNEL_H_
>  
> diff --git a/server/display-limits.h b/server/display-limits.h
> index ce9206c..4cf91137 100644
> --- a/server/display-limits.h
> +++ b/server/display-limits.h
> @@ -15,6 +15,7 @@
>     You should have received a copy of the GNU Lesser General Public
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
> +
>  #ifndef DISPLAY_LIMITS_H_
>  #define DISPLAY_LIMITS_H_
>  
> diff --git a/server/glib-compat.h b/server/glib-compat.h
> index 50a0783..a81bf48 100644
> --- a/server/glib-compat.h
> +++ b/server/glib-compat.h
> @@ -15,6 +15,7 @@
>     You should have received a copy of the GNU Lesser General Public
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
> +
>  #ifndef GLIB_COMPAT_H_
>  #define GLIB_COMPAT_H_
>  
> diff --git a/server/glz-encoder-dict.h b/server/glz-encoder-dict.h
> index 79b3781..f333412 100644
> --- a/server/glz-encoder-dict.h
> +++ b/server/glz-encoder-dict.h
> @@ -68,4 +68,4 @@ void glz_enc_dictionary_reset(GlzEncDictContext
> *opaque_dict, GlzEncoderUsrConte
>  void glz_enc_dictionary_remove_image(GlzEncDictContext *opaque_dict,
>                                       GlzEncDictImageContext *image,
> GlzEncoderUsrContext *usr);
>  
> -#endif // GLZ_ENCODER_DICT_H_
> +#endif /* GLZ_ENCODER_DICT_H_ */
> diff --git a/server/glz-encoder-priv.h b/server/glz-encoder-priv.h
> index a4609d9..08dc007 100644
> --- a/server/glz-encoder-priv.h
> +++ b/server/glz-encoder-priv.h
> @@ -200,4 +200,4 @@ void glz_dictionary_post_encode(uint32_t
> encoder_id, GlzEncoderUsrContext *usr,
>  #endif
>  
>  
> -#endif // GLZ_ENCODER_PRIV_H_
> +#endif /* GLZ_ENCODER_PRIV_H_ */
> diff --git a/server/glz-encoder.h b/server/glz-encoder.h
> index acc32b2..477cbe9 100644
> --- a/server/glz-encoder.h
> +++ b/server/glz-encoder.h
> @@ -15,8 +15,8 @@
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
>  
> -#ifndef _H_GLZ_ENCODER
> -#define _H_GLZ_ENCODER
> +#ifndef GLZ_ENCODER_H_
> +#define GLZ_ENCODER_H_
>  
>  /* Manging the lz encoding using a dictionary that is shared among
> encoders */
>  
> @@ -71,4 +71,4 @@ int glz_encode(GlzEncoderContext *opaque_encoder,
> LzImageType type, int width, i
>                 GlzEncDictImageContext **o_enc_dict_context);
>  
>  
> -#endif // _H_GLZ_ENCODER
> +#endif /* GLZ_ENCODER_H_ */
> diff --git a/server/image-cache.h b/server/image-cache.h
> index d86c8b7..c592c1c 100644
> --- a/server/image-cache.h
> +++ b/server/image-cache.h
> @@ -15,6 +15,7 @@
>     You should have received a copy of the GNU Lesser General Public
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
> +
>  #ifndef IMAGE_CACHE_H_
>  #define IMAGE_CACHE_H_
>  
> @@ -59,4 +60,4 @@
> void         image_cache_localize_brush    (ImageCache *cache,
> SpiceBrush *brush
>  void         image_cache_localize_mask     (ImageCache *cache,
> SpiceQMask *mask,
>                                              SpiceImage
> *image_store);
>  
> -#endif
> +#endif /* IMAGE_CACHE_H_ */
> diff --git a/server/image-encoders.h b/server/image-encoders.h
> index c1ee341..2022d32 100644
> --- a/server/image-encoders.h
> +++ b/server/image-encoders.h
> @@ -15,6 +15,7 @@
>     You should have received a copy of the GNU Lesser General Public
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
> +
>  #ifndef IMAGE_ENCODERS_H_
>  #define IMAGE_ENCODERS_H_
>  
> diff --git a/server/inputs-channel-client.h b/server/inputs-channel-
> client.h
> index ba08dbf..b792804 100644
> --- a/server/inputs-channel-client.h
> +++ b/server/inputs-channel-client.h
> @@ -15,8 +15,8 @@
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
>  
> -#ifndef _INPUTS_CHANNEL_CLIENT_H_
> -#define _INPUTS_CHANNEL_CLIENT_H_
> +#ifndef INPUTS_CHANNEL_CLIENT_H_
> +#define INPUTS_CHANNEL_CLIENT_H_
>  
>  #include <glib-object.h>
>  
> @@ -79,4 +79,4 @@ enum {
>      RED_PIPE_ITEM_MIGRATE_DATA,
>  };
>  
> -#endif /* _INPUTS_CHANNEL_CLIENT_H_ */
> +#endif /* INPUTS_CHANNEL_CLIENT_H_ */
> diff --git a/server/inputs-channel.h b/server/inputs-channel.h
> index 26569fa..e3cc251 100644
> --- a/server/inputs-channel.h
> +++ b/server/inputs-channel.h
> @@ -15,8 +15,8 @@
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
>  
> -#ifndef _INPUTS_CHANNEL_H_
> -#define _INPUTS_CHANNEL_H_
> +#ifndef INPUTS_CHANNEL_H_
> +#define INPUTS_CHANNEL_H_
>  
>  // Inputs channel, dealing with keyboard, mouse, tablet.
>  // This include should only be used by reds.c and inputs-channel.c
> @@ -61,4 +61,4 @@ gboolean
> inputs_channel_is_src_during_migrate(InputsChannel *inputs);
>  
>  G_END_DECLS
>  
> -#endif
> +#endif /* INPUTS_CHANNEL_H_ */
> diff --git a/server/jpeg-encoder.h b/server/jpeg-encoder.h
> index 690a029..665cf9f 100644
> --- a/server/jpeg-encoder.h
> +++ b/server/jpeg-encoder.h
> @@ -27,8 +27,9 @@
>     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
> USE
>     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
> DAMAGE.
>  */
> -#ifndef _H_JPEG_ENCODER
> -#define _H_JPEG_ENCODER
> +
> +#ifndef JPEG_ENCODER_H_
> +#define JPEG_ENCODER_H_
>  
>  #include <spice/types.h>
>  
> @@ -58,4 +59,5 @@ void jpeg_encoder_destroy(JpegEncoderContext
> *encoder);
>  int jpeg_encode(JpegEncoderContext *jpeg, int quality,
> JpegEncoderImageType type,
>                  int width, int height, uint8_t *lines, unsigned int
> num_lines, int stride,
>                  uint8_t *io_ptr, unsigned int num_io_bytes);
> -#endif
> +
> +#endif /* JPEG_ENCODER_H_ */
> diff --git a/server/lz4-encoder.h b/server/lz4-encoder.h
> index f1de12a..9f3183d 100644
> --- a/server/lz4-encoder.h
> +++ b/server/lz4-encoder.h
> @@ -27,8 +27,9 @@
>     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
> USE
>     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
> DAMAGE.
>  */
> -#ifndef _H_LZ4_ENCODER
> -#define _H_LZ4_ENCODER
> +
> +#ifndef LZ4_ENCODER_H_
> +#define LZ4_ENCODER_H_
>  
>  #include <spice/types.h>
>  
> @@ -46,4 +47,5 @@ void lz4_encoder_destroy(Lz4EncoderContext
> *encoder);
>  /* returns the total size of the encoded data. */
>  int lz4_encode(Lz4EncoderContext *lz4, int height, int stride,
> uint8_t *io_ptr,
>                 unsigned int num_io_bytes, int top_down, uint8_t
> format);
> -#endif
> +
> +#endif /* LZ4_ENCODER_H_ */
> diff --git a/server/main-channel-client.h b/server/main-channel-
> client.h
> index 9c7009d..cf54f51 100644
> --- a/server/main-channel-client.h
> +++ b/server/main-channel-client.h
> @@ -14,8 +14,9 @@
>     You should have received a copy of the GNU Lesser General Public
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
> -#ifndef __MAIN_CHANNEL_CLIENT_H__
> -#define __MAIN_CHANNEL_CLIENT_H__
> +
> +#ifndef MAIN_CHANNEL_CLIENT_H_
> +#define MAIN_CHANNEL_CLIENT_H_
>  
>  #include <glib-object.h>
>  #include <common/messages.h>
> @@ -139,4 +140,4 @@ RedPipeItem
> *main_multi_media_time_item_new(RedChannelClient *rcc,
>  
>  G_END_DECLS
>  
> -#endif /* __MAIN_CHANNEL_CLIENT_H__ */
> +#endif /* MAIN_CHANNEL_CLIENT_H_ */
> diff --git a/server/main-channel.h b/server/main-channel.h
> index 0209024..8f886dd 100644
> --- a/server/main-channel.h
> +++ b/server/main-channel.h
> @@ -15,8 +15,8 @@
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
>  
> -#ifndef __MAIN_CHANNEL_H__
> -#define __MAIN_CHANNEL_H__
> +#ifndef MAIN_CHANNEL_H_
> +#define MAIN_CHANNEL_H_
>  
>  #include <stdint.h>
>  #include <glib-object.h>
> @@ -86,4 +86,4 @@ void main_channel_on_migrate_connected(MainChannel
> *main_channel,
>  
>  G_END_DECLS
>  
> -#endif
> +#endif /* MAIN_CHANNEL_H_ */
> diff --git a/server/main-dispatcher.h b/server/main-dispatcher.h
> index 9a425de..088a5c2 100644
> --- a/server/main-dispatcher.h
> +++ b/server/main-dispatcher.h
> @@ -15,8 +15,9 @@
>     You should have received a copy of the GNU Lesser General Public
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
> -#ifndef MAIN_DISPATCHER_H
> -#define MAIN_DISPATCHER_H
> +
> +#ifndef MAIN_DISPATCHER_H_
> +#define MAIN_DISPATCHER_H_
>  
>  #include "spice.h"
>  #include "dispatcher.h"
> @@ -60,4 +61,4 @@ void
> main_dispatcher_client_disconnect(MainDispatcher *self, RedClient
> *client);
>  
>  MainDispatcher* main_dispatcher_new(RedsState *reds,
> SpiceCoreInterfaceInternal *core);
>  
> -#endif //MAIN_DISPATCHER_H
> +#endif /* MAIN_DISPATCHER_H_ */
> diff --git a/server/migration-protocol.h b/server/migration-
> protocol.h
> index 8458187..c8ec56e 100644
> --- a/server/migration-protocol.h
> +++ b/server/migration-protocol.h
> @@ -15,8 +15,8 @@
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
>  
> -#ifndef _H_MIGRATION_PROTOCOL
> -#define _H_MIGRATION_PROTOCOL
> +#ifndef MIGRATION_PROTOCOL_H_
> +#define MIGRATION_PROTOCOL_H_
>  
>  #include <spice/macros.h>
>  #include <spice/vd_agent.h>
> @@ -212,4 +212,4 @@ static inline int
> migration_protocol_validate_header(SpiceMigrateDataHeader *hea
>      return TRUE;
>  }
>  
> -#endif
> +#endif /* MIGRATION_PROTOCOL_H_ */
> diff --git a/server/pixmap-cache.h b/server/pixmap-cache.h
> index f6e58e0..db293d2 100644
> --- a/server/pixmap-cache.h
> +++ b/server/pixmap-cache.h
> @@ -15,8 +15,9 @@
>     You should have received a copy of the GNU Lesser General Public
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
> -#ifndef _PIXMAP_CACHE_H
> -# define _PIXMAP_CACHE_H
> +
> +#ifndef PIXMAP_CACHE_H_
> +#define PIXMAP_CACHE_H_
>  
>  #include "red-channel.h"
>  
> @@ -70,4 +71,4 @@ void         pixmap_cache_clear(PixmapCache
> *cache);
>  int          pixmap_cache_unlocked_set_lossy(PixmapCache *cache,
> uint64_t id, int lossy);
>  bool         pixmap_cache_freeze(PixmapCache *cache);
>  
> -#endif /* _PIXMAP_CACHE_H */
> +#endif /* PIXMAP_CACHE_H_ */
> diff --git a/server/red-channel-capabilities.h b/server/red-channel-
> capabilities.h
> index f590eb2..e3a6b02 100644
> --- a/server/red-channel-capabilities.h
> +++ b/server/red-channel-capabilities.h
> @@ -48,4 +48,4 @@ extern GType red_channel_capabilities_type;
>  
>  G_END_DECLS
>  
> -#endif
> +#endif /* RED_CHANNEL_CAPABILITIES_H_ */
> diff --git a/server/red-channel-client.h b/server/red-channel-
> client.h
> index ebe06d8..4e2a445 100644
> --- a/server/red-channel-client.h
> +++ b/server/red-channel-client.h
> @@ -15,8 +15,8 @@
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
>  
> -#ifndef _H_RED_CHANNEL_CLIENT
> -#define _H_RED_CHANNEL_CLIENT
> +#ifndef RED_CHANNEL_CLIENT_H_
> +#define RED_CHANNEL_CLIENT_H_
>  
>  #include <glib-object.h>
>  #include <gio/gio.h>
> @@ -200,4 +200,4 @@ enum {
>  
>  G_END_DECLS
>  
> -#endif /* _H_RED_CHANNEL_CLIENT */
> +#endif /* RED_CHANNEL_CLIENT_H_ */
> diff --git a/server/red-channel.h b/server/red-channel.h
> index 1982656..38289c4 100644
> --- a/server/red-channel.h
> +++ b/server/red-channel.h
> @@ -19,8 +19,8 @@
>          yhalperi at redhat.com
>  */
>  
> -#ifndef _H_RED_CHANNEL
> -#define _H_RED_CHANNEL
> +#ifndef RED_CHANNEL_H_
> +#define RED_CHANNEL_H_
>  
>  #include <pthread.h>
>  #include <limits.h>
> @@ -249,4 +249,4 @@ void red_channel_disconnect_client(RedChannel
> *channel, RedChannelClient *rcc);
>  
>  G_END_DECLS
>  
> -#endif
> +#endif /* RED_CHANNEL_H_ */
> diff --git a/server/red-client.h b/server/red-client.h
> index d7e9cc7..28c4eb4 100644
> --- a/server/red-client.h
> +++ b/server/red-client.h
> @@ -16,8 +16,8 @@
>  
>  */
>  
> -#ifndef _H_RED_CLIENT
> -#define _H_RED_CLIENT
> +#ifndef RED_CLIENT_H_
> +#define RED_CLIENT_H_
>  
>  #include <glib-object.h>
>  
> @@ -73,4 +73,4 @@ RedsState* red_client_get_server(RedClient
> *client);
>  
>  G_END_DECLS
>  
> -#endif /* _H_RED_CLIENT */
> +#endif /* RED_CLIENT_H_ */
> diff --git a/server/red-common.h b/server/red-common.h
> index 3219b23..cb459b0 100644
> --- a/server/red-common.h
> +++ b/server/red-common.h
> @@ -15,8 +15,8 @@
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
>  
> -#ifndef _H_RED_COMMON
> -#define _H_RED_COMMON
> +#ifndef RED_COMMON_H_
> +#define RED_COMMON_H_
>  
>  #include <errno.h>
>  #include <stdbool.h>
> @@ -93,4 +93,4 @@ typedef struct GListIter {
>  #define GLIST_FOREACH_REVERSED(_list, _iter, _type, _data) \
>      GLIST_FOREACH_GENERIC(_list, _iter, _type, _data, prev)
>  
> -#endif
> +#endif /* RED_COMMON_H_ */
> diff --git a/server/red-parse-qxl.h b/server/red-parse-qxl.h
> index 86a2d93..c3846bd 100644
> --- a/server/red-parse-qxl.h
> +++ b/server/red-parse-qxl.h
> @@ -16,8 +16,8 @@
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
>  
> -#ifndef RED_ABI_TRANSLATE_H
> -#define RED_ABI_TRANSLATE_H
> +#ifndef RED_PARSE_QXL_H_
> +#define RED_PARSE_QXL_H_
>  
>  #include <spice/qxl_dev.h>
>  
> @@ -141,4 +141,4 @@ int red_get_cursor_cmd(RedMemSlotInfo *slots, int
> group_id,
>                         RedCursorCmd *red, QXLPHYSICAL addr);
>  void red_put_cursor_cmd(RedCursorCmd *red);
>  
> -#endif
> +#endif /* RED_PARSE_QXL_H_ */
> diff --git a/server/red-pipe-item.h b/server/red-pipe-item.h
> index 90cc817..f6bf68f 100644
> --- a/server/red-pipe-item.h
> +++ b/server/red-pipe-item.h
> @@ -15,8 +15,9 @@
>     You should have received a copy of the GNU Lesser General Public
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
> -#ifndef _H_RED_PIPE_ITEM
> -#define _H_RED_PIPE_ITEM
> +
> +#ifndef RED_PIPE_ITEM_H_
> +#define RED_PIPE_ITEM_H_
>  
>  #include <glib.h>
>  #include <common/ring.h>
> @@ -46,4 +47,4 @@ static inline void red_pipe_item_init(RedPipeItem
> *item, int type)
>  /* a convenience function for unreffing a pipe item after it has
> been sent */
>  void marshaller_unref_pipe_item(uint8_t *data, void *opaque);
>  
> -#endif
> +#endif /* RED_PIPE_ITEM_H_ */
> diff --git a/server/red-qxl.h b/server/red-qxl.h
> index 26e329d..93cc4d0 100644
> --- a/server/red-qxl.h
> +++ b/server/red-qxl.h
> @@ -15,8 +15,8 @@
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
>  
> -#ifndef _H_RED_DISPATCHER
> -#define _H_RED_DISPATCHER
> +#ifndef RED_DISPATCHER_H_
> +#define RED_DISPATCHER_H_
>  
>  #include "red-channel.h"
>  #include "spice-qxl.h"
> @@ -303,4 +303,4 @@ enum {
>  
>  void red_qxl_clear_pending(QXLState *qxl_state, int pending);
>  
> -#endif
> +#endif /* RED_DISPATCHER_H_ */
> diff --git a/server/red-record-qxl.h b/server/red-record-qxl.h
> index 293e24a..50bd7b7 100644
> --- a/server/red-record-qxl.h
> +++ b/server/red-record-qxl.h
> @@ -16,8 +16,8 @@
>     along with this program.  If not, see <http://www.gnu.org/license
> s/>.
>  */
>  
> -#ifndef RED_ABI_RECORD_H
> -#define RED_ABI_RECORD_H
> +#ifndef RED_RECORD_QXL_H_
> +#define RED_RECORD_QXL_H_
>  
>  #include <spice/qxl_dev.h>
>  
> @@ -45,4 +45,4 @@ void red_record_event(RedRecord *record, int what,
> uint32_t type);
>  void red_record_qxl_command(RedRecord *record, RedMemSlotInfo
> *slots,
>                              QXLCommandExt ext_cmd);
>  
> -#endif
> +#endif /* RED_RECORD_QXL_H_ */
> diff --git a/server/red-worker.h b/server/red-worker.h
> index d5b5a78..8ec28f1 100644
> --- a/server/red-worker.h
> +++ b/server/red-worker.h
> @@ -15,8 +15,8 @@
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
>  
> -#ifndef _H_REDWORKER
> -#define _H_REDWORKER
> +#ifndef RED_WORKER_H_
> +#define RED_WORKER_H_
>  
>  #include "red-common.h"
>  #include "red-qxl.h"
> @@ -31,4 +31,4 @@ RedWorker* red_worker_new(QXLInstance *qxl,
>  bool       red_worker_run(RedWorker *worker);
>  void red_worker_free(RedWorker *worker);
>  
> -#endif
> +#endif /* RED_WORKER_H_ */
> diff --git a/server/reds-private.h b/server/reds-private.h
> index 07b7b38..b8119ca 100644
> --- a/server/reds-private.h
> +++ b/server/reds-private.h
> @@ -15,8 +15,9 @@
>     You should have received a copy of the GNU Lesser General Public
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
> -#ifndef REDS_PRIVATE_H
> -#define REDS_PRIVATE_H
> +
> +#ifndef REDS_PRIVATE_H_
> +#define REDS_PRIVATE_H_
>  
>  #include <spice/protocol.h>
>  #include <spice/stats.h>
> @@ -142,4 +143,4 @@ struct RedsState {
>  #define FOREACH_QXL_INSTANCE(_reds, _iter, _qxl) \
>      GLIST_FOREACH(_reds->qxl_instances, _iter, QXLInstance, _qxl)
>  
> -#endif
> +#endif /* REDS_PRIVATE_H_ */
> diff --git a/server/reds-stream.h b/server/reds-stream.h
> index d5bd682..ac5c65b 100644
> --- a/server/reds-stream.h
> +++ b/server/reds-stream.h
> @@ -15,8 +15,8 @@
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
>  
> -#ifndef _H_REDS_STREAM
> -#define _H_REDS_STREAM
> +#ifndef REDS_STREAM_H_
> +#define REDS_STREAM_H_
>  
>  #include <openssl/ssl.h>
>  #include <common/mem.h>
> @@ -91,4 +91,4 @@ bool reds_sasl_handle_auth_mechname(RedsStream
> *stream, AsyncReadDone read_cb, v
>  bool reds_sasl_handle_auth_mechlen(RedsStream *stream, AsyncReadDone
> read_cb, void *opaque);
>  bool reds_sasl_start_auth(RedsStream *stream, AsyncReadDone read_cb,
> void *opaque);
>  
> -#endif
> +#endif /* REDS_STREAM_H_ */
> diff --git a/server/reds.h b/server/reds.h
> index 8a1fdfa..7466c60 100644
> --- a/server/reds.h
> +++ b/server/reds.h
> @@ -15,8 +15,8 @@
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
>  
> -#ifndef _H_REDS
> -#define _H_REDS
> +#ifndef REDS_H_
> +#define REDS_H_
>  
>  #include <stdint.h>
>  #include <sys/uio.h>
> @@ -127,4 +127,4 @@ void reds_core_timer_cancel(RedsState *reds,
>  void reds_core_timer_remove(RedsState *reds,
>                              SpiceTimer *timer);
>  
> -#endif
> +#endif /* REDS_H_ */
> diff --git a/server/smartcard-channel-client.h b/server/smartcard-
> channel-client.h
> index 612f9f8..c20a2fb 100644
> --- a/server/smartcard-channel-client.h
> +++ b/server/smartcard-channel-client.h
> @@ -15,8 +15,8 @@
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
>  
> -#ifndef SMARTCARD_CHANNEL_CLIENT_H__
> -#define SMARTCARD_CHANNEL_CLIENT_H__
> +#ifndef SMARTCARD_CHANNEL_CLIENT_H_
> +#define SMARTCARD_CHANNEL_CLIENT_H_
>  
>  #include <glib-object.h>
>  
> @@ -89,4 +89,4 @@ RedCharDeviceSmartcard*
> smartcard_channel_client_get_char_device(SmartCardChanne
>  
>  G_END_DECLS
>  
> -#endif /* SMARTCARD_CHANNEL_CLIENT_H__ */
> +#endif /* SMARTCARD_CHANNEL_CLIENT_H_ */
> diff --git a/server/smartcard.h b/server/smartcard.h
> index e3932c0..11d334f 100644
> --- a/server/smartcard.h
> +++ b/server/smartcard.h
> @@ -15,8 +15,9 @@
>     You should have received a copy of the GNU Lesser General Public
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
> -#ifndef __SMART_CARD_H__
> -#define __SMART_CARD_H__
> +
> +#ifndef SMART_CARD_H_
> +#define SMART_CARD_H_
>  
>  #include <glib-object.h>
>  
> @@ -75,4 +76,4 @@ enum {
>      RED_PIPE_ITEM_TYPE_SMARTCARD_MIGRATE_DATA,
>  };
>  
> -#endif // __SMART_CARD_H__
> +#endif /* SMART_CARD_H_ */
> diff --git a/server/sound.h b/server/sound.h
> index 76174cf..f7bcaa6 100644
> --- a/server/sound.h
> +++ b/server/sound.h
> @@ -32,4 +32,4 @@ void snd_set_playback_compression(int on);
>  
>  void snd_set_playback_latency(struct RedClient *client, uint32_t
> latency);
>  
> -#endif
> +#endif /* SOUND_H_ */
> diff --git a/server/spice-bitmap-utils.h b/server/spice-bitmap-
> utils.h
> index ffb6c74..2707704 100644
> --- a/server/spice-bitmap-utils.h
> +++ b/server/spice-bitmap-utils.h
> @@ -15,6 +15,7 @@
>     You should have received a copy of the GNU Lesser General Public
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
> +
>  #ifndef SPICE_BITMAP_UTILS_H_
>  #define SPICE_BITMAP_UTILS_H_
>  
> diff --git a/server/spice-core.h b/server/spice-core.h
> index 4d8f2ed..3d5c83b 100644
> --- a/server/spice-core.h
> +++ b/server/spice-core.h
> @@ -102,5 +102,4 @@ struct SpiceCoreInterface {
>      void (*channel_event)(int event, SpiceChannelEventInfo *info);
>  };
>  
> -
>  #endif /* SPICE_CORE_H_ */
> diff --git a/server/spice-experimental.h b/server/spice-
> experimental.h
> index f6bb480..589e29b 100644
> --- a/server/spice-experimental.h
> +++ b/server/spice-experimental.h
> @@ -15,9 +15,10 @@
>     You should have received a copy of the GNU Lesser General Public
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
> -#ifndef __SPICE_EXPERIMENTAL_H__
> -#define __SPICE_EXPERIMENTAL_H__
> +
> +#ifndef SPICE_EXPERIMENTAL_H_
> +#define SPICE_EXPERIMENTAL_H_
>  
>  #warning spice-experimental.h is deprecated
>  
> -#endif // __SPICE_EXPERIMENTAL_H__
> +#endif /* SPICE_EXPERIMENTAL_H_ */
> diff --git a/server/spice-replay.h b/server/spice-replay.h
> index 9a02869..19a0128 100644
> --- a/server/spice-replay.h
> +++ b/server/spice-replay.h
> @@ -15,6 +15,7 @@
>     You should have received a copy of the GNU Lesser General Public
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
> +
>  #ifndef SPICE_REPLAY_H_
>  #define SPICE_REPLAY_H_
>  
> @@ -34,4 +35,4 @@ void            spice_replay_free_cmd(SpiceReplay
> *replay, QXLCommandExt *cmd);
>  void            spice_replay_free(SpiceReplay *replay);
>  SpiceReplay *   spice_replay_new(FILE *file, int nsurfaces);
>  
> -#endif // SPICE_REPLAY_H_
> +#endif /* SPICE_REPLAY_H_ */
> diff --git a/server/stat-file.h b/server/stat-file.h
> index 0ead05c..29991d6 100644
> --- a/server/stat-file.h
> +++ b/server/stat-file.h
> @@ -15,6 +15,7 @@
>     You should have received a copy of the GNU Lesser General Public
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
> +
>  #ifndef STAT_FILE_H_
>  #define STAT_FILE_H_
>  
> diff --git a/server/stat.h b/server/stat.h
> index 5255efa..4e08c1d 100644
> --- a/server/stat.h
> +++ b/server/stat.h
> @@ -15,8 +15,8 @@
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
>  
> -#ifndef _H_STAT
> -#define _H_STAT
> +#ifndef STAT_H_
> +#define STAT_H_
>  
>  #include <stdint.h>
>  #include <glib.h>
> @@ -189,4 +189,4 @@ static inline void stat_add(G_GNUC_UNUSED
> stat_info_t *info,
>  #endif
>  }
>  
> -#endif /* _H_STAT */
> +#endif /* STAT_H_ */
> diff --git a/server/stream.h b/server/stream.h
> index 2dfd9e0..6f19461 100644
> --- a/server/stream.h
> +++ b/server/stream.h
> @@ -15,6 +15,7 @@
>     You should have received a copy of the GNU Lesser General Public
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
> +
>  #ifndef STREAM_H_
>  #define STREAM_H_
>  
> @@ -150,4 +151,4 @@
> void                  stream_agent_stop                             (
> StreamAgent
>  
>  void stream_detach_drawable(Stream *stream);
>  
> -#endif /* STREAM_H */
> +#endif /* STREAM_H_ */
> diff --git a/server/tree.h b/server/tree.h
> index 5d267e3..accd1b5 100644
> --- a/server/tree.h
> +++ b/server/tree.h
> @@ -15,8 +15,9 @@
>     You should have received a copy of the GNU Lesser General Public
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
> +
>  #ifndef TREE_H_
> -# define TREE_H_
> +#define TREE_H_
>  
>  #include <stdint.h>
>  #include <common/region.h>
> diff --git a/server/utils.h b/server/utils.h
> index c4b8b1e..ec2db2c 100644
> --- a/server/utils.h
> +++ b/server/utils.h
> @@ -15,8 +15,9 @@
>     You should have received a copy of the GNU Lesser General Public
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
> +
>  #ifndef UTILS_H_
> -# define UTILS_H_
> +#define UTILS_H_
>  
>  #include <stdint.h>
>  #include <glib.h>
> diff --git a/server/video-encoder.h b/server/video-encoder.h
> index a4cd2b3..71f4131 100644
> --- a/server/video-encoder.h
> +++ b/server/video-encoder.h
> @@ -18,8 +18,8 @@
>     License along with this library; if not, see <http://www.gnu.org/
> licenses/>.
>  */
>  
> -#ifndef _H_VIDEO_ENCODER
> -#define _H_VIDEO_ENCODER
> +#ifndef VIDEO_ENCODER_H_
> +#define VIDEO_ENCODER_H_
>  
>  #include <inttypes.h>
>  #include <glib.h>
> @@ -213,4 +213,4 @@ typedef struct RedVideoCodec {
>      uint32_t cap;
>  } RedVideoCodec;
>  
> -#endif
> +#endif /* VIDEO_ENCODER_H_ */
> diff --git a/server/zlib-encoder.h b/server/zlib-encoder.h
> index 2800102..e66eee0 100644
> --- a/server/zlib-encoder.h
> +++ b/server/zlib-encoder.h
> @@ -27,8 +27,9 @@
>     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
> USE
>     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
> DAMAGE.
>  */
> -#ifndef _H_ZLIB_ENCODER
> -#define _H_ZLIB_ENCODER
> +
> +#ifndef ZLIB_ENCODER_H_
> +#define ZLIB_ENCODER_H_
>  
>  #include <inttypes.h>
>  
> @@ -46,4 +47,5 @@ void zlib_encoder_destroy(ZlibEncoder *encoder);
>  /* returns the total size of the encoded data */
>  int zlib_encode(ZlibEncoder *zlib, int level, int input_size,
>                  uint8_t *io_ptr, unsigned int num_io_bytes);
> -#endif
> +
> +#endif /* ZLIB_ENCODER_H_ */


More information about the Spice-devel mailing list