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>
This commit is contained in:
Rusty Russell 2016-01-22 06:38:08 +10:30
parent 4dafeba857
commit d733e82352
21 changed files with 35 additions and 12 deletions

View file

@ -1,7 +1,8 @@
#ifndef 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/short_types/short_types.h>
struct pubkey;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

4
pkt.h
View file

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

View file

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

View file

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

View file

@ -1,5 +1,6 @@
#ifndef 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. */
#include "lightning.pb-c.h"

View file

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