mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
2001-05-10 Dave Peticolas <dave@krondo.com>
* src/doc/design/engine.texinfo: update docs * src/scm/command-line.scm: fix bugs * src/engine/kvp_frame.c: handle NULL args git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4147 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
09945cef3c
commit
90ada02e6f
@ -1,3 +1,11 @@
|
||||
2001-05-10 Dave Peticolas <dave@krondo.com>
|
||||
|
||||
* src/doc/design/engine.texinfo: update docs
|
||||
|
||||
* src/scm/command-line.scm: fix bugs
|
||||
|
||||
* src/engine/kvp_frame.c: handle NULL args
|
||||
|
||||
2001-05-10 Christian Stimming <stimming@tuhh.de>
|
||||
|
||||
* src/scm/report/account-summary.scm, balance-sheet.scm, pnl.scm:
|
||||
|
@ -463,6 +463,10 @@ Use the number @code{n} as the denominator of the output value.
|
||||
@item GNC_DENOM_RECIPROCAL (n)
|
||||
Use the value @code{1/n} as the denominator of the output value.
|
||||
|
||||
@item GNC_DENOM_SIGFIGS (n)
|
||||
Use a value for the denominator that will keep at least @code{n}
|
||||
significant figures in the result.
|
||||
|
||||
@item GNC_DENOM_AUTO
|
||||
Compute an appropriate denominator automatically. Flags in the @var{how}
|
||||
argument will specify how to compute the denominator.
|
||||
@ -542,6 +546,10 @@ All arguments are required to have the same denominator, that
|
||||
denominator is to be used in the output, and an error is to be signaled
|
||||
if any argument has a different denominator.
|
||||
|
||||
@item GNC_DENOM_SIGFIG
|
||||
Round to the number of significant figures given in the rounding
|
||||
instructions by the GNC_DENOM_SIGFIGS () macro.
|
||||
|
||||
@end table
|
||||
|
||||
|
||||
@ -916,6 +924,12 @@ Return a deep copy of @var{frame}.
|
||||
Associate @var{key} with @var{value} in @var{frame}.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void kvp_frame_set_slot_nc(kvp_frame * @var{frame}, const char * @var{key}, kvp_value * @var{value})
|
||||
Same as @code{kvp_frame_set_slot}, except that @var{value} is used
|
||||
directly, instead of being copied. This call transfers 'ownership'
|
||||
of @var{value} to @var{frame}.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun kvp_value* kvp_frame_get_slot(kvp_frame * @var{frame}, const char * @var{key})
|
||||
Return the @code{kvp_value} object associated with @var{key}
|
||||
in @var{frame} or return @code{NULL} if there is no association
|
||||
@ -944,6 +958,27 @@ Return the value associated with the key path, or @code{NULL} if none.
|
||||
The path is specified as in @code{kvp_frame_set_slot_path_gslist}.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun {kvp_frame *} kvp_frame_get_frame (kvp_frame * @var{frame}, ...)
|
||||
Works like @code{kvp_frame_get_slot_path}, but returns the last frame
|
||||
in the path. All the keys should refer to frames. If the frame path
|
||||
does not exist, it is created.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun {kvp_frame *} kvp_frame_get_frame_gslist (kvp_frame * @var{frame}, GSList * @var{key_path})
|
||||
Works like @code{kvp_frame_get_slot_path_gslist}, but returns the last
|
||||
frame in the path. All the keys should refer to frames. If the frame
|
||||
path does not exist, it is created.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun {kvp_frame *} kvp_frame_get_frame_slash (kvp_frame * @var{frame}, const char * @var{path})
|
||||
Works like @code{kvp_frame_get_frame}, but the frame path is specified
|
||||
as a single string where the keys are separated by slashes; thus, for
|
||||
example: @code{/this/is/a/valid/path} and @code{///so//is////this/}.
|
||||
Multiple slashes are compresed and a leading slash is optional. The
|
||||
pointers @code{.} and @code{..} are @emph{not} followed/obeyed. (This
|
||||
is arguably a bug that needs fixing).
|
||||
@end deftypefun
|
||||
|
||||
|
||||
@node kvp_value, kvp_list, kvp_frame, Key-Value Pair Frames
|
||||
@subsection kvp_value
|
||||
|
@ -1071,6 +1071,8 @@ kvp_frame_to_string(const kvp_frame *frame)
|
||||
{
|
||||
gchar *tmp1;
|
||||
|
||||
g_return_val_if_fail (frame != NULL, NULL);
|
||||
|
||||
tmp1 = g_strdup_printf("{\n");
|
||||
|
||||
g_hash_table_foreach(frame->hash, kvp_frame_to_string_helper, &tmp1);
|
||||
@ -1088,5 +1090,6 @@ kvp_frame_to_string(const kvp_frame *frame)
|
||||
GHashTable*
|
||||
kvp_frame_get_hash(const kvp_frame *frame)
|
||||
{
|
||||
g_return_val_if_fail (frame != NULL, NULL);
|
||||
return frame->hash;
|
||||
}
|
||||
|
@ -246,8 +246,9 @@
|
||||
(list value (cdr args)))))))
|
||||
|
||||
(define (gnc:cmd-line-get-string-arg args)
|
||||
(gnc:debug "got string arg returning " (car args) " and " (cdr args))
|
||||
(list (car args) (cdr args)))
|
||||
(if (pair? args)
|
||||
(list (car args) (cdr args))
|
||||
(begin (gnc:warn "no argument given where one expected") #f)))
|
||||
|
||||
(define (gnc:prefs-show-version)
|
||||
(display "GnuCash ")
|
||||
@ -370,7 +371,7 @@
|
||||
|
||||
(if (not arg-parse-result)
|
||||
(begin
|
||||
(set result #f)
|
||||
(set! result #f)
|
||||
(set! quit? #t))
|
||||
(let ((parsed-value (car arg-parse-result))
|
||||
(remaining-args (cadr arg-parse-result)))
|
||||
|
Loading…
Reference in New Issue
Block a user