Ensure include guard is the first non-comment line
This commit is contained in:
parent
e10c049ef9
commit
5b29fe1556
|
@ -1,14 +1,14 @@
|
|||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
/*
|
||||
* Copyright 2001-2004 Unicode, Inc.
|
||||
*
|
||||
*
|
||||
* Disclaimer
|
||||
*
|
||||
*
|
||||
* This source code is provided as is by Unicode, Inc. No claims are
|
||||
* made as to fitness for any particular purpose. No warranties of any
|
||||
* kind are expressed or implied. The recipient agrees to determine
|
||||
|
@ -16,9 +16,9 @@
|
|||
* purchased on magnetic or optical media from Unicode, Inc., the
|
||||
* sole remedy for any claim will be exchange of defective media
|
||||
* within 90 days of receipt.
|
||||
*
|
||||
*
|
||||
* Limitations on Rights to Redistribute This Code
|
||||
*
|
||||
*
|
||||
* Unicode, Inc. hereby grants the right to freely use the information
|
||||
* supplied in this file in the creation of products supporting the
|
||||
* Unicode Standard, and to make copies of this file in any form
|
||||
|
@ -39,7 +39,7 @@
|
|||
|
||||
Each routine converts the text between *sourceStart and sourceEnd,
|
||||
putting the result into the buffer between *targetStart and
|
||||
targetEnd. Note: the end pointers are *after* the last item: e.g.
|
||||
targetEnd. Note: the end pointers are *after* the last item: e.g.
|
||||
* (sourceEnd - 1) is the last item.
|
||||
|
||||
The return result indicates whether the conversion was successful,
|
||||
|
@ -77,7 +77,7 @@
|
|||
sequence is malformed. When "sourceIllegal" is returned, the source
|
||||
value will point to the illegal value that caused the problem. E.g.,
|
||||
in UTF-8 when a sequence is malformed, it points to the start of the
|
||||
malformed sequence.
|
||||
malformed sequence.
|
||||
|
||||
Author: Mark E. Davis, 1994.
|
||||
Rev History: Rick McGowan, fixes & updates May 2001.
|
||||
|
@ -123,27 +123,27 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
ConversionResult ConvertUTF8toUTF16 (
|
||||
const UTF8** sourceStart, const UTF8* sourceEnd,
|
||||
const UTF8** sourceStart, const UTF8* sourceEnd,
|
||||
UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags);
|
||||
|
||||
ConversionResult ConvertUTF16toUTF8 (
|
||||
const UTF16** sourceStart, const UTF16* sourceEnd,
|
||||
const UTF16** sourceStart, const UTF16* sourceEnd,
|
||||
UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags);
|
||||
|
||||
|
||||
ConversionResult ConvertUTF8toUTF32 (
|
||||
const UTF8** sourceStart, const UTF8* sourceEnd,
|
||||
const UTF8** sourceStart, const UTF8* sourceEnd,
|
||||
UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags);
|
||||
|
||||
ConversionResult ConvertUTF32toUTF8 (
|
||||
const UTF32** sourceStart, const UTF32* sourceEnd,
|
||||
const UTF32** sourceStart, const UTF32* sourceEnd,
|
||||
UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags);
|
||||
|
||||
|
||||
ConversionResult ConvertUTF16toUTF32 (
|
||||
const UTF16** sourceStart, const UTF16* sourceEnd,
|
||||
const UTF16** sourceStart, const UTF16* sourceEnd,
|
||||
UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags);
|
||||
|
||||
ConversionResult ConvertUTF32toUTF16 (
|
||||
const UTF32** sourceStart, const UTF32* sourceEnd,
|
||||
const UTF32** sourceStart, const UTF32* sourceEnd,
|
||||
UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags);
|
||||
|
||||
Boolean isLegalUTF8Sequence (const UTF8 *source, const UTF8 *sourceEnd);
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __LIBTRANSMISSION_ANNOUNCER_MODULE__
|
||||
#error only the libtransmission announcer module should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "transmission.h" /* SHA_DIGEST_LENGTH */
|
||||
#include "session.h" /* PEER_ID_LEN */
|
||||
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#define __LIBTRANSMISSION_ANNOUNCER_MODULE__
|
||||
|
||||
#include <errno.h> /* errno, EAFNOSUPPORT */
|
||||
#include <string.h> /* memcpy(), memset() */
|
||||
|
||||
|
@ -15,6 +13,8 @@
|
|||
#include <event2/dns.h>
|
||||
#include <event2/util.h>
|
||||
|
||||
#define __LIBTRANSMISSION_ANNOUNCER_MODULE__
|
||||
|
||||
#include "transmission.h"
|
||||
#include "announcer.h"
|
||||
#include "announcer-common.h"
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "transmission.h"
|
||||
|
||||
struct tr_announcer;
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "transmission.h"
|
||||
#include "ptrarray.h"
|
||||
#include "tr-assert.h"
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "transmission.h"
|
||||
|
||||
/** @brief Implementation of the BitTorrent spec's Bitfield array of bits */
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
struct tr_address;
|
||||
|
||||
typedef struct tr_blocklistFile tr_blocklistFile;
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
struct evbuffer;
|
||||
|
||||
typedef struct tr_cache tr_cache;
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* @brief parse a peer-id into a human-readable client name and version number
|
||||
* @ingroup utils
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "transmission.h"
|
||||
#include "bitfield.h"
|
||||
#include "utils.h" /* tr_getRatio() */
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifndef TR_ENCRYPTION_H
|
||||
#define TR_ENCRYPTION_H
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#ifndef TR_ENCRYPTION_H
|
||||
#define TR_ENCRYPTION_H
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "crypto-utils.h"
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "transmission.h"
|
||||
#include "net.h"
|
||||
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* A generic short-term memory object that remembers how many times
|
||||
* something happened over the last N seconds.
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
struct tr_torrent;
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <locale.h> /* setlocale() */
|
||||
|
||||
#define __LIBTRANSMISSION_VARIANT_MODULE__
|
||||
|
||||
#include "transmission.h"
|
||||
#include "utils.h" /* tr_free */
|
||||
#include "variant.h"
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* @addtogroup utils Utilities
|
||||
* @{
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "transmission.h"
|
||||
#include "variant.h"
|
||||
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "transmission.h"
|
||||
#include "variant.h"
|
||||
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* @addtogroup port_forwarding Port Forwarding
|
||||
* @{
|
||||
|
|
|
@ -20,12 +20,12 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <inttypes.h>
|
||||
#include <ws2tcpip.h>
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "transmission.h"
|
||||
#include "bitfield.h"
|
||||
#include "history.h"
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
***
|
||||
**/
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <inttypes.h> /* uint16_t */
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <inttypes.h>
|
||||
#include "peer-common.h"
|
||||
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* @addtogroup tr_session Session
|
||||
* @{
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
#define TR_PATH_DELIMITER '/'
|
||||
#define TR_PATH_DELIMITER_STR "/"
|
||||
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "transmission.h"
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "transmission.h"
|
||||
#include "tr-assert.h"
|
||||
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
enum
|
||||
{
|
||||
TR_FR_DOWNLOADED = (1 << 0),
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "variant.h"
|
||||
|
||||
typedef struct tr_rpc_server tr_rpc_server;
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
#define TR_NAME "Transmission"
|
||||
|
||||
#include "bandwidth.h"
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
extern struct tr_session_stats const TR_SESSION_STATS_INIT;
|
||||
|
||||
void tr_statsInit(tr_session* session);
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <time.h>
|
||||
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "bandwidth.h" /* tr_bandwidth */
|
||||
#include "completion.h" /* tr_completion */
|
||||
#include "session.h" /* tr_sessionLock(), tr_sessionUnlock() */
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
|
|
@ -20,12 +20,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
int tr_lpdInit(tr_session*, tr_address*);
|
||||
void tr_lpdUninit(tr_session*);
|
||||
bool tr_lpdEnabled(tr_session const*);
|
||||
|
|
|
@ -21,12 +21,12 @@ THE SOFTWARE.
|
|||
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
int tr_utpPacket(unsigned char const* buf, size_t buflen, struct sockaddr const* from, socklen_t fromlen, tr_session* ss);
|
||||
|
||||
void tr_utpClose(tr_session*);
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
**/
|
||||
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* @addtogroup port_forwarding Port Forwarding
|
||||
* @{
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "ConvertUTF.h"
|
||||
|
||||
#define __LIBTRANSMISSION_VARIANT_MODULE__
|
||||
|
||||
#include "transmission.h"
|
||||
#include "ptrarray.h"
|
||||
#include "utils.h" /* tr_snprintf() */
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __LIBTRANSMISSION_VARIANT_MODULE__
|
||||
#error only libtransmission/variant-*.c should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
typedef void (* VariantWalkFunc)(tr_variant const* val, void* user_data);
|
||||
|
||||
struct VariantWalkFuncs
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "jsonsl.c"
|
||||
|
||||
#define __LIBTRANSMISSION_VARIANT_MODULE__
|
||||
|
||||
#include "transmission.h"
|
||||
#include "ConvertUTF.h"
|
||||
#include "list.h"
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <event2/buffer.h>
|
||||
|
||||
#define __LIBTRANSMISSION_VARIANT_MODULE__
|
||||
|
||||
#include "transmission.h"
|
||||
#include "utils.h" /* tr_free */
|
||||
#include "variant.h"
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include <event2/buffer.h>
|
||||
|
||||
#define __LIBTRANSMISSION_VARIANT_MODULE__
|
||||
|
||||
#include "transmission.h"
|
||||
#include "ConvertUTF.h"
|
||||
#include "error.h"
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* @addtogroup file_io File IO
|
||||
* @{
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
typedef struct tr_webseed tr_webseed;
|
||||
|
||||
#include "peer-common.h"
|
||||
|
|
Loading…
Reference in New Issue