LEFT | RIGHT |
1 ;;;; This file is part of LilyPond, the GNU music typesetter. | 1 ;;;; This file is part of LilyPond, the GNU music typesetter. |
2 ;;;; | 2 ;;;; |
3 ;;;; Copyright (C) 1998--2015 Jan Nieuwenhuizen <janneke@gnu.org> | 3 ;;;; Copyright (C) 1998--2015 Jan Nieuwenhuizen <janneke@gnu.org> |
4 ;;;; Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 ;;;; Han-Wen Nienhuys <hanwen@xs4all.nl> |
5 ;;;; | 5 ;;;; |
6 ;;;; LilyPond is free software: you can redistribute it and/or modify | 6 ;;;; LilyPond is free software: you can redistribute it and/or modify |
7 ;;;; it under the terms of the GNU General Public License as published by | 7 ;;;; it under the terms of the GNU General Public License as published by |
8 ;;;; the Free Software Foundation, either version 3 of the License, or | 8 ;;;; the Free Software Foundation, either version 3 of the License, or |
9 ;;;; (at your option) any later version. | 9 ;;;; (at your option) any later version. |
10 ;;;; | 10 ;;;; |
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
898 the trailing elements of the longer list are ignored." | 898 the trailing elements of the longer list are ignored." |
899 (let* ((ca (car a)) | 899 (let* ((ca (car a)) |
900 (iseql (op ca ca))) | 900 (iseql (op ca ca))) |
901 (let loop ((ca ca) (cb (car b)) (a (cdr a)) (b (cdr b))) | 901 (let loop ((ca ca) (cb (car b)) (a (cdr a)) (b (cdr b))) |
902 (let ((axb (op ca cb))) | 902 (let ((axb (op ca cb))) |
903 (if (and (pair? a) (pair? b) | 903 (if (and (pair? a) (pair? b) |
904 (eq? axb iseql (op cb ca))) | 904 (eq? axb iseql (op cb ca))) |
905 (loop (car a) (car b) (cdr a) (cdr b)) | 905 (loop (car a) (car b) (cdr a) (cdr b)) |
906 axb))))) | 906 axb))))) |
907 | 907 |
908 (define (ly:version? op . ver) | 908 (define (ly:version? op ver) |
909 "Compare the currently executed LilyPond version with a given version | 909 "Using the operator @var{op} compare the currently executed LilyPond |
910 @var{ver} using the operator @var{op}. @var{ver} may be passed as a | 910 version with a given version @var{ver} which is passed as a list of· |
911 sequence or a list of numbers with up to three elements." | 911 numbers." |
912 (lexicographic-list-compare? op (ly:version) | 912 (lexicographic-list-compare? op (ly:version) ver)) |
913 (if (and (= 1 (length ver)) (list? (car ver))) | |
914 (car ver) ver))) | |
915 | 913 |
916 ;;;;;;;;;;;;;;;; | 914 ;;;;;;;;;;;;;;;; |
917 ;; other | 915 ;; other |
918 | 916 |
919 (define (sign x) | 917 (define (sign x) |
920 (if (= x 0) | 918 (if (= x 0) |
921 0 | 919 0 |
922 (if (< x 0) -1 1))) | 920 (if (< x 0) -1 1))) |
923 | 921 |
924 (define-public (binary-search start end getter target-val) | 922 (define-public (binary-search start end getter target-val) |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1043 (ly:format "~a:1" input-file-name) | 1041 (ly:format "~a:1" input-file-name) |
1044 (_ "no \\version statement found, please add~afor future compatibility") | 1042 (_ "no \\version statement found, please add~afor future compatibility") |
1045 (format #f "\n\n\\version ~s\n\n" (lilypond-version)))) | 1043 (format #f "\n\n\\version ~s\n\n" (lilypond-version)))) |
1046 | 1044 |
1047 (define-public (output-module? module) | 1045 (define-public (output-module? module) |
1048 "Returns @code{#t} if @var{module} belongs to an output module | 1046 "Returns @code{#t} if @var{module} belongs to an output module |
1049 usually carrying context definitions (@code{\\midi} or | 1047 usually carrying context definitions (@code{\\midi} or |
1050 @code{\\layout})." | 1048 @code{\\layout})." |
1051 (or (module-ref module 'is-midi #f) | 1049 (or (module-ref module 'is-midi #f) |
1052 (module-ref module 'is-layout #f))) | 1050 (module-ref module 'is-layout #f))) |
LEFT | RIGHT |