use '#pragma once' instead of #ifndef..#define..#endif guards

This commit is contained in:
Jordan Lee 2016-03-29 16:37:21 +00:00
parent 77b5105ea0
commit 1af60ad6ad
129 changed files with 149 additions and 417 deletions

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef DTR_DAEMON_H
#define DTR_DAEMON_H
#pragma once
struct tr_error;
@ -26,4 +25,3 @@ bool dtr_daemon (const dtr_callbacks * cb,
int * exit_code,
struct tr_error ** error);
#endif /* DTR_DAEMON_H */

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef GTR_ACTIONS_H
#define GTR_ACTIONS_H
#pragma once
#include <gtk/gtk.h>
#include "tr-core.h"
@ -28,4 +27,3 @@ void gtr_action_set_toggled (const char * action_name, gboolean is_toggle
void gtr_action_set_important (const char * action_name, gboolean is_important);
GtkWidget* gtr_action_get_widget (const char * path);
#endif

View File

@ -22,8 +22,7 @@
* DEALINGS IN THE SOFTWARE.
*****************************************************************************/
#ifndef GTR_CONFIG_H
#define GTR_CONFIG_H
#pragma once
#include <inttypes.h>
#include <libtransmission/transmission.h> /* tr_variant, tr_session */
@ -46,4 +45,3 @@ void gtr_pref_string_set (const tr_quark key, const char * v
void gtr_pref_save (tr_session *);
struct tr_variant* gtr_pref_get_all (void);
#endif /* GTR_CONFIG_H */

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef GTR_TORRENT_DETAILS_H
#define GTR_TORRENT_DETAILS_H
#pragma once
#include <gtk/gtk.h>
#include "tr-core.h"
@ -19,4 +18,3 @@ GtkWidget* gtr_torrent_details_dialog_new (GtkWindow * parent,
void gtr_torrent_details_dialog_set_torrents (GtkWidget * details_dialog,
GSList * torrent_ids);
#endif /* GTR_TORRENT_DETAILS_H */

View File

@ -22,8 +22,7 @@
* DEALINGS IN THE SOFTWARE.
*****************************************************************************/
#ifndef GTR_DIALOGS_H
#define GTR_DIALOGS_H
#pragma once
#include "tr-core.h"
#include "util.h"
@ -36,4 +35,3 @@ void gtr_confirm_remove (GtkWindow * parent,
GSList * gtorrents,
gboolean doDelete);
#endif /* GTR_DIALOGS_H */

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef GTR_FAVICON_CACHE_H
#define GTR_FAVICON_CACHE_H
#pragma once
#include <gtk/gtk.h>
#include <libtransmission/transmission.h>
@ -23,5 +22,3 @@ void gtr_get_favicon_from_url (tr_session * session,
GFunc pixbuf_ready_func,
gpointer pixbuf_ready_func_data);
#endif

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef GTK_TORRENT_FILE_LIST_H
#define GTK_TORRENT_FILE_LIST_H
#pragma once
#include <gtk/gtk.h>
#include "tr-core.h"
@ -17,4 +16,3 @@ GtkWidget * gtr_file_list_new (TrCore *, int torrent_id);
void gtr_file_list_clear (GtkWidget *);
void gtr_file_list_set_torrent (GtkWidget *, int torrent_id);
#endif

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef GTR_FILTER_H
#define GTR_FILTER_H
#pragma once
#include <gtk/gtk.h>
#include <libtransmission/transmission.h>
@ -17,4 +16,3 @@ GtkWidget * gtr_filter_bar_new (tr_session * session,
GtkTreeModel * torrent_model,
GtkTreeModel ** filter_model);
#endif

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef GTR_HIG_H
#define GTR_HIG_H
#pragma once
#include <gtk/gtk.h>
@ -73,4 +72,3 @@ enum
GUI_PAD_LARGE = 12
};
#endif /* GTR_HIG_H */

View File

@ -6,8 +6,7 @@
* $Id$
*/
#ifndef GTR_ICONS_H
#define GTR_ICONS_H
#pragma once
#define DIRECTORY_MIME_TYPE "folder"
#define UNKNOWN_MIME_TYPE "unknown"
@ -18,4 +17,3 @@ GdkPixbuf * gtr_get_mime_type_icon (const char * mime_type,
GtkIconSize icon_size,
GtkWidget * for_widget);
#endif

View File

@ -7,12 +7,10 @@
* $Id$
*/
#ifndef GTR_TORRENT_CREATION_DIALOG_H
#define GTR_TORRENT_CREATION_DIALOG_H
#pragma once
#include <gtk/gtk.h>
#include "tr-core.h"
GtkWidget* gtr_torrent_creation_dialog_new (GtkWindow * parent, TrCore * core);
#endif

View File

@ -8,11 +8,9 @@
*/
#ifndef GTR_MSGWIN_H
#define GTR_MSGWIN_H
#pragma once
#include "tr-core.h"
GtkWidget * gtr_message_log_window_new (GtkWindow * parent, TrCore * core);
#endif

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef GTR_NOTIFY_H
#define GTR_NOTIFY_H
#pragma once
#include "tr-core.h"
@ -18,4 +17,3 @@ void gtr_notify_torrent_added (const char * name);
void gtr_notify_torrent_completed (TrCore * core, int torrent_id);
#endif

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef GTR_OPEN_DIALOG_H
#define GTR_OPEN_DIALOG_H
#pragma once
#include <gtk/gtk.h>
#include "tr-core.h"
@ -19,4 +18,3 @@ GtkWidget* gtr_torrent_open_from_file_dialog_new (GtkWindow * parent, TrCore * c
/* This dialog assumes ownership of the ctor */
GtkWidget* gtr_torrent_options_dialog_new (GtkWindow * parent, TrCore * core, tr_ctor * ctor);
#endif /* GTR_ADD_DIALOG */

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef GTR_RELOCATE_H
#define GTR_RELOCATE_H
#pragma once
#include <gtk/gtk.h>
#include "tr-core.h"
@ -17,4 +16,3 @@ GtkWidget * gtr_relocate_dialog_new (GtkWindow * parent,
TrCore * core,
GSList * torrentIds);
#endif

View File

@ -7,12 +7,10 @@
* $Id$
*/
#ifndef GTR_STATS_DIALOG_H
#define GTR_STATS_DIALOG_H
#pragma once
#include <gtk/gtk.h>
#include "tr-core.h"
GtkWidget* gtr_stats_dialog_new (GtkWindow * parent, TrCore * core);
#endif /* GTR_STATS_DIALOG_H */

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef GTR_TORRENT_CELL_RENDERER_H
#define GTR_TORRENT_CELL_RENDERER_H
#pragma once
#include <gtk/gtk.h>
@ -40,4 +39,3 @@ GType torrent_cell_renderer_get_type (void) G_GNUC_CONST;
GtkCellRenderer * torrent_cell_renderer_new (void);
#endif /* GTR_TORRENT_CELL_RENDERER_H */

View File

@ -22,8 +22,7 @@
* DEALINGS IN THE SOFTWARE.
*****************************************************************************/
#ifndef GTR_CORE_H
#define GTR_CORE_H
#pragma once
#include <gtk/gtk.h>
@ -196,5 +195,3 @@ enum
G_END_DECLS
#endif /* GTR_CORE_H */

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef GTR_ICON_H
#define GTR_ICON_H
#pragma once
#include <gtk/gtk.h>
#include "tr-core.h"
@ -16,4 +15,3 @@
gpointer gtr_icon_new (TrCore * core);
void gtr_icon_refresh (gpointer);
#endif /* GTR_ICON_H */

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef GTR_PREFS_H
#define GTR_PREFS_H
#pragma once
#include <gtk/gtk.h>
@ -53,4 +52,3 @@ enum
SECONDARY_WINDOW_REFRESH_INTERVAL_SECONDS = 2
};
#endif /* GTR_PREFS_H */

View File

@ -22,8 +22,7 @@
* DEALINGS IN THE SOFTWARE.
*****************************************************************************/
#ifndef GTR_WINDOW_H
#define GTR_WINDOW_H
#pragma once
#include <gtk/gtk.h>
#include "tr-core.h"
@ -33,4 +32,3 @@ GtkTreeSelection * gtr_window_get_selection (GtkWindow *);
void gtr_window_set_busy (GtkWindow *, gboolean isBusy);
void gtr_window_refresh (GtkWindow *);
#endif /* GTR_WINDOW_H */

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef GTR_UTIL_H
#define GTR_UTIL_H
#pragma once
#include <sys/types.h>
#include <glib.h>
@ -164,4 +163,3 @@ void gtr_paste_clipboard_url_into_entry (GtkWidget * entry);
* and prevents selected text in the label from being deselected */
void gtr_label_set_text (GtkLabel * lb, const char * text);
#endif /* GTR_UTIL_H */

View File

@ -1,10 +1,9 @@
#ifndef CONVERT_UNICODE_H
#define CONVERT_UNICODE_H
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#error only libtransmission should #include this header.
#endif
#pragma once
/*
* Copyright 2001-2004 Unicode, Inc.
*
@ -159,5 +158,3 @@ Boolean tr_utf8_validate (const char * str, size_t max_len, const char ** end);
#endif
/* --------------------------------------------------------------------- */
#endif /* CONVERT_UNICODE_H */

View File

@ -11,8 +11,7 @@
#error only the libtransmission announcer module should #include this header.
#endif
#ifndef _TR_ANNOUNCER_COMMON_H_
#define _TR_ANNOUNCER_COMMON_H_
#pragma once
#include "transmission.h" /* SHA_DIGEST_LENGTH */
#include "session.h" /* PEER_ID_LEN */
@ -235,4 +234,3 @@ void tr_tracker_udp_announce (tr_session * session,
void tr_tracker_udp_start_shutdown (tr_session * session);
#endif /* _TR_ANNOUNCER_COMMON_H_ */

View File

@ -8,11 +8,10 @@
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#error only libtransmission should #include this header.
#endif
#ifndef _TR_ANNOUNCER_H_
#define _TR_ANNOUNCER_H_
#pragma once
#include "transmission.h"
@ -111,6 +110,3 @@ void tr_tracker_udp_close (tr_session * session);
bool tr_tracker_udp_is_idle (const tr_session * session);
#endif /* _TR_ANNOUNCER_H_ */

View File

@ -8,11 +8,10 @@
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#error only libtransmission should #include this header.
#endif
#ifndef TR_BANDWIDTH_H
#define TR_BANDWIDTH_H
#pragma once
#include <assert.h>
@ -267,4 +266,4 @@ void tr_bandwidthSetPeer (tr_bandwidth * bandwidth,
struct tr_peerIo * peerIo);
/* @} */
#endif

View File

@ -11,8 +11,7 @@
#error only libtransmission should #include this header.
#endif
#ifndef TR_BITFIELD_H
#define TR_BITFIELD_H 1
#pragma once
#include "transmission.h"
@ -97,4 +96,3 @@ tr_bitfieldHasNone (const tr_bitfield * b)
bool tr_bitfieldHas (const tr_bitfield * b, size_t n);
#endif

View File

@ -8,11 +8,10 @@
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#error only libtransmission should #include this header.
#endif
#ifndef TR_BLOCKLIST_H
#define TR_BLOCKLIST_H
#pragma once
struct tr_address;
@ -40,4 +39,3 @@ bool tr_blocklistFileHasAddress (tr_blocklistFile * b,
int tr_blocklistFileSetContent (tr_blocklistFile * b,
const char * filename);
#endif

View File

@ -11,8 +11,7 @@
#error only libtransmission should #include this header.
#endif
#ifndef TR_CACHE_H
#define TR_CACHE_H
#pragma once
struct evbuffer;
@ -67,4 +66,3 @@ int tr_cacheFlushFile (tr_cache * cache,
tr_torrent * torrent,
tr_file_index_t file);
#endif

View File

@ -11,8 +11,7 @@
#error only libtransmission should #include this header.
#endif
#ifndef TR_CLIENTS_H
#define TR_CLIENTS_H
#pragma once
/**
* @brief parse a peer-id into a human-readable client name and version number
@ -20,4 +19,3 @@
*/
char* tr_clientForId (char * buf, size_t buflen, const void * peer_id);
#endif

View File

@ -11,8 +11,7 @@
#error only libtransmission should #include this header.
#endif
#ifndef TR_COMPLETION_H
#define TR_COMPLETION_H
#pragma once
#include "transmission.h"
#include "bitfield.h"
@ -142,5 +141,3 @@ tr_cpInvalidateDND (tr_completion * cp)
cp->sizeWhenDoneIsDirty = true;
}
#endif

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef TR_CRYPTO_TEST_REF_H
#define TR_CRYPTO_TEST_REF_H
#pragma once
/* #define CRYPTO_REFERENCE_CHECK */
@ -171,4 +170,3 @@
#endif /* CRYPTO_REFERENCE_CHECK */
#endif /* TR_CRYPTO_TEST_REF_H */

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef TR_CRYPTO_UTILS_H
#define TR_CRYPTO_UTILS_H
#pragma once
#include <inttypes.h>
#include <stddef.h>
@ -222,4 +221,3 @@ tr_hex_to_sha1 (uint8_t * sha1,
}
#endif
#endif /* TR_CRYPTO_UTILS_H */

View File

@ -7,13 +7,12 @@
* $Id$
*/
#ifndef TR_ENCRYPTION_H
#define TR_ENCRYPTION_H
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#error only libtransmission should #include this header.
#endif
#pragma once
#include <inttypes.h>
#include "crypto-utils.h"
@ -85,4 +84,3 @@ bool tr_cryptoSecretKeySha1 (const tr_crypto * crypto,
/* @} */
#endif

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef TR_ERROR_TYPES_H
#define TR_ERROR_TYPES_H
#pragma once
#ifdef _WIN32
@ -38,4 +37,3 @@
#endif /* _WIN32 */
#endif /* TR_ERROR_TYPES_H */

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef TR_ERROR_H
#define TR_ERROR_H
#pragma once
#include <stdarg.h>
@ -171,4 +170,3 @@ void tr_error_propagate_prefixed (tr_error ** new_error,
}
#endif
#endif

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef TR_FILE_H
#define TR_FILE_H
#pragma once
#include <inttypes.h>
#include <time.h>
@ -691,4 +690,3 @@ bool tr_sys_dir_close (tr_sys_dir_t handle,
}
#endif
#endif

View File

@ -8,11 +8,10 @@
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#error only libtransmission should #include this header.
#endif
#ifndef TR_HANDSHAKE_H
#define TR_HANDSHAKE_H
#pragma once
#include "transmission.h"
#include "net.h"
@ -51,4 +50,3 @@ struct tr_peerIo* tr_handshakeStealIO (tr_handshake * handshake);
/** @} */
#endif

View File

@ -11,8 +11,7 @@
#error only libtransmission should #include this header.
#endif
#ifndef TR_RECENT_HISTORY_H
#define TR_RECENT_HISTORY_H
#pragma once
/**
* A generic short-term memory object that remembers how many times
@ -56,4 +55,3 @@ void tr_historyAdd (tr_recentHistory *, time_t when, unsigned int n);
*/
unsigned int tr_historyGet (const tr_recentHistory *, time_t when, unsigned int seconds);
#endif

View File

@ -11,8 +11,7 @@
#error only libtransmission should #include this header.
#endif
#ifndef TR_IO_H
#define TR_IO_H 1
#pragma once
struct tr_torrent;
@ -64,4 +63,3 @@ void tr_ioFindFileLocation (const tr_torrent * tor,
/* @} */
#endif

View File

@ -9,8 +9,7 @@
/* Note VERBOSE needs to be (un)defined before including this file */
#ifndef LIBTRANSMISSION_TEST_H
#define LIBTRANSMISSION_TEST_H 1
#pragma once
#include <stdio.h>
#include <string.h> /* strlen() */
@ -101,4 +100,3 @@ void libtest_sandbox_destroy (const char * sandbox);
void libttest_sync (void);
#endif /* !LIBTRANSMISSION_TEST_H */

View File

@ -11,8 +11,7 @@
#error only libtransmission should #include this header.
#endif
#ifndef TR_LIST_H
#define TR_LIST_H
#pragma once
/**
* @addtogroup utils Utilities
@ -110,5 +109,4 @@ void tr_list_insert_sorted (tr_list ** list,
/* @} */
#endif /* TR_LIST_H */

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef TR_LOG_H
#define TR_LOG_H 1
#pragma once
#include <stddef.h> /* size_t */
@ -129,4 +128,3 @@ char* tr_logGetTimeStr (char * buf, size_t buflen) TR_GNUC_NONNULL (1);
/** @} */
#endif

View File

@ -11,8 +11,7 @@
#error only libtransmission should #include this header.
#endif
#ifndef TR_MAGNET_H
#define TR_MAGNET_H 1
#pragma once
#include "transmission.h"
#include "variant.h"
@ -39,4 +38,3 @@ void tr_magnetCreateMetainfo (const tr_magnet_info *, tr_variant *);
void tr_magnetFree (tr_magnet_info * info);
#endif

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef TR_MAKEMETA_H
#define TR_MAKEMETA_H 1
#pragma once
#ifdef __cplusplus
extern "C" {
@ -130,4 +129,3 @@ void tr_makeMetaInfo (tr_metainfo_builder * builder,
}
#endif
#endif

View File

@ -11,8 +11,7 @@
#error only libtransmission should #include this header.
#endif
#ifndef TR_METAINFO_H
#define TR_METAINFO_H 1
#pragma once
#include "transmission.h"
#include "variant.h"
@ -28,5 +27,3 @@ void tr_metainfoRemoveSaved (const tr_session * session,
char* tr_metainfoGetBasename (const tr_info *);
#endif

View File

@ -8,11 +8,10 @@
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#error only libtransmission should #include this header.
#endif
#ifndef TR_NATPMP_H
#define TR_NATPMP_H 1
#pragma once
/**
* @addtogroup port_forwarding Port Forwarding
@ -28,4 +27,3 @@ void tr_natpmpClose (tr_natpmp *);
int tr_natpmpPulse (tr_natpmp *, tr_port port, bool isEnabled, tr_port * public_port);
/* @} */
#endif

View File

@ -23,11 +23,10 @@
*****************************************************************************/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#error only libtransmission should #include this header.
#endif
#ifndef TR_NET_H
#define TR_NET_H
#pragma once
#ifdef _WIN32
#include <inttypes.h>
@ -174,4 +173,3 @@ char* tr_net_strerror (char * buf, size_t buflen, int err);
const unsigned char *tr_globalIPv6 (void);
#endif /* TR_NET_H */

View File

@ -11,8 +11,7 @@
#error only libtransmission should #include this header.
#endif
#ifndef TR_PEER_H
#define TR_PEER_H
#pragma once
#include "transmission.h"
#include "bitfield.h"
@ -180,4 +179,3 @@ void tr_swarmIncrementActivePeers (struct tr_swarm * swarm, tr_direction directi
/** @} */
#endif

View File

@ -8,11 +8,10 @@
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#error only libtransmission should #include this header.
#endif
#ifndef TR_PEER_IO_H
#define TR_PEER_IO_H
#pragma once
/**
***
@ -398,4 +397,3 @@ static inline struct evbuffer * tr_peerIoGetReadBuffer (tr_peerIo * io)
/* @} */
#endif

View File

@ -8,11 +8,10 @@
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#error only libtransmission should #include this header.
#endif
#ifndef TR_PEER_MGR_H
#define TR_PEER_MGR_H
#pragma once
#include <inttypes.h> /* uint16_t */
@ -187,5 +186,3 @@ void tr_peerMgrPieceCompleted (tr_torrent * tor,
/* @} */
#endif

View File

@ -11,8 +11,7 @@
#error only libtransmission should #include this header.
#endif
#ifndef TR_PEER_MSGS_H
#define TR_PEER_MSGS_H
#pragma once
#include <inttypes.h>
#include "peer-common.h"
@ -88,4 +87,3 @@ size_t tr_generateAllowedSet (tr_piece_index_t * setmePi
/* @} */
#endif

View File

@ -11,8 +11,7 @@
#error only libtransmission should #include this header.
#endif
#ifndef TR_PLATFORM_QUOTA_H
#define TR_PLATFORM_QUOTA_H
#pragma once
/**
* @addtogroup tr_session Session
@ -36,4 +35,3 @@ void tr_device_info_free (struct tr_device_info * info);
/** @} */
#endif

View File

@ -11,8 +11,7 @@
#error only libtransmission should #include this header.
#endif
#ifndef TR_PLATFORM_H
#define TR_PLATFORM_H
#pragma once
#define TR_PATH_DELIMITER '/'
#define TR_PATH_DELIMITER_STR "/"
@ -79,4 +78,3 @@ bool tr_lockHave (const tr_lock *);
/* @} */
#endif

View File

@ -8,11 +8,10 @@
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#error only libtransmission should #include this header.
#endif
#ifndef SHARED_H
#define SHARED_H 1
#pragma once
#include "transmission.h"
@ -40,4 +39,3 @@ bool tr_sharedTraversalIsEnabled (const tr_shared * s);
int tr_sharedTraversalStatus (const tr_shared *);
/** @} */
#endif

View File

@ -11,8 +11,7 @@
#error only libtransmission should #include this header.
#endif
#ifndef TR_PTR_ARRAY_H
#define TR_PTR_ARRAY_H
#pragma once
#include <assert.h>
@ -140,4 +139,3 @@ void* tr_ptrArrayFindSorted (tr_ptrArray * array,
int compare (const void*, const void*));
/* @} */
#endif

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef TR_QUARK_H
#define TR_QUARK_H 1
#pragma once
#ifdef __cplusplus
extern "C" {
@ -432,4 +431,3 @@ tr_quark tr_quark_new (const void * str, size_t len);
}
#endif
#endif

View File

@ -8,11 +8,10 @@
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#error only libtransmission should #include this header.
#endif
#ifndef TR_RESUME_H
#define TR_RESUME_H
#pragma once
enum
{
@ -37,7 +36,7 @@ enum
TR_FR_TIME_SEEDING = (1 << 18),
TR_FR_TIME_DOWNLOADING = (1 << 19),
TR_FR_FILENAMES = (1 << 20),
TR_FR_NAME = (1 << 21),
TR_FR_NAME = (1 << 21)
};
/**
@ -54,4 +53,3 @@ void tr_torrentRemoveResume (const tr_torrent * tor);
int tr_torrentRenameResume (const tr_torrent * tor,
const char * newname);
#endif

View File

@ -11,10 +11,9 @@
#error only libtransmission should #include this header.
#endif
#include "variant.h"
#pragma once
#ifndef TR_RPC_SERVER_H
#define TR_RPC_SERVER_H
#include "variant.h"
typedef struct tr_rpc_server tr_rpc_server;
@ -65,4 +64,3 @@ bool tr_rpcIsPasswordEnabled (const tr_rpc_server * session);
const char* tr_rpcGetBindAddress (const tr_rpc_server * server);
#endif

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef TR_RPC_H
#define TR_RPC_H
#pragma once
#ifdef __cplusplus
extern "C" {
@ -46,4 +45,3 @@ void tr_rpc_parse_list_str (tr_variant * setme,
}
#endif
#endif /* TR_RPC_H */

View File

@ -11,8 +11,7 @@
#error only libtransmission should #include this header.
#endif
#ifndef TR_INTERNAL_H
#define TR_INTERNAL_H 1
#pragma once
#define TR_NAME "Transmission"
@ -327,5 +326,3 @@ void tr_sessionGetNextQueuedTorrents (tr_session * session,
int tr_sessionCountQueueFreeSlots (tr_session * session, tr_direction);
#endif

View File

@ -10,8 +10,7 @@
#error only libtransmission should #include this header.
#endif
#ifndef TR_STATS_H
#define TR_STATS_H
#pragma once
void tr_statsInit (tr_session * session);
void tr_statsClose (tr_session * session);
@ -20,4 +19,3 @@ void tr_statsAddUploaded (tr_session * session, uint32_t bytes);
void tr_statsAddDownloaded (tr_session * session, uint32_t bytes);
void tr_statsFileCreated (tr_session * session);
#endif

View File

@ -11,8 +11,7 @@
#error only libtransmission should #include this header.
#endif
#ifndef TR_TORRENT_MAGNET_H
#define TR_TORRENT_MAGNET_H 1
#pragma once
#include <inttypes.h>
#include <time.h>
@ -33,4 +32,3 @@ bool tr_torrentSetMetadataSizeHint (tr_torrent * tor, int64_t metadata_size);
double tr_torrentGetMetadataPercent (const tr_torrent * tor);
#endif

View File

@ -11,8 +11,7 @@
#error only libtransmission should #include this header.
#endif
#ifndef TR_TORRENT_H
#define TR_TORRENT_H 1
#pragma once
#include "bandwidth.h" /* tr_bandwidth */
#include "completion.h" /* tr_completion */
@ -511,4 +510,3 @@ tr_torrentGetQueueDirection (const tr_torrent * tor)
return tr_torrentIsSeed (tor) ? TR_UP : TR_DOWN;
}
#endif

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef TR_GETOPT_H
#define TR_GETOPT_H
#pragma once
#ifdef __cplusplus
extern "C" {
@ -67,4 +66,3 @@ void tr_getopt_usage (const char * appName,
/** @} */
#endif /* TR_GETOPT_H */

View File

@ -24,8 +24,7 @@ THE SOFTWARE.
#error only libtransmission should #include this header.
#endif
#ifndef _TR_LPD_H
#define _TR_LPD_H
#pragma once
/* $Id$ */
@ -48,5 +47,3 @@ bool tr_lpdSendAnnounce (const tr_torrent*);
/**
* @} */
#endif /* _TR_LPD_H */

View File

@ -21,8 +21,7 @@ THE SOFTWARE.
*/
#ifndef TR_UDP_H
#define TR_UDP_H
#pragma once
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
@ -35,4 +34,3 @@ void tr_udpSetSocketBuffers (tr_session *);
bool tau_handle_message (tr_session * session,
const uint8_t * msg, size_t msglen);
#endif /* #ifndef TR_UDP_H */

View File

@ -25,8 +25,7 @@ THE SOFTWARE.
#error only libtransmission should #include this header.
#endif
#ifndef TR_UTP_H
#define TR_UTP_H
#pragma once
int tr_utpPacket (const unsigned char *buf, size_t buflen,
const struct sockaddr *from, socklen_t fromlen,
@ -37,4 +36,3 @@ void tr_utpClose (tr_session *);
void tr_utpSendTo (void *closure, const unsigned char *buf, size_t buflen,
const struct sockaddr *to, socklen_t tolen);
#endif /* #ifndef TR_UTP_H */

View File

@ -13,8 +13,7 @@
* most of the remaining headers in libtransmission are private.
*/
#ifndef TR_TRANSMISSION_H
#define TR_TRANSMISSION_H 1
#pragma once
#ifdef __cplusplus
extern "C" {
@ -2063,4 +2062,3 @@ static inline bool tr_isBool (bool b) { return b==1 || b==0; }
}
#endif
#endif

View File

@ -8,11 +8,10 @@
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#error only libtransmission should #include this header.
#endif
#ifndef TR_EVENT_H
#define TR_EVENT_H
#pragma once
/**
**/
@ -25,4 +24,3 @@ bool tr_amInEventThread (const tr_session *);
void tr_runInEventThread (tr_session *, void func (void*), void * user_data);
#endif

View File

@ -8,11 +8,10 @@
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#error only libtransmission should #include this header.
#endif
#ifndef TR_UPNP_H
#define TR_UPNP_H 1
#pragma once
/**
* @addtogroup port_forwarding Port Forwarding
@ -30,4 +29,3 @@ int tr_upnpPulse ( tr_upnp *,
int isEnabled,
int doPortCheck);
/* @} */
#endif

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef TR_UTILS_H
#define TR_UTILS_H 1
#pragma once
#include <inttypes.h>
#include <stdarg.h>
@ -532,4 +531,3 @@ void tr_net_init (void);
/** @} */
#endif

View File

@ -11,8 +11,7 @@
#error only libtransmission/variant-*.c should #include this header.
#endif
#ifndef _TR_VARIANT_COMMON_H_
#define _TR_VARIANT_COMMON_H_
#pragma once
typedef void (*VariantWalkFunc)(const tr_variant * val, void * user_data);
@ -64,5 +63,3 @@ int tr_variantParseBenc (const void * buf,
const char ** setme_end);
#endif /* _TR_VARIANT_COMMON_H_ */

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef TR_VARIANT_H
#define TR_VARIANT_H 1
#pragma once
#ifdef __cplusplus
extern "C" {
@ -435,4 +434,3 @@ void tr_variantMergeDicts (tr_variant * dict_target,
}
#endif
#endif

View File

@ -11,8 +11,7 @@
#error only libtransmission should #include this header.
#endif
#ifndef TR_VERIFY_H
#define TR_VERIFY_H 1
#pragma once
/**
* @addtogroup file_io File IO
@ -29,4 +28,3 @@ void tr_verifyClose (tr_session *);
/* @} */
#endif

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef TR_WATCHDIR_COMMON_H
#define TR_WATCHDIR_COMMON_H
#pragma once
#ifndef __LIBTRANSMISSION_WATCHDIR_MODULE__
#error only the libtransmission watchdir module should #include this header.
@ -52,4 +51,3 @@ tr_watchdir_backend * tr_watchdir_kqueue_new (tr_watchdir_t handle);
tr_watchdir_backend * tr_watchdir_win32_new (tr_watchdir_t handle);
#endif
#endif /* TR_WATCHDIR_COMMON_H */

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef TR_WATCHDIR_H
#define TR_WATCHDIR_H
#pragma once
#ifdef __cplusplus
extern "C" {
@ -46,4 +45,3 @@ const char * tr_watchdir_get_path (tr_watchdir_t handle);
}
#endif
#endif /* TR_WATCHDIR_H */

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef TR_HTTP_H
#define TR_HTTP_H
#pragma once
#include <curl/curl.h>
@ -78,4 +77,3 @@ char* tr_http_unescape (const char * str, size_t len);
}
#endif
#endif

View File

@ -8,11 +8,10 @@
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#error only libtransmission should #include this header.
#endif
#ifndef TR_WEBSEED_H
#define TR_WEBSEED_H
#pragma once
typedef struct tr_webseed tr_webseed;
@ -23,4 +22,3 @@ tr_webseed* tr_webseedNew (struct tr_torrent * torrent,
tr_peer_callback callback,
void * callback_data);
#endif

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef QTR_ABOUT_DIALOG_H
#define QTR_ABOUT_DIALOG_H
#pragma once
#include <QPointer>
@ -36,4 +35,3 @@ class AboutDialog: public BaseDialog
QPointer<LicenseDialog> myLicenseDialog;
};
#endif // QTR_ABOUT_DIALOG_H

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef QTR_ADD_DATA_H
#define QTR_ADD_DATA_H
#pragma once
#include <QByteArray>
#include <QString>
@ -45,4 +44,3 @@ class AddData
QUrl url;
};
#endif // QTR_ADD_DATA_H

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef QTR_APPLICATION_H
#define QTR_APPLICATION_H
#pragma once
#include <QApplication>
#include <QSet>
@ -73,4 +72,3 @@ class Application: public QApplication
#undef qApp
#define qApp static_cast<Application*> (Application::instance ())
#endif // QTR_APPLICATION_H

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef QTR_BASE_DIALOG_H
#define QTR_BASE_DIALOG_H
#pragma once
#include <QDialog>
@ -22,4 +21,3 @@ class BaseDialog: public QDialog
}
};
#endif // QTR_BASE_DIALOG_H

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef QTR_COLUMN_RESIZER_H
#define QTR_COLUMN_RESIZER_H
#pragma once
#include <QObject>
#include <QSet>
@ -39,4 +38,3 @@ class ColumnResizer: public QObject
QSet<QGridLayout *> myLayouts;
};
#endif // QTR_COLUMN_RESIZER_H

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef QTR_COM_INTEROP_HELPER_H
#define QTR_COM_INTEROP_HELPER_H
#pragma once
#include <memory>
@ -34,4 +33,3 @@ class ComInteropHelper
std::unique_ptr<QAxObject> m_client;
};
#endif // QTR_COM_INTEROP_HELPER_H

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef QTR_TYPES_H
#define QTR_TYPES_H
#pragma once
#include <QVariant>
@ -25,4 +24,3 @@ class CustomVariantType
};
};
#endif // QTR_TYPES_H

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef QTR_DBUS_INTEROP_HELPER_H
#define QTR_DBUS_INTEROP_HELPER_H
#pragma once
class QObject;
class QString;
@ -24,4 +23,3 @@ class DBusInteropHelper
static void registerObject (QObject * parent);
};
#endif // QTR_DBUS_INTEROP_HELPER_H

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef QTR_DETAILS_DIALOG_H
#define QTR_DETAILS_DIALOG_H
#pragma once
#include <QString>
#include <QMap>
@ -103,4 +102,3 @@ class DetailsDialog: public BaseDialog
QMap<QString, QTreeWidgetItem*> myPeers;
};
#endif // QTR_DETAILS_DIALOG_H

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef QTR_FAVICON_CACHE_H
#define QTR_FAVICON_CACHE_H
#pragma once
#include <QMap>
#include <QString>
@ -54,4 +53,3 @@ class FaviconCache: public QObject
QMap<QString, QPixmap> myPixmaps;
};
#endif // QTR_FAVICON_CACHE_H

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef QTR_FILE_TREE_DELEGATE_H
#define QTR_FILE_TREE_DELEGATE_H
#pragma once
#include <QItemDelegate>
@ -26,4 +25,3 @@ class FileTreeDelegate: public QItemDelegate
virtual void paint (QPainter *, const QStyleOptionViewItem&, const QModelIndex&) const;
};
#endif // QTR_FILE_TREE_DELEGATE_H

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef QTR_FILE_TREE_ITEM_H
#define QTR_FILE_TREE_ITEM_H
#pragma once
#include <cstdint>
@ -86,4 +85,3 @@ class FileTreeItem
size_t myFirstUnhashedRow;
};
#endif // QTR_FILE_TREE_ITEM_H

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef QTR_FILE_TREE_MODEL_H
#define QTR_FILE_TREE_MODEL_H
#pragma once
#include <cstdint>
@ -97,4 +96,3 @@ class FileTreeModel: public QAbstractItemModel
QMap<int, FileTreeItem *> myIndexCache;
};
#endif // QTR_FILE_TREE_MODEL_H

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef QTR_FILE_TREE_VIEW_H
#define QTR_FILE_TREE_VIEW_H
#pragma once
#include <QSet>
#include <QTreeView>
@ -85,4 +84,3 @@ class FileTreeView: public QTreeView
QAction * myRenameAction = nullptr;
};
#endif // QTR_FILE_TREE_VIEW_H

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef QTR_FILTER_BAR_H
#define QTR_FILTER_BAR_H
#pragma once
#include <QWidget>
@ -61,4 +60,3 @@ class FilterBar: public QWidget
FilterBarLineEdit * myLineEdit;
};
#endif // QTR_FILTER_BAR_H

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef QTR_FILTER_BAR_COMBO_BOX_H
#define QTR_FILTER_BAR_COMBO_BOX_H
#pragma once
#include <QComboBox>
@ -41,4 +40,3 @@ class FilterBarComboBox: public QComboBox
QSize calculateSize (const QSize& textSize, const QSize& countSize) const;
};
#endif // QTR_FILTER_BAR_COMBO_BOX_H

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef QTR_FILTER_BAR_COMBO_BOX_DELEGATE_H
#define QTR_FILTER_BAR_COMBO_BOX_DELEGATE_H
#pragma once
#include <QItemDelegate>
@ -34,4 +33,3 @@ class FilterBarComboBoxDelegate: public QItemDelegate
QComboBox * const myCombo;
};
#endif // QTR_FILTER_BAR_COMBO_BOX_DELEGATE_H

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef QTR_FILTER_BAR_LINE_EDIT_H
#define QTR_FILTER_BAR_LINE_EDIT_H
#pragma once
#include <QLineEdit>
@ -32,4 +31,3 @@ class FilterBarLineEdit: public QLineEdit
QToolButton * myClearButton;
};
#endif // QTR_FILTER_BAR_LINE_EDIT_H

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef QTR_FILTERS_H
#define QTR_FILTERS_H
#pragma once
#include <QMetaType>
#include <QString>
@ -84,4 +83,3 @@ class SortMode
Q_DECLARE_METATYPE(SortMode)
#endif // QTR_FILTERS_H

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef QTR_FORMATTER_H
#define QTR_FORMATTER_H
#pragma once
#include <cstdint> // int64_t
@ -55,4 +54,3 @@ class Formatter
static QString unitStrings[3][5];
};
#endif // QTR_FORMATTER_H

View File

@ -7,8 +7,7 @@
* $Id$
*/
#ifndef QTR_FREE_SPACE_LABEL_H
#define QTR_FREE_SPACE_LABEL_H
#pragma once
#include <cstdint>
@ -45,4 +44,3 @@ class FreeSpaceLabel: public QLabel
QTimer myTimer;
};
#endif // QTR_FREE_SPACE_LABEL_H

Some files were not shown because too many files have changed in this diff Show More