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

Delta Between Two Patch Sets: lily/sources.cc

Issue 225040043: Embed LilyPond source files inside generated PDF (Closed)
Left Patch Set: Access source files only through LilyPond. Created 9 years ago
Right Patch Set: Remove source file heading Created 9 years 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 | « Documentation/usage/running.itely ('k') | scm/framework-ps.scm » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 This file is part of LilyPond, the GNU music typesetter. 2 This file is part of LilyPond, the GNU music typesetter.
3 3
4 Copyright (C) 1997--2015 Han-Wen Nienhuys <hanwen@xs4all.nl> 4 Copyright (C) 1997--2015 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 Sources::~Sources () 81 Sources::~Sources ()
82 { 82 {
83 for (vsize i = 0; i < sourcefiles_.size (); i++) 83 for (vsize i = 0; i < sourcefiles_.size (); i++)
84 { 84 {
85 sourcefiles_[i]->unprotect (); 85 sourcefiles_[i]->unprotect ();
86 } 86 }
87 } 87 }
88 88
89 #include "lily-parser.hh" 89 #include "lily-parser.hh"
90 #include "lily-lexer.hh" 90 #include "lily-lexer.hh"
91 #include "lily-imports.hh"
92 #include "fluid.hh"
91 93
92 LY_DEFINE (ly_source_files, "ly:source-files", 1, 0, 0, 94 LY_DEFINE (ly_source_files, "ly:source-files", 0, 1, 0,
93 (SCM parser_smob), 95 (SCM parser_smob),
dak 2016/02/28 14:09:51 Maybe make the parser_smob argument optional? It
Valentin Villenave 2016/02/28 19:15:03 Done.
94 "A list of LilyPond files being processed by PARSER.") 96 "A list of LilyPond files being processed;"
97 "a PARSER may optionally be specified.")
95 { 98 {
96 LY_ASSERT_SMOB (Lily_parser, parser_smob, 1); 99
97 Lily_parser *parser = unsmob<Lily_parser> (parser_smob); 100 if (SCM_UNBNDP (parser_smob))
101 parser_smob = scm_fluid_ref (Lily::f_parser);
102 Lily_parser *parser = LY_ASSERT_SMOB (Lily_parser, parser_smob, 1);
98 Includable_lexer *lex = parser->lexer_; 103 Includable_lexer *lex = parser->lexer_;
99 104
100 SCM lst = SCM_EOL; 105 SCM lst = SCM_EOL;
101 for (vector<string>::const_iterator 106 for (vector<string>::const_iterator
102 i = lex->file_name_strings_.begin(); 107 i = lex->file_name_strings_.begin();
103 i != lex->file_name_strings_.end(); ++i) 108 i != lex->file_name_strings_.end(); ++i)
104 { 109 {
105 lst = scm_cons (ly_string2scm (*i), lst); 110 lst = scm_cons (ly_string2scm (*i), lst);
106 } 111 }
107 return scm_reverse (lst); 112 return scm_reverse_x (lst, SCM_EOL);
dak 2016/02/28 14:09:51 I'd use scm_reverse_x (lst, SCM_EOL) here since yo
Valentin Villenave 2016/02/28 19:15:03 Done.
108 } 113 }
LEFTRIGHT

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