*** empty log message ***

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2068 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2000-03-08 21:14:52 +00:00
parent aacce23278
commit 318911182b
5 changed files with 367 additions and 377 deletions

6
README
View File

@ -465,6 +465,12 @@ my $old = 'gnucash.pristine';
my $new = 'gnucash.mywork';
my $gnc_home = '/home/me/gnucash';
Right before you make your patch, make sure *both* your working and
your pristine directories are in sync with cvs. Run 'cvs -z3 update -dP'
in both directories to ensure that is the case. Updating from cvs in
your working directory may cause conficts in a file. You must resolve
those conficts before making a patch.
Now run the script. Note that this script requires the programs
'makepatch', 'gzip', 'diff', and 'uuencode' (and, of course, 'perl')
to run.

606
po/de.po

File diff suppressed because it is too large Load Diff

View File

@ -138,22 +138,17 @@
(apply string-append (map (lambda (val)
(string-append "\t" (tostring val)))
(cdr lst)))
"\n"
)
)
"\n"))
(define (text-table-header lst)
(string-append
"# "
(text-table-row lst)
))
(text-table-row lst)))
(define (text-table hdrlst llst)
(string-append
(text-table-header hdrlst)
(apply string-append (map text-table-row llst))
)
)
(apply string-append (map text-table-row llst))))
; Quick and dirty until there is REAL plot support
(define (data-to-gpfile hdrlst llst fn plotcmd)
@ -161,14 +156,13 @@
(display
(text-table hdrlst llst)
oport)
(close-output-port oport)
)
)
(close-output-port oport)))
;; Returns sum of all vector elements after the first
(define (vector-sum v)
(let ((sum 0))
(gnc:for-loop (lambda(i) (set! sum (+ sum (car (vector-ref v i)))))
(gnc:for-loop
(lambda(i) (set! sum (+ sum (car (vector-ref v i)))))
1 (vector-length v) 1)
sum))
@ -184,7 +178,6 @@
(balmax -10E9)
(gains 0)
(losses 0))
(define (procvals)
(let ((curbal (vector-sum (car (cdr (av 'x 0))))))
(set! balmin (min balmin curbal))
@ -194,8 +187,7 @@
(let ((curbal (vector-sum (car (cdr (av 'x 0))))))
(set! avgaccum (+ avgaccum
(* curbal
(gnc:timepair-delta beg end)))))
)
(gnc:timepair-delta beg end))))))
(define (calc-in-interval d tl)
@ -224,23 +216,17 @@
(procvals) ; catch all cases
(set! prevdate cd)
(calc-in-interval d (cdr tl))
)
(calc-in-interval d (cdr tl)))
(else ; Past interval, nothing to do?
(accbal prevdate ed)
(procvals)
tl
)
)))
tl))))
(else ; Out of data !
(accbal prevdate (dl:end d))
(procvals)
tl
)
)
)
tl)))
;; Actual routine
(cond ((null? dl) '()) ;; End of recursion
@ -263,27 +249,22 @@
(/ avgaccum
(gnc:timepair-delta bd ed))
balmin balmax (- gains losses) gains losses)
(reduce-split-list (cdr dl) rest pt av)))
)
)
)))
(reduce-split-list (cdr dl) rest pt av))))))))
;; Pull a scheme list of splits from a C array
(define (gnc:convert-split-list slist)
(let ((numsplit 0)
(schsl '()))
(while
(let ((asplit (gnc:ith-split slist numsplit)))
(cond
((pointer-token-null? asplit ) #f)
(else
(set! schsl (append! schsl (list asplit)) )
(set! numsplit (+ numsplit 1))
#t))) ())
schsl
)
)
(let
((numsplit 0)
(schsl '()))
(while
(let ((asplit (gnc:ith-split slist numsplit)))
(cond
((pointer-token-null? asplit ) #f)
(else
(set! schsl (append! schsl (list asplit)) )
(set! numsplit (+ numsplit 1))
#t))) ())
schsl))
;; Pull a scheme list of accounts (including subaccounts) from group grp
(define (gnc:group-get-account-list grp)
@ -292,7 +273,6 @@
(let ((numacct 0)
(acctar (gnc:get-accounts grp))
(schal '()))
(while
(let ((anact (gnc:account-nth-account acctar numacct)))
(cond
@ -301,50 +281,44 @@
(set! schal (append! schal (list anact)) )
(set! numacct (+ numacct 1))
#t))) ())
schal
)))
)
schal))))
(define (accumvects x y)
(cond
((null? x) '())
((number? (car x))
(cons (+ (car x) (car y)) (accumvects (cdr x) (cdr y))))
(else (cons "x" (accumvects (cdr x) (cdr y)))))
)
(else (cons "x" (accumvects (cdr x) (cdr y))))))
;; Add x to list lst if it is not already in there
(define (addunique lst x)
(cond
((null? lst) (list x)) ; all checked add it
((null? lst) (list x)) ; all checked add it
(else (cond
((equal? x (car lst)) lst) ; found, quit search and don't add again
((equal? x (car lst)) lst) ; found, quit search and don't add again
(else (cons (car lst) (addunique (cdr lst) x))) ; keep searching
))))
;; Calculate averages of each column
(define (get-averages indata)
(let* ((avglst '()))
(map (lambda (x) (set! avglst (append avglst (list 0.0)))) (car indata))
(map (lambda (x)
(set! avglst (accumvects x avglst)))
indata)
(map (lambda (x)
(cond ((number? x) (/ x (length indata)))
(else "")))
avglst)
))
(cond ((number? x) (/ x (length indata)))
(else "")))
avglst)))
;; Turn a C array of accounts into a scheme list of account names
(define (gnc:acctnames-from-list acctlist)
(let ((anlist '()))
(map (lambda(an)
(set! anlist (append! anlist
(list (gnc:account-get-name an))))) acctlist)
anlist))
(list (gnc:account-get-name an)))))
acctlist)
anlist))
(define acctcurrency "USD")
(define acctname "")

View File

@ -16,10 +16,10 @@
(gnc:depend "date-utilities.scm")
;; time values
;(define gnc:budget-day 1)
;(define gnc:budget-week 2)
;(define gnc:budget-month 3)
;(define gnc:budget-year 4)
(define gnc:budget-day 1)
(define gnc:budget-week 2)
(define gnc:budget-month 3)
(define gnc:budget-year 4)
;; budget types
(define gnc:budget-recurring 1) ; regular, recurring budget expenses

View File

@ -53,21 +53,21 @@
(set-item! 'gensymid (list (gensym))) ;;; Attach a unique identifier
actions)
(if testing?
(begin
(display "Testing structur.scm - define-mystruct, build-mystruct-instance")
(newline)
(let* ((ms (define-mystruct '(f1 f2 f3)))
(mi (build-mystruct-instance ms)))
(mi 'put 'f1 122)
(mi 'put 'f3 "hello")
(display "Empty list entry:") (display (mi 'get 'f2)) (newline)
(display "and two that aren't (f1 f3):")
(display (list (mi 'get 'f1) (mi 'get 'f3))) (newline)
(display "Whole thang:")
(display (mi 'whole 'thang)) (newline)
(display "Overlay 'f3 with 42, add to 'f1 value")
(mi 'put 'f3 42)
(display (number->string (+ (mi 'get 'f1) (mi 'get 'f3)))) (newline))))
;(if testing?
; (begin
; (display "Testing structur.scm - define-mystruct, build-mystruct-instance")
; (newline)
; (let* ((ms (define-mystruct '(f1 f2 f3)))
; (mi (build-mystruct-instance ms)))
; (mi 'put 'f1 122)
; (mi 'put 'f3 "hello")
; (display "Empty list entry:") (display (mi 'get 'f2)) (newline)
; (display "and two that aren't (f1 f3):")
; (display (list (mi 'get 'f1) (mi 'get 'f3))) (newline)
; (display "Whole thang:")
; (display (mi 'whole 'thang)) (newline)
; (display "Overlay 'f3 with 42, add to 'f1 value")
; (mi 'put 'f3 42)
; (display (number->string (+ (mi 'get 'f1) (mi 'get 'f3)))) (newline))))