headers: fix up header idempotent lines.

For future reference, done via:
	for f in `find wire/ bitcoin/ common/ lightningd -name '*.h' ! -name 'gen*'`; do ID=`echo -n LIGHTNING/$f | tr 'a-z' 'A-Z' | tr -cs 'A-Z0-9' _`; sed 's/^#\(ifndef\|define\) .*_H$/#\1 '$ID/ < $f | sed 's,#endif /..*_H ./$,#endif /* '$ID' */,' | bagto $f; done

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-08-29 01:36:01 +09:30
committed by Christian Decker
parent a37c165cb9
commit 8c22bd9ee1
54 changed files with 153 additions and 153 deletions

View File

@@ -1,5 +1,5 @@
#ifndef LIGHTNING_DAEMON_BITCOIND_H
#define LIGHTNING_DAEMON_BITCOIND_H
#ifndef LIGHTNING_LIGHTNINGD_BITCOIND_H
#define LIGHTNING_LIGHTNINGD_BITCOIND_H
#include "config.h"
#include <bitcoin/chainparams.h>
#include <ccan/list/list.h>
@@ -123,4 +123,4 @@ void bitcoind_getrawblock_(struct bitcoind *bitcoind,
struct bitcoind *, \
struct bitcoin_block *), \
(arg))
#endif /* LIGHTNING_DAEMON_BITCOIND_H */
#endif /* LIGHTNING_LIGHTNINGD_BITCOIND_H */

View File

@@ -1,5 +1,5 @@
#ifndef LIGHTNING_DAEMON_CHAINTOPOLOGY_H
#define LIGHTNING_DAEMON_CHAINTOPOLOGY_H
#ifndef LIGHTNING_LIGHTNINGD_CHAINTOPOLOGY_H
#define LIGHTNING_LIGHTNINGD_CHAINTOPOLOGY_H
#include "config.h"
#include <bitcoin/block.h>
#include <bitcoin/shadouble.h>
@@ -160,4 +160,4 @@ void json_dev_broadcast(struct command *cmd,
struct chain_topology *topo,
const char *buffer, const jsmntok_t *params);
#endif /* LIGHTNING_DAEMON_CRYPTOPKT_H */
#endif /* LIGHTNING_LIGHTNINGD_CHAINTOPOLOGY_H */

View File

@@ -1,5 +1,5 @@
#ifndef LIGHTNINGD_CHANNELD_HTLC_H
#define LIGHTNINGD_CHANNELD_HTLC_H
#ifndef LIGHTNING_LIGHTNINGD_CHANNEL_CHANNELD_HTLC_H
#define LIGHTNING_LIGHTNINGD_CHANNEL_CHANNELD_HTLC_H
#include "config.h"
#include <ccan/short_types/short_types.h>
#include <common/pseudorand.h>
@@ -76,4 +76,4 @@ static inline bool htlc_is_dead(const struct htlc *htlc)
return htlc->state == RCVD_REMOVE_ACK_REVOCATION
|| htlc->state == SENT_REMOVE_ACK_REVOCATION;
}
#endif /* LIGHTNINGD_CHANNELD_HTLC_H */
#endif /* LIGHTNING_LIGHTNINGD_CHANNEL_CHANNELD_HTLC_H */

View File

@@ -1,5 +1,5 @@
#ifndef LIGHTNING_LIGHTNINGD_COMMIT_TX_H
#define LIGHTNING_LIGHTNINGD_COMMIT_TX_H
#ifndef LIGHTNING_LIGHTNINGD_CHANNEL_COMMIT_TX_H
#define LIGHTNING_LIGHTNINGD_CHANNEL_COMMIT_TX_H
#include "config.h"
#include <bitcoin/pubkey.h>
#include <common/htlc.h>
@@ -58,4 +58,4 @@ struct bitcoin_tx *commit_tx(const tal_t *ctx,
u64 obscured_commitment_number,
enum side side);
#endif /* LIGHTNING_LIGHTNINGD_COMMIT_TX_H */
#endif /* LIGHTNING_LIGHTNINGD_CHANNEL_COMMIT_TX_H */

View File

@@ -1,6 +1,6 @@
/* This is the full channel routines, with HTLC support. */
#ifndef LIGHTNING_LIGHTNINGD_CHANNEL_H
#define LIGHTNING_LIGHTNINGD_CHANNEL_H
#ifndef LIGHTNING_LIGHTNINGD_CHANNEL_FULL_CHANNEL_H
#define LIGHTNING_LIGHTNINGD_CHANNEL_FULL_CHANNEL_H
#include "config.h"
#include <common/initial_channel.h>
#include <common/sphinx.h>
@@ -275,4 +275,4 @@ bool channel_force_htlcs(struct channel *channel,
* Uses status_trace() on every HTLC.
*/
void dump_htlcs(const struct channel *channel, const char *prefix);
#endif /* LIGHTNING_DAEMON_CHANNEL_H */
#endif /* LIGHTNING_LIGHTNINGD_CHANNEL_FULL_CHANNEL_H */

View File

@@ -1,5 +1,5 @@
#ifndef PETTYCOIN_DNS_H
#define PETTYCOIN_DNS_H
#ifndef LIGHTNING_LIGHTNINGD_DNS_H
#define LIGHTNING_LIGHTNINGD_DNS_H
#include "config.h"
#include <ccan/io/io.h>
#include <ccan/tal/tal.h>
@@ -50,4 +50,4 @@ struct dns_async *multiaddress_connect_(struct lightningd_state *dstate,
void (*fail)(struct lightningd_state *, void *arg),
void *arg);
#endif /* PETTYCOIN_DNS_H */
#endif /* LIGHTNING_LIGHTNINGD_DNS_H */

View File

@@ -1,5 +1,5 @@
#ifndef LIGHTNING_DAEMON_BROADCAST_H
#define LIGHTNING_DAEMON_BROADCAST_H
#ifndef LIGHTNING_LIGHTNINGD_GOSSIP_BROADCAST_H
#define LIGHTNING_LIGHTNINGD_GOSSIP_BROADCAST_H
#include "config.h"
#include <ccan/intmap/intmap.h>
@@ -37,4 +37,4 @@ void queue_broadcast(struct broadcast_state *bstate,
struct queued_message *next_broadcast_message(struct broadcast_state *bstate, u64 *last_index);
#endif /* LIGHTNING_DAEMON_BROADCAST_H */
#endif /* LIGHTNING_LIGHTNINGD_GOSSIP_BROADCAST_H */

View File

@@ -1,5 +1,5 @@
#ifndef LIGHTNING_DAEMON_ROUTING_H
#define LIGHTNING_DAEMON_ROUTING_H
#ifndef LIGHTNING_LIGHTNINGD_GOSSIP_ROUTING_H
#define LIGHTNING_LIGHTNINGD_GOSSIP_ROUTING_H
#include "config.h"
#include <bitcoin/pubkey.h>
#include <ccan/htable/htable_type.h>
@@ -175,4 +175,4 @@ struct route_hop *get_route(tal_t *ctx, struct routing_state *rstate,
* the direction bit the matching channel should get */
#define get_channel_direction(from, to) (pubkey_cmp(from, to) > 0)
#endif /* LIGHTNING_DAEMON_ROUTING_H */
#endif /* LIGHTNING_LIGHTNINGD_GOSSIP_ROUTING_H */

View File

@@ -6,4 +6,4 @@
struct lightningd;
void gossip_init(struct lightningd *ld);
#endif /* LIGHTNING_LIGHTNINGD_HSM_CONTROL_H */
#endif /* LIGHTNING_LIGHTNINGD_GOSSIP_CONTROL_H */

View File

@@ -33,4 +33,4 @@ void fromwire_gossip_getchannels_entry(const u8 **pptr, size_t *max,
void towire_gossip_getchannels_entry(
u8 **pptr, const struct gossip_getchannels_entry *entry);
#endif /* LIGHTNING_LIGHTGNINGD_GOSSIP_MSG_H */
#endif /* LIGHTNING_LIGHTNINGD_GOSSIP_MSG_H */

View File

@@ -1,6 +1,6 @@
/* API to ask the HSM for things. */
#ifndef LIGHTNING_LIGHTNINGD_HSM_H
#define LIGHTNING_LIGHTNINGD_HSM_H
#ifndef LIGHTNING_LIGHTNINGD_HSM_CLIENT_H
#define LIGHTNING_LIGHTNINGD_HSM_CLIENT_H
#include "config.h"
#include <ccan/endian/endian.h>
#include <ccan/short_types/short_types.h>
@@ -14,4 +14,4 @@ void hsm_setup(int fd);
/* Do ECDH using this node id secret. */
bool hsm_do_ecdh(struct secret *ss, const struct pubkey *point);
#endif /* LIGHTNING_LIGHTNINGD_HSM_H */
#endif /* LIGHTNING_LIGHTNINGD_HSM_CLIENT_H */

View File

@@ -1,5 +1,5 @@
#ifndef LIGHTNING_DAEMON_INVOICE_H
#define LIGHTNING_DAEMON_INVOICE_H
#ifndef LIGHTNING_LIGHTNINGD_INVOICE_H
#define LIGHTNING_LIGHTNINGD_INVOICE_H
#include "config.h"
#include <bitcoin/preimage.h>
#include <ccan/crypto/sha256/sha256.h>
@@ -33,4 +33,4 @@ struct invoice *find_unpaid(struct invoices *i,
const struct sha256 *rhash);
struct invoices *invoices_init(const tal_t *ctx);
#endif /* LIGHTNING_DAEMON_INVOICE_H */
#endif /* LIGHTNING_LIGHTNINGD_INVOICE_H */

View File

@@ -1,5 +1,5 @@
#ifndef LIGHTNING_DAEMON_JSONRPC_H
#define LIGHTNING_DAEMON_JSONRPC_H
#ifndef LIGHTNING_LIGHTNINGD_JSONRPC_H
#define LIGHTNING_LIGHTNINGD_JSONRPC_H
#include "config.h"
#include <ccan/autodata/autodata.h>
#include <ccan/list/list.h>
@@ -73,4 +73,4 @@ void json_add_address(struct json_result *response, const char *fieldname,
void setup_jsonrpc(struct lightningd_state *dstate, const char *rpc_filename);
AUTODATA_TYPE(json_command, struct json_command);
#endif /* LIGHTNING_DAEMON_JSONRPC_H */
#endif /* LIGHTNING_LIGHTNINGD_JSONRPC_H */

View File

@@ -1,5 +1,5 @@
#ifndef LIGHTNING_DAEMON_LOG_H
#define LIGHTNING_DAEMON_LOG_H
#ifndef LIGHTNING_LIGHTNINGD_LOG_H
#define LIGHTNING_LIGHTNINGD_LOG_H
#include "config.h"
#include <ccan/tal/tal.h>
#include <ccan/typesafe_cb/typesafe_cb.h>
@@ -132,4 +132,4 @@ void crashlog_activate(struct log *log);
/* Before the crashlog is activated, just prints to stderr. */
void NORETURN PRINTF_FMT(1,2) fatal(const char *fmt, ...);
#endif /* LIGHTNING_DAEMON_LOG_H */
#endif /* LIGHTNING_LIGHTNINGD_LOG_H */

View File

@@ -1,5 +1,5 @@
#ifndef LIGHTNING_DAEMON_NETADDR_H
#define LIGHTNING_DAEMON_NETADDR_H
#ifndef LIGHTNING_LIGHTNINGD_NETADDR_H
#define LIGHTNING_LIGHTNINGD_NETADDR_H
#include "config.h"
#include <ccan/tal/tal.h>
#include <netinet/in.h>
@@ -31,4 +31,4 @@ bool netaddr_from_fd(int fd, int type, int protocol, struct netaddr *a);
bool netaddr_from_blob(const void *linear, size_t len, struct netaddr *a);
char *netaddr_to_hex(const tal_t *ctx, const struct netaddr *a);
#endif /* LIGHTNING_DAEMON_NETADDR_H */
#endif /* LIGHTNING_LIGHTNINGD_NETADDR_H */

View File

@@ -1,5 +1,5 @@
#ifndef LIGHTNING_LIGHTNINGD_ONCHAIN_TYPES_H
#define LIGHTNING_LIGHTNINGD_ONCHAIN_TYPES_H
#ifndef LIGHTNING_LIGHTNINGD_ONCHAIN_ONCHAIN_TYPES_H
#define LIGHTNING_LIGHTNINGD_ONCHAIN_ONCHAIN_TYPES_H
#include "config.h"
/* Different transactions we care about. */
@@ -51,4 +51,4 @@ enum output_type {
};
#endif /* LIGHTNING_LIGHTNINGD_ONCHAIN_TYPES_H */
#endif /* LIGHTNING_LIGHTNINGD_ONCHAIN_ONCHAIN_TYPES_H */

View File

@@ -1,5 +1,5 @@
#ifndef LIGHTNING_LIGHTNINGD_ONCHAIN_WIRE_H
#define LIGHTNING_LIGHTNINGD_ONCHAIN_WIRE_H
#ifndef LIGHTNING_LIGHTNINGD_ONCHAIN_ONCHAIN_WIRE_H
#define LIGHTNING_LIGHTNINGD_ONCHAIN_ONCHAIN_WIRE_H
#include "config.h"
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
@@ -15,4 +15,4 @@ struct htlc_stub {
void towire_htlc_stub(u8 **pptr, const struct htlc_stub *htlc_stub);
void fromwire_htlc_stub(const u8 **cursor, size_t *max,
struct htlc_stub *htlc_stub);
#endif /* LIGHTNING_LIGHTNINGD_ONCHAIN_WIRE_H */
#endif /* LIGHTNING_LIGHTNINGD_ONCHAIN_ONCHAIN_WIRE_H */

View File

@@ -1,5 +1,5 @@
#ifndef LIGHTNING_DAEMON_OPT_TIME_H
#define LIGHTNING_DAEMON_OPT_TIME_H
#ifndef LIGHTNING_LIGHTNINGD_OPT_TIME_H
#define LIGHTNING_LIGHTNINGD_OPT_TIME_H
#include "config.h"
#include <ccan/opt/opt.h>
#include <ccan/time/time.h>
@@ -10,4 +10,4 @@ void opt_show_time(char buf[OPT_SHOW_LEN], const struct timerel *t);
char *opt_set_timeabs(const char *arg, struct timeabs *t);
void opt_show_timeabs(char buf[OPT_SHOW_LEN], const struct timeabs *t);
#endif /* LIGHTNING_DAEMON_OPT_TIME_H */
#endif /* LIGHTNING_LIGHTNINGD_OPT_TIME_H */

View File

@@ -1,5 +1,5 @@
#ifndef LIGHTNING_DAEMON_OPTIONS_H
#define LIGHTNING_DAEMON_OPTIONS_H
#ifndef LIGHTNING_LIGHTNINGD_OPTIONS_H
#define LIGHTNING_LIGHTNINGD_OPTIONS_H
#include "config.h"
#include <ccan/tal/tal.h>
@@ -13,4 +13,4 @@ void register_opts(struct lightningd_state *dstate);
*/
bool handle_opts(struct lightningd_state *dstate, int argc, char *argv[]);
#endif /* LIGHTNING_DAEMON_OPTIONS_H */
#endif /* LIGHTNING_LIGHTNINGD_OPTIONS_H */

View File

@@ -1,5 +1,5 @@
#ifndef LIGHTNING_DAEMON_WATCH_H
#define LIGHTNING_DAEMON_WATCH_H
#ifndef LIGHTNING_LIGHTNINGD_WATCH_H
#define LIGHTNING_LIGHTNINGD_WATCH_H
#include "config.h"
#include "bitcoin/shadouble.h"
#include <ccan/crypto/ripemd160/ripemd160.h>
@@ -148,4 +148,4 @@ bool watching_txid(const struct chain_topology *topo,
const struct sha256_double *txid);
void watch_topology_changed(struct chain_topology *topo);
#endif /* LIGHTNING_DAEMON_WATCH_H */
#endif /* LIGHTNING_LIGHTNINGD_WATCH_H */