Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(5)

Delta Between Two Patch Sets: scm/lily-library.scm

Issue 257580043: Clear fret-diagram- and harp-pedal-input-strings from whitespace (Closed)
Left Patch Set: Created 9 years, 7 months ago
Right Patch Set: David's comment Created 9 years, 7 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « scm/harp-pedals.scm ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 ;; string 779 ;; string
780 780
781 (define-public (string-endswith s suffix) 781 (define-public (string-endswith s suffix)
782 (equal? suffix (substring s 782 (equal? suffix (substring s
783 (max 0 (- (string-length s) (string-length suffix))) 783 (max 0 (- (string-length s) (string-length suffix)))
784 (string-length s)))) 784 (string-length s))))
785 785
786 (define-public (string-startswith s prefix) 786 (define-public (string-startswith s prefix)
787 (equal? prefix (substring s 0 (min (string-length s) (string-length prefix)))) ) 787 (equal? prefix (substring s 0 (min (string-length s) (string-length prefix)))) )
788 788
789 (define-public (remove-white-space strg) 789 (define-public (remove-whitespace strg)
790 "Remove characters satisfying @code{char-set:whitespace} from string @var{strg}" 790 "Remove characters satisfying @code{char-whitespace?} from string @var{strg}"
791 (string-delete 791 (string-delete
792 strg 792 strg
793 char-set:whitespace)) 793 char-whitespace?))
dak 2015/08/26 08:55:13 A mostly theoretic musing: in the predicates docum
794 794
795 (define-public (string-encode-integer i) 795 (define-public (string-encode-integer i)
796 (cond 796 (cond
797 ((= i 0) "o") 797 ((= i 0) "o")
798 ((< i 0) (string-append "n" (string-encode-integer (- i)))) 798 ((< i 0) (string-append "n" (string-encode-integer (- i))))
799 (else (string-append 799 (else (string-append
800 (make-string 1 (integer->char (+ 65 (modulo i 26)))) 800 (make-string 1 (integer->char (+ 65 (modulo i 26))))
801 (string-encode-integer (quotient i 26)))))) 801 (string-encode-integer (quotient i 26))))))
802 802
803 (define (number->octal-string x) 803 (define (number->octal-string x)
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 (debugf "scaling:~S\n" scaling) 1021 (debugf "scaling:~S\n" scaling)
1022 (debugf "magnification:~S\n" magnification) 1022 (debugf "magnification:~S\n" magnification)
1023 (debugf "design:~S\n" designsize) 1023 (debugf "design:~S\n" designsize)
1024 scaling)) 1024 scaling))
1025 1025
1026 (define-public (version-not-seen-message input-file-name) 1026 (define-public (version-not-seen-message input-file-name)
1027 (ly:warning-located 1027 (ly:warning-located
1028 (ly:format "~a:1" input-file-name) 1028 (ly:format "~a:1" input-file-name)
1029 (_ "no \\version statement found, please add~afor future compatibility") 1029 (_ "no \\version statement found, please add~afor future compatibility")
1030 (format #f "\n\n\\version ~s\n\n" (lilypond-version)))) 1030 (format #f "\n\n\\version ~s\n\n" (lilypond-version))))
1031
1032 (define-public (output-module? module)
1033 "Returns @code{#t} if @var{module} belongs to an output module
1034 usually carrying context definitions (@code{\\midi} or
1035 @code{\\layout})."
1036 (or (module-ref module 'is-midi #f)
1037 (module-ref module 'is-layout #f)))
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b