Skip to content

Commit

Permalink
[ofx import] Typedef OfxTransactionData.
Browse files Browse the repository at this point in the history
So we don't have to say struct on every use.
  • Loading branch information
jralls committed Dec 13, 2022
1 parent 5519a9d commit 0bc2d69
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions gnucash/import-export/ofx/gnc-ofx-import.c
Expand Up @@ -65,6 +65,9 @@ static QofLogModule log_module = GNC_MOD_IMPORT;

static gboolean auto_create_commodity = FALSE;
static Account *ofx_parent_account = NULL;

typedef struct OfxTransactionData OfxTransactionData;

// Structure we use to gather information about statement balance/account etc.
typedef struct _ofx_info
{
Expand Down Expand Up @@ -126,9 +129,9 @@ set_associated_income_account(Account* investment_account,

int ofx_proc_statement_cb (struct OfxStatementData data, void * statement_user_data);
int ofx_proc_security_cb (const struct OfxSecurityData data, void * security_user_data);
int ofx_proc_transaction_cb (struct OfxTransactionData data, void *user_data);
int ofx_proc_transaction_cb (OfxTransactionData data, void *user_data);
int ofx_proc_account_cb (struct OfxAccountData data, void * account_user_data);
static double ofx_get_investment_amount (const struct OfxTransactionData* data);
static double ofx_get_investment_amount (const OfxTransactionData* data);

static const gchar *gnc_ofx_ttype_to_string(TransactionType t)
{
Expand Down Expand Up @@ -314,7 +317,7 @@ int ofx_proc_security_cb(const struct OfxSecurityData data, void * security_user
return 0;
}

static void gnc_ofx_set_split_memo(const struct OfxTransactionData* data, Split *split)
static void gnc_ofx_set_split_memo(const OfxTransactionData* data, Split *split)
{
g_assert(data);
g_assert(split);
Expand Down Expand Up @@ -412,7 +415,7 @@ fix_ofx_bug_39 (time64 t)
return t;
}

int ofx_proc_transaction_cb(struct OfxTransactionData data, void *user_data)
int ofx_proc_transaction_cb(OfxTransactionData data, void *user_data)
{
char dest_string[255];
time64 current_time = gnc_time (NULL);
Expand Down Expand Up @@ -1079,7 +1082,7 @@ int ofx_proc_account_cb(struct OfxAccountData data, void * account_user_data)
return 0;
}

double ofx_get_investment_amount(const struct OfxTransactionData* data)
double ofx_get_investment_amount(const OfxTransactionData* data)
{
double amount = data->amount;
#ifdef HAVE_LIBOFX_VERSION_0_10
Expand Down

0 comments on commit 0bc2d69

Please sign in to comment.