Skip to content

Commit

Permalink
Sort includes
Browse files Browse the repository at this point in the history
  • Loading branch information
0xPxt committed Aug 21, 2024
1 parent 765ee62 commit 064852e
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 22 deletions.
6 changes: 4 additions & 2 deletions app/src/items.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
********************************************************************************/
#include "crypto_helper.h"
#include "items.h"

#include <base64.h>

#include "crypto_helper.h"
#include "items_format.h"
#include "parser_impl.h"
#include <base64.h>

static items_error_t items_storeSigningTransaction();
static items_error_t items_storeNetwork();
Expand Down
5 changes: 3 additions & 2 deletions app/src/items.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
#pragma once

#include <zxmacros.h>
#include "zxtypes.h"
#include "parser_common.h"

#include "items_defs.h"
#include "json_parser.h"
#include "parser_common.h"
#include "zxtypes.h"

void items_initItems();
void items_storeItems();
Expand Down
6 changes: 4 additions & 2 deletions app/src/items_format.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
********************************************************************************/

#include "items_format.h"
#include "parser.h"
#include "crypto.h"

#include <zxformat.h>

#include "crypto.h"
#include "parser.h"

extern char base64_hash[44];

items_error_t items_stdToDisplayString(item_t item, char *outVal, uint16_t *outValLen) {
Expand Down
3 changes: 2 additions & 1 deletion app/src/items_format.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
#pragma once

#include <zxmacros.h>
#include "zxtypes.h"

#include "items_defs.h"
#include "zxtypes.h"

#define WARNING_TEXT \
"UNSAFE TRANSACTION. This transaction's code was not recognized and does not limit capabilities for all signers. " \
Expand Down
4 changes: 2 additions & 2 deletions app/src/json/json_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
********************************************************************************/
#include <zxmacros.h>
#include "json_parser.h"

#include "../common/parser_common.h"
#include "jsmn/jsmn.h"
#include "json_parser.h"

#define EQUALS(_P, _Q, _LEN) (MEMCMP((const void *)PIC(_P), (const void *)PIC(_Q), (_LEN)) == 0)

Expand Down
8 changes: 5 additions & 3 deletions app/src/json/json_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
********************************************************************************/
#pragma once

#include "jsmn.h"
#include <stdint.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include "common/parser_common.h"
#include <zxmacros.h>

#include "jsmn.h"
#include "parser_common.h"

/// Max number of accepted tokens in the JSON input
#define MAX_NUMBER_OF_TOKENS 768
Expand Down
5 changes: 3 additions & 2 deletions app/src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@
* limitations under the License.
********************************************************************************/

#include "parser.h"

#include <stdio.h>
#include <zxformat.h>
#include <zxmacros.h>
#include <zxtypes.h>

#include "items.h"
#include "coin.h"
#include "crypto.h"
#include "crypto_helper.h"
#include "items.h"
#include "parser_impl.h"
#include "parser.h"

#define MAX_ITEM_LENGTH_IN_PAGE 40

Expand Down
1 change: 1 addition & 0 deletions app/src/parser_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
********************************************************************************/

#include "parser_impl.h"

#include "crypto_helper.h"
#include "items.h"

Expand Down
5 changes: 3 additions & 2 deletions app/src/parser_txdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
extern "C" {
#endif

#include <stdint.h>
#include <stddef.h>
#include <json/json_parser.h>
#include <stddef.h>
#include <stdint.h>

#include "coin.h"

typedef struct {
Expand Down
3 changes: 1 addition & 2 deletions tests/json_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@
* limitations under the License.
********************************************************************************/

#include "parser_impl.h"

#include <hexutils.h>

#include <iostream>
#include <vector>

#include "gmock/gmock.h"
#include "parser.h"
#include "parser_impl.h"
#include "parser_txdef.h"
#include "utils/common.h"

Expand Down
8 changes: 4 additions & 4 deletions tests/utils/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
********************************************************************************/
#pragma once

#include <coin.h>
#include <json/json_parser.h>

#include <string>
#include <vector>

#include "parser_impl.h"
#include "parser_common.h"

#include <json/json_parser.h>
#include <coin.h>
#include "parser_impl.h"

#define EXPECT_EQ_STR(_STR1, _STR2, _ERROR_MESSAGE) \
{ \
Expand Down

0 comments on commit 064852e

Please sign in to comment.