mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Revert r13749. Wedon't need to explicitly #include glib.h
because qof.h includes it for us. Also, this changeset contains lots of other stuff that has nothing to do with glib.h. Note that this revision wont build, but I'll fix that shortly. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13763 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -6,6 +6,12 @@
|
||||
because qof.h includes it for us. Besides, it doesn't fix
|
||||
the whole problem.
|
||||
|
||||
* lots of files:
|
||||
Revert r13749. Wedon't need to explicitly #include glib.h
|
||||
because qof.h includes it for us. Also, this changeset contains
|
||||
lots of other stuff that has nothing to do with glib.h. Note
|
||||
that this revision wont build, but I'll fix that shortly.
|
||||
|
||||
2006-04-08 David Hampton <hampton@employees.org>
|
||||
|
||||
* src/gnome-utils/account-quickfill.c: Eliminate some unnecessary
|
||||
|
||||
@@ -220,7 +220,7 @@ string_to_gint64(const gchar *str, gint64 *v)
|
||||
g_return_val_if_fail(str, FALSE);
|
||||
|
||||
/* must use "<" here because %n's effects aren't well defined */
|
||||
if(sscanf(str, " %" G_GINT64_FORMAT "%n", &v_in, &num_read) < 1) {
|
||||
if(sscanf(str, " " GNC_SCANF_LLD "%n", &v_in, &num_read) < 1) {
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
* 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <glib.h>
|
||||
#include "qof.h"
|
||||
#include "cashobjects.h"
|
||||
#include "test-stuff.h"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <glib.h>
|
||||
|
||||
#include "gncBusGuile.h"
|
||||
#include "engine-helpers.h"
|
||||
#include <g-wrap-wct.h>
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
ws
|
||||
(lambda (wrapset client-wrapset)
|
||||
(list
|
||||
"#include <glib.h>\n"
|
||||
"#include <gncAddress.h>\n"
|
||||
"#include <gncBillTerm.h>\n"
|
||||
"#include <gncCustomer.h>\n"
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
(lambda (wrapset client-wrapset)
|
||||
(list
|
||||
"#include <config.h>\n"
|
||||
"#include <glib.h>\n"
|
||||
"#include <dialog-tax-table.h>\n"
|
||||
)))
|
||||
|
||||
|
||||
@@ -126,9 +126,9 @@ xaccInitAccount (Account * acc, QofBook *book)
|
||||
|
||||
acc->type = NO_TYPE;
|
||||
|
||||
acc->accountName = QOF_CACHE_NEW();
|
||||
acc->accountCode = QOF_CACHE_NEW();
|
||||
acc->description = QOF_CACHE_NEW();
|
||||
acc->accountName = CACHE_INSERT("");
|
||||
acc->accountCode = CACHE_INSERT("");
|
||||
acc->description = CACHE_INSERT("");
|
||||
|
||||
acc->idata = 0;
|
||||
|
||||
@@ -999,8 +999,7 @@ xaccAccountOrder (const Account **aa, const Account **ab)
|
||||
}
|
||||
|
||||
/* Otherwise do a string sort */
|
||||
safe_strcmp (da, db);
|
||||
/* SAFE_STRCMP (da, db);*/
|
||||
SAFE_STRCMP (da, db);
|
||||
|
||||
/* if acccount-type-order array not initialized, initialize it */
|
||||
/* this will happen at most once during program invocation */
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
* Copyright (c) 2001-2003 Linas Vepstas <linas@linas.org>
|
||||
*/
|
||||
|
||||
#include <glib.h>
|
||||
#include "AccountP.h"
|
||||
#include "qof.h"
|
||||
#include "gnc-lot.h"
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#include "FreqSpec.h"
|
||||
#include "Account.h"
|
||||
#include "gnc-book.h"
|
||||
#include "Group.h"
|
||||
#include "GroupP.h"
|
||||
#include "SX-book.h"
|
||||
|
||||
@@ -242,8 +242,8 @@ xaccInitTransaction (Transaction * trans, QofBook *book)
|
||||
{
|
||||
ENTER ("trans=%p", trans);
|
||||
/* Fill in some sane defaults */
|
||||
trans->num = QOF_CACHE_NEW();
|
||||
trans->description = QOF_CACHE_NEW();
|
||||
trans->num = gnc_string_cache_insert("");
|
||||
trans->description = gnc_string_cache_insert("");
|
||||
|
||||
trans->common_currency = NULL;
|
||||
trans->splits = NULL;
|
||||
@@ -358,8 +358,8 @@ xaccDupeTransaction (const Transaction *t)
|
||||
|
||||
trans = g_new0 (Transaction, 1);
|
||||
|
||||
trans->num = qof_util_string_cache_insert (t->num);
|
||||
trans->description = qof_util_string_cache_insert (t->description);
|
||||
trans->num = gnc_string_cache_insert (t->num);
|
||||
trans->description = gnc_string_cache_insert (t->description);
|
||||
|
||||
trans->splits = g_list_copy (t->splits);
|
||||
for (node = trans->splits; node; node = node->next)
|
||||
@@ -405,8 +405,8 @@ xaccTransClone (const Transaction *t)
|
||||
|
||||
trans->date_entered = t->date_entered;
|
||||
trans->date_posted = t->date_posted;
|
||||
trans->num = qof_util_string_cache_insert (t->num);
|
||||
trans->description = qof_util_string_cache_insert (t->description);
|
||||
trans->num = gnc_string_cache_insert (t->num);
|
||||
trans->description = gnc_string_cache_insert (t->description);
|
||||
trans->common_currency = t->common_currency;
|
||||
trans->version = t->version;
|
||||
trans->version_check = t->version_check;
|
||||
@@ -458,8 +458,8 @@ xaccFreeTransaction (Transaction *trans)
|
||||
trans->splits = NULL;
|
||||
|
||||
/* free up transaction strings */
|
||||
qof_util_string_cache_remove(trans->num);
|
||||
qof_util_string_cache_remove(trans->description);
|
||||
gnc_string_cache_remove(trans->num);
|
||||
gnc_string_cache_remove(trans->description);
|
||||
|
||||
/* Just in case someone looks up freed memory ... */
|
||||
trans->num = (char *) 1;
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <g-wrap-wct.h>
|
||||
#include <libguile.h>
|
||||
#include <string.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "Account.h"
|
||||
#include "Group.h"
|
||||
#include "engine-helpers.h"
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
\********************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
#include <glib.h>
|
||||
|
||||
#include "AccountP.h"
|
||||
#include "gnc-associate-account.h"
|
||||
#include "gnc-engine.h"
|
||||
|
||||
@@ -1239,7 +1239,7 @@ gnc_commodity_table_insert(gnc_commodity_table * table,
|
||||
PINFO ("insert %p %s into nsp=%p %s", comm->mnemonic, comm->mnemonic,
|
||||
nsp->cm_table, nsp->name);
|
||||
g_hash_table_insert(nsp->cm_table,
|
||||
qof_util_string_cache_insert(comm->mnemonic),
|
||||
gnc_string_cache_insert(comm->mnemonic),
|
||||
(gpointer)comm);
|
||||
nsp->cm_list = g_list_append(nsp->cm_list, comm);
|
||||
|
||||
@@ -1482,7 +1482,7 @@ gnc_commodity_table_add_namespace(gnc_commodity_table * table,
|
||||
{
|
||||
ns = g_new0(gnc_commodity_namespace, 1);
|
||||
ns->cm_table = g_hash_table_new(g_str_hash, g_str_equal);
|
||||
ns->name = qof_util_string_cache_insert((gpointer)namespace);
|
||||
ns->name = gnc_string_cache_insert((gpointer)namespace);
|
||||
ns->iso4217 = gnc_commodity_namespace_is_iso(namespace);
|
||||
qof_instance_init (&ns->inst, GNC_ID_COMMODITY_NAMESPACE, book);
|
||||
qof_event_gen (&ns->inst.entity, QOF_EVENT_CREATE, NULL);
|
||||
@@ -1539,7 +1539,7 @@ ns_helper(gpointer key, gpointer value, gpointer user_data)
|
||||
{
|
||||
gnc_commodity * c = value;
|
||||
gnc_commodity_destroy(c);
|
||||
qof_util_string_cache_remove(key); /* key is commodity mnemonic */
|
||||
gnc_string_cache_remove(key); /* key is commodity mnemonic */
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -1564,7 +1564,7 @@ gnc_commodity_table_delete_namespace(gnc_commodity_table * table,
|
||||
|
||||
g_hash_table_foreach_remove(ns->cm_table, ns_helper, NULL);
|
||||
g_hash_table_destroy(ns->cm_table);
|
||||
qof_util_string_cache_remove(ns->name);
|
||||
gnc_string_cache_remove(ns->name);
|
||||
|
||||
qof_event_gen (&ns->inst.entity, QOF_EVENT_DESTROY, NULL);
|
||||
qof_instance_release(&ns->inst);
|
||||
|
||||
@@ -119,8 +119,11 @@ gnc_engine_init(int argc, char ** argv)
|
||||
void
|
||||
gnc_engine_shutdown (void)
|
||||
{
|
||||
qof_query_shutdown ();
|
||||
qof_object_shutdown ();
|
||||
guid_shutdown();
|
||||
gnc_engine_string_cache_destroy ();
|
||||
qof_log_shutdown();
|
||||
qof_close();
|
||||
engine_is_initialized = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
* Copyright (c) 2002,2003 Linas Vepstas <linas@linas.org>
|
||||
*/
|
||||
|
||||
#include <glib.h>
|
||||
#include "Account.h"
|
||||
#include "gnc-lot.h"
|
||||
#include "gnc-lot-p.h"
|
||||
|
||||
@@ -67,8 +67,8 @@ gnc_price_destroy (GNCPrice *p)
|
||||
ENTER(" ");
|
||||
qof_event_gen (&p->inst.entity, QOF_EVENT_DESTROY, NULL);
|
||||
|
||||
if(p->type) qof_util_string_cache_remove(p->type);
|
||||
if(p->source) qof_util_string_cache_remove(p->source);
|
||||
if(p->type) gnc_string_cache_remove(p->type);
|
||||
if(p->source) gnc_string_cache_remove(p->source);
|
||||
|
||||
qof_instance_release (&p->inst);
|
||||
memset(p, 0, sizeof(GNCPrice));
|
||||
@@ -260,8 +260,8 @@ gnc_price_set_source(GNCPrice *p, const char *s)
|
||||
char *tmp;
|
||||
|
||||
gnc_price_begin_edit (p);
|
||||
tmp = qof_util_string_cache_insert((gpointer) s);
|
||||
if(p->source) qof_util_string_cache_remove(p->source);
|
||||
tmp = gnc_string_cache_insert((gpointer) s);
|
||||
if(p->source) gnc_string_cache_remove(p->source);
|
||||
p->source = tmp;
|
||||
gnc_price_set_dirty(p);
|
||||
gnc_price_commit_edit (p);
|
||||
@@ -277,8 +277,8 @@ gnc_price_set_type(GNCPrice *p, const char* type)
|
||||
gchar *tmp;
|
||||
|
||||
gnc_price_begin_edit (p);
|
||||
tmp = qof_util_string_cache_insert((gpointer) type);
|
||||
if(p->type) qof_util_string_cache_remove(p->type);
|
||||
tmp = gnc_string_cache_insert((gpointer) type);
|
||||
if(p->type) gnc_string_cache_remove(p->type);
|
||||
p->type = tmp;
|
||||
gnc_price_set_dirty(p);
|
||||
gnc_price_commit_edit (p);
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <glib.h>
|
||||
#include "qof.h"
|
||||
#include "gnc-session.h"
|
||||
#include "gnc-engine.h"
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
ws
|
||||
(lambda (wrapset client-wrapset)
|
||||
(list
|
||||
"#include <glib.h>\n"
|
||||
"#include <qof.h>\n"
|
||||
"#include <kvp-scm.h>\n"
|
||||
"#include <Transaction.h>\n")))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "config.h"
|
||||
#include <glib.h>
|
||||
|
||||
#include <kvp_frame.h>
|
||||
#include <g-wrap-wct.h>
|
||||
#include <libguile.h>
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <glib.h>
|
||||
#include "qof.h"
|
||||
#include "cashobjects.h"
|
||||
#include "test-stuff.h"
|
||||
|
||||
@@ -111,7 +111,7 @@ gnc_quickfill_destroy (QuickFill *qf)
|
||||
qf->matches = NULL;
|
||||
|
||||
if (qf->text)
|
||||
qof_util_string_cache_remove(qf->text);
|
||||
gnc_string_cache_remove(qf->text);
|
||||
qf->text = NULL;
|
||||
qf->len = 0;
|
||||
|
||||
@@ -127,7 +127,7 @@ gnc_quickfill_purge (QuickFill *qf)
|
||||
g_hash_table_foreach_remove (qf->matches, destroy_helper, NULL);
|
||||
|
||||
if (qf->text)
|
||||
qof_util_string_cache_remove (qf->text);
|
||||
gnc_string_cache_remove (qf->text);
|
||||
qf->text = NULL;
|
||||
qf->len = 0;
|
||||
}
|
||||
@@ -302,7 +302,7 @@ quickfill_insert_recursive (QuickFill *qf, const char *text, int depth,
|
||||
/* If there's no string there already, just put the new one in. */
|
||||
if (old_text == NULL)
|
||||
{
|
||||
match_qf->text = qof_util_string_cache_insert((gpointer) text);
|
||||
match_qf->text = gnc_string_cache_insert((gpointer) text);
|
||||
match_qf->len = len;
|
||||
break;
|
||||
}
|
||||
@@ -312,8 +312,8 @@ quickfill_insert_recursive (QuickFill *qf, const char *text, int depth,
|
||||
(strncmp(text, old_text, strlen(old_text)) == 0))
|
||||
break;
|
||||
|
||||
qof_util_string_cache_remove(old_text);
|
||||
match_qf->text = qof_util_string_cache_insert((gpointer) text);
|
||||
gnc_string_cache_remove(old_text);
|
||||
match_qf->text = gnc_string_cache_insert((gpointer) text);
|
||||
match_qf->len = len;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <time.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "Account.h"
|
||||
#include "Group.h"
|
||||
#include "Query.h"
|
||||
|
||||
Reference in New Issue
Block a user