From: fred Date: Sun, 24 Mar 2002 20:12:13 +0000 (+0000) Subject: lilypond-1.0.1 X-Git-Tag: release/1.5.59~3073 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=35a42a6c22905c1aafb85ff394688af0d48dceb0;p=lilypond.git lilypond-1.0.1 --- diff --git a/Documentation/BLURB.in b/Documentation/BLURB.in new file mode 100644 index 0000000000..68ca4dc05e --- /dev/null +++ b/Documentation/BLURB.in @@ -0,0 +1,6 @@ +LilyPond is the GNU Project music typesetter. This program can print +beautiful sheet music from a music definition file. It can also play +mechanical performances to a MIDI file. Features include multiple +staffs, meters, clefs, keys, lyrics, versatile input language, cadenzas, +beams, slurs, triplets, formatting scores, part extraction. It includes +a nice font of musical symbols. diff --git a/flower/file-path.cc b/flower/file-path.cc index e6f9c4cff7..3b76d4b1dd 100644 --- a/flower/file-path.cc +++ b/flower/file-path.cc @@ -74,20 +74,23 @@ File_path::parse_path (String p) /** find a file. It will search in the current dir, in the construction-arg, and in any other added path, in this order. + + @return + The full path if found, or empty string if not found */ String File_path::find (String nm) const { - fdebug << _("looking for ") << nm << ": "; + fdebug << "looking for" << nm << ": "; if (!nm.length_i() || (nm == "-") ) return nm; for (int i=0; i < size(); i++) { String path = elem(i); - String sep (DIRSEP); + String sep = to_str (DIRSEP); String right(path.right_str (1)); if (path.length_i () && right != sep) - path += DIRSEP; + path += to_str (DIRSEP); path += nm; @@ -95,12 +98,12 @@ File_path::find (String nm) const FILE *f = fopen (path.ch_C(), "r"); // ugh! if (f) { - fdebug << _("found\n"); + fdebug << "found\n"; fclose (f); return path; } } - fdebug << "\n"; + fdebug << '\n'; return ""; } diff --git a/flower/include/text-db.hh b/flower/include/text-db.hh index ab3e9c82b5..6e90e38c47 100644 --- a/flower/include/text-db.hh +++ b/flower/include/text-db.hh @@ -40,7 +40,7 @@ public: Text_db (String fn):Data_file (fn) { } Data_file::error; - bool eof(); + bool eof_b (); /// get next line. Text_record operator++(int) { @@ -48,7 +48,7 @@ public: } /// are we done yet? operator bool() { - return !eof(); + return !eof_b (); } }; diff --git a/flower/include/text-stream.hh b/flower/include/text-stream.hh index 4d369fdbbb..3bebb08505 100644 --- a/flower/include/text-stream.hh +++ b/flower/include/text-stream.hh @@ -5,7 +5,7 @@ #include #include #include "string.hh" -#include "varray.hh" +#include "array.hh" /** line counting input stream. @@ -28,10 +28,8 @@ class Text_stream public: Text_stream (String fn); String get_name() { return name; } - bool eof() { - return feof (f); - } - char get() { + bool eof_b(); + char get() { char c; if (pushback.empty()) @@ -49,6 +47,8 @@ public: pushback.push (c); } char peek() { + if (eof_b ()) + return -1; char c = get(); unget (c); return c; @@ -61,7 +61,7 @@ public: } ~Text_stream(){ - if (!eof()) + if (!eof_b()) cerr <<__FUNCTION__<< ": closing unended file"; fclose (f); diff --git a/flower/text-db.cc b/flower/text-db.cc index fef860eb31..e59748f665 100644 --- a/flower/text-db.cc +++ b/flower/text-db.cc @@ -1,9 +1,9 @@ #include "text-db.hh" bool -Text_db::eof() +Text_db::eof_b () { Data_file::gobble_leading_white(); - return Data_file::eof(); + return Data_file::eof_b(); } void @@ -11,41 +11,41 @@ Text_db::gobble_leading_white() { while (1) { - Data_file::gobble_leading_white(); - if (eof()) - return ; - char c; - if ((c = data_get()) !='\n') - { - data_unget (c); - return ; + Data_file::gobble_leading_white(); + if (eof_b ()) + return ; + char c; + if ((c = data_get()) !='\n') + { + data_unget (c); + return ; } - } + } } Text_record Text_db::get_record() { - while (1) - { - String s; - Array fields; - assert (!eof()); + while (1) + { + String s; + Array fields; + assert (!eof_b ()); - while ((s = get_word()) != "") - { - fields.push (s); - gobble_white(); - } + while ((s = get_word()) != "") + { + fields.push (s); + gobble_white(); + } - if (get_line() != "") - assert (false); + if (get_line() != "") + assert (false); - assert (fields.size()); - return Text_record (fields, get_name(), line ()); - } + assert (fields.size()); + return Text_record (fields, get_name(), line ()); + } } diff --git a/flower/text-stream.cc b/flower/text-stream.cc index 01d2e8ef5c..9c87211c25 100644 --- a/flower/text-stream.cc +++ b/flower/text-stream.cc @@ -4,28 +4,38 @@ Text_stream::Text_stream (String fn) { ios::sync_with_stdio(); if (fn == "") - { - name = _(""); - f = stdin; - } - - else - { - name = fn; - f = fopen (fn.ch_C (), "r"); - } + { + name = _ (""); + f = stdin; + } - if (!f) - { - cerr <<__FUNCTION__<< _(": can't open `") << fn << "'\n"; - exit (1); - } + else + { + name = fn; + f = fopen (fn.ch_C (), "r"); + } - line_no = 1; + if (!f) + { + cerr << __FUNCTION__ + << ": " << _f ("can't open file: `%s'", fn) << '\n'; + exit (1); } + line_no = 1; +} + void Text_stream::message (String s) { - cerr << "\n"< + \paper{} + \midi{} +} + +% A full-mudala example with two staffs +% +% Type: +% +% ly2dvi example-3 +% xdvi example-3 # or your dvi viewer here +% +% For more elaborate examples see twinkle.ly, kortjakje.ly and mutopia/*. +% +% A docmument on Mudela is under construction: Documentation/tex/mudela.doc +% (available as .ps from the website too).