Commit 6dfd85e1 authored by Frediano Ziglio's avatar Frediano Ziglio

Use "#pragma once" instead of preprocessor guards

Guards currently are quite different in format.
Unify updating to "#pragma once" syntax. This syntax is used
by GTK tools too.
To avoid possible regression public headers are left untouched.
Signed-off-by: Frediano Ziglio's avatarFrediano Ziglio <fziglio@redhat.com>
Acked-by: Snir Sheriber's avatarSnir Sheriber <ssheribe@redhat.com>
parent 60b9037c
Pipeline #55468 passed with stage
in 3 minutes and 13 seconds
......@@ -15,8 +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 BIO_GIO_H_
# define BIO_GIO_H_
#pragma once
#include <openssl/bio.h>
#include <gio/gio.h>
......@@ -26,5 +25,3 @@ G_BEGIN_DECLS
BIO* bio_new_giostream(GIOStream *stream);
G_END_DECLS
#endif /* !BIO_GIO_H_ */
......@@ -15,8 +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 CHANNEL_DISPLAY_PRIV_H_
# define CHANNEL_DISPLAY_PRIV_H_
#pragma once
#include <pixman.h>
#ifdef WIN32
......@@ -203,5 +202,3 @@ gboolean hand_pipeline_to_widget(display_stream *st, GstPipeline *pipeline);
void spice_frame_free(SpiceFrame *frame);
G_END_DECLS
#endif // CHANNEL_DISPLAY_PRIV_H_
......@@ -15,10 +15,8 @@
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_CLIENT_PLAYBACK_CHANNEL_PRIV_H__
#define __SPICE_CLIENT_PLAYBACK_CHANNEL_PRIV_H__
#pragma once
gboolean spice_playback_channel_is_active(SpicePlaybackChannel *channel);
guint32 spice_playback_channel_get_latency(SpicePlaybackChannel *channel);
void spice_playback_channel_sync_latency(SpicePlaybackChannel *channel);
#endif
......@@ -18,8 +18,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_CLIENT_USBREDIR_CHANNEL_PRIV_H__
#define __SPICE_CLIENT_USBREDIR_CHANNEL_PRIV_H__
#pragma once
#ifdef USE_USBREDIR
......@@ -76,5 +75,3 @@ int spice_usbredir_write_callback(SpiceUsbredirChannel *channel, uint8_t *data,
G_END_DECLS
#endif /* USE_USBREDIR */
#endif /* __SPICE_CLIENT_USBREDIR_CHANNEL_PRIV_H__ */
......@@ -15,11 +15,8 @@
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_CLIENT_SW_CANVAS_H__
#define __SPICE_CLIENT_SW_CANVAS_H__
#pragma once
#define SW_CANVAS_CACHE
#include <common/sw_canvas.h>
#endif /* __SPICE_CLIENT_SW_CANVAS_H__ */
......@@ -18,8 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _CONTINUATION_H_
#define _CONTINUATION_H_
#pragma once
#include "spice-common.h"
#include <stddef.h>
......@@ -53,7 +52,6 @@ int cc_swap(struct continuation *from, struct continuation *to);
SPICE_ALIGNED_CAST(type *, \
(((char *)obj) - offset_of(type, member)))
#endif
/*
* Local variables:
* c-indent-level: 8
......
......@@ -18,8 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _COROUTINE_H_
#define _COROUTINE_H_
#pragma once
#include "config.h"
......@@ -73,7 +72,6 @@ static inline gboolean coroutine_self_is_main(void) {
return coroutine_self() == NULL || coroutine_is_main(coroutine_self());
}
#endif
/*
* Local variables:
* c-indent-level: 8
......
......@@ -15,8 +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 SPICEGTK_DECODE_H_
# define SPICEGTK_DECODE_H_
#pragma once
#include <glib.h>
......@@ -40,5 +39,3 @@ SpiceJpegDecoder *jpeg_decoder_new(void);
void jpeg_decoder_destroy(SpiceJpegDecoder *d);
G_END_DECLS
#endif // SPICEGTK_DECODE_H_
......@@ -18,8 +18,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_DESKTOP_INTEGRATION_H__
#define __SPICE_DESKTOP_INTEGRATION_H__
#pragma once
#include "spice-client.h"
......@@ -60,5 +59,3 @@ void spice_desktop_integration_inhibit_automount(SpiceDesktopIntegration *self);
void spice_desktop_integration_uninhibit_automount(SpiceDesktopIntegration *self);
G_END_DECLS
#endif /* __SPICE_DESKTOP_INTEGRATION_H__ */
......@@ -18,8 +18,7 @@
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef __GIO_COROUTINE_H__
#define __GIO_COROUTINE_H__
#pragma once
#include <gio/gio.h>
#include "coroutine.h"
......@@ -62,5 +61,3 @@ void g_coroutine_signal_emit (gpointer instance, guint signal_id,
void g_coroutine_object_notify(GObject *object, const gchar *property_name);
G_END_DECLS
#endif /* __GIO_COROUTINE_H__ */
......@@ -15,8 +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_GIO_PIPE_H__
#define __SPICE_GIO_PIPE_H__
#pragma once
#include <gio/gio.h>
......@@ -25,5 +24,3 @@ G_BEGIN_DECLS
void spice_make_pipe(GIOStream **p1, GIOStream **p2);
G_END_DECLS
#endif /* __SPICE_GIO_PIPE_H__ */
......@@ -15,8 +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 __SMARTCARD_MANAGER_PRIV_H__
#define __SMARTCARD_MANAGER_PRIV_H__
#pragma once
#include "config.h"
#include <gio/gio.h>
......@@ -33,5 +32,3 @@ gboolean spice_smartcard_manager_init_finish(SpiceSession *session,
GError **err);
G_END_DECLS
#endif /* __SMARTCARD_MANAGER_PRIV_H__ */
......@@ -15,8 +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_AUDIO_PRIVATE_H__
#define __SPICE_AUDIO_PRIVATE_H__
#pragma once
#include <glib.h>
#include <gio/gio.h>
......@@ -41,5 +40,3 @@ void spice_audio_get_record_volume_info_async(SpiceAudio *audio, GCancellable *c
gboolean spice_audio_get_record_volume_info_finish(SpiceAudio *audio, GAsyncResult *res,
gboolean *mute, guint8 *nchannels, guint16 **volume, GError **error);
G_END_DECLS
#endif /* __SPICE_AUDIO_PRIVATE_H__ */
......@@ -15,8 +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_CHANNEL_CACHE_H_
# define SPICE_CHANNEL_CACHE_H_
#pragma once
#include "common/mem.h"
......@@ -150,5 +149,3 @@ static inline void cache_free(display_cache *cache)
}
G_END_DECLS
#endif // SPICE_CHANNEL_CACHE_H_
......@@ -15,8 +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_CLIENT_CHANNEL_PRIV_H__
#define __SPICE_CLIENT_CHANNEL_PRIV_H__
#pragma once
#include "config.h"
......@@ -210,5 +209,3 @@ gint spice_channel_unix_read_fd(SpiceChannel *channel);
#endif
G_END_DECLS
#endif /* __SPICE_CLIENT_CHANNEL_PRIV_H__ */
......@@ -15,8 +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_COMMON_H_
# define SPICE_COMMON_H_
#pragma once
/* system */
#include <stdio.h>
......@@ -32,5 +31,3 @@
#include "common/marshaller.h"
#include "spice-util.h"
#endif // SPICE_COMMON_H_
......@@ -15,8 +15,7 @@
License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __SPICE_FILE_TRANSFER_TASK_PRIV_H__
#define __SPICE_FILE_TRANSFER_TASK_PRIV_H__
#pragma once
#include "config.h"
......@@ -53,5 +52,3 @@ gssize spice_file_transfer_task_read_finish(SpiceFileTransferTask *self,
gboolean spice_file_transfer_task_is_completed(SpiceFileTransferTask *self);
G_END_DECLS
#endif /* __SPICE_FILE_TRANSFER_TASK_PRIV_H__ */
......@@ -15,8 +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_GRABSEQUENCE_PRIV_H__
#define __SPICE_GRABSEQUENCE_PRIV_H__
#pragma once
#include <glib.h>
......@@ -25,5 +24,3 @@ struct _SpiceGrabSequence {
guint nkeysyms;
guint *keysyms;
};
#endif
......@@ -15,8 +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_CLIENT_GSTAUDIO_H__
#define __SPICE_CLIENT_GSTAUDIO_H__
#pragma once
#include "spice-client.h"
#include "spice-audio.h"
......@@ -52,5 +51,3 @@ SpiceGstaudio *spice_gstaudio_new(SpiceSession *session,
GMainContext *context, const char *name);
G_END_DECLS
#endif /* __SPICE_CLIENT_GSTAUDIO_H__ */
......@@ -15,8 +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_CLIENT_GTK_SESSION_PRIV_H__
#define __SPICE_CLIENT_GTK_SESSION_PRIV_H__
#pragma once
#include "spice-gtk-session.h"
......@@ -46,5 +45,3 @@ gboolean spice_gtk_session_get_keyboard_has_focus(SpiceGtkSession *self);
gboolean spice_gtk_session_get_mouse_has_pointer(SpiceGtkSession *self);
G_END_DECLS
#endif /* __SPICE_CLIENT_GTK_SESSION_PRIV_H__ */
......@@ -15,8 +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_CLIENT_PULSE_H__
#define __SPICE_CLIENT_PULSE_H__
#pragma once
#include "spice-client.h"
#include "spice-audio.h"
......@@ -53,5 +52,3 @@ SpicePulse *spice_pulse_new(SpiceSession *session,
const char *name);
G_END_DECLS
#endif /* __SPICE_CLIENT_PULSE_H__ */
......@@ -15,8 +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_CLIENT_SESSION_PRIV_H__
#define __SPICE_CLIENT_SESSION_PRIV_H__
#pragma once
#include "config.h"
......@@ -99,5 +98,3 @@ gboolean spice_session_set_migration_session(SpiceSession *session, SpiceSession
SpiceAudio *spice_audio_get(SpiceSession *session, GMainContext *context);
const gchar* spice_audio_data_mode_to_string(gint mode);
G_END_DECLS
#endif /* __SPICE_CLIENT_SESSION_PRIV_H__ */
......@@ -15,8 +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_URI_PRIV_H__
#define __SPICE_URI_PRIV_H__
#pragma once
#include "spice-uri.h"
......@@ -26,5 +25,3 @@ SpiceURI* spice_uri_new(void);
gboolean spice_uri_parse(SpiceURI* self, const gchar* uri, GError** error);
G_END_DECLS
#endif /* __SPICE_URI_PRIV_H__ */
......@@ -15,8 +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_UTIL_PRIV_H
#define SPICE_UTIL_PRIV_H
#pragma once
#include <glib.h>
#include "spice-util.h"
......@@ -34,5 +33,3 @@ void spice_mono_edge_highlight(unsigned width, unsigned hight,
const guint8 *and, const guint8 *xor, guint8 *dest);
G_END_DECLS
#endif /* SPICE_UTIL_PRIV_H */
......@@ -15,8 +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_WIDGET_PRIV_H__
#define __SPICE_WIDGET_PRIV_H__
#pragma once
#include "config.h"
......@@ -177,5 +176,3 @@ void spice_display_widget_gl_scanout (SpiceDisplay *display);
void spice_display_widget_update_monitor_area(SpiceDisplay *display);
G_END_DECLS
#endif
......@@ -18,8 +18,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_USB_ACL_HELPER_H__
#define __SPICE_USB_ACL_HELPER_H__
#pragma once
#include "spice-client.h"
#include <gio/gio.h>
......@@ -68,5 +67,3 @@ gboolean spice_usb_acl_helper_open_acl_finish(
void spice_usb_acl_helper_cancel(SpiceUsbAclHelper *self);
G_END_DECLS
#endif /* __SPICE_USB_ACL_HELPER_H__ */
......@@ -19,8 +19,7 @@
License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __SPICE_USB_BACKEND_H__
#define __SPICE_USB_BACKEND_H__
#pragma once
#include <usbredirfilter.h>
#include "usb-device-manager.h"
......@@ -90,5 +89,3 @@ void spice_usb_backend_channel_get_guest_filter(SpiceUsbBackendChannel *ch,
void spice_usb_backend_return_write_data(SpiceUsbBackendChannel *ch, void *data);
G_END_DECLS
#endif
......@@ -18,8 +18,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_USB_DEVICE_MANAGER_PRIV_H__
#define __SPICE_USB_DEVICE_MANAGER_PRIV_H__
#pragma once
#include "usb-device-manager.h"
......@@ -38,5 +37,3 @@ gboolean spice_usb_device_is_isochronous(const SpiceUsbDevice *device);
#endif
G_END_DECLS
#endif /* __SPICE_USB_DEVICE_MANAGER_PRIV_H__ */
......@@ -19,8 +19,7 @@
Dmitry Fleytman <dmitry@daynix.com>
Kirill Moizik <kirill@daynix.com>
*/
#ifndef USBDK_HEADER
#define USBDK_HEADER
#pragma once
typedef struct tag_usbdk_api_wrapper usbdk_api_wrapper;
......@@ -31,4 +30,3 @@ HANDLE usbdk_create_hider_handle(usbdk_api_wrapper *usbdk_api);
void usbdk_api_set_hide_rules(usbdk_api_wrapper *usbdk_api, HANDLE hider_handle, gchar *redirect_on_connect);
BOOL usbdk_clear_hide_rules(usbdk_api_wrapper *usbdk_api, HANDLE hider_handle);
void usbdk_close_hider_handle(usbdk_api_wrapper *usbdk_api, HANDLE hider_handle);
#endif
......@@ -18,8 +18,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_USBUTIL_H__
#define __SPICE_USBUTIL_H__
#pragma once
#include <glib.h>
......@@ -35,4 +34,3 @@ void spice_usb_util_get_device_strings(int bus, int address,
G_END_DECLS
#endif /* USE_USBREDIR */
#endif /* __SPICE_USBUTIL_H__ */
......@@ -15,8 +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_VMC_STREAM_H__
#define __SPICE_VMC_STREAM_H__
#pragma once
#include <gio/gio.h>
......@@ -77,5 +76,3 @@ GType spice_vmc_stream_get_type (void) G_GNUC_CONST;
SpiceVmcStream* spice_vmc_stream_new (SpiceChannel *channel);
G_END_DECLS
#endif /* __SPICE_VMC_STREAM_H__ */
......@@ -19,8 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef VNC_DISPLAY_KEYMAP_H
#define VNC_DISPLAY_KEYMAP_H
#pragma once
#include <glib.h>
......@@ -32,5 +31,3 @@ guint16 vnc_display_keymap_gdk2xtkbd(const guint16 *keycode_map,
void vnc_display_keyval_set_entries(void);
void vnc_display_keyval_free_entries(void);
guint vnc_display_keyval_from_keycode(guint keycode, guint keyval);
#endif /* VNC_DISPLAY_KEYMAP_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment