From bf55880a4d58359c0551dc69cf5a9de1d6ba2915 Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Mon, 12 Oct 1998 03:08:35 +0000 Subject: [PATCH] change to routine providing access to account type names git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@1299 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/engine/AccInfo.c | 7 +++++++ src/engine/AccInfo.h | 5 +---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/engine/AccInfo.c b/src/engine/AccInfo.c index b6a7294901..9cc240d61a 100644 --- a/src/engine/AccInfo.c +++ b/src/engine/AccInfo.c @@ -22,3 +22,10 @@ char *account_type_name[NUM_ACCOUNT_TYPES] = CREDITLINE_STR }; + +char * xaccAccountGetTypeStr (int type) +{ + if (0 > type) return ""; + if (NUM_ACCOUNT_TYPES <= type) return ""; + return (account_type_name [type]); +} diff --git a/src/engine/AccInfo.h b/src/engine/AccInfo.h index c4c4471490..419369b267 100644 --- a/src/engine/AccInfo.h +++ b/src/engine/AccInfo.h @@ -97,10 +97,7 @@ enum }; -/* hack alert -- we need a better way of dealing with - * account names! - */ -extern char *account_type_name [NUM_ACCOUNT_TYPES]; +char * xaccAccountGetTypeStr (int type); struct _BankAcct {