Browse Source

header cleanup: sort include lines into alpha order, after config.h

This makes merging easier in future.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 9 years ago
parent
commit
d733e82352
  1. 3
      bitcoin/address.h
  2. 2
      bitcoin/base58.h
  3. 1
      bitcoin/locktime.h
  4. 1
      bitcoin/privkey.h
  5. 3
      bitcoin/pubkey.h
  6. 3
      bitcoin/script.h
  7. 1
      bitcoin/shadouble.h
  8. 3
      bitcoin/signature.h
  9. 3
      bitcoin/tx.h
  10. 3
      close_tx.h
  11. 3
      commit_tx.h
  12. 1
      find_p2sh_out.h
  13. 4
      funding.h
  14. 1
      opt_bits.h
  15. 1
      overflows.h
  16. 1
      permute_tx.h
  17. 4
      pkt.h
  18. 3
      protobuf_convert.h
  19. 4
      state.h
  20. 1
      state_types.h
  21. 1
      version.h

3
bitcoin/address.h

@ -1,7 +1,8 @@
#ifndef LIGHTNING_BITCOIN_ADDRESS_H #ifndef LIGHTNING_BITCOIN_ADDRESS_H
#define LIGHTNING_BITCOIN_ADDRESS_H #define LIGHTNING_BITCOIN_ADDRESS_H
#include <ccan/short_types/short_types.h> #include "config.h"
#include <ccan/crypto/ripemd160/ripemd160.h> #include <ccan/crypto/ripemd160/ripemd160.h>
#include <ccan/short_types/short_types.h>
struct pubkey; struct pubkey;

2
bitcoin/base58.h

@ -1,5 +1,7 @@
#ifndef LIGHTNING_BITCOIN_BASE58_H #ifndef LIGHTNING_BITCOIN_BASE58_H
#define LIGHTNING_BITCOIN_BASE58_H #define LIGHTNING_BITCOIN_BASE58_H
#include "config.h"
#include <ccan/crypto/ripemd160/ripemd160.h> #include <ccan/crypto/ripemd160/ripemd160.h>
#include <ccan/short_types/short_types.h> #include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h> #include <ccan/tal/tal.h>

1
bitcoin/locktime.h

@ -1,5 +1,6 @@
#ifndef LIGHTNING_BITCOIN_LOCKTIME_H #ifndef LIGHTNING_BITCOIN_LOCKTIME_H
#define LIGHTNING_BITCOIN_LOCKTIME_H #define LIGHTNING_BITCOIN_LOCKTIME_H
#include "config.h"
#include <ccan/short_types/short_types.h> #include <ccan/short_types/short_types.h>
#include <stdbool.h> #include <stdbool.h>

1
bitcoin/privkey.h

@ -1,5 +1,6 @@
#ifndef LIGHTNING_BITCOIN_PRIVKEY_H #ifndef LIGHTNING_BITCOIN_PRIVKEY_H
#define LIGHTNING_BITCOIN_PRIVKEY_H #define LIGHTNING_BITCOIN_PRIVKEY_H
#include "config.h"
#include <ccan/short_types/short_types.h> #include <ccan/short_types/short_types.h>
/* This is a private key. Keep it secret. */ /* This is a private key. Keep it secret. */

3
bitcoin/pubkey.h

@ -1,8 +1,9 @@
#ifndef LIGHTNING_BITCOIN_PUBKEY_H #ifndef LIGHTNING_BITCOIN_PUBKEY_H
#define LIGHTNING_BITCOIN_PUBKEY_H #define LIGHTNING_BITCOIN_PUBKEY_H
#include "config.h"
#include "secp256k1.h"
#include <ccan/short_types/short_types.h> #include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h> #include <ccan/tal/tal.h>
#include "secp256k1.h"
struct privkey; struct privkey;

3
bitcoin/script.h

@ -1,8 +1,9 @@
#ifndef LIGHTNING_BITCOIN_SCRIPT_H #ifndef LIGHTNING_BITCOIN_SCRIPT_H
#define LIGHTNING_BITCOIN_SCRIPT_H #define LIGHTNING_BITCOIN_SCRIPT_H
#include "config.h"
#include "signature.h"
#include <ccan/short_types/short_types.h> #include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h> #include <ccan/tal/tal.h>
#include "signature.h"
struct bitcoin_address; struct bitcoin_address;
struct pubkey; struct pubkey;

1
bitcoin/shadouble.h

@ -1,5 +1,6 @@
#ifndef LIGHTNING_BITCOIN_SHADOUBLE_H #ifndef LIGHTNING_BITCOIN_SHADOUBLE_H
#define LIGHTNING_BITCOIN_SHADOUBLE_H #define LIGHTNING_BITCOIN_SHADOUBLE_H
#include "config.h"
#include <ccan/crypto/sha256/sha256.h> #include <ccan/crypto/sha256/sha256.h>
/* To explicitly distinguish between single sha and bitcoin's standard double */ /* To explicitly distinguish between single sha and bitcoin's standard double */

3
bitcoin/signature.h

@ -1,8 +1,9 @@
#ifndef LIGHTNING_BITCOIN_SIGNATURE_H #ifndef LIGHTNING_BITCOIN_SIGNATURE_H
#define LIGHTNING_BITCOIN_SIGNATURE_H #define LIGHTNING_BITCOIN_SIGNATURE_H
#include "config.h"
#include "secp256k1.h"
#include <ccan/short_types/short_types.h> #include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h> #include <ccan/tal/tal.h>
#include "secp256k1.h"
enum sighash_type { enum sighash_type {
SIGHASH_ALL = 1, SIGHASH_ALL = 1,

3
bitcoin/tx.h

@ -1,8 +1,9 @@
#ifndef LIGHTNING_BITCOIN_TX_H #ifndef LIGHTNING_BITCOIN_TX_H
#define LIGHTNING_BITCOIN_TX_H #define LIGHTNING_BITCOIN_TX_H
#include "config.h"
#include "shadouble.h"
#include <ccan/short_types/short_types.h> #include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h> #include <ccan/tal/tal.h>
#include "shadouble.h"
/* We unpack varints for our in-memory representation */ /* We unpack varints for our in-memory representation */
#define varint_t u64 #define varint_t u64

3
close_tx.h

@ -1,7 +1,8 @@
#ifndef LIGHTNING_CLOSE_TX_H #ifndef LIGHTNING_CLOSE_TX_H
#define LIGHTNING_CLOSE_TX_H #define LIGHTNING_CLOSE_TX_H
#include <ccan/tal/tal.h> #include "config.h"
#include "lightning.pb-c.h" #include "lightning.pb-c.h"
#include <ccan/tal/tal.h>
struct sha256_double; struct sha256_double;

3
commit_tx.h

@ -1,7 +1,8 @@
#ifndef LIGHTNING_COMMIT_TX_H #ifndef LIGHTNING_COMMIT_TX_H
#define LIGHTNING_COMMIT_TX_H #define LIGHTNING_COMMIT_TX_H
#include <ccan/tal/tal.h> #include "config.h"
#include "lightning.pb-c.h" #include "lightning.pb-c.h"
#include <ccan/tal/tal.h>
struct channel_state; struct channel_state;
struct sha256_double; struct sha256_double;

1
find_p2sh_out.h

@ -1,5 +1,6 @@
#ifndef LIGHTNING_FIND_P2SH_OUT_H #ifndef LIGHTNING_FIND_P2SH_OUT_H
#define LIGHTNING_FIND_P2SH_OUT_H #define LIGHTNING_FIND_P2SH_OUT_H
#include "config.h"
#include <ccan/short_types/short_types.h> #include <ccan/short_types/short_types.h>
struct bitcoin_tx; struct bitcoin_tx;

4
funding.h

@ -1,10 +1,10 @@
#ifndef LIGHTNING_FUNDING_H #ifndef LIGHTNING_FUNDING_H
#define LIGHTNING_FUNDING_H #define LIGHTNING_FUNDING_H
#include "config.h"
#include "lightning.pb-c.h"
#include <ccan/tal/tal.h> #include <ccan/tal/tal.h>
#include <stdbool.h> #include <stdbool.h>
#include "lightning.pb-c.h"
struct channel_oneside { struct channel_oneside {
/* Payment and fee is in millisatoshi. */ /* Payment and fee is in millisatoshi. */
uint32_t pay_msat, fee_msat; uint32_t pay_msat, fee_msat;

1
opt_bits.h

@ -1,5 +1,6 @@
#ifndef LIGHTNING_OPT_BITS_H #ifndef LIGHTNING_OPT_BITS_H
#define LIGHTNING_OPT_BITS_H #define LIGHTNING_OPT_BITS_H
#include "config.h"
#include <ccan/opt/opt.h> #include <ccan/opt/opt.h>
#include <ccan/short_types/short_types.h> #include <ccan/short_types/short_types.h>

1
overflows.h

@ -1,5 +1,6 @@
#ifndef LIGHTNING_OVERFLOWS_H #ifndef LIGHTNING_OVERFLOWS_H
#define LIGHTNING_OVERFLOWS_H #define LIGHTNING_OVERFLOWS_H
#include "config.h"
static inline bool add_overflows_size_t(uint64_t a, uint64_t b) static inline bool add_overflows_size_t(uint64_t a, uint64_t b)
{ {

1
permute_tx.h

@ -1,5 +1,6 @@
#ifndef LIGHTNING_PERMUTE_TX_H #ifndef LIGHTNING_PERMUTE_TX_H
#define LIGHTNING_PERMUTE_TX_H #define LIGHTNING_PERMUTE_TX_H
#include "config.h"
#include "bitcoin/tx.h" #include "bitcoin/tx.h"
/* Permute the transaction into BIP69 order. /* Permute the transaction into BIP69 order.

4
pkt.h

@ -1,14 +1,16 @@
#ifndef LIGHTNING_PKT_H #ifndef LIGHTNING_PKT_H
#define LIGHTNING_PKT_H #define LIGHTNING_PKT_H
#include "config.h"
/* Simple (non-threadsafe!) wrapper for protobufs. /* Simple (non-threadsafe!) wrapper for protobufs.
* *
* This could be a simple set of macros, if the protobuf-c people hadn't * This could be a simple set of macros, if the protobuf-c people hadn't
* insisted on "prettifing" the names they generate into CamelCase. * insisted on "prettifing" the names they generate into CamelCase.
*/ */
#include "lightning.pb-c.h"
#include <ccan/endian/endian.h> #include <ccan/endian/endian.h>
#include <ccan/short_types/short_types.h> #include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h> #include <ccan/tal/tal.h>
#include "lightning.pb-c.h"
/* A packet, ready to be de-protobuf'ed. */ /* A packet, ready to be de-protobuf'ed. */
struct pkt { struct pkt {

3
protobuf_convert.h

@ -1,8 +1,9 @@
#ifndef LIGHTNING_PROTOBUF_CONVERT_H #ifndef LIGHTNING_PROTOBUF_CONVERT_H
#define LIGHTNING_PROTOBUF_CONVERT_H #define LIGHTNING_PROTOBUF_CONVERT_H
#include "config.h"
#include "lightning.pb-c.h"
#include <ccan/tal/tal.h> #include <ccan/tal/tal.h>
#include <stdbool.h> #include <stdbool.h>
#include "lightning.pb-c.h"
/* Convert to-from protobuf to internal representation. */ /* Convert to-from protobuf to internal representation. */
struct signature; struct signature;

4
state.h

@ -1,8 +1,10 @@
#ifndef LIGHTNING_STATE_H #ifndef LIGHTNING_STATE_H
#define LIGHTNING_STATE_H #define LIGHTNING_STATE_H
#include "config.h"
#include <ccan/tal/tal.h>
#include <state_types.h> #include <state_types.h>
#include <stdbool.h> #include <stdbool.h>
#include <ccan/tal/tal.h>
enum cmd_complete_status { enum cmd_complete_status {
CMD_STATUS_ONGOING, CMD_STATUS_ONGOING,

1
state_types.h

@ -1,5 +1,6 @@
#ifndef LIGHTNING_STATE_TYPES_H #ifndef LIGHTNING_STATE_TYPES_H
#define LIGHTNING_STATE_TYPES_H #define LIGHTNING_STATE_TYPES_H
#include "config.h"
/* FIXME: cdump is really dumb, so we put these in their own header. */ /* FIXME: cdump is really dumb, so we put these in their own header. */
#include "lightning.pb-c.h" #include "lightning.pb-c.h"

1
version.h

@ -1,5 +1,6 @@
#ifndef LIGHTNING_VERSION_H #ifndef LIGHTNING_VERSION_H
#define LIGHTNING_VERSION_H #define LIGHTNING_VERSION_H
#include "config.h"
#include <ccan/opt/opt.h> #include <ccan/opt/opt.h>
char *version_and_exit(const void *unused); char *version_and_exit(const void *unused);

Loading…
Cancel
Save