* src/scm/main.scm (gnc:safe-strcmp): new public function -- we

were using a g-wrapped version, but that seemed more expensive
than necessary.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6606 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Rob Browning 2002-01-09 22:12:03 +00:00
parent d89db5340a
commit 0aa250cb61

View File

@ -18,8 +18,10 @@
(define-module (gnucash main))
(use-modules (ice-9 slib))
(use-modules (g-wrap gw-wct))
(use-modules (g-wrapped gw-gnc))
(use-modules (g-wrapped gw-runtime))
;; Load the srfis (eventually, we should see where these are needed
;; and only have the use-modules statements in those files).
@ -54,6 +56,7 @@
(export gnc:find-file)
(export gnc:find-localized-file)
(export gnc:main)
(export gnc:safe-strcmp) ;; only used by aging.scm atm...
;; from path.scm
(export gnc:make-home-dir)
@ -143,6 +146,18 @@
(lambda (module)
(process-use-modules (list (list module)))))))
(define (gnc:safe-strcmp a b)
(cond
(if (and a b)
(cond
((string<? a b) -1)
((string>? a b) 1)
(else 0))
(cond
(a 1)
(b -1)
(else 0)))))
(if (not (defined? 'hash-fold))
(define (hash-fold proc init table)
(for-each