Unify the include guards accross all header files

This commit is contained in:
Alexandre Paillier
2022-03-07 14:21:32 +01:00
parent 89070cd2be
commit c548aba364
27 changed files with 97 additions and 38 deletions

View File

@@ -1,3 +1,6 @@
#ifndef _APDU_CONSTANTS_H_
#define _APDU_CONSTANTS_H_
#include "shared_context.h"
#define APP_FLAG_DATA_ALLOWED 0x01
@@ -156,3 +159,5 @@ void handleStarkwareUnsafeSign(uint8_t p1,
unsigned int *tx);
#endif
#endif // _APDU_CONSTANTS_H_

View File

@@ -69,4 +69,4 @@ typedef struct chain_config_s {
#define ETHEREUM_MAINNET_CHAINID 1
#endif /* _CHAIN_CONFIG_H_ */
#endif // _CHAIN_CONFIG_H_

View File

@@ -1,4 +1,5 @@
#ifndef __ETH_PLUGIN_HANDLER_H__
#ifndef _ETH_PLUGIN_HANDLER_H_
#define _ETH_PLUGIN_HANDLER_H_
#include "eth_plugin_interface.h"
@@ -27,4 +28,4 @@ eth_plugin_result_t eth_plugin_call(int method, void *parameter);
void plugin_ui_start(void);
#endif
#endif // _ETH_PLUGIN_HANDLER_H_

View File

@@ -1,6 +1,5 @@
#ifndef __ETH_PLUGIN_INTERFACE_H__
#define __ETH_PLUGIN_INTERFACE_H__
#ifndef _ETH_PLUGIN_INTERFACE_H_
#define _ETH_PLUGIN_INTERFACE_H_
#include "os.h"
#include "cx.h"
@@ -179,4 +178,4 @@ typedef struct ethQueryContractUI_t {
} ethQueryContractUI_t;
#endif
#endif // _ETH_PLUGIN_INTERFACE_H_

View File

@@ -1,4 +1,5 @@
#ifndef __ETH_PLUGIN_INTERNAL_H__
#ifndef _ETH_PLUGIN_INTERNAL_H_
#define _ETH_PLUGIN_INTERNAL_H_
#include "eth_plugin_interface.h"
@@ -45,4 +46,4 @@ extern const uint8_t* const STARKWARE_SELECTORS[NUM_STARKWARE_SELECTORS];
extern internalEthPlugin_t const INTERNAL_ETH_PLUGINS[];
#endif
#endif // _ETH_PLUGIN_INTERNAL_H_

View File

@@ -1,3 +1,6 @@
#ifndef _NFT_H_
#define _NFT_H_
#include "tokens.h"
#define COLLECTION_NAME_MAX_LEN 70
@@ -6,3 +9,5 @@ typedef struct nftInfo_t {
uint8_t contractAddress[ADDRESS_LENGTH]; // must be first item
char collectionName[COLLECTION_NAME_MAX_LEN + 1];
} nftInfo_t;
#endif // _NFT_H_

View File

@@ -1,5 +1,5 @@
#ifndef __POORSTREAM_H__
#define __POORSTREAM_H__
#ifndef _POORSTREAM_H_
#define _POORSTREAM_H_
#include <stdbool.h>
#include <stdint.h>
@@ -18,4 +18,4 @@ void poorstream_init(poorstream_t *stream, uint8_t *buffer);
void poorstream_flush(poorstream_t *stream);
void poorstream_write_bits(poorstream_t *stream, uint64_t bits, uint32_t num_bits);
#endif
#endif // _POORSTREAM_H_

View File

@@ -1,6 +1,5 @@
#ifndef __SHARED_CONTEXT_H__
#define __SHARED_CONTEXT_H__
#ifndef _SHARED_CONTEXT_H_
#define _SHARED_CONTEXT_H_
#include <stdbool.h>
#include <stdint.h>
@@ -221,4 +220,4 @@ extern uint32_t eth2WithdrawalIndex;
void reset_app_context(void);
#endif // __SHARED_CONTEXT_H__
#endif // _SHARED_CONTEXT_H_

View File

@@ -1,5 +1,5 @@
#ifndef __STARK_CRYPTO_H__
#define __STARK_CRYPTO_H__
#ifndef _STARK_CRYPTO_H_
#define _STARK_CRYPTO_H_
#include <stdbool.h>
#include <stdint.h>
@@ -18,4 +18,4 @@ void pedersen(FieldElement res, /* out */
FieldElement a,
FieldElement b);
#endif
#endif // _STARK_CRYPTO_H_

View File

@@ -1,5 +1,5 @@
#ifndef __STARK_UTILS_H__
#define __STARK_UTILS_H__
#ifndef _STARK_UTILS_H_
#define _STARK_UTILS_H_
#include <stdbool.h>
#include <stdint.h>
@@ -32,4 +32,4 @@ int stark_sign(uint8_t *signature, /* out */
FieldElement msg,
FieldElement condition);
#endif
#endif // _STARK_UTILS_H_

View File

@@ -1,5 +1,5 @@
#ifndef SWAP_LIB_CALLS
#define SWAP_LIB_CALLS
#ifndef _SWAP_LIB_CALLS_H_
#define _SWAP_LIB_CALLS_H_
#include "stdbool.h"
@@ -50,4 +50,4 @@ typedef struct create_transaction_parameters_s {
char* destination_address_extra_id;
} create_transaction_parameters_t;
#endif
#endif // _SWAP_LIB_CALLS_H_

View File

@@ -141,4 +141,4 @@ extern tokenDefinition_t const TOKENS_SHYFT[NUM_TOKENS_SHYFT];
#endif /* HAVE_TOKENS_LIST */
#endif /* _TOKENS_H_ */
#endif // _TOKENS_H_

View File

@@ -1,3 +1,6 @@
#ifndef _UI_CALLBACKS_H_
#define _UI_CALLBACKS_H_
#include "shared_context.h"
#include "ux.h"
@@ -22,3 +25,5 @@ void io_seproxyhal_send_status(uint32_t sw);
void format_signature_out(const uint8_t *signature);
void finalizeParsing(bool direct);
extraInfo_t *getKnownToken(uint8_t *contractAddress);
#endif // _UI_CALLBACKS_H_

View File

@@ -1,3 +1,6 @@
#ifndef _UI_FLOW_H_
#define _UI_FLOW_H_
#include "shared_context.h"
#include "os_io_seproxyhal.h"
@@ -52,3 +55,5 @@ extern const ux_flow_step_t* const ux_approval_starkware_verify_escape_flow[];
extern const ux_flow_step_t* const ux_stark_unsafe_sign_flow[];
#endif
#endif // _UI_FLOW_H_

View File

@@ -41,4 +41,4 @@ void amountToString(const uint8_t* amount,
bool parse_swap_config(uint8_t* config, uint8_t config_len, char* ticker, uint8_t* decimals);
#endif /* _UTILS_H_ */
#endif // _UTILS_H_