From dafcbea15efe4e7ed20f28e36711c0d457b6a032 Mon Sep 17 00:00:00 2001 From: Joshua Sled Date: Thu, 19 Jan 2006 01:29:24 +0000 Subject: [PATCH] C-style comment conventions; rename identifiers that are C++ keywords. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12870 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 5 +++++ src/app-utils/gnc-account-merge.c | 26 +++++++++++++------------- src/app-utils/gnc-account-merge.h | 12 ++++++------ 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index fbeb87fe59..8fa18a819d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-01-18 Joshua Sled + + * src/app-utils/gnc-account-merge.[ch]: C-style comment + conventions; rename identifiers that are C++ keywords. + 2006-01-18 Joshua Sled * src/gnome/gnc-plugin-page-account-tree.c diff --git a/src/app-utils/gnc-account-merge.c b/src/app-utils/gnc-account-merge.c index 81430d1a35..c1aeab7dab 100644 --- a/src/app-utils/gnc-account-merge.c +++ b/src/app-utils/gnc-account-merge.c @@ -1,4 +1,4 @@ -// Copyright (C) 2006 Joshua Sled +/* Copyright (C) 2006 Joshua Sled */ #include "gnc-account-merge.h" #include "Account.h" @@ -33,22 +33,22 @@ determine_merge_disposition(AccountGroup *existing_root, Account *new_acct) } static void -_account_merge_error_detection(AccountGroup *existing, AccountGroup *new, GList **error_accum) +_account_merge_error_detection(AccountGroup *existing_grp, AccountGroup *new_grp, GList **error_accum) { AccountList *accts; - for (accts = xaccGroupGetAccountList(new); accts; accts = accts->next) + for (accts = xaccGroupGetAccountList(new_grp); accts; accts = accts->next) { Account *new_acct, *existing_acct; GncAccountMergeDisposition disp; new_acct = (Account*)accts->data; - existing_acct = xaccGetAccountFromName(existing, xaccAccountGetName(new_acct)); + existing_acct = xaccGetAccountFromName(existing_grp, xaccAccountGetName(new_acct)); disp = determine_account_merge_disposition(existing_acct, new_acct); if (disp == GNC_ACCOUNT_MERGE_DISPOSITION_ERROR) { GncAccountMergeError *err = g_new0(GncAccountMergeError, 1); - err->existing = existing_acct; - err->new = new_acct; + err->existing_acct = existing_acct; + err->new_acct = new_acct; err->disposition = disp; *error_accum = g_list_append(*error_accum, err); } @@ -59,10 +59,10 @@ _account_merge_error_detection(AccountGroup *existing, AccountGroup *new, GList } GList* -account_merge_error_detection(AccountGroup *existing, AccountGroup *new) +account_merge_error_detection(AccountGroup *existing_grp, AccountGroup *new_grp) { GList *errors = NULL; - _account_merge_error_detection(existing, new, &errors); + _account_merge_error_detection(existing_grp, new_grp, &errors); return errors; } @@ -74,9 +74,9 @@ account_group_merge(AccountGroup *existing_grp, AccountGroup *new_grp) g_return_if_fail(new_grp != NULL); g_return_if_fail(existing_grp != NULL); - // since we're have a chance of mutating the list (via - // xaccGroupInsertAccount) while we're iterating over it, iterate over a - // copy. + /* since we're have a chance of mutating the list (via + * xaccGroupInsertAccount) while we're iterating over it, iterate over a + * copy. */ accounts_copy = g_list_copy(xaccGroupGetAccountList(new_grp)); for (accounts = accounts_copy; accounts; accounts = accounts->next) { @@ -92,12 +92,12 @@ account_group_merge(AccountGroup *existing_grp, AccountGroup *new_grp) g_assert_not_reached(); return; case GNC_ACCOUNT_MERGE_DISPOSITION_USE_EXISTING: - // recurse + /* recurse */ account_group_merge(xaccAccountGetChildren(existing_named), xaccAccountGetChildren(new_acct)); break; case GNC_ACCOUNT_MERGE_DISPOSITION_CREATE_NEW: - // merge this one in. + /* merge this one in. */ xaccGroupInsertAccount(existing_grp, new_acct); break; } diff --git a/src/app-utils/gnc-account-merge.h b/src/app-utils/gnc-account-merge.h index f7d1a6c950..dba441f859 100644 --- a/src/app-utils/gnc-account-merge.h +++ b/src/app-utils/gnc-account-merge.h @@ -1,4 +1,4 @@ -// Copyright (C) 2006 Joshua Sled +/* Copyright (C) 2006 Joshua Sled */ #ifndef GNC_ACCOUNT_MERGE_H #define GNC_ACCOUNT_MERGE_H @@ -13,17 +13,17 @@ typedef enum { } GncAccountMergeDisposition; typedef struct _merge_error { - Account *existing; - Account *new; + Account *existing_acct; + Account *new_acct; GncAccountMergeDisposition disposition; } GncAccountMergeError; GncAccountMergeDisposition determine_account_merge_disposition(Account *existing_acct, Account *new_acct); GncAccountMergeDisposition determine_merge_disposition(AccountGroup *existing_root, Account *new_acct); -/** @return GList **/ -GList* account_merge_error_detection(AccountGroup *existing, AccountGroup *new); +/** @return GList **/ +GList* account_merge_error_detection(AccountGroup *existing_grp, AccountGroup *new_grp); void account_group_merge(AccountGroup *existing_grp, AccountGroup *new_grp); -#endif // GNC_ACCOUNT_MERGE_H +#endif /* GNC_ACCOUNT_MERGE_H */