From: fred Date: Sun, 24 Mar 2002 19:53:56 +0000 (+0000) Subject: lilypond-0.1.8 X-Git-Tag: release/1.5.59~4109 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e4a9fe4d26bf9e0b9ad4e98bc340512327945f14;p=lilypond.git lilypond-0.1.8 --- diff --git a/flower/flower-debug.cc b/flower/flower-debug.cc index 7e0e519f57..5ea5e50dc0 100644 --- a/flower/flower-debug.cc +++ b/flower/flower-debug.cc @@ -4,18 +4,19 @@ bool flower_check_debug=false; ofstream null_device ( "/dev/null"); -Dstream default_flower_stream(&null_device ,"/dev/null"); +Dstream default_flower_stream (&null_device ,"/dev/null"); Dstream *flower_dstream = &default_flower_stream; /** Set the debugging output. Will not delete/swallow argument. */ -void set_flower_debug(Dstream&ds, bool b) +void set_flower_debug (Dstream&ds, bool b) { #ifdef NPRINT if (b) cout << "Debug printout disabled, see the installation guide." << endl; #endif + flower_check_debug = b; flower_dstream = &ds; } diff --git a/flower/path.cc b/flower/path.cc index 5674ca90a3..be5f56a7f0 100644 --- a/flower/path.cc +++ b/flower/path.cc @@ -14,33 +14,33 @@ @return 4 components of the path. They can be empty */ void -split_path(String path, +split_path (String path, String &drive, String &dirs, String &filebase, String &extension) { // peel off components, one by one. - int di = path.index_i(':'); + int di = path.index_i (':'); if (di >= 0) { - drive = path.left_str(di + 1); - path = path.right_str(path.len() - di -1); + drive = path.left_str (di + 1); + path = path.right_str (path.len() - di -1); } else drive = ""; - di = path.index_last_i(PATHSEP); + di = path.index_last_i (PATHSEP); if (di >=0) { - dirs = path.left_str(di + 1); - path = path.right_str(path.len()-di -1); + dirs = path.left_str (di + 1); + path = path.right_str (path.len()-di -1); } else dirs = ""; - di = path.index_last_i('.'); + di = path.index_last_i ('.'); if (di >= 0) { - filebase = path.left_str(di); - extension =path.right_str(path.len()-di); + filebase = path.left_str (di); + extension =path.right_str (path.len()-di); } else { @@ -54,22 +54,25 @@ split_path(String path, in any other added path, in this order. */ String -File_path::find(String nm)const +File_path::find (String nm)const { fdebug << "looking for " << nm << ": "; - if ( !nm.length_i() || ( nm == "-" ) ) + if ( !nm.length_i() || ( nm == "-") ) return nm; for (int i=0; i < size(); i++) { - String path = (*this)[i]; - path+= String(path.length_i()? "/":"")+nm; + String path = elem(i); + if ( path.length_i() ) + path += "/"; + + path += nm; fdebug << path << "? "; - FILE *f = fopen(path.ch_C(), "r"); // ugh! + FILE *f = fopen (path.ch_C(), "r"); // ugh! if (f) { fdebug << "found\n"; - fclose(f); + fclose (f); return path; } }