r19883 - gnucash/trunk/src/business/business-ledger - Make prototype for gnc_entry_ledger_get_entry public. Add documentation.

Christian Stimming cstim at code.gnucash.org
Thu Nov 25 16:34:26 EST 2010


Author: cstim
Date: 2010-11-25 16:34:25 -0500 (Thu, 25 Nov 2010)
New Revision: 19883
Trac: http://svn.gnucash.org/trac/changeset/19883

Modified:
   gnucash/trunk/src/business/business-ledger/gncEntryLedger.c
   gnucash/trunk/src/business/business-ledger/gncEntryLedger.h
Log:
Make prototype for gnc_entry_ledger_get_entry public. Add documentation.

Modified: gnucash/trunk/src/business/business-ledger/gncEntryLedger.c
===================================================================
--- gnucash/trunk/src/business/business-ledger/gncEntryLedger.c	2010-11-25 04:05:01 UTC (rev 19882)
+++ gnucash/trunk/src/business/business-ledger/gncEntryLedger.c	2010-11-25 21:34:25 UTC (rev 19883)
@@ -714,7 +714,7 @@
 }
 
 gboolean
-gnc_entry_ledger_get_entry_virt_loc (GncEntryLedger *ledger, GncEntry *entry,
+gnc_entry_ledger_get_entry_virt_loc (GncEntryLedger *ledger, const GncEntry *entry,
                                      VirtualCellLocation *vcell_loc)
 {
     Table *table;
@@ -723,6 +723,7 @@
 
     if ((ledger == NULL) || (entry == NULL))
         return FALSE;
+    g_assert(vcell_loc);
 
     table = ledger->table;
 

Modified: gnucash/trunk/src/business/business-ledger/gncEntryLedger.h
===================================================================
--- gnucash/trunk/src/business/business-ledger/gncEntryLedger.h	2010-11-25 04:05:01 UTC (rev 19882)
+++ gnucash/trunk/src/business/business-ledger/gncEntryLedger.h	2010-11-25 21:34:25 UTC (rev 19883)
@@ -119,10 +119,20 @@
 
 void gnc_entry_ledger_reset_query (GncEntryLedger *ledger);
 
+/** Returns the GncEntry at the given location, or NULL if the
+ * location is not valid. */
+GncEntry * gnc_entry_ledger_get_entry (GncEntryLedger *ledger,
+                                       VirtualCellLocation vcell_loc);
+
+/** Returns the GncEntry that represents the blank new line at the
+ * bottom of the ledger */
 GncEntry * gnc_entry_ledger_get_blank_entry (GncEntryLedger *ledger);
 
+/** Looks up the cell location of the given "entry" and writes the
+ * location into the variable pointed to by vcell_loc (which must be
+ * non-NULL). Returns TRUE if the entry was found, otherwise FALSE. */
 gboolean gnc_entry_ledger_get_entry_virt_loc (GncEntryLedger *ledger,
-        GncEntry *entry,
+        const GncEntry *entry,
         VirtualCellLocation *vcell_loc);
 
 void gnc_entry_ledger_delete_current_entry (GncEntryLedger *ledger);



More information about the gnucash-changes mailing list