LEFT | RIGHT |
(no file at all) | |
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--2014 Jan Nieuwenhuizen <janneke@gnu.org> | 3 ;;;; Copyright (C) 1998--2014 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 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 | 882 |
883 (regexp-substitute/global #f regex str notice 'post) | 883 (regexp-substitute/global #f regex str notice 'post) |
884 | 884 |
885 (if (< end-of-prev-match (string-length str)) | 885 (if (< end-of-prev-match (string-length str)) |
886 (set! | 886 (set! |
887 matches | 887 matches |
888 (cons (substring str end-of-prev-match (string-length str)) matches))) | 888 (cons (substring str end-of-prev-match (string-length str)) matches))) |
889 | 889 |
890 (reverse matches)) | 890 (reverse matches)) |
891 | 891 |
| 892 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 893 ;; numbering styles |
| 894 |
| 895 (define-public (number-format number-type num . custom-format) |
| 896 "Print NUM accordingly to the requested NUMBER-TYPE. |
| 897 Choices include @code{roman-lower} (by default), |
| 898 @code{roman-upper}, @code{arabic} and @code{custom}. |
| 899 In the latter case, CUSTOM-FORMAT must be supplied |
| 900 and will be applied to NUM." |
| 901 (cond |
| 902 ((equal? number-type 'roman-lower) |
| 903 (fancy-format #f "~(~@r~)" num)) |
| 904 ((equal? number-type 'roman-upper) |
| 905 (fancy-format #f "~@r" num)) |
| 906 ((equal? number-type 'arabic) |
| 907 (fancy-format #f "~d" num)) |
| 908 ((equal? number-type 'custom) |
| 909 (fancy-format #f (car custom-format) num)) |
| 910 (else (fancy-format #f "~(~@r~)" num)))) |
| 911 |
892 ;;;;;;;;;;;;;;;; | 912 ;;;;;;;;;;;;;;;; |
893 ;; other | 913 ;; other |
894 | 914 |
895 (define (sign x) | 915 (define (sign x) |
896 (if (= x 0) | 916 (if (= x 0) |
897 0 | 917 0 |
898 (if (< x 0) -1 1))) | 918 (if (< x 0) -1 1))) |
899 | 919 |
900 (define-public (binary-search start end getter target-val) | 920 (define-public (binary-search start end getter target-val) |
901 (_i "Find the index between @var{start} and @var{end} (an integer) | 921 (_i "Find the index between @var{start} and @var{end} (an integer) |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1012 (debugf "scaling:~S\n" scaling) | 1032 (debugf "scaling:~S\n" scaling) |
1013 (debugf "magnification:~S\n" magnification) | 1033 (debugf "magnification:~S\n" magnification) |
1014 (debugf "design:~S\n" designsize) | 1034 (debugf "design:~S\n" designsize) |
1015 scaling)) | 1035 scaling)) |
1016 | 1036 |
1017 (define-public (version-not-seen-message input-file-name) | 1037 (define-public (version-not-seen-message input-file-name) |
1018 (ly:warning-located | 1038 (ly:warning-located |
1019 (ly:format "~a:1" input-file-name) | 1039 (ly:format "~a:1" input-file-name) |
1020 (_ "no \\version statement found, please add~afor future compatibility") | 1040 (_ "no \\version statement found, please add~afor future compatibility") |
1021 (format #f "\n\n\\version ~s\n\n" (lilypond-version)))) | 1041 (format #f "\n\n\\version ~s\n\n" (lilypond-version)))) |
LEFT | RIGHT |