[patch 1/8] Remove two slightly different definitions of

c.shoemaker at cox.net c.shoemaker at cox.net
Thu Mar 2 00:08:10 EST 2006


   Remove two slightly different definitions of
   gnc:transaction-map-splits, both unused.
   Remove g-wrapped versions of functions being removed:
      gnc:account-fix-split-date-order,
      gnc:trans-fix-split-date-order

---
 src/engine/engine-utilities.scm               |    9 ---------
 src/engine/engine.scm                         |    1 -
 src/engine/gw-engine-spec.scm                 |   18 ------------------
 src/report/report-system/report-utilities.scm |   10 ----------
 4 files changed, 38 deletions(-)

Index: trunk/src/engine/engine-utilities.scm
===================================================================
--- trunk.orig/src/engine/engine-utilities.scm
+++ trunk/src/engine/engine-utilities.scm
@@ -39,15 +39,6 @@
     (or result
         (begin (gnc:session-destroy session) #f))))
 
-(define (gnc:transaction-map-splits thunk transaction)
-  (let ((retval '()))
-    (let loop ((splits (or (gnc:transaction-get-splits transaction) '())))
-      (if (not (null? splits))
-          (begin 
-            (set! retval (cons (thunk (car splits)) retval))
-            (loop (cdr splits)))))
-    (reverse retval)))
-
 (define (gnc:group-map-all-accounts thunk group)
   (let ((accounts (or (gnc:group-get-subaccounts group) '())))
     (map thunk accounts)))
Index: trunk/src/engine/engine.scm
===================================================================
--- trunk.orig/src/engine/engine.scm
+++ trunk/src/engine/engine.scm
@@ -45,7 +45,6 @@
 (export gnc:commodity-is-currency?)
 
 (export gnc:url->loaded-session)
-(export gnc:transaction-map-splits)
 (export gnc:group-map-all-accounts)
 (export gnc:group-map-accounts)
 
Index: trunk/src/engine/gw-engine-spec.scm
===================================================================
--- trunk.orig/src/engine/gw-engine-spec.scm
+++ trunk/src/engine/gw-engine-spec.scm
@@ -722,24 +722,6 @@ number of nanoseconds.")
  "Insert the split s into account a. If the split already belongs
 to another account, it will be removed from that account first.")
 
-(gw:wrap-function
- ws
- 'gnc:account-fix-split-date-order
- '<gw:void>
- "xaccAccountFixSplitDateOrder"
- '((<gnc:Account*> a) (<gnc:Split*> s))
- "Check to see if split s is in proper sorted date order with respect
-to the other splits in account a.")
-
-(gw:wrap-function
- ws
- 'gnc:trans-fix-split-date-order
- '<gw:void>
- "xaccTransFixSplitDateOrder"
- '((<gnc:Transaction*> t))
- "Check to see if all of the splits in transaction t are in proper
-date order.")
-
 ;; (gw:wrap-function
 ;;  ws
 ;;  'gnc:account-order
Index: trunk/src/report/report-system/report-utilities.scm
===================================================================
--- trunk.orig/src/report/report-system/report-utilities.scm
+++ trunk/src/report/report-system/report-utilities.scm
@@ -192,16 +192,6 @@
       (gnc:account-get-children a)))
    accountlist))
 
-
-(define (gnc:transaction-map-splits thunk transaction)
-  (let loop ((num-splits (gnc:transaction-get-split-count transaction))
-             (i 0))
-    (if (< i num-splits)
-        (cons
-         (thunk (gnc:transaction-get-split transaction i))
-         (loop num-splits (+ i 1)))
-        '())))
-
 ;;; Here's a statistics collector...  Collects max, min, total, and makes
 ;;; it easy to get at the mean.
 

--


More information about the gnucash-devel mailing list