return SCM_BOOL_F;
}
-LY_DEFINE (ly_vsize_p, "ly:vsize?",
- 1, 0, 0, (SCM s),
- "Is @var{s} a vsize?")
-{
- if (scm_is_integer (s))
- {
- int i = scm_to_int (s);
- return i >= 0 ? SCM_BOOL_T : SCM_BOOL_F;
- }
- return SCM_BOOL_F;
-}
-
LY_DEFINE (ly_assoc_get, "ly:assoc-get",
2, 2, 0,
(SCM key, SCM alist, SCM default_value, SCM strict_checking),
(define-public (fraction? x)
(and (pair? x)
- (integer? (car x)) (integer? (cdr x))
- (>= (car x) 0) (>= (cdr x) 0)))
+ (index? (car x)) (index? (cdr x))))
(define-public (number-or-grob? x)
(or (ly:grob? x) (number? x)))
(define-public (number-list? x)
(and (list? x) (every number? x)))
+(define-public (index? x)
+ (and (integer? x) (>= x 0)))
+
(define-public (moment-pair? x)
(and (pair? x)
(ly:moment? (car x)) (ly:moment? (cdr x))))
(side-support-elements ,ly:grob-array? "The side support, an array of
grobs.")
- (skyline-quantizing ,ly:vsize? "The number of boxes to break a
+ (skyline-quantizing ,index? "The number of boxes to break a
slur into when calculating its skyline.")
(slur ,ly:grob? "A pointer to a @code{Slur} object.")
(spacing ,ly:grob? "The spacing spanner governing this section.")
(,cheap-list? . "list")
(,fraction? . "fraction, as pair")
(,grob-list? . "list of grobs")
+ (,index? . "non-negative integer")
;; this is built on cheap-list
(,list-or-symbol? . "list or symbol")
(,markup? . "markup")
(,ly:translator? . "translator")
(,ly:translator-group? . "translator group")
(,ly:unpure-pure-container? . "unpure/pure container")
- (,ly:vsize? . "vsize")
))
ly:unit
ly:usage
ly:version
- ly:vsize?
ly:warning
;; FIXME: cannot change staff size in --safe-mode