Re-indentation of source code.

This re-indentation was done using astyle-1.24 using the following options:

astyle --indent=spaces=4 --brackets=break --pad-oper --pad-header --suffix=none

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19301 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2010-06-25 18:44:40 +00:00
parent 63eed826bd
commit 187da546b6
30 changed files with 232 additions and 207 deletions

View File

@ -60,7 +60,11 @@ sqlEscapeString (sqlEscape *b, const char *str)
ENTER("str = %s", str); ENTER("str = %s", str);
if (!b || !str) { LEAVE("(null) args"); return NULL; } if (!b || !str)
{
LEAVE("(null) args");
return NULL;
}
/* if a string is escaped twice, just return the first */ /* if a string is escaped twice, just return the first */
if (b->escape == str) if (b->escape == str)
@ -144,7 +148,11 @@ void
sqlEscape_destroy (sqlEscape *b) sqlEscape_destroy (sqlEscape *b)
{ {
ENTER(" "); ENTER(" ");
if (!b) { LEAVE("b is (null)"); return; } if (!b)
{
LEAVE("b is (null)");
return;
}
g_free (b->escape); g_free (b->escape);
b->escape = NULL; b->escape = NULL;
g_free (b); g_free (b);

View File

@ -1249,7 +1249,8 @@ const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList
} }
static GncSqlColumnTypeHandler string_handler static GncSqlColumnTypeHandler string_handler
= { =
{
load_string, load_string,
add_string_col_info_to_list, add_string_col_info_to_list,
gnc_sql_add_colname_to_list, gnc_sql_add_colname_to_list,
@ -1346,7 +1347,8 @@ const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList
} }
static GncSqlColumnTypeHandler int_handler static GncSqlColumnTypeHandler int_handler
= { =
{
load_int, load_int,
add_int_col_info_to_list, add_int_col_info_to_list,
gnc_sql_add_colname_to_list, gnc_sql_add_colname_to_list,
@ -1443,7 +1445,8 @@ const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList
} }
static GncSqlColumnTypeHandler boolean_handler static GncSqlColumnTypeHandler boolean_handler
= { =
{
load_boolean, load_boolean,
add_boolean_col_info_to_list, add_boolean_col_info_to_list,
gnc_sql_add_colname_to_list, gnc_sql_add_colname_to_list,
@ -1533,7 +1536,8 @@ const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList
} }
static GncSqlColumnTypeHandler int64_handler static GncSqlColumnTypeHandler int64_handler
= { =
{
load_int64, load_int64,
add_int64_col_info_to_list, add_int64_col_info_to_list,
gnc_sql_add_colname_to_list, gnc_sql_add_colname_to_list,
@ -1642,7 +1646,8 @@ const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList
} }
static GncSqlColumnTypeHandler double_handler static GncSqlColumnTypeHandler double_handler
= { =
{
load_double, load_double,
add_double_col_info_to_list, add_double_col_info_to_list,
gnc_sql_add_colname_to_list, gnc_sql_add_colname_to_list,
@ -1743,7 +1748,8 @@ const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList
} }
static GncSqlColumnTypeHandler guid_handler static GncSqlColumnTypeHandler guid_handler
= { =
{
load_guid, load_guid,
add_guid_col_info_to_list, add_guid_col_info_to_list,
gnc_sql_add_colname_to_list, gnc_sql_add_colname_to_list,
@ -1945,7 +1951,8 @@ const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList
} }
static GncSqlColumnTypeHandler timespec_handler static GncSqlColumnTypeHandler timespec_handler
= { =
{
load_timespec, load_timespec,
add_timespec_col_info_to_list, add_timespec_col_info_to_list,
gnc_sql_add_colname_to_list, gnc_sql_add_colname_to_list,
@ -2070,7 +2077,8 @@ const GncSqlColumnTableEntry* table_row, GSList** pList )
} }
static GncSqlColumnTypeHandler date_handler static GncSqlColumnTypeHandler date_handler
= { =
{
load_date, load_date,
add_date_col_info_to_list, add_date_col_info_to_list,
gnc_sql_add_colname_to_list, gnc_sql_add_colname_to_list,

View File

@ -71,12 +71,14 @@ static GncSqlColumnTableEntry tt_col_table[] =
{ "guid", CT_GUID, 0, COL_NNUL | COL_PKEY, "guid" }, { "guid", CT_GUID, 0, COL_NNUL | COL_PKEY, "guid" },
{ "name", CT_STRING, MAX_NAME_LEN, COL_NNUL, "name" }, { "name", CT_STRING, MAX_NAME_LEN, COL_NNUL, "name" },
{ "refcount", CT_INT64, 0, COL_NNUL, NULL, GNC_TT_REFCOUNT }, { "refcount", CT_INT64, 0, COL_NNUL, NULL, GNC_TT_REFCOUNT },
{ "invisible", CT_BOOLEAN, 0, COL_NNUL, NULL, NULL, {
"invisible", CT_BOOLEAN, 0, COL_NNUL, NULL, NULL,
(QofAccessFunc)gncTaxTableGetInvisible, (QofSetterFunc)set_invisible (QofAccessFunc)gncTaxTableGetInvisible, (QofSetterFunc)set_invisible
}, },
/* { "child", CT_TAXTABLEREF, 0, 0, NULL, NULL, /* { "child", CT_TAXTABLEREF, 0, 0, NULL, NULL,
get_child, (QofSetterFunc)gncTaxTableSetChild }, */ get_child, (QofSetterFunc)gncTaxTableSetChild }, */
{ "parent", CT_GUID, 0, 0, NULL, NULL, {
"parent", CT_GUID, 0, 0, NULL, NULL,
(QofAccessFunc)bt_get_parent, tt_set_parent (QofAccessFunc)bt_get_parent, tt_set_parent
}, },
{ NULL } { NULL }

View File

@ -367,7 +367,8 @@ gnc_gbr_find_prefix (const gchar *default_prefix)
GtkOSXApplication* theApp = g_object_new (GTK_TYPE_OSX_APPLICATION, NULL); GtkOSXApplication* theApp = g_object_new (GTK_TYPE_OSX_APPLICATION, NULL);
gchar *id = gtk_osxapplication_get_bundle_id (theApp); gchar *id = gtk_osxapplication_get_bundle_id (theApp);
gchar *path = gtk_osxapplication_get_resource_path (theApp); gchar *path = gtk_osxapplication_get_resource_path (theApp);
if (id == NULL) { if (id == NULL)
{
gchar *dirname = g_path_get_dirname (path); gchar *dirname = g_path_get_dirname (path);
g_free (path); g_free (path);
g_free (id); g_free (id);

View File

@ -610,9 +610,11 @@ gnc_budget_get_default (QofBook *book)
OPTION_NAME_DEFAULT_BUDGET, OPTION_NAME_DEFAULT_BUDGET,
NULL); NULL);
if (kvp_default_budget != NULL ) { if (kvp_default_budget != NULL )
{
default_budget_guid = kvp_value_get_guid(kvp_default_budget); default_budget_guid = kvp_value_get_guid(kvp_default_budget);
if (default_budget_guid != NULL) { if (default_budget_guid != NULL)
{
col = qof_book_get_collection(book, GNC_ID_BUDGET); col = qof_book_get_collection(book, GNC_ID_BUDGET);
bgt = (GncBudget *) qof_collection_lookup_entity(col, bgt = (GncBudget *) qof_collection_lookup_entity(col,
default_budget_guid); default_budget_guid);
@ -621,7 +623,8 @@ gnc_budget_get_default (QofBook *book)
/* Revert to 2.2.x behavior if there is no defined budget in KVP */ /* Revert to 2.2.x behavior if there is no defined budget in KVP */
if ( bgt == NULL ) { if ( bgt == NULL )
{
col = qof_book_get_collection(book, GNC_ID_BUDGET); col = qof_book_get_collection(book, GNC_ID_BUDGET);
if (qof_collection_count(col) > 0) if (qof_collection_count(col) > 0)
{ {

View File

@ -1572,7 +1572,8 @@ gnc_main_window_update_radio_button (GncMainWindow *window)
/* Block the signal so as not to affect window ordering (top to /* Block the signal so as not to affect window ordering (top to
* bottom) on the screen */ * bottom) on the screen */
action_list = gtk_radio_action_get_group(GTK_RADIO_ACTION(action)); action_list = gtk_radio_action_get_group(GTK_RADIO_ACTION(action));
if (action_list) { if (action_list)
{
first_action = g_slist_last(action_list)->data; first_action = g_slist_last(action_list)->data;
g_signal_handlers_block_by_func(G_OBJECT(first_action), g_signal_handlers_block_by_func(G_OBJECT(first_action),
G_CALLBACK(gnc_main_window_cmd_window_raise), G_CALLBACK(gnc_main_window_cmd_window_raise),

View File

@ -135,7 +135,9 @@ gnc_html_webkit_init( GncHtmlWebkit* self )
if (default_font_family == NULL) if (default_font_family == NULL)
{ {
PWARN("webkit_settings: Cannot get default font family."); PWARN("webkit_settings: Cannot get default font family.");
}else{ }
else
{
g_object_set (G_OBJECT(webkit_settings), g_object_set (G_OBJECT(webkit_settings),
"default-font-family", default_font_family, "default-font-family", default_font_family,
NULL); NULL);