Left: | ||
Right: |
OLD | NEW |
---|---|
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) 1999--2020 Jan Nieuwenhuizen <janneke@gnu.org> | 4 Copyright (C) 1999--2020 Jan Nieuwenhuizen <janneke@gnu.org> |
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 22 matching lines...) Expand all Loading... | |
33 class Source_file : public Smob<Source_file> | 33 class Source_file : public Smob<Source_file> |
34 { | 34 { |
35 public: | 35 public: |
36 int print_smob (SCM, scm_print_state *) const; | 36 int print_smob (SCM, scm_print_state *) const; |
37 SCM mark_smob () const; | 37 SCM mark_smob () const; |
38 static const char * const type_p_name_; | 38 static const char * const type_p_name_; |
39 virtual ~Source_file (); | 39 virtual ~Source_file (); |
40 private: | 40 private: |
41 std::vector<char const *> newline_locations_; | 41 std::vector<char const *> newline_locations_; |
42 std::istream *istream_; | 42 std::istream *istream_; |
43 | |
44 /* The input data, plus an extra \0 to terminate */ | |
Dan Eble
2020/02/14 12:43:40
I haven't looked through this code. Would changin
hanwenn
2020/02/14 22:12:28
Done.
| |
43 std::vector<char> characters_; | 45 std::vector<char> characters_; |
44 SCM str_port_; | 46 SCM str_port_; |
45 | 47 |
46 void load_stdin (); | 48 void load_stdin (); |
47 void init_port (); | 49 void init_port (); |
48 void init (); | 50 void init (); |
49 | 51 |
50 public: | 52 public: |
51 Source_file (const std::string &fn); | 53 Source_file (const std::string &fn); |
52 Source_file (const std::string&, const std::string&); | 54 Source_file (const std::string&, const std::string&); |
(...skipping 16 matching lines...) Expand all Loading... | |
69 SCM get_port () const; | 71 SCM get_port () const; |
70 std::string name_; | 72 std::string name_; |
71 | 73 |
72 protected: | 74 protected: |
73 ssize_t line_offset_; | 75 ssize_t line_offset_; |
74 }; | 76 }; |
75 | 77 |
76 std::vector<char> gulp_file (const std::string &fn, size_t desired_size); | 78 std::vector<char> gulp_file (const std::string &fn, size_t desired_size); |
77 | 79 |
78 #endif /* SOURCE_FILE_HH */ | 80 #endif /* SOURCE_FILE_HH */ |
OLD | NEW |