From f655f9dcb61b8fdb068c24da7e9a1d9d5ca23e4d Mon Sep 17 00:00:00 2001 From: Dave Peticolas Date: Tue, 12 Jun 2001 20:42:34 +0000 Subject: [PATCH] 2001-06-12 Dave Peticolas * src/register/register-common.h: move function defs to register-common.c * src/register/register-common.c: new file git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4643 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 5 +++++ src/register/Makefile.am | 1 + src/register/register-common.c | 40 ++++++++++++++++++++++++++++++++++ src/register/register-common.h | 20 +++-------------- 4 files changed, 49 insertions(+), 17 deletions(-) create mode 100644 src/register/register-common.c diff --git a/ChangeLog b/ChangeLog index 7be5b270f3..796e8159dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2001-06-12 Dave Peticolas + * src/register/register-common.h: move function defs to + register-common.c + + * src/register/register-common.c: new file + * src/gnome/glade/Makefile.am: new file * src/gnome/glade/commodity.glade: new file. glade file for diff --git a/src/register/Makefile.am b/src/register/Makefile.am index c78ea094ea..609d723df5 100644 --- a/src/register/Makefile.am +++ b/src/register/Makefile.am @@ -10,6 +10,7 @@ libgncregister_a_SOURCES = \ pricecell.c \ quickfillcell.c \ recncell.c \ + register-common.c \ splitreg.c \ table-allgui.c \ table-gnome.c \ diff --git a/src/register/register-common.c b/src/register/register-common.c new file mode 100644 index 0000000000..386bc630d4 --- /dev/null +++ b/src/register/register-common.c @@ -0,0 +1,40 @@ +/********************************************************************\ + * register-common.c -- Common functions for the register * + * Copyright (c) 2001 Dave Peticolas * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License as * + * published by the Free Software Foundation; either version 2 of * + * the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License* + * along with this program; if not, contact: * + * * + * Free Software Foundation Voice: +1-617-542-5942 * + * 59 Temple Place - Suite 330 Fax: +1-617-542-2652 * + * Boston, MA 02111-1307, USA gnu@gnu.org * + * * +\********************************************************************/ + +#include "register-common.h" + + +gboolean +virt_cell_loc_equal (VirtualCellLocation vcl1, VirtualCellLocation vcl2) +{ + return ((vcl1.virt_row == vcl2.virt_row) && + (vcl1.virt_col == vcl2.virt_col)); +} + +gboolean +virt_loc_equal (VirtualLocation vl1, VirtualLocation vl2) +{ + return (virt_cell_loc_equal (vl1.vcell_loc, vl2.vcell_loc) && + (vl1.phys_row_offset == vl2.phys_row_offset) && + (vl1.phys_col_offset == vl2.phys_col_offset)); +} diff --git a/src/register/register-common.h b/src/register/register-common.h index ea6fdfd49d..74d98d5dda 100644 --- a/src/register/register-common.h +++ b/src/register/register-common.h @@ -37,14 +37,8 @@ struct _VirtualCellLocation { }; -G_INLINE_FUNC gboolean -virt_cell_loc_equal (VirtualCellLocation vcl1, VirtualCellLocation vcl2); -G_INLINE_FUNC gboolean -virt_cell_loc_equal (VirtualCellLocation vcl1, VirtualCellLocation vcl2) -{ - return ((vcl1.virt_row == vcl2.virt_row) && - (vcl1.virt_col == vcl2.virt_col)); -} +gboolean virt_cell_loc_equal (VirtualCellLocation vcl1, + VirtualCellLocation vcl2); /* The VirtualLocation structure contains the virtual @@ -66,14 +60,6 @@ struct _VirtualLocation { }; -G_INLINE_FUNC gboolean -virt_loc_equal (VirtualLocation vl1, VirtualLocation vl2); -G_INLINE_FUNC gboolean -virt_loc_equal (VirtualLocation vl1, VirtualLocation vl2) -{ - return (virt_cell_loc_equal (vl1.vcell_loc, vl2.vcell_loc) && - (vl1.phys_row_offset == vl2.phys_row_offset) && - (vl1.phys_col_offset == vl2.phys_col_offset)); -} +gboolean virt_loc_equal (VirtualLocation vl1, VirtualLocation vl2); #endif