fix compose mess, and a number of 64 bit printf specs

git-svn-id: svn://localhost/trunk/ardour2@51 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2005-10-06 19:10:57 +00:00
parent 5a52d8fee4
commit 4c50965622
70 changed files with 448 additions and 448 deletions

View File

@ -181,7 +181,7 @@ About::About ()
set_name (X_("ardour"));
set_website (X_("http://ardour.org/"));
set_website_label (X_("ardour.org"));
set_version ((compose(_("%1\n(built with ardour/gtk %2.%3.%4 libardour: %5.%6.%7)"),
set_version ((string_compose(_("%1\n(built with ardour/gtk %2.%3.%4 libardour: %5.%6.%7)"),
VERSIONSTRING,
gtk_ardour_major_version,
gtk_ardour_minor_version,

View File

@ -30,7 +30,7 @@
#include <gtkmm.h>
#include <pbd/error.h>
#include <pbd/compose.h>
#include <pbd/string_compose.h>
#include <pbd/basename.h>
#include <pbd/pathscanner.h>
#include <pbd/failed_constructor.h>
@ -900,7 +900,7 @@ ARDOUR_UI::cannot_record_no_input (DiskStream* ds)
{
ENSURE_GUI_THREAD (bind (mem_fun(*this, &ARDOUR_UI::cannot_record_no_input), ds));
string msg = PBD::compose (_("\
string msg = string_compose (_("\
You cannot record-enable\n\
track %1\n\
because it has no input connections.\n\
@ -1104,17 +1104,17 @@ ARDOUR_UI::ask_about_saving_session (string what)
string msg;
msg = PBD::compose(_("Save and %1"), what);
msg = string_compose(_("Save and %1"), what);
Gtk::Button save_button (msg);
save_button.set_name ("EditorGTKButton");
msg = PBD::compose(_("Just %1"), what);
msg = string_compose(_("Just %1"), what);
Gtk::Button nosave_button (msg);
nosave_button.set_name ("EditorGTKButton");
msg = PBD::compose(_("Don't %1"), what);
msg = string_compose(_("Don't %1"), what);
Gtk::Button noquit_button (msg);
noquit_button.set_name ("EditorGTKButton");
@ -1127,7 +1127,7 @@ ARDOUR_UI::ask_about_saving_session (string what)
} else {
type = _("snapshot");
}
prompt = PBD::compose(_("The %1\n\"%2\"\nhas not been saved.\n\nAny changes made this time\nwill be lost unless you save it.\n\nWhat do you want to do?"),
prompt = string_compose(_("The %1\n\"%2\"\nhas not been saved.\n\nAny changes made this time\nwill be lost unless you save it.\n\nWhat do you want to do?"),
type, session->snap_name());
prompt_label.set_text (prompt);
@ -2728,7 +2728,7 @@ ARDOUR_UI::new_session (bool startup, string predetermined_path)
// Check that it doesn't already exist.
access(session_path.c_str(), R_OK);
if (errno != ENOENT){
error << PBD::compose(_("Session %1 already exists at %2"), session_name, session_path) << endmsg;
error << string_compose(_("Session %1 already exists at %2"), session_name, session_path) << endmsg;
return;
}
@ -2812,7 +2812,7 @@ This prevents the session from being loaded."));
catch (...) {
error << PBD::compose(_("Session \"%1 (snapshot %2)\" did not load successfully"), path, snap_name) << endmsg;
error << string_compose(_("Session \"%1 (snapshot %2)\" did not load successfully"), path, snap_name) << endmsg;
return -1;
}
@ -2865,7 +2865,7 @@ ARDOUR_UI::build_session (string path, string snap_name,
catch (...) {
error << PBD::compose(_("Session \"%1 (snapshot %2)\" did not load successfully"), path, snap_name) << endmsg;
error << string_compose(_("Session \"%1 (snapshot %2)\" did not load successfully"), path, snap_name) << endmsg;
return -1;
}
@ -2966,15 +2966,15 @@ require some unused files to continue to exist."));
if (rep.space < 1048576.0f) {
if (removed > 1) {
txt.set_text (PBD::compose (msg, removed, _("files"), (float) rep.space / 1024.0f, "kilo"));
txt.set_text (string_compose (msg, removed, _("files"), (float) rep.space / 1024.0f, "kilo"));
} else {
txt.set_text (PBD::compose (msg, removed, _("file"), (float) rep.space / 1024.0f, "kilo"));
txt.set_text (string_compose (msg, removed, _("file"), (float) rep.space / 1024.0f, "kilo"));
}
} else {
if (removed > 1) {
txt.set_text (PBD::compose (msg, removed, _("files"), (float) rep.space / 1048576.0f, "mega"));
txt.set_text (string_compose (msg, removed, _("files"), (float) rep.space / 1048576.0f, "mega"));
} else {
txt.set_text (PBD::compose (msg, removed, _("file"), (float) rep.space / 1048576.0f, "mega"));
txt.set_text (string_compose (msg, removed, _("file"), (float) rep.space / 1048576.0f, "mega"));
}
}

View File

@ -1446,7 +1446,7 @@ AudioTimeAxisView::add_redirect_automation_curve (Redirect *redirect, uint32_t w
if ((ran = find_redirect_automation_node (redirect, what)) == 0) {
fatal << _("programming error: ")
<< compose (X_("redirect automation curve for %1:%2 not registered with audio track!"),
<< string_compose (X_("redirect automation curve for %1:%2 not registered with audio track!"),
redirect->name(), what)
<< endmsg;
/*NOTREACHED*/
@ -1885,7 +1885,7 @@ AudioTimeAxisView::build_playlist_menu (Gtk::Menu * menu)
playlist_menu = new Menu;
playlist_menu->set_name ("ArdourContextMenu");
playlist_items.push_back (MenuElem (compose (_("Current: %1"), get_diskstream()->playlist()->name())));
playlist_items.push_back (MenuElem (string_compose (_("Current: %1"), get_diskstream()->playlist()->name())));
playlist_items.push_back (SeparatorElem());
playlist_items.push_back (MenuElem (_("Rename"), mem_fun(*this, &AudioTimeAxisView::rename_current_playlist)));

View File

@ -3886,7 +3886,7 @@ Editor::edit_menu_map_handler ()
if (session->undo_depth() == 0) {
label = _("Undo");
} else {
label = compose(_("Undo (%1)"), session->next_undo());
label = string_compose(_("Undo (%1)"), session->next_undo());
}
edit_items.push_back (MenuElem (label, bind (mem_fun(*this, &Editor::undo), 1U)));
@ -3898,7 +3898,7 @@ Editor::edit_menu_map_handler ()
if (session->redo_depth() == 0) {
label = _("Redo");
} else {
label = compose(_("Redo (%1)"), session->next_redo());
label = string_compose(_("Redo (%1)"), session->next_redo());
}
edit_items.push_back (MenuElem (label, bind (mem_fun(*this, &Editor::redo), 1U)));
@ -4543,7 +4543,7 @@ int
Editor::playlist_deletion_dialog (Playlist* pl)
{
ArdourDialog dialog ("playlist deletion dialog");
Label label (compose (_("Playlist %1 is currently unused.\n"
Label label (string_compose (_("Playlist %1 is currently unused.\n"
"If left alone, no audio files used by it will be cleaned.\n"
"If deleted, audio files used by it alone by will cleaned."),
pl->name()));

View File

@ -96,7 +96,7 @@ Editor::event_frame (GdkEvent* event, double* pcx, double* pcy)
gnome_canvas_w2c_d (GNOME_CANVAS(track_gnome_canvas), event->crossing.x, event->crossing.y, pcx, pcy);
break;
default:
warning << compose (_("Editor::event_frame() used on unhandled event type %1"), event->type) << endmsg;
warning << string_compose (_("Editor::event_frame() used on unhandled event type %1"), event->type) << endmsg;
break;
}

View File

@ -169,7 +169,7 @@ Editor::destroy_clicked_region ()
vector<string> choices;
string prompt;
prompt = compose (_(" This is destructive, will possibly delete audio files\n\
prompt = string_compose (_(" This is destructive, will possibly delete audio files\n\
It cannot be undone\n\
Do you really want to destroy %1 ?"),
(selected > 1 ?
@ -488,7 +488,7 @@ Editor::build_region_boundary_cache ()
point = Start;
break;
default:
fatal << compose (_("build_region_boundary_cache called with snap_type = %1"), snap_type) << endmsg;
fatal << string_compose (_("build_region_boundary_cache called with snap_type = %1"), snap_type) << endmsg;
/*NOTREACHED*/
return;
}
@ -1941,7 +1941,7 @@ Editor::do_import (vector<string> paths, bool split, bool as_tracks)
for (vector<string>::iterator i = paths.begin(); i != paths.end(); ++i ) {
interthread_progress_window->set_title (compose (_("ardour: importing %1"), (*i)));
interthread_progress_window->set_title (string_compose (_("ardour: importing %1"), (*i)));
import_status.pathname = (*i);
import_status.done = false;
@ -1987,21 +1987,21 @@ Editor::reject_because_rate_differs (string path, SF_INFO& finfo, string action,
if (finfo.samplerate != (int) session->frame_rate()) {
vector<string> choices;
choices.push_back (compose (_("%1 it anyway"), action));
choices.push_back (string_compose (_("%1 it anyway"), action));
if (multiple_pending) {
/* XXX assumptions about sentence structure
here for translators. Sorry.
*/
choices.push_back (compose (_("Don't %1 it"), action));
choices.push_back (compose (_("%1 all without questions"), action));
choices.push_back (string_compose (_("Don't %1 it"), action));
choices.push_back (string_compose (_("%1 all without questions"), action));
choices.push_back (_("Cancel entire import"));
} else {
choices.push_back (_("Cancel"));
}
Gtkmm2ext::Choice rate_choice (
compose (_("%1\nThis audiofile's sample rate doesn't match the session sample rate!"), path),
string_compose (_("%1\nThis audiofile's sample rate doesn't match the session sample rate!"), path),
choices);
rate_choice.chosen.connect (Main::quit.slot());
@ -2087,7 +2087,7 @@ Editor::embed_sndfile (string path, bool split, bool multiple_files, bool& check
if ((sf = sf_open (path.c_str(), SFM_READ, &finfo)) == 0) {
char errbuf[256];
sf_error_str (0, errbuf, sizeof (errbuf) - 1);
error << compose(_("Editor: cannot open file \"%1\" (%2)"), selection, errbuf) << endmsg;
error << string_compose(_("Editor: cannot open file \"%1\" (%2)"), selection, errbuf) << endmsg;
return;
}
sf_close (sf);
@ -2117,7 +2117,7 @@ Editor::embed_sndfile (string path, bool split, bool multiple_files, bool& check
for (int n=0; n < finfo.channels; ++n)
{
idspec = path;
idspec += compose(":%1", n);
idspec += string_compose(":%1", n);
try {
source = new SndFileSource (idspec.c_str());
@ -2125,7 +2125,7 @@ Editor::embed_sndfile (string path, bool split, bool multiple_files, bool& check
}
catch (failed_constructor& err) {
error << compose(_("could not open %1"), path) << endmsg;
error << string_compose(_("could not open %1"), path) << endmsg;
goto out;
}
@ -2207,7 +2207,7 @@ Editor::insert_paths_as_new_tracks (vector<string> paths, bool split)
if ((sf = sf_open ((*p).c_str(), SFM_READ, &finfo)) == 0) {
char errbuf[256];
sf_error_str (0, errbuf, sizeof (errbuf) - 1);
error << compose(_("Editor: cannot open file \"%1\" (%2)"), (*p), errbuf) << endmsg;
error << string_compose(_("Editor: cannot open file \"%1\" (%2)"), (*p), errbuf) << endmsg;
continue;
}
@ -2283,7 +2283,7 @@ Editor::insert_sndfile_into (string path, bool multi, AudioTimeAxisView* tv, jac
if ((sf = sf_open (path.c_str(), SFM_READ, &finfo)) == 0) {
char errbuf[256];
sf_error_str (0, errbuf, sizeof (errbuf) - 1);
error << compose(_("Editor: cannot open file \"%1\" (%2)"), path, errbuf) << endmsg;
error << string_compose(_("Editor: cannot open file \"%1\" (%2)"), path, errbuf) << endmsg;
return;
}
sf_close (sf);
@ -2301,7 +2301,7 @@ Editor::insert_sndfile_into (string path, bool multi, AudioTimeAxisView* tv, jac
for (int n=0; n < finfo.channels; ++n)
{
idspec = path;
idspec += compose(":%1", n);
idspec += string_compose(":%1", n);
try {
source = new SndFileSource (idspec.c_str());
@ -2309,7 +2309,7 @@ Editor::insert_sndfile_into (string path, bool multi, AudioTimeAxisView* tv, jac
}
catch (failed_constructor& err) {
error << compose(_("could not open %1"), path) << endmsg;
error << string_compose(_("could not open %1"), path) << endmsg;
goto out;
}

View File

@ -229,7 +229,7 @@ Editor::add_audio_region_to_region_display (AudioRegion *region)
item.clear ();
if (region->n_channels() > 1) {
str = compose("%1 [%2]", region->name(), region->n_channels());
str = string_compose("%1 [%2]", region->name(), region->n_channels());
item.push_back (str.c_str());
} else {
item.push_back (region->name().c_str());
@ -284,7 +284,7 @@ Editor::add_audio_region_to_region_display (AudioRegion *region)
item.clear ();
if (region->n_channels() > 1) {
str = compose("%1 [%2]", region->name(), region->n_channels());
str = string_compose("%1 [%2]", region->name(), region->n_channels());
item.push_back (str.c_str());
} else {
item.push_back (region->name().c_str());
@ -303,7 +303,7 @@ Editor::add_audio_region_to_region_display (AudioRegion *region)
item.clear ();
if (region->n_channels() > 1) {
str = compose("%1 [%2]", region->name(), region->n_channels());
str = string_compose("%1 [%2]", region->name(), region->n_channels());
item.push_back (str.c_str());
} else {
item.push_back (region->name().c_str());

View File

@ -655,7 +655,7 @@ ExportDialog::export_toc_file (Locations::LocationList& locations, const string&
gchar buf[18];
if (!out) {
error << compose(_("Editor: cannot open \"%1\" as export file for CD toc file"), filepath) << endmsg;
error << string_compose(_("Editor: cannot open \"%1\" as export file for CD toc file"), filepath) << endmsg;
return;
}
out << "CD_DA" << endl;
@ -729,8 +729,8 @@ ExportDialog::export_toc_file (Locations::LocationList& locations, const string&
if ((*i)->cd_info.find("performer") != (*i)->cd_info.end()) {
out << " PERFORMER \"" << (*i)->cd_info["performer"] << "\"" << endl;
}
if ((*i)->cd_info.find("composer") != (*i)->cd_info.end()) {
out << " COMPOSER \"" << (*i)->cd_info["composer"] << "\"" << endl;
if ((*i)->cd_info.find("string_composer") != (*i)->cd_info.end()) {
out << " COMPOSER \"" << (*i)->cd_info["string_composer"] << "\"" << endl;
}
if ((*i)->cd_info.find("isrc") != (*i)->cd_info.end()) {
@ -777,7 +777,7 @@ ExportDialog::export_cue_file (Locations::LocationList& locations, const string&
int numtracks = 0, tracknum = 0, indexnum = 0;
if (!out) {
error << compose(_("Editor: cannot open \"%1\" as export file for CD cue file"), filepath) << endmsg;
error << string_compose(_("Editor: cannot open \"%1\" as export file for CD cue file"), filepath) << endmsg;
return;
}
@ -867,8 +867,8 @@ ExportDialog::export_cue_file (Locations::LocationList& locations, const string&
out << "PERFORMER \"" << (*i)->cd_info["performer"] << "\"" << endl;
}
if ((*i)->cd_info.find("composer") != (*i)->cd_info.end()) {
out << "SONGWRITER \"" << (*i)->cd_info["composer"] << "\"" << endl;
if ((*i)->cd_info.find("string_composer") != (*i)->cd_info.end()) {
out << "SONGWRITER \"" << (*i)->cd_info["string_composer"] << "\"" << endl;
}
snprintf (buf, sizeof(buf), "INDEX %02d", indexnum);
out << buf;
@ -1261,7 +1261,7 @@ ExportDialog::channels_chosen (GdkEventAny* ignored)
if (route->n_outputs() == 1) {
stupid_list.push_back (route->name());
} else {
stupid_list.push_back (compose("%1: out-%2", route->name(), i+1));
stupid_list.push_back (string_compose("%1: out-%2", route->name(), i+1));
}
stupid_list.push_back ("");

View File

@ -555,7 +555,7 @@ ImageFrameSocketHandler::send_imageframe_view_position_change(jack_nframes_t pos
msgBuffer << ardourvis::ITEM_UPDATE << ardourvis::IMAGEFRAME_ITEM << ardourvis::POSITION_CHANGE ;
// add the item description
this->compose_imageframe_item_desc(item, msgBuffer) ;
this->string_compose_imageframe_item_desc(item, msgBuffer) ;
msgBuffer << std::setw(ardourvis::TIME_VALUE_CHARS) << pos ;
@ -590,7 +590,7 @@ ImageFrameSocketHandler::send_imageframe_view_duration_change(jack_nframes_t dur
// add the msg type
msgBuffer << ardourvis::ITEM_UPDATE << ardourvis::IMAGEFRAME_ITEM << ardourvis::DURATION_CHANGE ;
this->compose_imageframe_item_desc(item, msgBuffer) ;
this->string_compose_imageframe_item_desc(item, msgBuffer) ;
msgBuffer << std::setw(ardourvis::TIME_VALUE_CHARS) << dur ;
@ -624,7 +624,7 @@ ImageFrameSocketHandler::send_imageframe_view_renamed(std::string new_id, std::s
// add the msg type
msgBuffer << ardourvis::RENAME_ITEM << ardourvis::IMAGEFRAME_ITEM ;
this->compose_imageframe_item_desc(item, msgBuffer) ;
this->string_compose_imageframe_item_desc(item, msgBuffer) ;
// add the old id and length
msgBuffer << std::setw(3) << old_id.length() ;
@ -703,7 +703,7 @@ ImageFrameSocketHandler::send_marker_view_position_change(jack_nframes_t pos, vo
msgBuffer << ardourvis::ITEM_UPDATE << ardourvis::MARKER_ITEM << ardourvis::POSITION_CHANGE ;
// add the item description
this->compose_marker_item_desc(item, msgBuffer) ;
this->string_compose_marker_item_desc(item, msgBuffer) ;
msgBuffer << std::setw(ardourvis::TIME_VALUE_CHARS) << pos ;
@ -736,7 +736,7 @@ ImageFrameSocketHandler::send_marker_view_duration_change(jack_nframes_t dur, vo
// add the msg type
msgBuffer << ardourvis::ITEM_UPDATE << ardourvis::MARKER_ITEM << ardourvis::DURATION_CHANGE ;
this->compose_marker_item_desc(item, msgBuffer) ;
this->string_compose_marker_item_desc(item, msgBuffer) ;
msgBuffer << std::setw(ardourvis::TIME_VALUE_CHARS) << dur ;
@ -772,7 +772,7 @@ ImageFrameSocketHandler::send_marker_view_renamed(std::string new_id, std::strin
// add the msg type
msgBuffer << ardourvis::RENAME_ITEM << ardourvis::MARKER_ITEM ;
this->compose_marker_item_desc(item, msgBuffer) ;
this->string_compose_marker_item_desc(item, msgBuffer) ;
// add the old id and length
msgBuffer << std::setw(3) << old_id.length() ;
@ -1066,7 +1066,7 @@ ImageFrameSocketHandler::handle_item_selected(const char* msg)
int scene_id_size ;
int item_id_size ;
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, scene_id, scene_id_size, item_id, item_id_size) ;
this->dstring_ecompose_imageframe_item_desc(msg, position, track_id, track_id_size, scene_id, scene_id_size, item_id, item_id_size) ;
// get the named time axis
ImageFrameTimeAxis* ifta = dynamic_cast<ImageFrameTimeAxis*>(thePublicEditor.get_named_time_axis(track_id)) ;
@ -1671,7 +1671,7 @@ ImageFrameSocketHandler::handle_imageframe_view_position_update(const char* msg)
int scene_id_size ;
int item_id_size ;
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, scene_id, scene_id_size, item_id, item_id_size) ;
this->dstring_ecompose_imageframe_item_desc(msg, position, track_id, track_id_size, scene_id, scene_id_size, item_id, item_id_size) ;
jack_nframes_t start_frame = strtoul(get_message_part(position, ardourvis::TIME_VALUE_CHARS, msg).c_str(), 0, 10) ;
position += ardourvis::TIME_VALUE_CHARS ;
@ -1723,7 +1723,7 @@ ImageFrameSocketHandler::handle_imageframe_view_duration_update(const char* msg)
int scene_id_size ;
int item_id_size ;
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, scene_id, scene_id_size, item_id, item_id_size) ;
this->dstring_ecompose_imageframe_item_desc(msg, position, track_id, track_id_size, scene_id, scene_id_size, item_id, item_id_size) ;
jack_nframes_t duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
position += ardourvis::TIME_VALUE_CHARS ;
@ -1774,7 +1774,7 @@ ImageFrameSocketHandler::handle_imageframe_position_lock_update(const char* msg)
int group_id_size ;
int item_id_size ;
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
this->dstring_ecompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
std::string pos_lock = get_message_part(position,1,msg) ;
bool pos_lock_active = false ;
@ -1826,7 +1826,7 @@ ImageFrameSocketHandler::handle_imageframe_view_max_duration_update(const char*
int group_id_size ;
int item_id_size ;
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
this->dstring_ecompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
jack_nframes_t max_duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
position += ardourvis::TIME_VALUE_CHARS ;
@ -1862,7 +1862,7 @@ ImageFrameSocketHandler::handle_imageframe_view_max_duration_enable_update(const
int group_id_size ;
int item_id_size ;
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
this->dstring_ecompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
std::string active = get_message_part(position,1,msg) ;
bool max_duration_active = false ;
@ -1914,7 +1914,7 @@ ImageFrameSocketHandler::handle_imageframe_view_min_duration_update(const char*
int group_id_size ;
int item_id_size ;
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
this->dstring_ecompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
jack_nframes_t min_duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
position += ardourvis::TIME_VALUE_CHARS ;
@ -1950,7 +1950,7 @@ ImageFrameSocketHandler::handle_imageframe_view_min_duration_enable_update(const
int group_id_size ;
int item_id_size ;
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
this->dstring_ecompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
std::string active = get_message_part(position,1,msg) ;
bool min_duration_active = false ;
@ -2146,7 +2146,7 @@ ImageFrameSocketHandler::get_message_part(int start, int32_t num_chars, const ch
* @param item_id_size
*/
void
ImageFrameSocketHandler::decompose_imageframe_item_desc(const char* msg, int& position, std::string& track_id,
ImageFrameSocketHandler::dstring_ecompose_imageframe_item_desc(const char* msg, int& position, std::string& track_id,
int& track_id_size, std::string& scene_id, int& scene_id_size, std::string& item_id, int& item_id_size)
{
// get the track Id size
@ -2179,7 +2179,7 @@ ImageFrameSocketHandler::decompose_imageframe_item_desc(const char* msg, int& po
* The description consists of the parent track name size and name,
* the parent group name size and name, and the item name size and name
*
* @param ifv the item to compose a description of
* @param ifv the item to string_compose a description of
* @param buffer the buffer to write the description
*/
void
@ -2202,7 +2202,7 @@ ImageFrameSocketHandler::compose_imageframe_item_desc(ImageFrameView* ifv, std::
* The description consists of the parent track name size and name,
* and the item name size and name
*
* @param mv the item to compose a description of
* @param mv the item to string_compose a description of
* @param buffer the buffer to write the description
*/
void
@ -2326,7 +2326,7 @@ ImageFrameSocketHandler::read_message(std::string& msg)
/**
* Convenience method to compose and send a success messasge back to the Image Compositor
* Convenience method to string_compose and send a success messasge back to the Image Compositor
*
*/
void
@ -2336,7 +2336,7 @@ ImageFrameSocketHandler::send_return_success()
}
/**
* Convenience method to compose and send a failure messasge back to the Image Compositor
* Convenience method to string_compose and send a failure messasge back to the Image Compositor
*
* @param msg the failure message
*/

View File

@ -61,9 +61,9 @@ IOSelectorWindow::IOSelectorWindow (Session& sess, IO& ior, bool input, bool can
string title;
if (input) {
title = compose(_("%1 input"), ior.name());
title = string_compose(_("%1 input"), ior.name());
} else {
title = compose(_("%1 output"), ior.name());
title = string_compose(_("%1 output"), ior.name());
}
ok_button.set_name ("IOSelectorButton");

View File

@ -416,7 +416,7 @@ Keyboard::translate_key_name (const string& name)
}
if ((keycode = gdk_keyval_from_name(get_real_keyname (keyname).c_str())) == GDK_VoidSymbol) {
error << compose(_("KeyboardTarget: keyname \"%1\" is unknown."), keyname) << endmsg;
error << string_compose(_("KeyboardTarget: keyname \"%1\" is unknown."), keyname) << endmsg;
result.clear();
return result;
}
@ -642,7 +642,7 @@ Keyboard::check_meta_numlock (char keycode, guint mod, string modname)
alternate_meta_modname = "Mod2";
break;
default:
error << compose (_("Your system is completely broken - NumLock uses \"%1\""
error << string_compose (_("Your system is completely broken - NumLock uses \"%1\""
"as its modifier. This is madness - see the man page "
"for xmodmap to find out how to fix this."),
modname)
@ -650,7 +650,7 @@ Keyboard::check_meta_numlock (char keycode, guint mod, string modname)
return;
}
warning << compose (_("Your system generates \"%1\" when the NumLock key "
warning << string_compose (_("Your system generates \"%1\" when the NumLock key "
"is pressed. This can cause problems when editing "
"so Ardour will use %2 to mean Meta rather than %1"),
modname, alternate_meta_modname)
@ -711,7 +711,7 @@ Keyboard::get_modifier_masks ()
}
#ifdef WARN_ABOUT_DUPLICATE_MODIFIERS
if (bound > 1) {
warning << compose (_("You have %1 keys bound to \"mod1\""), bound) << endmsg;
warning << string_compose (_("You have %1 keys bound to \"mod1\""), bound) << endmsg;
}
#endif
bound = 0;
@ -726,7 +726,7 @@ Keyboard::get_modifier_masks ()
}
#ifdef WARN_ABOUT_DUPLICATE_MODIFIERS
if (bound > 1) {
warning << compose (_("You have %1 keys bound to \"mod2\""), bound) << endmsg;
warning << string_compose (_("You have %1 keys bound to \"mod2\""), bound) << endmsg;
}
#endif
bound = 0;
@ -741,7 +741,7 @@ Keyboard::get_modifier_masks ()
}
#ifdef WARN_ABOUT_DUPLICATE_MODIFIERS
if (bound > 1) {
warning << compose (_("You have %1 keys bound to \"mod3\""), bound) << endmsg;
warning << string_compose (_("You have %1 keys bound to \"mod3\""), bound) << endmsg;
}
#endif
bound = 0;
@ -756,7 +756,7 @@ Keyboard::get_modifier_masks ()
}
#ifdef WARN_ABOUT_DUPLICATE_MODIFIERS
if (bound > 1) {
warning << compose (_("You have %1 keys bound to \"mod4\""), bound) << endmsg;
warning << string_compose (_("You have %1 keys bound to \"mod4\""), bound) << endmsg;
}
#endif
bound = 0;
@ -771,7 +771,7 @@ Keyboard::get_modifier_masks ()
}
#ifdef WARN_ABOUT_DUPLICATE_MODIFIERS
if (bound > 1) {
warning << compose (_("You have %1 keys bound to \"mod5\""), bound) << endmsg;
warning << string_compose (_("You have %1 keys bound to \"mod5\""), bound) << endmsg;
}
#endif

View File

@ -75,12 +75,12 @@ KeyboardTarget::add_binding (string keystring, string action)
}
if (state.size() == 0) {
error << compose(_("KeyboardTarget: no translation found for \"%1\""), keystring) << endmsg;
error << string_compose(_("KeyboardTarget: no translation found for \"%1\""), keystring) << endmsg;
return -1;
}
if (find_action (action, key_action)) {
error << compose(_("KeyboardTarget: unknown action \"%1\""), action) << endmsg;
error << string_compose(_("KeyboardTarget: unknown action \"%1\""), action) << endmsg;
return -1;
}

View File

@ -745,7 +745,7 @@ clone_ftw(void* ptr)
ftw_return = 0;
if (ftw (file->c_str(), process_node, 100) < 0){
warning << compose(_("%1 not added to database"), *file) << endmsg;
warning << string_compose(_("%1 not added to database"), *file) << endmsg;
}
delete old_parent;
@ -937,17 +937,17 @@ process_node (const char *file, const struct stat *sb, int32_t flag)
SNDFILE *sf;
SF_INFO info;
if ((sf = sf_open ((char *) file, SFM_READ, &info)) < 0) {
error << compose(_("file \"%1\" could not be opened"), file) << endmsg;
error << string_compose(_("file \"%1\" could not be opened"), file) << endmsg;
return ftw_return;
}
sf_close (sf);
string uri = Library->add_member(file, parent_uri);
Library->set_field(uri, "channels", compose("%1", info.channels));
Library->set_field(uri, "samplerate", compose("%1", info.samplerate));
Library->set_field(uri, "resolution", compose("%1", sndfile_data_width(info.format)));
Library->set_field(uri, "format", compose("%1", info.format));
Library->set_field(uri, "channels", string_compose("%1", info.channels));
Library->set_field(uri, "samplerate", string_compose("%1", info.samplerate));
Library->set_field(uri, "resolution", string_compose("%1", sndfile_data_width(info.format)));
Library->set_field(uri, "format", string_compose("%1", info.format));
return ftw_return;
}
@ -1093,7 +1093,7 @@ SoundFileBox::setup_labels (string uri)
}
if ((sf = sf_open ((char *) file.c_str(), SFM_READ, sf_info)) < 0) {
error << compose(_("file \"%1\" could not be opened"), file) << endmsg;
error << string_compose(_("file \"%1\" could not be opened"), file) << endmsg;
return -1;
}
@ -1103,7 +1103,7 @@ SoundFileBox::setup_labels (string uri)
sf_info->format == 0 &&
sf_info->sections == 0) {
/* .. ok, its not a sound file */
error << compose(_("file \"%1\" appears not to be an audio file"), file) << endmsg;
error << string_compose(_("file \"%1\" appears not to be an audio file"), file) << endmsg;
return -1;
}
@ -1121,18 +1121,18 @@ SoundFileBox::setup_labels (string uri)
path_entry.signal_focus_out_event()().connect (ptr_fun (ARDOUR_UI::generic_focus_out_event));
length.set_alignment (0.0f, 0.0f);
length.set_text (compose("Length: %1", length2string(sf_info->frames, sf_info->samplerate)));
length.set_text (string_compose("Length: %1", length2string(sf_info->frames, sf_info->samplerate)));
format.set_alignment (0.0f, 0.0f);
format.set_text (compose("Format: %1, %2",
format.set_text (string_compose("Format: %1, %2",
sndfile_major_format(sf_info->format),
sndfile_minor_format(sf_info->format)));
channels.set_alignment (0.0f, 0.0f);
channels.set_text (compose("Channels: %1", sf_info->channels));
channels.set_text (string_compose("Channels: %1", sf_info->channels));
samplerate.set_alignment (0.0f, 0.0f);
samplerate.set_text (compose("Samplerate: %1", sf_info->samplerate));
samplerate.set_text (string_compose("Samplerate: %1", sf_info->samplerate));
return 0;
}
@ -1156,7 +1156,7 @@ SoundFileBox::play_btn_clicked ()
}
if (access(file.c_str(), R_OK)) {
warning << compose(_("Could not read file: %1 (%2)."), file, strerror(errno)) << endmsg;
warning << string_compose(_("Could not read file: %1 (%2)."), file, strerror(errno)) << endmsg;
return;
}
@ -1170,7 +1170,7 @@ SoundFileBox::play_btn_clicked ()
for (int n=0; n < sf_info->channels; ++n) {
try {
sfs = new SndFileSource(file+":"+compose("%1", n), false);
sfs = new SndFileSource(file+":"+string_compose("%1", n), false);
srclist.push_back(sfs);
} catch (failed_constructor& err) {

View File

@ -77,16 +77,16 @@ LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num)
preemph_check_button.set_name ("LocationEditCdButton");
performer_label.set_name ("LocationEditNumberLabel");
performer_entry.set_name ("LocationEditNameEntry");
composer_label.set_name ("LocationEditNumberLabel");
composer_entry.set_name ("LocationEditNameEntry");
string_composer_label.set_name ("LocationEditNumberLabel");
string_composer_entry.set_name ("LocationEditNameEntry");
isrc_label.set_text ("ISRC: ");
isrc_label.set_size_request (30, -1);
performer_label.set_text ("Performer: ");
performer_label.set_size_request (60, -1);
composer_label.set_text ("Composer: ");
composer_label.set_size_request (60, -1);
string_composer_label.set_text ("Composer: ");
string_composer_label.set_size_request (60, -1);
isrc_entry.set_size_request (112, -1);
isrc_entry.set_max_length(12);
@ -95,8 +95,8 @@ LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num)
performer_entry.set_size_request (100, -1);
performer_entry.set_editable (true);
composer_entry.set_size_request (100, -1);
composer_entry.set_editable (true);
string_composer_entry.set_size_request (100, -1);
string_composer_entry.set_editable (true);
cd_track_details_hbox.pack_start (isrc_label, false, false);
cd_track_details_hbox.pack_start (isrc_entry, false, false);
@ -104,8 +104,8 @@ LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num)
cd_track_details_hbox.pack_start (preemph_check_button, false, false);
cd_track_details_hbox.pack_start (performer_label, false, false);
cd_track_details_hbox.pack_start (performer_entry, true, true);
cd_track_details_hbox.pack_start (composer_label, false, false);
cd_track_details_hbox.pack_start (composer_entry, true, true);
cd_track_details_hbox.pack_start (string_composer_label, false, false);
cd_track_details_hbox.pack_start (string_composer_entry, true, true);
isrc_entry.signal_changed().connect (mem_fun(*this, &LocationEditRow::isrc_entry_changed));
isrc_entry.signal_focus_in_event().connect (mem_fun(*this, &LocationEditRow::entry_focus_event));
@ -115,9 +115,9 @@ LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num)
performer_entry.signal_focus_in_event().connect (mem_fun(*this, &LocationEditRow::entry_focus_event));
performer_entry.signal_focus_out_event().connect (mem_fun(*this, &LocationEditRow::entry_focus_event));
composer_entry.signal_changed().connect (mem_fun(*this, &LocationEditRow::composer_entry_changed));
composer_entry.signal_focus_in_event().connect (mem_fun(*this, &LocationEditRow::entry_focus_event));
composer_entry.signal_focus_out_event().connect (mem_fun(*this, &LocationEditRow::entry_focus_event));
string_composer_entry.signal_changed().connect (mem_fun(*this, &LocationEditRow::composer_entry_changed));
string_composer_entry.signal_focus_in_event().connect (mem_fun(*this, &LocationEditRow::entry_focus_event));
string_composer_entry.signal_focus_out_event().connect (mem_fun(*this, &LocationEditRow::entry_focus_event));
scms_check_button.signal_toggled().connect(mem_fun(*this, &LocationEditRow::scms_toggled));
preemph_check_button.signal_toggled().connect(mem_fun(*this, &LocationEditRow::preemph_toggled));
@ -198,7 +198,7 @@ LocationEditRow::set_number (int num)
number = num;
if (number >= 0 ) {
number_label.set_text (compose ("%1", number));
number_label.set_text (string_compose ("%1", number));
}
}
@ -361,10 +361,10 @@ LocationEditRow::composer_entry_changed ()
if (i_am_the_modifier || !location) return;
if (composer_entry.get_text() != "") {
location->cd_info["composer"] = composer_entry.get_text();
if (string_composer_entry.get_text() != "") {
location->cd_info["string_composer"] = string_composer_entry.get_text();
} else {
location->cd_info.erase("composer");
location->cd_info.erase("string_composer");
}
}
@ -438,8 +438,8 @@ LocationEditRow::cd_toggled ()
if (location->cd_info.find("performer") != location->cd_info.end()) {
performer_entry.set_text(location->cd_info["performer"]);
}
if (location->cd_info.find("composer") != location->cd_info.end()) {
composer_entry.set_text(location->cd_info["composer"]);
if (location->cd_info.find("string_composer") != location->cd_info.end()) {
string_composer_entry.set_text(location->cd_info["string_composer"]);
}
if (location->cd_info.find("scms") != location->cd_info.end()) {
scms_check_button.set_active(true);

View File

@ -187,7 +187,7 @@ catch_signals (void)
// if (setpgid (0,0)) {
if (setsid ()) {
warning << compose (_("cannot become new process group leader (%1)"),
warning << string_compose (_("cannot become new process group leader (%1)"),
strerror (errno))
<< endmsg;
}
@ -214,7 +214,7 @@ catch_signals (void)
for (int i = 1; i < 32; i++) {
if (sigismember (&signals, i)) {
if (sigaction (i, &action, 0)) {
cerr << compose (_("cannot setup signal handling for %1"), i) << endl;
cerr << string_compose (_("cannot setup signal handling for %1"), i) << endl;
return -1;
}
}
@ -225,7 +225,7 @@ catch_signals (void)
*/
if (pthread_sigmask (SIG_SETMASK, &signals, 0)) {
cerr << compose (_("cannot set default signal mask (%1)"), strerror (errno)) << endl;
cerr << string_compose (_("cannot set default signal mask (%1)"), strerror (errno)) << endl;
return -1;
}
@ -416,7 +416,7 @@ main (int argc, char *argv[])
catch (AudioEngine::NoBackendAvailable& err) {
gui_jack_error ();
error << compose (_("Could not connect to JACK server as \"%1\""), jack_client_name) << endmsg;
error << string_compose (_("Could not connect to JACK server as \"%1\""), jack_client_name) << endmsg;
return -1;
}
@ -432,7 +432,7 @@ main (int argc, char *argv[])
bool isnew;
if (Session::find_session (session_name, path, name, isnew)) {
error << compose(_("could not load command line session \"%1\""), session_name) << endmsg;
error << string_compose(_("could not load command line session \"%1\""), session_name) << endmsg;
} else {
if (new_session) {
@ -452,7 +452,7 @@ main (int argc, char *argv[])
/* it wasn't new, but we require a new session */
error << compose (_("\n\nA session named \"%1\" already exists.\n\
error << string_compose (_("\n\nA session named \"%1\" already exists.\n\
To avoid this message, start ardour as \"ardour %1"), path)
<< endmsg;
goto out;
@ -463,7 +463,7 @@ To avoid this message, start ardour as \"ardour %1"), path)
/* command line didn't require a new session */
if (isnew) {
error << compose (_("\n\nNo session named \"%1\" exists.\n\
error << string_compose (_("\n\nNo session named \"%1\" exists.\n\
To create it from the command line, start ardour as \"ardour --new %1"), path)
<< endmsg;
goto out;

View File

@ -137,13 +137,13 @@ MeterBridgeStrip::update ()
meter.set (log_meter (power));
if (over_short != last_over_short) {
buf = compose("%1", over_short);
buf = string_compose("%1", over_short);
over_short_label.set_text (buf);
last_over_short = over_short;
}
if (over_long != last_over_long) {
buf = compose("%1", over_long);
buf = string_compose("%1", over_long);
over_long_label.set_text (buf);
last_over_long = over_long;
}

View File

@ -460,7 +460,7 @@ MixerStrip::set_stuff_from_route ()
set_width (Narrow);
}
else {
error << compose(_("unknown strip width \"%1\" in XML GUI information"), prop->value()) << endmsg;
error << string_compose(_("unknown strip width \"%1\" in XML GUI information"), prop->value()) << endmsg;
set_width (Wide);
}
}

View File

@ -68,7 +68,7 @@ NewSessionDialog::NewSessionDialog (ARDOUR::AudioEngine& engine, bool startup, s
/* sample rate */
sr_label1.set_text (compose
sr_label1.set_text (string_compose
(_("This session will playback and record at %1 Hz"),
engine.frame_rate()));
sr_label2.set_text (_("This rate is set by JACK and cannot be changed.\n"

View File

@ -266,7 +266,7 @@ PluginUI::build (AudioEngine &engine)
}
if ((cui = build_control_ui (engine, i, plugin.get_nth_midi_control (i))) == 0) {
error << compose(_("Plugin Editor: could not build control element for port %1"), i) << endmsg;
error << string_compose(_("Plugin Editor: could not build control element for port %1"), i) << endmsg;
continue;
}
@ -889,7 +889,7 @@ PlugUIBase::setting_selected(GdkEventAny* ignored)
Entry* entry = combo.get_entry();
if (entry->get_text().length() > 0) {
if (!plugin.load_preset(entry->get_text())) {
warning << compose(_("Plugin preset %1 not found"), entry->get_text()) << endmsg;
warning << string_compose(_("Plugin preset %1 not found"), entry->get_text()) << endmsg;
}
}

View File

@ -484,7 +484,7 @@ RedirectBox::wierd_plugin_dialog (Plugin& p, uint32_t streams, IO& io)
/* i hate this kind of code */
if (streams > p.get_info().n_inputs) {
label.set_text (compose (_(
label.set_text (string_compose (_(
"You attempted to add a plugin (%1).\n"
"The plugin has %2 inputs\n"
"but at the insertion point, there are\n"
@ -496,7 +496,7 @@ RedirectBox::wierd_plugin_dialog (Plugin& p, uint32_t streams, IO& io)
p.get_info().n_inputs,
streams));
} else if (streams < p.get_info().n_inputs) {
label.set_text (compose (_(
label.set_text (string_compose (_(
"You attempted to add a plugin (%1).\n"
"The plugin has %2 inputs\n"
"but at the insertion point there are\n"
@ -509,7 +509,7 @@ RedirectBox::wierd_plugin_dialog (Plugin& p, uint32_t streams, IO& io)
p.get_info().n_inputs,
streams));
} else {
label.set_text (compose (_(
label.set_text (string_compose (_(
"You attempted to add a plugin (%1).\n"
"\n"
"The I/O configuration doesn't make sense:\n"
@ -1111,7 +1111,7 @@ RedirectBox::edit_redirect (Redirect* redirect)
if (send->get_gui() == 0) {
string title;
title = compose(_("ardour: %1"), send->name());
title = string_compose(_("ardour: %1"), send->name());
send_ui = new SendUIWindow (*send, _session);
send_ui->set_title (title);
@ -1153,7 +1153,7 @@ RedirectBox::edit_redirect (Redirect* redirect)
maker += " ...";
}
title = compose(_("ardour: %1: %2 (by %3)"), _route.name(), plugin_insert->name(), maker);
title = string_compose(_("ardour: %1: %2 (by %3)"), _route.name(), plugin_insert->name(), maker);
plugin_ui = new PluginUIWindow (_session.engine(), *plugin_insert);
if (_owner_is_mixer) {

View File

@ -37,7 +37,7 @@
#include <ardour/diskstream.h>
#include "i18n.h"
/* there is a compose() here.. */
/* there is a string_compose() here.. */
//using namespace sigc;
using namespace Gtk;
using namespace Gtkmm2ext;
@ -649,9 +649,9 @@ RouteUI::remove_this_route ()
string prompt;
if (is_audio_track()) {
prompt = compose (_("Do you really want to remove track \"%1\" ?\nYou may also lose the playlist used by this track.\n(cannot be undone)"), _route.name());
prompt = string_compose (_("Do you really want to remove track \"%1\" ?\nYou may also lose the playlist used by this track.\n(cannot be undone)"), _route.name());
} else {
prompt = compose (_("Do you really want to remove bus \"%1\" ?\n(cannot be undone)"), _route.name());
prompt = string_compose (_("Do you really want to remove bus \"%1\" ?\n(cannot be undone)"), _route.name());
}
choices.push_back (_("Yes, remove it."));

View File

@ -301,7 +301,7 @@ MeterDialog::get_note_type ()
for (i = strings.begin(); i != strings.end(); ++i) {
if (text == *i) {
if (sscanf (text.c_str(), "%*[^0-9]%lf", &note_type) != 1) {
error << compose(_("garbaged note type entry (%1)"), text) << endmsg;
error << string_compose(_("garbaged note type entry (%1)"), text) << endmsg;
return 0;
} else {
break;
@ -311,7 +311,7 @@ MeterDialog::get_note_type ()
if (i == strings.end()) {
if (sscanf (text.c_str(), "%lf", &note_type) != 1) {
error << compose(_("incomprehensible note type entry (%1)"), text) << endmsg;
error << string_compose(_("incomprehensible note type entry (%1)"), text) << endmsg;
return 0;
}
}

View File

@ -47,7 +47,7 @@
#include "i18n.h"
using namespace Gtk;
/*can't use sigc namespace while we have the compose() in libs/pbd3/pbd */
/*can't use sigc namespace while we have the string_compose() in libs/pbd3/pbd */
//using namespace sigc;
using namespace ARDOUR;
using namespace Editing;
@ -783,7 +783,7 @@ TimeAxisView::set_state (const XMLNode& node)
} else if (prop->value() == "small") {
set_height (Small);
} else {
error << compose(_("unknown track height name \"%1\" in XML GUI information"), prop->value()) << endmsg;
error << string_compose(_("unknown track height name \"%1\" in XML GUI information"), prop->value()) << endmsg;
set_height (Normal);
}

View File

@ -255,7 +255,7 @@ bool
TimeAxisViewItem::set_duration (jack_nframes_t dur, void* src)
{
if ((dur > max_item_duration) || (dur < min_item_duration)) {
warning << compose (_("new duration %1 frames is out of bounds for %2"), get_item_name(), dur)
warning << string_compose (_("new duration %1 frames is out of bounds for %2"), get_item_name(), dur)
<< endmsg;
return false;
}

View File

@ -37,7 +37,7 @@ TimeSelection::operator[] (uint32_t which)
return *i;
}
}
fatal << compose (_("programming error: request for non-existent audio range (%1)!"), which) << endmsg;
fatal << string_compose (_("programming error: request for non-existent audio range (%1)!"), which) << endmsg;
/*NOTREACHED*/
return *(new AudioRange(0,0,0)); /* keep the compiler happy; never called */
}

View File

@ -219,7 +219,7 @@ xpm2rgb (const char** xpm, uint32_t& w, uint32_t& h)
// PARSE HEADER
if ( sscanf(xpm[0], "%u%u%u%u", &w, &h, &colors, &cpp) != 4 ) {
error << compose (_("bad XPM header %1"), xpm[0])
error << string_compose (_("bad XPM header %1"), xpm[0])
<< endmsg;
return 0;
}
@ -262,7 +262,7 @@ xpm2rgba (const char** xpm, uint32_t& w, uint32_t& h)
// PARSE HEADER
if ( sscanf(xpm[0], "%u%u%u%u", &w, &h, &colors, &cpp) != 4 ) {
error << compose (_("bad XPM header %1"), xpm[0])
error << string_compose (_("bad XPM header %1"), xpm[0])
<< endmsg;
return 0;
}
@ -513,7 +513,7 @@ rgba_from_style (string style, uint32_t r, uint32_t g, uint32_t b, uint32_t a)
a = waverc->fg[GTK_STATE_ACTIVE].red / 257;
} else {
warning << compose (_("missing RGBA style for \"%1\""), style) << endl;
warning << string_compose (_("missing RGBA style for \"%1\""), style) << endl;
}
return (uint32_t) RGBA_TO_UINT(r,g,b,a);

View File

@ -294,7 +294,7 @@ VisualTimeAxis::remove_this_time_axis(void* src)
{
vector<string> choices;
std::string prompt = compose (_("Do you really want to remove track \"%1\" ?\n(cannot be undone)"), time_axis_name);
std::string prompt = string_compose (_("Do you really want to remove track \"%1\" ?\n(cannot be undone)"), time_axis_name);
choices.push_back (_("Yes, remove it."));
choices.push_back (_("No, do nothing."));

View File

@ -103,14 +103,14 @@ void
AudioLibrary::save_changes ()
{
if (lrdf_export_by_source(src.c_str(), src.substr(5).c_str())) {
warning << compose(_("Could not open %1. Audio Library not saved"), src) << endmsg;
warning << string_compose(_("Could not open %1. Audio Library not saved"), src) << endmsg;
}
}
string
AudioLibrary::add_group (string group, string parent_uri)
{
string local_group(compose("file:sfbd/group/%1", get_uid()));
string local_group(string_compose("file:sfbd/group/%1", get_uid()));
lrdf_add_triple(src.c_str(), local_group.c_str(),
RDFS_BASE "label", group.c_str(), lrdf_literal);
@ -184,8 +184,8 @@ AudioLibrary::get_groups (list<string>& groups, string parent_uri)
string
AudioLibrary::add_member (string member, string parent_uri)
{
string local_member(compose("file:sfdb/soundfile/%1", get_uid()));
string file_uri(compose("file:%1", member));
string local_member(string_compose("file:sfdb/soundfile/%1", get_uid()));
string file_uri(string_compose("file:%1", member));
lrdf_add_triple(src.c_str(), local_member.c_str(), RDF_TYPE,
SOUNDFILE, lrdf_uri);

View File

@ -473,7 +473,7 @@ AudioPlaylist::set_state (const XMLNode& node)
}
catch (failed_constructor& err) {
// cout << compose (_("could not create crossfade object in playlist %1"),
// cout << string_compose (_("could not create crossfade object in playlist %1"),
// _name)
// << endl;
continue;

View File

@ -116,14 +116,14 @@ AudioTrack::deprecated_use_diskstream_connections ()
Connection* c = _session.connection_by_name (prop->value());
if (c == 0) {
error << compose(_("Unknown connection \"%1\" listed for input of %2"), prop->value(), _name) << endmsg;
error << string_compose(_("Unknown connection \"%1\" listed for input of %2"), prop->value(), _name) << endmsg;
if ((c = _session.connection_by_name (_("in 1"))) == 0) {
error << _("No input connections available as a replacement")
<< endmsg;
return -1;
} else {
info << compose (_("Connection %1 was not available - \"in 1\" used instead"), prop->value())
info << string_compose (_("Connection %1 was not available - \"in 1\" used instead"), prop->value())
<< endmsg;
}
}
@ -132,7 +132,7 @@ AudioTrack::deprecated_use_diskstream_connections ()
} else if ((prop = node.property ("inputs")) != 0) {
if (set_inputs (prop->value())) {
error << compose(_("improper input channel list in XML node (%1)"), prop->value()) << endmsg;
error << string_compose(_("improper input channel list in XML node (%1)"), prop->value()) << endmsg;
return -1;
}
}
@ -176,7 +176,7 @@ AudioTrack::use_diskstream (string name)
DiskStream *dstream;
if ((dstream = _session.diskstream_by_name (name)) == 0) {
error << compose(_("AudioTrack: diskstream \"%1\" not known by session"), name) << endmsg;
error << string_compose(_("AudioTrack: diskstream \"%1\" not known by session"), name) << endmsg;
return -1;
}
@ -189,7 +189,7 @@ AudioTrack::use_diskstream (id_t id)
DiskStream *dstream;
if ((dstream = _session.diskstream_by_id (id)) == 0) {
error << compose(_("AudioTrack: diskstream \"%1\" not known by session"), id) << endmsg;
error << string_compose(_("AudioTrack: diskstream \"%1\" not known by session"), id) << endmsg;
return -1;
}
@ -287,7 +287,7 @@ AudioTrack::set_state (const XMLNode& node)
if (get_midi_node_info (child, ev, chn, additional)) {
_midi_rec_enable_control.set_control_type (chn, ev, additional);
} else {
error << compose(_("MIDI rec_enable control specification for %1 is incomplete, so it has been ignored"), _name) << endmsg;
error << string_compose(_("MIDI rec_enable control specification for %1 is incomplete, so it has been ignored"), _name) << endmsg;
}
}
}
@ -447,7 +447,7 @@ AudioTrack::set_state_part_two ()
FreezeRecordInsertInfo* frii = new FreezeRecordInsertInfo (*((*citer)->children().front()));
frii->insert = 0;
sscanf (prop->value().c_str(), "%llu", &frii->id);
sscanf (prop->value().c_str(), "%" PRIu64, &frii->id);
_freeze_record.insert_info.push_back (frii);
}
}
@ -855,11 +855,11 @@ AudioTrack::freeze (InterThreadInfo& itt)
uint32_t n = 1;
while (n < ULONG_MAX) {
while (n < (ULONG_MAX-1)) {
string candidate;
candidate = compose ("<F%2>%1", _freeze_record.playlist->name(), n);
candidate = string_compose ("<F%2>%1", _freeze_record.playlist->name(), n);
if (_session.playlist_by_name (candidate) == 0) {
new_playlist_name = candidate;
@ -870,8 +870,8 @@ AudioTrack::freeze (InterThreadInfo& itt)
}
if (n == ULONG_MAX) {
error << compose (X_("There Are too many frozen versions of playlist \"%1\""
if (n == (ULONG_MAX-1)) {
error << string_compose (X_("There Are too many frozen versions of playlist \"%1\""
" to create another one"), _freeze_record.playlist->name())
<< endmsg;
return;

View File

@ -539,7 +539,7 @@ AudioEngine::connect (const string& source, const string& destination)
pair<string,string> c (s, d);
port_connections.push_back (c);
} else {
error << compose(_("AudioEngine: cannot connect %1 (%2) to %3 (%4)"),
error << string_compose(_("AudioEngine: cannot connect %1 (%2) to %3 (%4)"),
source, s, destination, d)
<< endmsg;
}
@ -908,7 +908,7 @@ AudioEngine::connect_to_jack (string client_name)
error << _("Unable to connect to JACK server") << endmsg;
}
error << compose (_("Could not connect to JACK server as \"%1\""), jack_client_name) << endmsg;
error << string_compose (_("Could not connect to JACK server as \"%1\""), jack_client_name) << endmsg;
return -1;
}
@ -988,7 +988,7 @@ AudioEngine::reconnect_to_jack ()
short_name = long_name.substr (long_name.find_last_of (':') + 1);
if (((*i)->port = jack_port_register (_jack, short_name.c_str(), (*i)->type(), (*i)->flags(), 0)) == 0) {
error << compose (_("could not reregister %1"), (*i)->name()) << endmsg;
error << string_compose (_("could not reregister %1"), (*i)->name()) << endmsg;
break;
} else {
}
@ -1045,7 +1045,7 @@ AudioEngine::reconnect_to_jack ()
if ((err = jack_connect (_jack, (*i).first.c_str(), (*i).second.c_str())) != 0) {
if (err != EEXIST) {
error << compose (_("could not reconnect %1 and %2 (err = %3)"),
error << string_compose (_("could not reconnect %1 and %2 (err = %3)"),
(*i).first, (*i).second, err)
<< endmsg;
}

View File

@ -41,7 +41,7 @@ AudioFilter::make_new_sources (AudioRegion& region, AudioRegion::SourceList& nsr
string path = session.path_from_region_name (PBD::basename_nosuffix (names[i]), string (""));
if (path.length() == 0) {
error << compose (_("audiofilter: error creating name for new audio file based on %1"), region.name())
error << string_compose (_("audiofilter: error creating name for new audio file based on %1"), region.name())
<< endmsg;
return -1;
}
@ -51,7 +51,7 @@ AudioFilter::make_new_sources (AudioRegion& region, AudioRegion::SourceList& nsr
}
catch (failed_constructor& err) {
error << compose (_("audiofilter: error creating new audio file %1 (%2)"), path, strerror (errno)) << endmsg;
error << string_compose (_("audiofilter: error creating new audio file %1 (%2)"), path, strerror (errno)) << endmsg;
return -1;
}
}

View File

@ -96,12 +96,12 @@ Configuration::load_state ()
cerr << "Loading system configuration file " << rcfile << endl;
if (!tree.read (rcfile.c_str())) {
error << compose(_("Ardour: cannot read system configuration file \"%1\""), rcfile) << endmsg;
error << string_compose(_("Ardour: cannot read system configuration file \"%1\""), rcfile) << endmsg;
return -1;
}
if (set_state (*tree.root())) {
error << compose(_("Ardour: system configuration file \"%1\" not loaded successfully."), rcfile) << endmsg;
error << string_compose(_("Ardour: system configuration file \"%1\" not loaded successfully."), rcfile) << endmsg;
return -1;
}
}
@ -121,13 +121,13 @@ Configuration::load_state ()
cerr << "Loading user configuration file " << rcfile << endl;
if (!tree.read (rcfile)) {
error << compose(_("Ardour: cannot read configuration file \"%1\""), rcfile) << endmsg;
error << string_compose(_("Ardour: cannot read configuration file \"%1\""), rcfile) << endmsg;
return -1;
}
if (set_state (*tree.root())) {
error << compose(_("Ardour: configuration file \"%1\" not loaded successfully."), rcfile) << endmsg;
error << string_compose(_("Ardour: configuration file \"%1\" not loaded successfully."), rcfile) << endmsg;
return -1;
}
}

View File

@ -224,12 +224,12 @@ Connection::set_connections (const string& str)
start += 1;
if ((end = str.find_first_of ('}', start)) == string::npos) {
error << compose(_("IO: badly formed string in XML node for inputs \"%1\""), str) << endmsg;
error << string_compose(_("IO: badly formed string in XML node for inputs \"%1\""), str) << endmsg;
return -1;
}
if ((n = parse_io_string (str.substr (start, end - start), ports)) < 0) {
error << compose(_("bad input string in XML node \"%1\""), str) << endmsg;
error << string_compose(_("bad input string in XML node \"%1\""), str) << endmsg;
return -1;

View File

@ -122,10 +122,10 @@ Crossfade::Crossfade (const Playlist& playlist, XMLNode& node)
throw failed_constructor();
}
sscanf (prop->value().c_str(), "%llu", &id);
sscanf (prop->value().c_str(), "%" PRIu64, &id);
if ((r = playlist.find_region (id)) == 0) {
error << compose (_("Crossfade: no \"in\" region %1 found in playlist %2"), id, playlist.name())
error << string_compose (_("Crossfade: no \"in\" region %1 found in playlist %2"), id, playlist.name())
<< endmsg;
throw failed_constructor();
}
@ -139,10 +139,10 @@ Crossfade::Crossfade (const Playlist& playlist, XMLNode& node)
throw failed_constructor();
}
sscanf (prop->value().c_str(), "%llu", &id);
sscanf (prop->value().c_str(), "%" PRIu64, &id);
if ((r = playlist.find_region (id)) == 0) {
error << compose (_("Crossfade: no \"out\" region %1 found in playlist %2"), id, playlist.name())
error << string_compose (_("Crossfade: no \"out\" region %1 found in playlist %2"), id, playlist.name())
<< endmsg;
throw failed_constructor();
}

View File

@ -324,12 +324,12 @@ DiskStream::find_and_use_playlist (const string& name)
AudioPlaylist* playlist;
if ((pl = _session.get_playlist (name)) == 0) {
error << compose(_("DiskStream: Session doesn't know about a Playlist called \"%1\""), name) << endmsg;
error << string_compose(_("DiskStream: Session doesn't know about a Playlist called \"%1\""), name) << endmsg;
return -1;
}
if ((playlist = dynamic_cast<AudioPlaylist*> (pl)) == 0) {
error << compose(_("DiskStream: Playlist \"%1\" isn't an audio playlist"), name) << endmsg;
error << string_compose(_("DiskStream: Playlist \"%1\" isn't an audio playlist"), name) << endmsg;
return -1;
}
@ -412,7 +412,7 @@ int
DiskStream::use_copy_playlist ()
{
if (_playlist == 0) {
error << compose(_("DiskStream %1: there is no existing playlist to make a copy of!"), _name) << endmsg;
error << string_compose(_("DiskStream %1: there is no existing playlist to make a copy of!"), _name) << endmsg;
return -1;
}
@ -1032,7 +1032,7 @@ DiskStream::overwrite_existing_buffers ()
if (read ((*chan).playback_buf->buffer() + overwrite_offset, mixdown_buffer, gain_buffer,
start, to_read, *chan, n, reversed)) {
error << compose(_("DiskStream %1: when refilling, cannot read %2 from playlist at frame %3"),
error << string_compose(_("DiskStream %1: when refilling, cannot read %2 from playlist at frame %3"),
_id, size, playback_sample) << endmsg;
goto out;
}
@ -1043,7 +1043,7 @@ DiskStream::overwrite_existing_buffers ()
if (read ((*chan).playback_buf->buffer(), mixdown_buffer, gain_buffer,
start, cnt, *chan, n, reversed)) {
error << compose(_("DiskStream %1: when refilling, cannot read %2 from playlist at frame %3"),
error << string_compose(_("DiskStream %1: when refilling, cannot read %2 from playlist at frame %3"),
_id, size, playback_sample) << endmsg;
goto out;
}
@ -1172,7 +1172,7 @@ DiskStream::read (Sample* buf, Sample* mixdown_buffer, float* gain_buffer, jack_
this_read = min(cnt,this_read);
if (_playlist->read (buf+offset, mixdown_buffer, gain_buffer, start, this_read, channel) != this_read) {
error << compose(_("DiskStream %1: cannot read %2 from playlist at frame %3"), _id, this_read,
error << string_compose(_("DiskStream %1: cannot read %2 from playlist at frame %3"), _id, this_read,
start) << endmsg;
return -1;
}
@ -1471,7 +1471,7 @@ DiskStream::do_flush (bool force_flush)
to_write = min (disk_io_chunk_frames, (jack_nframes_t) vector.len[0]);
if ((!(*chan).write_source) || (*chan).write_source->write (vector.buf[0], to_write) != to_write) {
error << compose(_("DiskStream %1: cannot write to disk"), _id) << endmsg;
error << string_compose(_("DiskStream %1: cannot write to disk"), _id) << endmsg;
return -1;
}
@ -1487,7 +1487,7 @@ DiskStream::do_flush (bool force_flush)
to_write = min ((jack_nframes_t)(disk_io_chunk_frames - to_write), (jack_nframes_t) vector.len[1]);
if ((*chan).write_source->write (vector.buf[1], to_write) != to_write) {
error << compose(_("DiskStream %1: cannot write to disk"), _id) << endmsg;
error << string_compose(_("DiskStream %1: cannot write to disk"), _id) << endmsg;
return -1;
}
@ -1546,7 +1546,7 @@ DiskStream::transport_stopped (struct tm& when, time_t twhen, bool abort_capture
case 1:
break;
case -1:
error << compose(_("DiskStream \"%1\": cannot flush captured data to disk!"), _name) << endmsg;
error << string_compose(_("DiskStream \"%1\": cannot flush captured data to disk!"), _name) << endmsg;
err++;
}
}
@ -1628,7 +1628,7 @@ DiskStream::transport_stopped (struct tm& when, time_t twhen, bool abort_capture
}
catch (failed_constructor& err) {
error << compose(_("%1: could not create region for complete audio file"), _name) << endmsg;
error << string_compose(_("%1: could not create region for complete audio file"), _name) << endmsg;
/* XXX what now? */
}
@ -1801,7 +1801,7 @@ DiskStream::get_state ()
char buf[64];
LocaleGuard lg (X_("POSIX"));
snprintf (buf, sizeof(buf), "%d", channels.size());
snprintf (buf, sizeof(buf), "%zd", channels.size());
node->add_property ("channels", buf);
node->add_property ("playlist", _playlist->name());
@ -1877,11 +1877,11 @@ DiskStream::set_state (const XMLNode& node)
if (deprecated_io_node) {
if ((prop = deprecated_io_node->property ("id")) != 0) {
sscanf (prop->value().c_str(), "%llu", &_id);
sscanf (prop->value().c_str(), "%" PRIu64, &_id);
}
} else {
if ((prop = node.property ("id")) != 0) {
sscanf (prop->value().c_str(), "%llu", &_id);
sscanf (prop->value().c_str(), "%" PRIu64, &_id);
}
}
@ -1973,7 +1973,7 @@ DiskStream::use_new_write_source (uint32_t n)
}
if (n >= channels.size()) {
error << compose (_("DiskStream: channel %1 out of range"), n) << endmsg;
error << string_compose (_("DiskStream: channel %1 out of range"), n) << endmsg;
return -1;
}
@ -1998,7 +1998,7 @@ DiskStream::use_new_write_source (uint32_t n)
}
catch (failed_constructor &err) {
error << compose (_("%1:%2 new capture file not initialized correctly"), _name, n) << endmsg;
error << string_compose (_("%1:%2 new capture file not initialized correctly"), _name, n) << endmsg;
chan.write_source = 0;
return -1;
}
@ -2191,7 +2191,7 @@ DiskStream::set_loop (Location *location)
{
if (location) {
if (location->start() >= location->end()) {
error << compose(_("Location \"%1\" not valid for track loop (start >= end)"), location->name()) << endl;
error << string_compose(_("Location \"%1\" not valid for track loop (start >= end)"), location->name()) << endl;
return -1;
}
}
@ -2269,7 +2269,7 @@ DiskStream::use_pending_capture_data (XMLNode& node)
}
catch (failed_constructor& err) {
error << compose (_("%1: cannot restore pending capture source file %2"),
error << string_compose (_("%1: cannot restore pending capture source file %2"),
_name, prop->value())
<< endmsg;
return -1;
@ -2291,7 +2291,7 @@ DiskStream::use_pending_capture_data (XMLNode& node)
}
if (pending_sources.size() != _n_channels) {
error << compose (_("%1: incorrect number of pending sources listed - ignoring them all"), _name)
error << string_compose (_("%1: incorrect number of pending sources listed - ignoring them all"), _name)
<< endmsg;
return -1;
}
@ -2307,7 +2307,7 @@ DiskStream::use_pending_capture_data (XMLNode& node)
}
catch (failed_constructor& err) {
error << compose (_("%1: cannot create whole-file region from pending capture sources"),
error << string_compose (_("%1: cannot create whole-file region from pending capture sources"),
_name)
<< endmsg;
@ -2319,7 +2319,7 @@ DiskStream::use_pending_capture_data (XMLNode& node)
}
catch (failed_constructor& err) {
error << compose (_("%1: cannot create region from pending capture sources"),
error << string_compose (_("%1: cannot create region from pending capture sources"),
_name)
<< endmsg;

View File

@ -158,13 +158,13 @@ FileSource::init (string pathstr, bool must_exist, jack_nframes_t rate)
vector<string*>* result = scanner (search_path, regexp, false, true, -1);
if (result == 0 || result->size() == 0) {
error << compose (_("FileSource: \"%1\" not found when searching %2 using %3"),
error << string_compose (_("FileSource: \"%1\" not found when searching %2 using %3"),
pathstr, search_path, regexp) << endmsg;
goto out;
}
if (result->size() > 1) {
string msg = compose (_("FileSource: \"%1\" is ambigous when searching %2\n\t"), pathstr, search_path);
string msg = string_compose (_("FileSource: \"%1\" is ambigous when searching %2\n\t"), pathstr, search_path);
vector<string*>::iterator x = result->begin();
while (true) {
@ -199,7 +199,7 @@ FileSource::init (string pathstr, bool must_exist, jack_nframes_t rate)
if (access (_path.c_str(), F_OK) != 0) {
if (must_exist) {
error << compose(_("Filesource: cannot find required file (%1): %2"), _path, strerror (errno)) << endmsg;
error << string_compose(_("Filesource: cannot find required file (%1): %2"), _path, strerror (errno)) << endmsg;
goto out;
}
@ -207,13 +207,13 @@ FileSource::init (string pathstr, bool must_exist, jack_nframes_t rate)
if (errno == ENOENT) {
new_file = true;
} else {
error << compose(_("Filesource: cannot check for existing file (%1): %2"), _path, strerror (errno)) << endmsg;
error << string_compose(_("Filesource: cannot check for existing file (%1): %2"), _path, strerror (errno)) << endmsg;
goto out;
}
}
if ((fd = open64 (_path.c_str(), O_RDWR|O_CREAT, 0644)) < 0) {
error << compose(_("FileSource: could not open \"%1\": (%2)"), _path, strerror (errno)) << endmsg;
error << string_compose(_("FileSource: could not open \"%1\": (%2)"), _path, strerror (errno)) << endmsg;
goto out;
}
@ -239,7 +239,7 @@ FileSource::init (string pathstr, bool must_exist, jack_nframes_t rate)
is_bwf = Config->get_native_format_is_bwf ();
if (fill_header (rate)) {
error << compose (_("FileSource: cannot write header in %1"), _path) << endmsg;
error << string_compose (_("FileSource: cannot write header in %1"), _path) << endmsg;
goto out;
}
@ -254,17 +254,17 @@ FileSource::init (string pathstr, bool must_exist, jack_nframes_t rate)
} else {
if (discover_chunks (must_exist)) {
error << compose (_("FileSource: cannot locate chunks in %1"), _path) << endmsg;
error << string_compose (_("FileSource: cannot locate chunks in %1"), _path) << endmsg;
goto out;
}
if (read_header (must_exist)) {
error << compose (_("FileSource: cannot read header in %1"), _path) << endmsg;
error << string_compose (_("FileSource: cannot read header in %1"), _path) << endmsg;
goto out;
}
if (check_header (rate, must_exist)) {
error << compose (_("FileSource: cannot check header in %1"), _path) << endmsg;
error << string_compose (_("FileSource: cannot check header in %1"), _path) << endmsg;
goto out;
}
@ -272,7 +272,7 @@ FileSource::init (string pathstr, bool must_exist, jack_nframes_t rate)
}
if ((ret = initialize_peakfile (new_file, _path))) {
error << compose (_("FileSource: cannot initialize peakfile for %1"), _path) << endmsg;
error << string_compose (_("FileSource: cannot initialize peakfile for %1"), _path) << endmsg;
}
out:
@ -326,7 +326,7 @@ FileSource::discover_chunks (bool silent)
if (memcmp (rw.id, "RIFF", 4) || memcmp (rw.text, "WAVE", 4)) {
if (!silent) {
error << compose (_("FileSource %1: not a RIFF/WAVE file"), _path) << endmsg;
error << string_compose (_("FileSource %1: not a RIFF/WAVE file"), _path) << endmsg;
}
return -1;
}
@ -401,11 +401,11 @@ FileSource::fill_header (jack_nframes_t rate)
struct utsname utsinfo;
if ((pwinfo = getpwuid (getuid())) == 0) {
error << compose(_("FileSource: cannot get user information for BWF header (%1)"), strerror(errno)) << endmsg;
error << string_compose(_("FileSource: cannot get user information for BWF header (%1)"), strerror(errno)) << endmsg;
return -1;
}
if (uname (&utsinfo)) {
error << compose(_("FileSource: cannot get host information for BWF header (%1)"), strerror(errno)) << endmsg;
error << string_compose(_("FileSource: cannot get host information for BWF header (%1)"), strerror(errno)) << endmsg;
return -1;
}
@ -543,7 +543,7 @@ FileSource::update_header (jack_nframes_t when, struct tm& now, time_t tnow)
compute_header_size ();
if (write_header()) {
error << compose(_("FileSource[%1]: cannot update data size: %2"), _path, strerror (errno)) << endmsg;
error << string_compose(_("FileSource[%1]: cannot update data size: %2"), _path, strerror (errno)) << endmsg;
return -1;
}
@ -613,7 +613,7 @@ FileSource::read_broadcast_data (ChunkInfo& info)
int32_t coding_history_size;
if (::pread (fd, (char *) &header.bext, sizeof (header.bext), info.offset + sizeof (GenericChunk)) != sizeof (header.bext)) {
error << compose(_("FileSource: cannot read Broadcast Wave data from existing audio file \"%1\" (%2)"),
error << string_compose(_("FileSource: cannot read Broadcast Wave data from existing audio file \"%1\" (%2)"),
_path, strerror (errno)) << endmsg;
return -1;
}
@ -625,7 +625,7 @@ FileSource::read_broadcast_data (ChunkInfo& info)
char data[coding_history_size];
if (::pread (fd, data, coding_history_size, info.offset + sizeof (BroadcastChunk)) != coding_history_size) {
error << compose(_("FileSource: cannot read Broadcast Wave coding history from audio file \"%1\" (%2)"),
error << string_compose(_("FileSource: cannot read Broadcast Wave coding history from audio file \"%1\" (%2)"),
_path, strerror (errno)) << endmsg;
return -1;
}
@ -658,7 +658,7 @@ FileSource::check_header (jack_nframes_t rate, bool silent)
{
if (header.format.formatTag != 3) { /* IEEE float */
if (!silent) {
error << compose(_("FileSource \"%1\" does not use floating point format.\n"
error << string_compose(_("FileSource \"%1\" does not use floating point format.\n"
"This is probably a programming error."), _path) << endmsg;
}
return -1;
@ -697,17 +697,17 @@ FileSource::check_header (jack_nframes_t rate, bool silent)
}
if (data_offset == 0) {
error << compose(_("FileSource \"%1\" has no \"data\" chunk"), _path) << endmsg;
error << string_compose(_("FileSource \"%1\" has no \"data\" chunk"), _path) << endmsg;
return -1;
}
if (_length * sizeof (Sample) != (jack_nframes_t) header.data.size) {
warning << compose(_("%1: data length in header (%2) differs from implicit size in file (%3)"),
warning << string_compose(_("%1: data length in header (%2) differs from implicit size in file (%3)"),
_path, header.data.size, _length * sizeof (Sample)) << endmsg;
}
if ((jack_nframes_t) header.format.nSamplesPerSec != rate) {
warning << compose(_("\"%1\" has a sample rate of %2 instead of %3 as used by this session"),
warning << string_compose(_("\"%1\" has a sample rate of %2 instead of %3 as used by this session"),
_path, header.format.nSamplesPerSec, rate) << endmsg;
}
@ -724,7 +724,7 @@ FileSource::write_header()
pos = 0;
if (::pwrite64 (fd, (char *) &header.wave, sizeof (header.wave), pos) != sizeof (header.wave)) {
error << compose(_("FileSource: cannot write WAVE chunk: %1"), strerror (errno)) << endmsg;
error << string_compose(_("FileSource: cannot write WAVE chunk: %1"), strerror (errno)) << endmsg;
return -1;
}
@ -759,14 +759,14 @@ FileSource::write_header()
/* write fmt and data chunks */
if (::pwrite64 (fd, (char *) &header.format, sizeof (header.format), pos) != sizeof (header.format)) {
error << compose(_("FileSource: cannot write format chunk: %1"), strerror (errno)) << endmsg;
error << string_compose(_("FileSource: cannot write format chunk: %1"), strerror (errno)) << endmsg;
return -1;
}
pos += sizeof (header.format);
if (::pwrite64 (fd, (char *) &header.data, sizeof (header.data), pos) != sizeof (header.data)) {
error << compose(_("FileSource: cannot data chunk: %1"), strerror (errno)) << endmsg;
error << string_compose(_("FileSource: cannot data chunk: %1"), strerror (errno)) << endmsg;
return -1;
}
@ -836,7 +836,7 @@ FileSource::write (Sample *data, jack_nframes_t cnt)
jack_nframes_t oldlen;
if (::pwrite64 (fd, (char *) data, byte_cnt, byte_pos) != (off64_t) byte_cnt) {
error << compose(_("FileSource: \"%1\" bad write (%2)"), _path, strerror (errno)) << endmsg;
error << string_compose(_("FileSource: \"%1\" bad write (%2)"), _path, strerror (errno)) << endmsg;
return 0;
}
@ -960,7 +960,7 @@ FileSource::move_to_trash (const string trash_dir_name)
}
if (version == 999) {
error << compose (_("there are already 1000 files with names like %1; versioning discontinued"),
error << string_compose (_("there are already 1000 files with names like %1; versioning discontinued"),
newpath)
<< endmsg;
} else {
@ -974,14 +974,14 @@ FileSource::move_to_trash (const string trash_dir_name)
}
if (::rename (_path.c_str(), newpath.c_str()) != 0) {
error << compose (_("cannot rename audio file source from %1 to %2 (%3)"),
error << string_compose (_("cannot rename audio file source from %1 to %2 (%3)"),
_path, newpath, strerror (errno))
<< endmsg;
return -1;
}
if (::unlink (peakpath.c_str()) != 0) {
error << compose (_("cannot remove peakfile %1 for %2 (%3)"),
error << string_compose (_("cannot remove peakfile %1 for %2 (%3)"),
peakpath, _path, strerror (errno))
<< endmsg;
/* try to back out */

View File

@ -94,7 +94,7 @@ setup_midi ()
port_descriptor->type);
if (request.status != MIDI::PortRequest::OK) {
error << compose(_("MIDI port specifications for \"%1\" are not understandable."), port_descriptor->tag) << endmsg;
error << string_compose(_("MIDI port specifications for \"%1\" are not understandable."), port_descriptor->tag) << endmsg;
continue;
}
@ -143,18 +143,18 @@ setup_midi ()
}
if (default_mmc_port == 0) {
warning << compose (_("No MMC control (MIDI port \"%1\" not available)"), Config->get_mmc_port_name())
warning << string_compose (_("No MMC control (MIDI port \"%1\" not available)"), Config->get_mmc_port_name())
<< endmsg;
return 0;
}
if (default_mtc_port == 0) {
warning << compose (_("No MTC support (MIDI port \"%1\" not available)"), Config->get_mtc_port_name())
warning << string_compose (_("No MTC support (MIDI port \"%1\" not available)"), Config->get_mtc_port_name())
<< endmsg;
}
if (default_midi_port == 0) {
warning << compose (_("No MIDI parameter support (MIDI port \"%1\" not available)"), Config->get_midi_port_name())
warning << string_compose (_("No MIDI parameter support (MIDI port \"%1\" not available)"), Config->get_midi_port_name())
<< endmsg;
}

View File

@ -66,7 +66,7 @@ Session::import_audiofile (import_status& status)
string tmp_convert_file;
if ((in = sf_open (status.pathname.c_str(), SFM_READ, &info)) == 0) {
error << compose(_("Import: cannot open input sound file \"%1\""), status.pathname) << endmsg;
error << string_compose(_("Import: cannot open input sound file \"%1\""), status.pathname) << endmsg;
return -1;
} else {
if ((uint32_t) info.samplerate != frame_rate()) {
@ -75,12 +75,12 @@ Session::import_audiofile (import_status& status)
// resample to session frame_rate
if (sample_rate_convert(status, status.pathname, tmp_convert_file)) {
if ((in = sf_open (tmp_convert_file.c_str(), SFM_READ, &info)) == 0) {
error << compose(_("Import: cannot open converted sound file \"%1\""), tmp_convert_file) << endmsg;
error << string_compose(_("Import: cannot open converted sound file \"%1\""), tmp_convert_file) << endmsg;
return -1;
}
} else if (!status.cancel){
// error
error << compose(_("Import: error while resampling sound file \"%1\""), status.pathname) << endmsg;
error << string_compose(_("Import: error while resampling sound file \"%1\""), status.pathname) << endmsg;
return -1;
} else {
// canceled
@ -136,7 +136,7 @@ Session::import_audiofile (import_status& status)
}
catch (failed_constructor& err) {
error << compose(_("Session::import_audiofile: cannot open new file source for channel %1"), n+1) << endmsg;
error << string_compose(_("Session::import_audiofile: cannot open new file source for channel %1"), n+1) << endmsg;
goto out;
}
@ -309,7 +309,7 @@ Session::sample_rate_convert (import_status& status, string infile, string& outf
outfile = build_tmp_convert_name(infile);
SNDFILE* out = sf_open(outfile.c_str(), SFM_RDWR, &sf_info);
if(!out) {
error << compose(_("Import: could not open temp file: %1"), outfile) << endmsg;
error << string_compose(_("Import: could not open temp file: %1"), outfile) << endmsg;
return false;
}
@ -318,7 +318,7 @@ Session::sample_rate_convert (import_status& status, string infile, string& outf
/* Initialize the sample rate converter. */
if ((src_state = src_new (SRC_SINC_BEST_QUALITY, sf_info.channels, &err)) == 0) {
error << compose(_("Import: src_new() failed : %1"), src_strerror (err)) << endmsg ;
error << string_compose(_("Import: src_new() failed : %1"), src_strerror (err)) << endmsg ;
return false ;
}
@ -346,7 +346,7 @@ Session::sample_rate_convert (import_status& status, string infile, string& outf
}
if ((err = src_process (src_state, &src_data))) {
error << compose(_("Import: %1"), src_strerror (err)) << endmsg ;
error << string_compose(_("Import: %1"), src_strerror (err)) << endmsg ;
return false ;
}

View File

@ -522,7 +522,7 @@ PluginInsert::plugin_factory (Plugin& other)
#endif
}
fatal << compose (_("programming error: %1"),
fatal << string_compose (_("programming error: %1"),
X_("unknown plugin type in PluginInsert::plugin_factory"))
<< endmsg;
/*NOTREACHED*/
@ -597,7 +597,7 @@ PluginInsert::state (bool full)
node->add_property ("type", _plugins[0]->state_node_name());
snprintf(buf, sizeof(buf), "%s", _plugins[0]->name());
node->add_property("id", string(buf));
node->add_property("count", compose("%1", _plugins.size()));
node->add_property("count", string_compose("%1", _plugins.size()));
node->add_child_nocopy (_plugins[0]->get_state());
/* add port automation state */
@ -644,7 +644,7 @@ PluginInsert::set_state(const XMLNode& node)
} else if (prop->value() == X_("vst")) {
type = PluginInfo::VST;
} else {
error << compose (_("unknown plugin type %1 in plugin insert state"),
error << string_compose (_("unknown plugin type %1 in plugin insert state"),
prop->value())
<< endmsg;
return -1;
@ -658,7 +658,7 @@ PluginInsert::set_state(const XMLNode& node)
Plugin* plugin;
if ((plugin = find_plugin (_session, prop->value(), type)) == 0) {
error << compose(_("Found a reference to a plugin (\"%1\") that is unknown.\n"
error << string_compose(_("Found a reference to a plugin (\"%1\") that is unknown.\n"
"Perhaps it was removed or moved since it was last used."), prop->value())
<< endmsg;
return -1;
@ -701,7 +701,7 @@ PluginInsert::set_state(const XMLNode& node)
}
if (niter == nlist.end()) {
error << compose(_("XML node describing a plugin insert is missing the `%1' information"), plugin->state_node_name()) << endmsg;
error << string_compose(_("XML node describing a plugin insert is missing the `%1' information"), plugin->state_node_name()) << endmsg;
return -1;
}
@ -748,7 +748,7 @@ PluginInsert::set_state(const XMLNode& node)
}
if (niter == nlist.end()) {
warning << compose(_("XML node describing a port automation is missing the `%1' information"), port_automation_node_name) << endmsg;
warning << string_compose(_("XML node describing a port automation is missing the `%1' information"), port_automation_node_name) << endmsg;
}

View File

@ -416,7 +416,7 @@ IO::deliver_output_no_pan (vector<Sample *>& bufs, uint32_t nbufs, jack_nframes_
}
gain_t dg;
gain_t old_gain;
gain_t old_gain = _gain;
if (apply_gain_automation) {
@ -424,7 +424,6 @@ IO::deliver_output_no_pan (vector<Sample *>& bufs, uint32_t nbufs, jack_nframes_
speed quietning.
*/
old_gain = _gain;
_gain = 1.0f;
dg = _gain;
@ -585,7 +584,7 @@ IO::disconnect_input (Port* our_port, string other_port, void* src)
/* disconnect it from the source */
if (_session.engine().disconnect (other_port, our_port->name())) {
error << compose(_("IO: cannot disconnect input port %1 from %2"), our_port->name(), other_port) << endmsg;
error << string_compose(_("IO: cannot disconnect input port %1 from %2"), our_port->name(), other_port) << endmsg;
return -1;
}
@ -653,7 +652,7 @@ IO::disconnect_output (Port* our_port, string other_port, void* src)
/* disconnect it from the destination */
if (_session.engine().disconnect (our_port->name(), other_port)) {
error << compose(_("IO: cannot disconnect output port %1 from %2"), our_port->name(), other_port) << endmsg;
error << string_compose(_("IO: cannot disconnect output port %1 from %2"), our_port->name(), other_port) << endmsg;
return -1;
}
@ -800,7 +799,7 @@ IO::add_output_port (string destination, void* src)
}
if ((our_port = _session.engine().register_audio_output_port (buf)) == 0) {
error << compose(_("IO: cannot register output port %1"), buf) << endmsg;
error << string_compose(_("IO: cannot register output port %1"), buf) << endmsg;
return -1;
}
@ -901,7 +900,7 @@ IO::add_input_port (string source, void* src)
}
if ((our_port = _session.engine().register_audio_input_port (buf)) == 0) {
error << compose(_("IO: cannot register input port %1"), buf) << endmsg;
error << string_compose(_("IO: cannot register input port %1"), buf) << endmsg;
return -1;
}
@ -1007,7 +1006,7 @@ IO::ensure_inputs_locked (uint32_t n, bool clear, void* src)
try {
if ((input_port = _session.engine().register_audio_input_port (buf)) == 0) {
error << compose(_("IO: cannot register input port %1"), buf) << endmsg;
error << string_compose(_("IO: cannot register input port %1"), buf) << endmsg;
return -1;
}
}
@ -1112,7 +1111,7 @@ IO::ensure_io (uint32_t nin, uint32_t nout, bool clear, void* src)
try {
if ((port = _session.engine().register_audio_input_port (buf)) == 0) {
error << compose(_("IO: cannot register input port %1"), buf) << endmsg;
error << string_compose(_("IO: cannot register input port %1"), buf) << endmsg;
return -1;
}
}
@ -1145,7 +1144,7 @@ IO::ensure_io (uint32_t nin, uint32_t nout, bool clear, void* src)
try {
if ((port = _session.engine().register_audio_output_port (buf)) == 0) {
error << compose(_("IO: cannot register output port %1"), buf) << endmsg;
error << string_compose(_("IO: cannot register output port %1"), buf) << endmsg;
return -1;
}
}
@ -1269,7 +1268,7 @@ IO::ensure_outputs_locked (uint32_t n, bool clear, void* src)
}
if ((output_port = _session.engine().register_audio_output_port (buf)) == 0) {
error << compose(_("IO: cannot register output port %1"), buf) << endmsg;
error << string_compose(_("IO: cannot register output port %1"), buf) << endmsg;
return -1;
}
@ -1579,7 +1578,7 @@ IO::set_state (const XMLNode& node)
*/
if (node.name() != state_node_name) {
error << compose(_("incorrect XML node \"%1\" passed to IO object"), node.name()) << endmsg;
error << string_compose(_("incorrect XML node \"%1\" passed to IO object"), node.name()) << endmsg;
return -1;
}
@ -1589,7 +1588,7 @@ IO::set_state (const XMLNode& node)
}
if ((prop = node.property ("id")) != 0) {
sscanf (prop->value().c_str(), "%llu", &_id);
sscanf (prop->value().c_str(), "%" PRIu64, &_id);
}
if ((prop = node.property ("iolimits")) != 0) {
@ -1634,7 +1633,7 @@ IO::set_state (const XMLNode& node)
if (get_midi_node_info (child, ev, chn, additional)) {
_midi_gain_control.set_control_type (chn, ev, additional);
} else {
error << compose(_("MIDI gain control specification for %1 is incomplete, so it has been ignored"), _name) << endmsg;
error << string_compose(_("MIDI gain control specification for %1 is incomplete, so it has been ignored"), _name) << endmsg;
}
}
}
@ -1701,14 +1700,14 @@ IO::create_ports (const XMLNode& node)
Connection* c = _session.connection_by_name (prop->value());
if (c == 0) {
error << compose(_("Unknown connection \"%1\" listed for input of %2"), prop->value(), _name) << endmsg;
error << string_compose(_("Unknown connection \"%1\" listed for input of %2"), prop->value(), _name) << endmsg;
if ((c = _session.connection_by_name (_("in 1"))) == 0) {
error << _("No input connections available as a replacement")
<< endmsg;
return -1;
} else {
info << compose (_("Connection %1 was not available - \"in 1\" used instead"), prop->value())
info << string_compose (_("Connection %1 was not available - \"in 1\" used instead"), prop->value())
<< endmsg;
}
}
@ -1724,14 +1723,14 @@ IO::create_ports (const XMLNode& node)
Connection* c = _session.connection_by_name (prop->value());
if (c == 0) {
error << compose(_("Unknown connection \"%1\" listed for output of %2"), prop->value(), _name) << endmsg;
error << string_compose(_("Unknown connection \"%1\" listed for output of %2"), prop->value(), _name) << endmsg;
if ((c = _session.connection_by_name (_("out 1"))) == 0) {
error << _("No output connections available as a replacement")
<< endmsg;
return -1;
} else {
info << compose (_("Connection %1 was not available - \"out 1\" used instead"), prop->value())
info << string_compose (_("Connection %1 was not available - \"out 1\" used instead"), prop->value())
<< endmsg;
}
}
@ -1745,7 +1744,7 @@ IO::create_ports (const XMLNode& node)
no_panner_reset = true;
if (ensure_io (num_inputs, num_outputs, true, this)) {
error << compose(_("%1: cannot create I/O ports"), _name) << endmsg;
error << string_compose(_("%1: cannot create I/O ports"), _name) << endmsg;
return -1;
}
@ -1811,14 +1810,14 @@ IO::make_connections (const XMLNode& node)
Connection* c = _session.connection_by_name (prop->value());
if (c == 0) {
error << compose(_("Unknown connection \"%1\" listed for input of %2"), prop->value(), _name) << endmsg;
error << string_compose(_("Unknown connection \"%1\" listed for input of %2"), prop->value(), _name) << endmsg;
if ((c = _session.connection_by_name (_("in 1"))) == 0) {
error << _("No input connections available as a replacement")
<< endmsg;
return -1;
} else {
info << compose (_("Connection %1 was not available - \"in 1\" used instead"), prop->value())
info << string_compose (_("Connection %1 was not available - \"in 1\" used instead"), prop->value())
<< endmsg;
}
}
@ -1827,7 +1826,7 @@ IO::make_connections (const XMLNode& node)
} else if ((prop = node.property ("inputs")) != 0) {
if (set_inputs (prop->value())) {
error << compose(_("improper input channel list in XML node (%1)"), prop->value()) << endmsg;
error << string_compose(_("improper input channel list in XML node (%1)"), prop->value()) << endmsg;
return -1;
}
}
@ -1836,14 +1835,14 @@ IO::make_connections (const XMLNode& node)
Connection* c = _session.connection_by_name (prop->value());
if (c == 0) {
error << compose(_("Unknown connection \"%1\" listed for output of %2"), prop->value(), _name) << endmsg;
error << string_compose(_("Unknown connection \"%1\" listed for output of %2"), prop->value(), _name) << endmsg;
if ((c = _session.connection_by_name (_("out 1"))) == 0) {
error << _("No output connections available as a replacement")
<< endmsg;
return -1;
} else {
info << compose (_("Connection %1 was not available - \"out 1\" used instead"), prop->value())
info << string_compose (_("Connection %1 was not available - \"out 1\" used instead"), prop->value())
<< endmsg;
}
}
@ -1852,7 +1851,7 @@ IO::make_connections (const XMLNode& node)
} else if ((prop = node.property ("outputs")) != 0) {
if (set_outputs (prop->value())) {
error << compose(_("improper output channel list in XML node (%1)"), prop->value()) << endmsg;
error << string_compose(_("improper output channel list in XML node (%1)"), prop->value()) << endmsg;
return -1;
}
}
@ -1887,12 +1886,12 @@ IO::set_inputs (const string& str)
start += 1;
if ((end = str.find_first_of ('}', start)) == string::npos) {
error << compose(_("IO: badly formed string in XML node for inputs \"%1\""), str) << endmsg;
error << string_compose(_("IO: badly formed string in XML node for inputs \"%1\""), str) << endmsg;
return -1;
}
if ((n = parse_io_string (str.substr (start, end - start), ports)) < 0) {
error << compose(_("bad input string in XML node \"%1\""), str) << endmsg;
error << string_compose(_("bad input string in XML node \"%1\""), str) << endmsg;
return -1;
@ -1937,12 +1936,12 @@ IO::set_outputs (const string& str)
start += 1;
if ((end = str.find_first_of ('}', start)) == string::npos) {
error << compose(_("IO: badly formed string in XML node for outputs \"%1\""), str) << endmsg;
error << string_compose(_("IO: badly formed string in XML node for outputs \"%1\""), str) << endmsg;
return -1;
}
if ((n = parse_io_string (str.substr (start, end - start), ports)) < 0) {
error << compose(_("IO: bad output string in XML node \"%1\""), str) << endmsg;
error << string_compose(_("IO: bad output string in XML node \"%1\""), str) << endmsg;
return -1;
@ -2480,7 +2479,7 @@ IO::save_automation (const string& path)
out.open (fullpath.c_str());
if (!out) {
error << compose(_("%1: could not open automation event file \"%2\""), _name, fullpath) << endmsg;
error << string_compose(_("%1: could not open automation event file \"%2\""), _name, fullpath) << endmsg;
return -1;
}
@ -2519,7 +2518,7 @@ IO::load_automation (const string& path)
fullpath += path;
in.open (fullpath.c_str());
if (!in) {
error << compose(_("%1: cannot open automation event file \"%2\""), _name, fullpath) << endmsg;
error << string_compose(_("%1: cannot open automation event file \"%2\""), _name, fullpath) << endmsg;
return -1;
}
}
@ -2534,16 +2533,16 @@ IO::load_automation (const string& path)
if (++linecnt == 1) {
if (memcmp (line, "version", 7) == 0) {
if (sscanf (line, "version %f", &version) != 1) {
error << compose(_("badly formed version number in automation event file \"%1\""), path) << endmsg;
error << string_compose(_("badly formed version number in automation event file \"%1\""), path) << endmsg;
return -1;
}
} else {
error << compose(_("no version information in automation event file \"%1\""), path) << endmsg;
error << string_compose(_("no version information in automation event file \"%1\""), path) << endmsg;
return -1;
}
if (version != current_automation_version_number) {
error << compose(_("mismatched automation event file version (%1)"), version) << endmsg;
error << string_compose(_("mismatched automation event file version (%1)"), version) << endmsg;
return -1;
}
@ -2551,7 +2550,7 @@ IO::load_automation (const string& path)
}
if (sscanf (line, "%c %" PRIu32 " %lf", &type, &when, &value) != 3) {
warning << compose(_("badly formatted automation event record at line %1 of %2 (ignored)"), linecnt, path) << endmsg;
warning << string_compose(_("badly formatted automation event record at line %1 of %2 (ignored)"), linecnt, path) << endmsg;
continue;
}

View File

@ -95,7 +95,7 @@ LadspaPlugin::init (void *mod, uint32_t index, jack_nframes_t rate)
_index = index;
if (LADSPA_IS_INPLACE_BROKEN(descriptor->Properties)) {
error << compose(_("LADSPA: \"%1\" cannot be used, since it cannot do inplace processing"), descriptor->Name) << endmsg;
error << string_compose(_("LADSPA: \"%1\" cannot be used, since it cannot do inplace processing"), descriptor->Name) << endmsg;
throw failed_constructor();
}
@ -325,7 +325,7 @@ LadspaPlugin::set_parameter (uint32_t which, float val)
}
} else {
warning << compose (_("illegal parameter number used with plugin \"%1\". This may"
warning << string_compose (_("illegal parameter number used with plugin \"%1\". This may"
"indicate a change in the plugin design, and presets may be"
"invalid"), name())
<< endmsg;
@ -494,7 +494,7 @@ LadspaPlugin::set_state(const XMLNode& node)
}
} else {
error << compose(_("LADSPA LadspaPlugin MIDI control specification for port %1 is incomplete, so it has been ignored"), port) << endl;
error << string_compose(_("LADSPA LadspaPlugin MIDI control specification for port %1 is incomplete, so it has been ignored"), port) << endl;
}
}
}

View File

@ -73,10 +73,10 @@ NamedSelection::NamedSelection (Session& session, const XMLNode& node)
playlist->ref();
playlists.push_back (playlist);
} else {
warning << compose (_("Chunk %1 uses an unknown playlist \"%2\""), name, property->value()) << endmsg;
warning << string_compose (_("Chunk %1 uses an unknown playlist \"%2\""), name, property->value()) << endmsg;
}
} else {
error << compose (_("Chunk %1 contains misformed playlist information"), name) << endmsg;
error << string_compose (_("Chunk %1 contains misformed playlist information"), name) << endmsg;
throw failed_constructor();
}
}

View File

@ -393,7 +393,7 @@ BaseStereoPanner::save (ostream& out) const
for (AutomationList::const_iterator i = _automation.const_begin(); i != _automation.const_end(); ++i) {
out << '\t' << (jack_nframes_t) floor ((*i)->when) << ' ' << (*i)->value << endl;
if (!out) {
error << compose (_("error writing pan automation file (%s)"), strerror (errno)) << endmsg;
error << string_compose (_("error writing pan automation file (%s)"), strerror (errno)) << endmsg;
return -1;
}
}
@ -421,7 +421,7 @@ BaseStereoPanner::load (istream& in, string path, uint32_t& linecnt)
}
if (sscanf (line, "%" PRIu32 " %lf", &when, &value) != 2) {
warning << compose(_("badly formatted pan automation event record at line %1 of %2 (ignored) [%3]"), linecnt, path, line) << endmsg;
warning << string_compose(_("badly formatted pan automation event record at line %1 of %2 (ignored) [%3]"), linecnt, path, line) << endmsg;
continue;
}
@ -1224,7 +1224,7 @@ Panner::save () const
ofstream out (automation_path.c_str());
if (!out) {
error << compose (_("cannot open pan automation file \"%1\" for saving (%s)"), automation_path, strerror (errno))
error << string_compose (_("cannot open pan automation file \"%1\" for saving (%s)"), automation_path, strerror (errno))
<< endmsg;
return -1;
}
@ -1260,7 +1260,7 @@ Panner::load ()
ifstream in (automation_path.c_str());
if (!in) {
error << compose (_("cannot open pan automation file %1 (%2)"),
error << string_compose (_("cannot open pan automation file %1 (%2)"),
automation_path, strerror (errno))
<< endmsg;
return -1;
@ -1273,17 +1273,17 @@ Panner::load ()
if (++linecnt == 1) {
if (memcmp (line, X_("version"), 7) == 0) {
if (sscanf (line, "version %f", &version) != 1) {
error << compose(_("badly formed version number in pan automation event file \"%1\""), automation_path) << endmsg;
error << string_compose(_("badly formed version number in pan automation event file \"%1\""), automation_path) << endmsg;
return -1;
}
} else {
error << compose(_("no version information in pan automation event file \"%1\" (first line = %2)"),
error << string_compose(_("no version information in pan automation event file \"%1\" (first line = %2)"),
automation_path, line) << endmsg;
return -1;
}
if (version != current_automation_version_number) {
error << compose(_("mismatched pan automation event file version (%1)"), version) << endmsg;
error << string_compose(_("mismatched pan automation event file version (%1)"), version) << endmsg;
return -1;
}
@ -1297,7 +1297,7 @@ Panner::load ()
if (strcmp (line, "begin") == 0) {
if (sp == end()) {
error << compose (_("too many panner states found in pan automation file %1"),
error << string_compose (_("too many panner states found in pan automation file %1"),
automation_path)
<< endmsg;
return -1;
@ -1438,7 +1438,7 @@ Panner::set_state (const XMLNode& node)
if (!pan_plugins[i].factory) {
error << compose (_("Unknown panner plugin \"%1\" found in pan state - ignored"),
error << string_compose (_("Unknown panner plugin \"%1\" found in pan state - ignored"),
prop->value())
<< endmsg;
}

View File

@ -483,7 +483,7 @@ void
Playlist::add_region_internal (Region *region, jack_nframes_t position, bool delay_sort)
{
RegionSortByPosition cmp;
jack_nframes_t old_length;
jack_nframes_t old_length = 0;
// cerr << "adding region " << region->name() << " at " << position << endl;
@ -550,7 +550,7 @@ int
Playlist::remove_region_internal (Region *region, bool delay_sort)
{
RegionList::iterator i;
jack_nframes_t old_length;
jack_nframes_t old_length = 0;
// cerr << "removing region " << region->name() << endl;
@ -1061,7 +1061,7 @@ Playlist::region_bounds_changed (Change what_changed, Region *region)
RegionList::iterator i = find (regions.begin(), regions.end(), region);
if (i == regions.end()) {
warning << compose (_("%1: bounds changed received for region (%2)not in playlist"),
warning << string_compose (_("%1: bounds changed received for region (%2)not in playlist"),
_name, region->name())
<< endmsg;
return;

View File

@ -326,24 +326,24 @@ Plugin::save_preset (string name, string domain)
return false;
}
string source(compose("file:%1/.%2/rdf/ardour-presets.n3", envvar, domain));
string source(string_compose("file:%1/.%2/rdf/ardour-presets.n3", envvar, domain));
free(lrdf_add_preset(source.c_str(), name.c_str(), unique_id(), &defaults));
string path = compose("%1/.%2", envvar, domain);
string path = string_compose("%1/.%2", envvar, domain);
if (mkdir(path.c_str(), 0775) && errno != EEXIST) {
warning << compose(_("Could not create %1. Preset not saved. (%2)"), path, strerror(errno)) << endmsg;
warning << string_compose(_("Could not create %1. Preset not saved. (%2)"), path, strerror(errno)) << endmsg;
return false;
}
path += "/rdf";
if (mkdir(path.c_str(), 0775) && errno != EEXIST) {
warning << compose(_("Could not create %1. Preset not saved. (%2)"), path, strerror(errno)) << endmsg;
warning << string_compose(_("Could not create %1. Preset not saved. (%2)"), path, strerror(errno)) << endmsg;
return false;
}
if (lrdf_export_by_source(source.c_str(), source.substr(5).c_str())) {
warning << compose(_("Error saving presets file %1."), source) << endmsg;
warning << string_compose(_("Error saving presets file %1."), source) << endmsg;
return false;
}

View File

@ -183,14 +183,14 @@ PluginManager::add_presets(string domain)
return;
}
string path = compose("%1/.%2/rdf", envvar, domain);
string path = string_compose("%1/.%2/rdf", envvar, domain);
presets = scanner (path, rdf_filter, 0, true, true);
if (presets) {
for (x = presets->begin(); x != presets->end (); ++x) {
string file = "file:" + **x;
if (lrdf_read_file(file.c_str())) {
warning << compose(_("Could not parse rdf file: %1"), *x) << endmsg;
warning << string_compose(_("Could not parse rdf file: %1"), *x) << endmsg;
}
}
}
@ -232,14 +232,14 @@ PluginManager::ladspa_discover (string path)
const char *errstr;
if ((module = dlopen (path.c_str(), RTLD_NOW)) == 0) {
error << compose(_("LADSPA: cannot load module \"%1\" (%2)"), path, dlerror()) << endmsg;
error << string_compose(_("LADSPA: cannot load module \"%1\" (%2)"), path, dlerror()) << endmsg;
return -1;
}
dfunc = (LADSPA_Descriptor_Function) dlsym (module, "ladspa_descriptor");
if ((errstr = dlerror()) != 0) {
error << compose(_("LADSPA: module \"%1\" has no descriptor function."), path) << endmsg;
error << string_compose(_("LADSPA: module \"%1\" has no descriptor function."), path) << endmsg;
error << errstr << endmsg;
dlclose (module);
return -1;
@ -293,7 +293,7 @@ PluginManager::load (Session& session, PluginInfo *info)
FSTHandle* handle;
if ((handle = fst_load (info->path.c_str())) == 0) {
error << compose(_("VST: cannot load module from \"%1\""), info->path) << endmsg;
error << string_compose(_("VST: cannot load module from \"%1\""), info->path) << endmsg;
} else {
plugin = new VSTPlugin (_engine, session, handle);
}
@ -308,7 +308,7 @@ PluginManager::load (Session& session, PluginInfo *info)
} else {
if ((module = dlopen (info->path.c_str(), RTLD_NOW)) == 0) {
error << compose(_("LADSPA: cannot load module from \"%1\""), info->path) << endmsg;
error << string_compose(_("LADSPA: cannot load module from \"%1\""), info->path) << endmsg;
error << dlerror() << endmsg;
} else {
plugin = new LadspaPlugin (module, _engine, session, info->index, session.frame_rate());
@ -455,7 +455,7 @@ PluginManager::vst_discover (string path)
}
if (!finfo->canProcessReplacing) {
warning << compose (_("VST plugin %1 does not support processReplacing, and so cannot be used in ardour at this time"),
warning << string_compose (_("VST plugin %1 does not support processReplacing, and so cannot be used in ardour at this time"),
finfo->name)
<< endl;
}

View File

@ -41,7 +41,7 @@ ARDOUR::read_recent_sessions (RecentSessions& rs)
if (!recent) {
if (errno != ENOENT) {
error << compose (_("cannot open recent session file %1 (%2)"), path, strerror (errno)) << endmsg;
error << string_compose (_("cannot open recent session file %1 (%2)"), path, strerror (errno)) << endmsg;
return -1;
} else {
return 1;

View File

@ -98,7 +98,7 @@ Redirect::set_placement (const string& str, void *src)
} else if (str == _("post")) {
set_placement (PostFader, this);
} else {
error << compose(_("Redirect: unknown placement string \"%1\" (ignored)"), str) << endmsg;
error << string_compose(_("Redirect: unknown placement string \"%1\" (ignored)"), str) << endmsg;
}
}
@ -116,7 +116,7 @@ Redirect::load_automation (string path)
ifstream in (fullpath.c_str());
if (!in) {
warning << compose(_("%1: cannot open %2 to load automation data (%3)"), _name, fullpath, strerror (errno)) << endmsg;
warning << string_compose(_("%1: cannot open %2 to load automation data (%3)"), _name, fullpath, strerror (errno)) << endmsg;
return 1;
}
@ -145,7 +145,7 @@ Redirect::load_automation (string path)
return 0;
bad:
error << compose(_("%1: cannot load automation data from %2"), _name, fullpath) << endmsg;
error << string_compose(_("%1: cannot load automation data from %2"), _name, fullpath) << endmsg;
parameter_automation.clear ();
return -1;
}
@ -166,7 +166,7 @@ Redirect::save_automation (string path)
ofstream out (fullpath.c_str());
if (!out) {
error << compose(_("%1: cannot open %2 to store automation data (%3)"), _name, fullpath, strerror (errno)) << endmsg;
error << string_compose(_("%1: cannot open %2 to store automation data (%3)"), _name, fullpath, strerror (errno)) << endmsg;
return -1;
}
@ -185,14 +185,14 @@ Redirect::save_automation (string path)
if (i != (*li).second->end()) {
unlink (fullpath.c_str());
error << compose(_("%1: could not save automation state to %2"), _name, fullpath) << endmsg;
error << string_compose(_("%1: could not save automation state to %2"), _name, fullpath) << endmsg;
return -1;
}
}
if (li != parameter_automation.end()) {
unlink (fullpath.c_str());
error << compose(_("%1: could not save automation state to %2"), _name, fullpath) << endmsg;
error << string_compose(_("%1: could not save automation state to %2"), _name, fullpath) << endmsg;
return -1;
}
@ -237,7 +237,7 @@ Redirect::state (bool full_state)
switch (save_automation (path)) {
case -1:
error << compose(_("Could not get state from Redirect (%1). Problem with save_automation"), _name) << endmsg;
error << string_compose(_("Could not get state from Redirect (%1). Problem with save_automation"), _name) << endmsg;
break;
case 0:
@ -287,7 +287,7 @@ Redirect::set_state (const XMLNode& node)
const XMLProperty *prop;
if (node.name() != state_node_name) {
error << compose(_("incorrect XML node \"%1\" passed to Redirect object"), node.name()) << endmsg;
error << string_compose(_("incorrect XML node \"%1\" passed to Redirect object"), node.name()) << endmsg;
return -1;
}
@ -309,7 +309,7 @@ Redirect::set_state (const XMLNode& node)
if ((prop = (*niter)->property ("path")) != 0) {
load_automation (prop->value());
} else {
warning << compose(_("%1: Automation node has no path property"), _name) << endmsg;
warning << string_compose(_("%1: Automation node has no path property"), _name) << endmsg;
}
if ((prop = (*niter)->property ("visible")) != 0) {

View File

@ -843,7 +843,7 @@ Region::state (bool full_state)
XMLNode *node = new XMLNode ("Region");
char buf[64];
snprintf (buf, sizeof (buf), "%llu", _id);
snprintf (buf, sizeof (buf), "%" PRIu64, _id);
node->add_property ("id", buf);
node->add_property ("name", _name);
snprintf (buf, sizeof (buf), "%u", _start);
@ -885,7 +885,7 @@ Region::set_state (const XMLNode& node)
return -1;
}
sscanf (prop->value().c_str(), "%llu", &_id);
sscanf (prop->value().c_str(), "%" PRIu64, &_id);
if ((prop = node.property ("name")) == 0) {
error << _("Session: XMLNode describing a Region is incomplete (no name)") << endmsg;

View File

@ -1458,7 +1458,7 @@ Route::add_redirect_from_xml (const XMLNode& node)
} else {
error << compose(_("unknown Insert type \"%1\"; ignored"), prop->value()) << endmsg;
error << string_compose(_("unknown Insert type \"%1\"; ignored"), prop->value()) << endmsg;
}
add_redirect (insert, this);
@ -1487,7 +1487,7 @@ Route::set_state (const XMLNode& node)
if (node.name() != "Route"){
error << compose(_("Bad node sent to Route::set_state() [%1]"), node.name()) << endmsg;
error << string_compose(_("Bad node sent to Route::set_state() [%1]"), node.name()) << endmsg;
return -1;
}
@ -1546,7 +1546,7 @@ Route::set_state (const XMLNode& node)
if ((prop = node.property ("edit-group")) != 0) {
RouteGroup* edit_group = _session.edit_group_by_name(prop->value());
if(edit_group == 0) {
error << compose(_("Route %1: unknown edit group \"%2 in saved state (ignored)"), _name, prop->value()) << endmsg;
error << string_compose(_("Route %1: unknown edit group \"%2 in saved state (ignored)"), _name, prop->value()) << endmsg;
} else {
set_edit_group(edit_group, this);
}
@ -1562,11 +1562,11 @@ Route::set_state (const XMLNode& node)
while (remaining.length()) {
if ((equal = remaining.find_first_of ('=')) == string::npos || equal == remaining.length()) {
error << compose (_("badly formed order key string in state file! [%1] ... ignored."), remaining)
error << string_compose (_("badly formed order key string in state file! [%1] ... ignored."), remaining)
<< endmsg;
} else {
if (sscanf (remaining.substr (equal+1).c_str(), "%ld", &n) != 1) {
error << compose (_("badly formed order key string in state file! [%1] ... ignored."), remaining)
error << string_compose (_("badly formed order key string in state file! [%1] ... ignored."), remaining)
<< endmsg;
} else {
set_order_key (remaining.substr (0, equal), n);
@ -1667,7 +1667,7 @@ Route::set_state (const XMLNode& node)
if ((prop = node.property ("mix-group")) != 0) {
RouteGroup* mix_group = _session.mix_group_by_name(prop->value());
if (mix_group == 0) {
error << compose(_("Route %1: unknown mix group \"%2 in saved state (ignored)"), _name, prop->value()) << endmsg;
error << string_compose(_("Route %1: unknown mix group \"%2 in saved state (ignored)"), _name, prop->value()) << endmsg;
} else {
set_mix_group(mix_group, this);
}
@ -1696,7 +1696,7 @@ Route::set_state (const XMLNode& node)
if (get_midi_node_info (child, ev, chn, additional)) {
_midi_mute_control.set_control_type (chn, ev, additional);
} else {
error << compose(_("MIDI mute control specification for %1 is incomplete, so it has been ignored"), _name) << endmsg;
error << string_compose(_("MIDI mute control specification for %1 is incomplete, so it has been ignored"), _name) << endmsg;
}
}
else if (child->name() == "solo") {
@ -1704,7 +1704,7 @@ Route::set_state (const XMLNode& node)
if (get_midi_node_info (child, ev, chn, additional)) {
_midi_solo_control.set_control_type (chn, ev, additional);
} else {
error << compose(_("MIDI mute control specification for %1 is incomplete, so it has been ignored"), _name) << endmsg;
error << string_compose(_("MIDI mute control specification for %1 is incomplete, so it has been ignored"), _name) << endmsg;
}
}
@ -2060,7 +2060,7 @@ Route::roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nframes_t
return 0;
}
jack_nframes_t unused;
jack_nframes_t unused = 0;
if ((nframes = check_initial_delay (nframes, offset, unused)) == 0) {
return 0;

View File

@ -94,7 +94,7 @@ Session::find_session (string str, string& path, string& snapshot, bool& isnew)
isnew = false;
if (!realpath (str.c_str(), buf) && (errno != ENOENT && errno != ENOTDIR)) {
error << compose (_("Could not resolve path: %1 (%2)"), buf, strerror(errno)) << endmsg;
error << string_compose (_("Could not resolve path: %1 (%2)"), buf, strerror(errno)) << endmsg;
return -1;
}
@ -106,7 +106,7 @@ Session::find_session (string str, string& path, string& snapshot, bool& isnew)
if (errno == ENOENT) {
isnew = true;
} else {
error << compose (_("cannot check session path %1 (%2)"), str, strerror (errno))
error << string_compose (_("cannot check session path %1 (%2)"), str, strerror (errno))
<< endmsg;
return -1;
}
@ -136,7 +136,7 @@ Session::find_session (string str, string& path, string& snapshot, bool& isnew)
/* is it there ? */
if (stat (tmp.c_str(), &statbuf)) {
error << compose (_("cannot check statefile %1 (%2)"), tmp, strerror (errno))
error << string_compose (_("cannot check statefile %1 (%2)"), tmp, strerror (errno))
<< endmsg;
return -1;
}
@ -172,7 +172,7 @@ Session::find_session (string str, string& path, string& snapshot, bool& isnew)
suffix = snapshot.find (_statefile_suffix);
if (suffix == string::npos) {
error << compose (_("%1 is not an Ardour snapshot file"), str) << endmsg;
error << string_compose (_("%1 is not an Ardour snapshot file"), str) << endmsg;
return -1;
}
@ -189,7 +189,7 @@ Session::find_session (string str, string& path, string& snapshot, bool& isnew)
char cwd[PATH_MAX+1];
if (getcwd (cwd, sizeof (cwd)) == 0) {
error << compose (_("cannot determine current working directory (%1)"), strerror (errno))
error << string_compose (_("cannot determine current working directory (%1)"), strerror (errno))
<< endmsg;
return -1;
}
@ -206,7 +206,7 @@ Session::find_session (string str, string& path, string& snapshot, bool& isnew)
} else {
/* what type of file is it? */
error << compose (_("unknown file type for session %1"), str) << endmsg;
error << string_compose (_("unknown file type for session %1"), str) << endmsg;
return -1;
}
@ -577,7 +577,7 @@ Session::when_engine_running ()
_clicking = false;
try {
XMLNode* child;
XMLNode* child = 0;
_click_io = new ClickIO (*this, "click", 0, 0, -1, -1);
@ -1432,7 +1432,7 @@ trace_terminal (Route* r1, Route* rbase)
Route* r2;
if ((r1->fed_by.find (rbase) != r1->fed_by.end()) && (rbase->fed_by.find (r1) != rbase->fed_by.end())) {
info << compose(_("feedback loop setup between %1 and %2"), r1->name(), rbase->name()) << endmsg;
info << string_compose(_("feedback loop setup between %1 and %2"), r1->name(), rbase->name()) << endmsg;
return;
}
@ -1566,7 +1566,7 @@ Session::new_audio_track (int input_channels, int output_channels)
}
n++;
} while (n < ULONG_MAX);
} while (n < (ULONG_MAX-1));
if (input_auto_connect & AutoConnectPhysical) {
nphysical_in = n_physical_inputs;
@ -1584,7 +1584,7 @@ Session::new_audio_track (int input_channels, int output_channels)
track = new AudioTrack (*this, track_name);
if (track->ensure_io (input_channels, output_channels, false, this)) {
error << compose (_("cannot configure %1 in/%2 out configuration for new audio track"),
error << string_compose (_("cannot configure %1 in/%2 out configuration for new audio track"),
input_channels, output_channels)
<< endmsg;
}
@ -1673,13 +1673,13 @@ Session::new_audio_route (int input_channels, int output_channels)
}
n++;
} while (n < ULONG_MAX);
} while (n < (ULONG_MAX-1));
try {
bus = new Route (*this, bus_name, -1, -1, -1, -1);
if (bus->ensure_io (input_channels, output_channels, false, this)) {
error << compose (_("cannot configure %1 in/%2 out configuration for new audio track"),
error << string_compose (_("cannot configure %1 in/%2 out configuration for new audio track"),
input_channels, output_channels)
<< endmsg;
}
@ -2153,7 +2153,7 @@ Session::new_region_name (string old)
}
while (number < ULONG_MAX) {
while (number < (ULONG_MAX-1)) {
AudioRegionList::const_iterator i;
string sbuf;
@ -2174,11 +2174,11 @@ Session::new_region_name (string old)
}
}
if (number != ULONG_MAX) {
if (number != (ULONG_MAX-1)) {
return buf;
}
error << compose (_("cannot create new name for region \"%1\""), old) << endmsg;
error << string_compose (_("cannot create new name for region \"%1\""), old) << endmsg;
return old;
}
@ -2243,7 +2243,7 @@ Session::region_name (string& result, string base, bool newlevel) const
}
if (name_taken) {
fatal << compose(_("too many regions with names like %1"), base) << endmsg;
fatal << string_compose(_("too many regions with names like %1"), base) << endmsg;
/*NOTREACHED*/
}
}
@ -2575,7 +2575,7 @@ Session::create_file_source (DiskStream& ds, int32_t chan)
}
if (cnt > limit) {
error << compose(_("There are already %1 recordings for %2, which I consider too many."), limit, ds.name()) << endmsg;
error << string_compose(_("There are already %1 recordings for %2, which I consider too many."), limit, ds.name()) << endmsg;
throw failed_constructor();
}
@ -3341,7 +3341,7 @@ Session::write_one_track (AudioTrack& track, jack_nframes_t start, jack_nframes_
}
if (x == 99999) {
error << compose (_("too many bounced versions of playlist \"%1\""), playlist->name()) << endmsg;
error << string_compose (_("too many bounced versions of playlist \"%1\""), playlist->name()) << endmsg;
goto out;
}
@ -3350,7 +3350,7 @@ Session::write_one_track (AudioTrack& track, jack_nframes_t start, jack_nframes_
}
catch (failed_constructor& err) {
error << compose (_("cannot create new audio file \"%1\" for %2"), buf, track.name()) << endmsg;
error << string_compose (_("cannot create new audio file \"%1\" for %2"), buf, track.name()) << endmsg;
goto out;
}

View File

@ -78,17 +78,17 @@ Session::start_butler_thread ()
butler_should_run = false;
if (pipe (butler_request_pipe)) {
error << compose(_("Cannot create transport request signal pipe (%1)"), strerror (errno)) << endmsg;
error << string_compose(_("Cannot create transport request signal pipe (%1)"), strerror (errno)) << endmsg;
return -1;
}
if (fcntl (butler_request_pipe[0], F_SETFL, O_NONBLOCK)) {
error << compose(_("UI: cannot set O_NONBLOCK on butler request pipe (%1)"), strerror (errno)) << endmsg;
error << string_compose(_("UI: cannot set O_NONBLOCK on butler request pipe (%1)"), strerror (errno)) << endmsg;
return -1;
}
if (fcntl (butler_request_pipe[1], F_SETFL, O_NONBLOCK)) {
error << compose(_("UI: cannot set O_NONBLOCK on butler request pipe (%1)"), strerror (errno)) << endmsg;
error << string_compose(_("UI: cannot set O_NONBLOCK on butler request pipe (%1)"), strerror (errno)) << endmsg;
return -1;
}
@ -186,7 +186,7 @@ Session::butler_thread_work ()
continue;
}
error << compose (_("poll on butler request pipe failed (%1)"),
error << string_compose (_("poll on butler request pipe failed (%1)"),
strerror (errno))
<< endmsg;
break;
@ -269,7 +269,7 @@ Session::butler_thread_work ()
default:
compute_io = false;
error << compose(_("Butler read ahead failure on dstream %1"), (*i)->name()) << endmsg;
error << string_compose(_("Butler read ahead failure on dstream %1"), (*i)->name()) << endmsg;
break;
}
@ -313,7 +313,7 @@ Session::butler_thread_work ()
default:
err++;
compute_io = false;
error << compose(_("Butler write-behind failure on dstream %1"), (*i)->name()) << endmsg;
error << string_compose(_("Butler write-behind failure on dstream %1"), (*i)->name()) << endmsg;
/* don't break - try to flush all streams in case they
are split across disks.
*/

View File

@ -145,7 +145,7 @@ Session::setup_click_sounds (int which)
if ((sndfile = sf_open (click_sound.c_str(), SFM_READ, &info)) == 0) {
char errbuf[256];
sf_error_str (0, errbuf, sizeof (errbuf) - 1);
warning << compose (_("cannot open click soundfile %1 (%2)"), click_sound, errbuf) << endmsg;
warning << string_compose (_("cannot open click soundfile %1 (%2)"), click_sound, errbuf) << endmsg;
_clicking = false;
return;
}
@ -179,7 +179,7 @@ Session::setup_click_sounds (int which)
if ((sndfile = sf_open (click_emphasis_sound.c_str(), SFM_READ, &info)) == 0) {
char errbuf[256];
sf_error_str (0, errbuf, sizeof (errbuf) - 1);
warning << compose (_("cannot open click emphasis soundfile %1 (%2)"), click_emphasis_sound, errbuf) << endmsg;
warning << string_compose (_("cannot open click emphasis soundfile %1 (%2)"), click_emphasis_sound, errbuf) << endmsg;
return;
}

View File

@ -158,7 +158,7 @@ Session::merge_event (Event* ev)
default:
for (Events::iterator i = events.begin(); i != events.end(); ++i) {
if ((*i)->type == ev->type && (*i)->action_frame == ev->action_frame) {
error << compose(_("Session: cannot have two events of type %1 at the same frame (%2)."),
error << string_compose(_("Session: cannot have two events of type %1 at the same frame (%2)."),
event_names[ev->type], ev->action_frame) << endmsg;
return;
}
@ -425,7 +425,7 @@ Session::process_event (Event* ev)
break;
default:
fatal << compose(_("Programming error: illegal event type in process_event (%1)"), ev->type) << endmsg;
fatal << string_compose(_("Programming error: illegal event type in process_event (%1)"), ev->type) << endmsg;
/*NOTREACHED*/
break;
};

View File

@ -201,7 +201,7 @@ AudioExportSpecification::prepare (jack_nframes_t blocksize, jack_nframes_t frat
if ((out = sf_open (path.c_str(), SFM_WRITE, &sfinfo)) == 0) {
sf_error_str (0, errbuf, sizeof (errbuf) - 1);
error << compose(_("Export: cannot open output file \"%1\" (%2)"), path, errbuf) << endmsg;
error << string_compose(_("Export: cannot open output file \"%1\" (%2)"), path, errbuf) << endmsg;
return -1;
}
@ -211,7 +211,7 @@ AudioExportSpecification::prepare (jack_nframes_t blocksize, jack_nframes_t frat
int err;
if ((src_state = src_new (src_quality, channels, &err)) == 0) {
error << compose (_("cannot initialize sample rate conversion: %1"), src_strerror (err)) << endmsg;
error << string_compose (_("cannot initialize sample rate conversion: %1"), src_strerror (err)) << endmsg;
return -1;
}
@ -313,7 +313,7 @@ AudioExportSpecification::process (jack_nframes_t nframes)
++cnt;
if ((err = src_process (src_state, &src_data)) != 0) {
error << compose (_("an error occured during sample rate conversion: %1"),
error << string_compose (_("an error occured during sample rate conversion: %1"),
src_strerror (err))
<< endmsg;
return -1;
@ -415,7 +415,7 @@ AudioExportSpecification::process (jack_nframes_t nframes)
if ((jack_nframes_t) written != to_write) {
sf_error_str (out, errbuf, sizeof (errbuf) - 1);
error << compose(_("Export: could not write data to output file (%1)"), errbuf) << endmsg;
error << string_compose(_("Export: could not write data to output file (%1)"), errbuf) << endmsg;
return -1;
}
@ -497,7 +497,7 @@ Session::prepare_to_export (AudioExportSpecification& spec)
LockMonitor lm (diskstream_lock, __LINE__, __FILE__);
for (DiskStreamList::iterator i = diskstreams.begin(); i != diskstreams.end(); ++i) {
if ((*i)-> seek (spec.start_frame, true)) {
error << compose (_("%1: cannot seek to %2 for export"),
error << string_compose (_("%1: cannot seek to %2 for export"),
(*i)->name(), spec.start_frame)
<< endmsg;
goto out;

View File

@ -48,19 +48,19 @@ int
Session::init_feedback ()
{
if (pipe (feedback_request_pipe) != 0) {
error << compose (_("cannot create feedback request pipe (%1)"),
error << string_compose (_("cannot create feedback request pipe (%1)"),
strerror (errno))
<< endmsg;
return -1;
}
if (fcntl (feedback_request_pipe[0], F_SETFL, O_NONBLOCK)) {
error << compose(_("UI: cannot set O_NONBLOCK on " "signal read pipe (%1)"), strerror (errno)) << endmsg;
error << string_compose(_("UI: cannot set O_NONBLOCK on " "signal read pipe (%1)"), strerror (errno)) << endmsg;
return -1;
}
if (fcntl (feedback_request_pipe[1], F_SETFL, O_NONBLOCK)) {
error << compose(_("UI: cannot set O_NONBLOCK on " "signal write pipe (%1)"), strerror (errno)) << endmsg;
error << string_compose(_("UI: cannot set O_NONBLOCK on " "signal write pipe (%1)"), strerror (errno)) << endmsg;
return -1;
}
@ -138,7 +138,7 @@ Session::feedback_thread_work ()
if (errno == EINTR) {
continue;
}
error << compose (_("Feedback thread poll failed (%1)"),
error << string_compose (_("Feedback thread poll failed (%1)"),
strerror (errno))
<< endmsg;
break;

View File

@ -201,7 +201,7 @@ Session::set_mtc_port (string port_tag)
MIDI::Port* port;
if ((port = MIDI::Manager::instance()->port (port_tag)) == 0) {
error << compose (_("unknown port %1 requested for MTC"), port_tag) << endl;
error << string_compose (_("unknown port %1 requested for MTC"), port_tag) << endl;
return -1;
}
@ -559,7 +559,7 @@ Session::midi_read (MIDI::Port* port)
} else if (errno == EAGAIN) {
break;
} else {
fatal << compose(_("Error reading from MIDI port %1"), port->name()) << endmsg;
fatal << string_compose(_("Error reading from MIDI port %1"), port->name()) << endmsg;
/*NOTREACHED*/
}
}
@ -993,7 +993,7 @@ Session::send_midi_time_code ()
}
if (_mtc_port->midimsg (mtc_msg, 2)) {
error << compose(_("Session: cannot send quarter-frame MTC message (%1)"), strerror (errno))
error << string_compose(_("Session: cannot send quarter-frame MTC message (%1)"), strerror (errno))
<< endmsg;
return -1;
@ -1099,7 +1099,7 @@ Session::deliver_mmc (MIDI::MachineControl::Command cmd, jack_nframes_t where)
LockMonitor lm (midi_lock, __LINE__, __FILE__);
if (_mmc_port->write (mmc_buffer, nbytes) != nbytes) {
error << compose(_("MMC: cannot send command %1%2%3"), &hex, cmd, &dec) << endmsg;
error << string_compose(_("MMC: cannot send command %1%2%3"), &hex, cmd, &dec) << endmsg;
}
}
}
@ -1201,17 +1201,17 @@ int
Session::start_midi_thread ()
{
if (pipe (midi_request_pipe)) {
error << compose(_("Cannot create transport request signal pipe (%1)"), strerror (errno)) << endmsg;
error << string_compose(_("Cannot create transport request signal pipe (%1)"), strerror (errno)) << endmsg;
return -1;
}
if (fcntl (midi_request_pipe[0], F_SETFL, O_NONBLOCK)) {
error << compose(_("UI: cannot set O_NONBLOCK on " "signal read pipe (%1)"), strerror (errno)) << endmsg;
error << string_compose(_("UI: cannot set O_NONBLOCK on " "signal read pipe (%1)"), strerror (errno)) << endmsg;
return -1;
}
if (fcntl (midi_request_pipe[1], F_SETFL, O_NONBLOCK)) {
error << compose(_("UI: cannot set O_NONBLOCK on " "signal write pipe (%1)"), strerror (errno)) << endmsg;
error << string_compose(_("UI: cannot set O_NONBLOCK on " "signal write pipe (%1)"), strerror (errno)) << endmsg;
return -1;
}
@ -1245,7 +1245,7 @@ Session::poke_midi_thread ()
char c;
if (write (midi_request_pipe[1], &c, 1) != 1) {
error << compose(_("cannot send signal to midi thread! (%1)"), strerror (errno)) << endmsg;
error << string_compose(_("cannot send signal to midi thread! (%1)"), strerror (errno)) << endmsg;
}
}
@ -1340,7 +1340,7 @@ Session::midi_thread_work ()
goto again;
}
error << compose(_("MIDI thread poll failed (%1)"), strerror (errno)) << endmsg;
error << string_compose(_("MIDI thread poll failed (%1)"), strerror (errno)) << endmsg;
break;
}
@ -1448,7 +1448,7 @@ Session::midi_thread_work ()
for (int p = 1; p < nfds; ++p) {
if ((pfd[p].revents & ~POLLIN)) {
// error << compose(_("Transport: error polling MIDI port %1 (revents =%2%3%4"), p, &hex, pfd[p].revents, &dec) << endmsg;
// error << string_compose(_("Transport: error polling MIDI port %1 (revents =%2%3%4"), p, &hex, pfd[p].revents, &dec) << endmsg;
break;
}

View File

@ -102,7 +102,7 @@ Session::no_roll (jack_nframes_t nframes, jack_nframes_t offset)
if ((*i)->no_roll (nframes, _transport_frame, end_frame, offset, non_realtime_work_pending(),
actively_recording(), declick)) {
error << compose(_("Session: error in no roll for %1"), (*i)->name()) << endmsg;
error << string_compose(_("Session: error in no roll for %1"), (*i)->name()) << endmsg;
ret = -1;
break;
}

View File

@ -96,7 +96,7 @@ Session::first_stage_init (string fullpath, string snapshot_name)
char buf[PATH_MAX+1];
if (!realpath(fullpath.c_str(), buf) && (errno != ENOENT)) {
error << compose(_("Could not use path %1 (%s)"), buf, strerror(errno)) << endmsg;
error << string_compose(_("Could not use path %1 (%s)"), buf, strerror(errno)) << endmsg;
throw failed_constructor();
}
_path = string(buf);
@ -458,7 +458,7 @@ Session::create (bool& new_session, string* mix_template, jack_nframes_t initial
if (errno == EEXIST) {
new_session = false;
} else {
error << compose(_("Session: cannot create session dir \"%1\" (%2)"), _path, strerror (errno)) << endmsg;
error << string_compose(_("Session: cannot create session dir \"%1\" (%2)"), _path, strerror (errno)) << endmsg;
return -1;
}
} else {
@ -469,7 +469,7 @@ Session::create (bool& new_session, string* mix_template, jack_nframes_t initial
if (mkdir (dir.c_str(), 0755) < 0) {
if (errno != EEXIST) {
error << compose(_("Session: cannot create session peakfile dir \"%1\" (%2)"), dir, strerror (errno)) << endmsg;
error << string_compose(_("Session: cannot create session peakfile dir \"%1\" (%2)"), dir, strerror (errno)) << endmsg;
return -1;
}
}
@ -478,7 +478,7 @@ Session::create (bool& new_session, string* mix_template, jack_nframes_t initial
if (mkdir (dir.c_str(), 0755) < 0) {
if (errno != EEXIST) {
error << compose(_("Session: cannot create session sounds dir \"%1\" (%2)"), dir, strerror (errno)) << endmsg;
error << string_compose(_("Session: cannot create session sounds dir \"%1\" (%2)"), dir, strerror (errno)) << endmsg;
return -1;
}
}
@ -487,7 +487,7 @@ Session::create (bool& new_session, string* mix_template, jack_nframes_t initial
if (mkdir (dir.c_str(), 0755) < 0) {
if (errno != EEXIST) {
error << compose(_("Session: cannot create session dead sounds dir \"%1\" (%2)"), dir, strerror (errno)) << endmsg;
error << string_compose(_("Session: cannot create session dead sounds dir \"%1\" (%2)"), dir, strerror (errno)) << endmsg;
return -1;
}
}
@ -496,7 +496,7 @@ Session::create (bool& new_session, string* mix_template, jack_nframes_t initial
if (mkdir (dir.c_str(), 0755) < 0) {
if (errno != EEXIST) {
error << compose(_("Session: cannot create session automation dir \"%1\" (%2)"), dir, strerror (errno)) << endmsg;
error << string_compose(_("Session: cannot create session automation dir \"%1\" (%2)"), dir, strerror (errno)) << endmsg;
return -1;
}
}
@ -520,14 +520,14 @@ Session::create (bool& new_session, string* mix_template, jack_nframes_t initial
vector<string*>* result= scanner (tpath, lookfor, false, true);
if (result == 0) {
error << compose (_("Could not find a template called %1 in %2"), *mix_template, tpath)
error << string_compose (_("Could not find a template called %1 in %2"), *mix_template, tpath)
<< endmsg;
*mix_template = "";
}
if (result->size() == 0) {
delete result;
error << compose (_("Could not find a template called %1 in %2"), *mix_template, tpath)
error << string_compose (_("Could not find a template called %1 in %2"), *mix_template, tpath)
<< endmsg;
*mix_template = "";
}
@ -553,13 +553,13 @@ Session::create (bool& new_session, string* mix_template, jack_nframes_t initial
return 0;
} else {
error << compose (_("Could not open %1 for writing mix template"), out_path)
error << string_compose (_("Could not open %1 for writing mix template"), out_path)
<< endmsg;
return -1;
}
} else {
error << compose (_("Could not open mix template %1 for reading"), in_path)
error << string_compose (_("Could not open mix template %1 for reading"), in_path)
<< endmsg;
return -1;
}
@ -668,18 +668,18 @@ Session::save_state (string snapshot_name, bool pending)
}
if (!tree.write (xml_path)) {
error << compose (_("state could not be saved to %1"), xml_path) << endmsg;
error << string_compose (_("state could not be saved to %1"), xml_path) << endmsg;
/* don't leave a corrupt file lying around if it is
possible to fix.
*/
if (unlink (xml_path.c_str())) {
error << compose (_("could not remove corrupt state file %1"), xml_path) << endmsg;
error << string_compose (_("could not remove corrupt state file %1"), xml_path) << endmsg;
} else {
if (!pending) {
if (rename (bak_path.c_str(), xml_path.c_str())) {
error << compose (_("could not restore state file from backup %1"), bak_path) << endmsg;
error << string_compose (_("could not restore state file from backup %1"), bak_path) << endmsg;
}
}
}
@ -748,7 +748,7 @@ Session::load_state (string snapshot_name)
}
if (access (xmlpath.c_str(), F_OK)) {
error << compose(_("%1: session state information file \"%2\" doesn't exist!"), _name, xmlpath) << endmsg;
error << string_compose(_("%1: session state information file \"%2\" doesn't exist!"), _name, xmlpath) << endmsg;
return 1;
}
@ -759,7 +759,7 @@ Session::load_state (string snapshot_name)
if (state_tree->read (xmlpath)) {
return 0;
} else {
error << compose(_("Could not understand ardour file %1"), xmlpath) << endmsg;
error << string_compose(_("Could not understand ardour file %1"), xmlpath) << endmsg;
}
delete state_tree;
@ -1715,10 +1715,10 @@ Session::XMLRegionFactory (const XMLNode& node, bool full)
}
}
sscanf (prop->value().c_str(), "%llu", &s_id);
sscanf (prop->value().c_str(), "%" PRIu64, &s_id);
if ((source = get_source (s_id)) == 0) {
error << compose(_("Session: XMLNode describing a AudioRegion references an unknown source id =%1"), s_id) << endmsg;
error << string_compose(_("Session: XMLNode describing a AudioRegion references an unknown source id =%1"), s_id) << endmsg;
return 0;
}
@ -1729,10 +1729,10 @@ Session::XMLRegionFactory (const XMLNode& node, bool full)
for (uint32_t n=1; n < nchans; ++n) {
snprintf (buf, sizeof(buf), X_("source-%d"), n);
if ((prop = node.property (buf)) != 0) {
sscanf (prop->value().c_str(), "%llu", &s_id);
sscanf (prop->value().c_str(), "%" PRIu64, &s_id);
if ((source = get_source (s_id)) == 0) {
error << compose(_("Session: XMLNode describing a AudioRegion references an unknown source id =%1"), s_id) << endmsg;
error << string_compose(_("Session: XMLNode describing a AudioRegion references an unknown source id =%1"), s_id) << endmsg;
return 0;
}
sources.push_back(source);
@ -1852,7 +1852,7 @@ Session::save_template (string template_name)
closedir (dp);
} else {
if (mkdir (dir.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)<0) {
error << compose(_("Could not create mix templates directory \"%1\" (%2)"), dir, strerror (errno)) << endmsg;
error << string_compose(_("Could not create mix templates directory \"%1\" (%2)"), dir, strerror (errno)) << endmsg;
return -1;
}
}
@ -1866,7 +1866,7 @@ Session::save_template (string template_name)
ifstream in(xml_path.c_str());
if (in) {
warning << compose(_("Template \"%1\" already exists - new version not created"), template_name) << endmsg;
warning << string_compose(_("Template \"%1\" already exists - new version not created"), template_name) << endmsg;
return -1;
} else {
in.close();
@ -1933,7 +1933,7 @@ Session::ensure_sound_dir (string path, string& result)
if (mkdir (path.c_str(), 0775)) {
if (errno != EEXIST) {
error << compose(_("cannot create session directory \"%1\"; ignored"), path) << endmsg;
error << string_compose(_("cannot create session directory \"%1\"; ignored"), path) << endmsg;
return -1;
}
}
@ -1946,7 +1946,7 @@ Session::ensure_sound_dir (string path, string& result)
if (mkdir (result.c_str(), 0775)) {
if (errno != EEXIST) {
error << compose(_("cannot create sounds directory \"%1\"; ignored"), result) << endmsg;
error << string_compose(_("cannot create sounds directory \"%1\"; ignored"), result) << endmsg;
return -1;
}
}
@ -1957,7 +1957,7 @@ Session::ensure_sound_dir (string path, string& result)
if (mkdir (dead.c_str(), 0775)) {
if (errno != EEXIST) {
error << compose(_("cannot create dead sounds directory \"%1\"; ignored"), dead) << endmsg;
error << string_compose(_("cannot create dead sounds directory \"%1\"; ignored"), dead) << endmsg;
return -1;
}
}
@ -1968,7 +1968,7 @@ Session::ensure_sound_dir (string path, string& result)
if (mkdir (peak.c_str(), 0775)) {
if (errno != EEXIST) {
error << compose(_("cannot create peak file directory \"%1\"; ignored"), peak) << endmsg;
error << string_compose(_("cannot create peak file directory \"%1\"; ignored"), peak) << endmsg;
return -1;
}
}
@ -2266,7 +2266,7 @@ Session::load_connections (const XMLNode& node)
} else if ((*niter)->name() == "OutputConnection") {
add_connection (new ARDOUR::OutputConnection (**niter));
} else {
error << compose(_("Unknown node \"%1\" found in Connections list from state file"), (*niter)->name()) << endmsg;
error << string_compose(_("Unknown node \"%1\" found in Connections list from state file"), (*niter)->name()) << endmsg;
return -1;
}
}
@ -2612,7 +2612,7 @@ Session::read_favorite_dirs (FavoriteDirs & favs)
if (!fav) {
if (errno != ENOENT) {
//error << compose (_("cannot open favorite file %1 (%2)"), path, strerror (errno)) << endmsg;
//error << string_compose (_("cannot open favorite file %1 (%2)"), path, strerror (errno)) << endmsg;
return -1;
} else {
return 1;
@ -2976,7 +2976,7 @@ Session::cleanup_sources (Session::cleanup_report& rep)
}
if (version == 999) {
error << compose (_("there are already 1000 files with names like %1; versioning discontinued"),
error << string_compose (_("there are already 1000 files with names like %1; versioning discontinued"),
newpath)
<< endmsg;
} else {
@ -2990,7 +2990,7 @@ Session::cleanup_sources (Session::cleanup_report& rep)
}
if (::rename ((*x).c_str(), newpath.c_str()) != 0) {
error << compose (_("cannot rename audio file source from %1 to %2 (%3)"),
error << string_compose (_("cannot rename audio file source from %1 to %2 (%3)"),
(*x), newpath, strerror (errno))
<< endmsg;
goto out;
@ -3005,7 +3005,7 @@ Session::cleanup_sources (Session::cleanup_report& rep)
if (access (peakpath.c_str(), W_OK) == 0) {
if (::unlink (peakpath.c_str()) != 0) {
error << compose (_("cannot remove peakfile %1 for %2 (%3)"),
error << string_compose (_("cannot remove peakfile %1 for %2 (%3)"),
peakpath, _path, strerror (errno))
<< endmsg;
/* try to back out */
@ -3078,7 +3078,7 @@ Session::cleanup_trash_sources (Session::cleanup_report& rep)
}
if (unlink (fullpath.c_str())) {
error << compose (_("cannot remove dead sound file %1 (%2)"),
error << string_compose (_("cannot remove dead sound file %1 (%2)"),
fullpath, strerror (errno))
<< endmsg;
}

View File

@ -733,7 +733,7 @@ Session::jack_sync_callback (jack_transport_state_t state,
break;
default:
error << compose (_("Unknown JACK transport state %1 in sync callback"), state)
error << string_compose (_("Unknown JACK transport state %1 in sync callback"), state)
<< endmsg;
}

View File

@ -74,7 +74,7 @@ Session::tempoize_region (TimeStretchRequest& tsr)
string path = path_from_region_name (PBD::basename_nosuffix (names[i]), ident);
if (path.length() == 0) {
error << compose (_("tempoize: error creating name for new audio file based on %1"), tsr.region->name())
error << string_compose (_("tempoize: error creating name for new audio file based on %1"), tsr.region->name())
<< endmsg;
goto out;
}
@ -82,7 +82,7 @@ Session::tempoize_region (TimeStretchRequest& tsr)
try {
sources.push_back(new FileSource (path, frame_rate()));
} catch (failed_constructor& err) {
error << compose (_("tempoize: error creating new audio file %1 (%2)"), path, strerror (errno)) << endmsg;
error << string_compose (_("tempoize: error creating new audio file %1 (%2)"), path, strerror (errno)) << endmsg;
goto out;
}
}
@ -107,7 +107,7 @@ Session::tempoize_region (TimeStretchRequest& tsr)
subject to timefx. */
if ((this_read = tsr.region->master_read_at (buffer, buffer, gain_buffer, pos + tsr.region->position(), this_time)) != this_time) {
error << compose (_("tempoize: error reading data from %1"), sources[i]->name()) << endmsg;
error << string_compose (_("tempoize: error reading data from %1"), sources[i]->name()) << endmsg;
goto out;
}
@ -120,7 +120,7 @@ Session::tempoize_region (TimeStretchRequest& tsr)
while ((this_read = st.receiveSamples (buffer, bufsize)) > 0 && tsr.running) {
if (sources[i]->write (buffer, this_read) != this_read) {
error << compose (_("error writing tempo-adjusted data to %1"), sources[i]->name()) << endmsg;
error << string_compose (_("error writing tempo-adjusted data to %1"), sources[i]->name()) << endmsg;
goto out;
}
}
@ -132,7 +132,7 @@ Session::tempoize_region (TimeStretchRequest& tsr)
while (tsr.running && (this_read = st.receiveSamples (buffer, bufsize)) > 0) {
if (sources[i]->write (buffer, this_read) != this_read) {
error << compose (_("error writing tempo-adjusted data to %1"), sources[i]->name()) << endmsg;
error << string_compose (_("error writing tempo-adjusted data to %1"), sources[i]->name()) << endmsg;
goto out;
}
}

View File

@ -84,12 +84,12 @@ SndFileSource::init (const string& idstr, bool build_peak)
if ((sf = sf_open (file.c_str(), SFM_READ, &_info)) == 0) {
char errbuf[256];
sf_error_str (0, errbuf, sizeof (errbuf) - 1);
error << compose(_("SndFileSource: cannot open file \"%1\" (%2)"), file, errbuf) << endmsg;
error << string_compose(_("SndFileSource: cannot open file \"%1\" (%2)"), file, errbuf) << endmsg;
throw failed_constructor();
}
if (channel >= _info.channels) {
error << compose(_("SndFileSource: file only contains %1 channels; %2 is invalid as a channel number"), _info.channels, channel) << endmsg;
error << string_compose(_("SndFileSource: file only contains %1 channels; %2 is invalid as a channel number"), _info.channels, channel) << endmsg;
sf_close (sf);
sf = 0;
throw failed_constructor();
@ -137,7 +137,7 @@ SndFileSource::read (Sample *dst, jack_nframes_t start, jack_nframes_t cnt) cons
if (sf_seek (sf, (off_t) start, SEEK_SET) < 0) {
char errbuf[256];
sf_error_str (0, errbuf, sizeof (errbuf) - 1);
error << compose(_("SndFileSource: could not seek to frame %1 within %2 (%3)"), start, _name.substr (1), errbuf) << endmsg;
error << string_compose(_("SndFileSource: could not seek to frame %1 within %2 (%3)"), start, _name.substr (1), errbuf) << endmsg;
return 0;
}

View File

@ -96,7 +96,7 @@ Source::get_state ()
char buf[64];
node->add_property ("name", _name);
snprintf (buf, sizeof(buf)-1, "%llu", _id);
snprintf (buf, sizeof(buf)-1, "%" PRIu64, _id);
node->add_property ("id", buf);
if (_timestamp != 0) {
@ -123,7 +123,7 @@ Source::set_state (const XMLNode& node)
}
if ((prop = node.property ("id")) != 0) {
sscanf (prop->value().c_str(), "%llu", &_id);
sscanf (prop->value().c_str(), "%" PRIu64, &_id);
} else {
return -1;
}
@ -165,7 +165,7 @@ Source::peak_thread_work (void* arg)
continue;
}
error << compose (_("poll on peak request pipe failed (%1)"),
error << string_compose (_("poll on peak request pipe failed (%1)"),
strerror (errno))
<< endmsg;
break;
@ -237,17 +237,17 @@ Source::start_peak_thread ()
}
if (pipe (peak_request_pipe)) {
error << compose(_("Cannot create transport request signal pipe (%1)"), strerror (errno)) << endmsg;
error << string_compose(_("Cannot create transport request signal pipe (%1)"), strerror (errno)) << endmsg;
return -1;
}
if (fcntl (peak_request_pipe[0], F_SETFL, O_NONBLOCK)) {
error << compose(_("UI: cannot set O_NONBLOCK on peak request pipe (%1)"), strerror (errno)) << endmsg;
error << string_compose(_("UI: cannot set O_NONBLOCK on peak request pipe (%1)"), strerror (errno)) << endmsg;
return -1;
}
if (fcntl (peak_request_pipe[1], F_SETFL, O_NONBLOCK)) {
error << compose(_("UI: cannot set O_NONBLOCK on peak request pipe (%1)"), strerror (errno)) << endmsg;
error << string_compose(_("UI: cannot set O_NONBLOCK on peak request pipe (%1)"), strerror (errno)) << endmsg;
return -1;
}
@ -342,7 +342,7 @@ Source::initialize_peakfile (bool newfile, string audio_path)
if (errno != ENOENT) {
/* it exists in the peaks dir, but there is some kind of error */
error << compose(_("Source: cannot stat peakfile \"%1\""), peakpath) << endmsg;
error << string_compose(_("Source: cannot stat peakfile \"%1\""), peakpath) << endmsg;
return -1;
}
@ -362,7 +362,7 @@ Source::initialize_peakfile (bool newfile, string audio_path)
/* it exists in the audio dir , but there is some kind of error */
error << compose(_("Source: cannot stat peakfile \"%1\" or \"%2\""), peakpath, oldpeakpath) << endmsg;
error << string_compose(_("Source: cannot stat peakfile \"%1\" or \"%2\""), peakpath, oldpeakpath) << endmsg;
return -1;
}
@ -394,7 +394,7 @@ Source::initialize_peakfile (bool newfile, string audio_path)
}
if ((peakfile = ::open (peakpath.c_str(), O_RDWR|O_CREAT, 0664)) < 0) {
error << compose(_("Source: cannot open peakpath \"%1\" (%2)"), peakpath, strerror (errno)) << endmsg;
error << string_compose(_("Source: cannot open peakpath \"%1\" (%2)"), peakpath, strerror (errno)) << endmsg;
return -1;
}
@ -631,7 +631,7 @@ Source::read_peaks (PeakData *peaks, jack_nframes_t npeaks, jack_nframes_t start
to_read = min (chunksize, (_length - current_frame));
if ((frames_read = read_unlocked (raw_staging, current_frame, to_read)) < 0) {
error << compose(_("Source[%1]: peak read - cannot read %2 samples at offset %3")
error << string_compose(_("Source[%1]: peak read - cannot read %2 samples at offset %3")
, _name, to_read, current_frame)
<< endmsg;
goto out;
@ -767,7 +767,7 @@ Source::do_build_peak (jack_nframes_t first_frame, jack_nframes_t cnt)
frames_to_read = min (frames_per_peak, cnt);
if ((frames_read = read_unlocked (buf, current_frame, frames_to_read)) != frames_to_read) {
error << compose(_("%1: could not write read raw data for peak computation (%2)"), _name, strerror (errno)) << endmsg;
error << string_compose(_("%1: could not write read raw data for peak computation (%2)"), _name, strerror (errno)) << endmsg;
goto out;
}
@ -791,8 +791,8 @@ Source::do_build_peak (jack_nframes_t first_frame, jack_nframes_t cnt)
cnt -= frames_read;
}
if (::pwrite (peakfile, peakbuf, sizeof (PeakData) * peaki, first_peak_byte) != (size_t) sizeof (PeakData) * peaki) {
error << compose(_("%1: could not write peak file data (%2)"), _name, strerror (errno)) << endmsg;
if (::pwrite (peakfile, peakbuf, sizeof (PeakData) * peaki, first_peak_byte) != (ssize_t) sizeof (PeakData) * peaki) {
error << string_compose(_("%1: could not write peak file data (%2)"), _name, strerror (errno)) << endmsg;
goto out;
}

View File

@ -36,7 +36,7 @@ StateManager::use_state (state_id_t id)
for (n = 0, i = states.begin(); n < id && i != states.end(); ++n, ++i);
if (n != id || i == states.end()) {
fatal << compose (_("programming error: illegal state ID (%1) passed to "
fatal << string_compose (_("programming error: illegal state ID (%1) passed to "
"StateManager::set_state() (range = 0-%3)"), id,
states.size()-1)
<< endmsg;

View File

@ -97,7 +97,7 @@ Stateful::add_instant_xml (XMLNode& node, const string& dir)
tree.set_root (copy);
if (!tree.write()) {
error << compose(_("Error: could not write %1"), dir+"/instant.xml") << endmsg;
error << string_compose(_("Error: could not write %1"), dir+"/instant.xml") << endmsg;
}
}
@ -111,7 +111,7 @@ Stateful::instant_xml (const string& str, const string& dir)
if (tree.read(dir+"/instant.xml")) {
_instant_xml = new XMLNode(*(tree.root()));
} else {
warning << compose(_("Could not understand XML file %1"), instant_file) << endmsg;
warning << string_compose(_("Could not understand XML file %1"), instant_file) << endmsg;
return 0;
}
} else {

View File

@ -67,7 +67,7 @@ TempoSection::TempoSection (const XMLNode& node)
throw failed_constructor();
}
if (sscanf (prop->value().c_str(), "%lu|%lu|%lu",
if (sscanf (prop->value().c_str(), "%" PRIu32 "|%" PRIu32 "|%" PRIu32,
&start.bars,
&start.beats,
&start.ticks) < 3) {
@ -131,7 +131,7 @@ MeterSection::MeterSection (const XMLNode& node)
throw failed_constructor();
}
if (sscanf (prop->value().c_str(), "%lu|%lu|%lu",
if (sscanf (prop->value().c_str(), "%" PRIu32 "|%" PRIu32 "|%" PRIu32,
&start.bars,
&start.beats,
&start.ticks) < 3) {

View File

@ -183,7 +183,7 @@ VSTPlugin::get_state()
if (stat (path.c_str(), &sbuf)) {
if (errno == ENOENT) {
if (mkdir (path.c_str(), 0600)) {
error << compose (_("cannot create VST chunk directory: %1"),
error << string_compose (_("cannot create VST chunk directory: %1"),
strerror (errno))
<< endmsg;
return *root;
@ -191,14 +191,14 @@ VSTPlugin::get_state()
} else {
error << compose (_("cannot check VST chunk directory: %1"),
error << string_compose (_("cannot check VST chunk directory: %1"),
strerror (errno))
<< endmsg;
return *root;
}
} else if (!S_ISDIR (sbuf.st_mode)) {
error << compose (_("%1 exists but is not a directory"), path)
error << string_compose (_("%1 exists but is not a directory"), path)
<< endmsg;
return *root;
}

View File

@ -28,6 +28,7 @@
#include <gtkmm.h>
#include <pbd/error.h>
#include <pbd/compose.h>
#include <pbd/touchable.h>
#include <pbd/failed_constructor.h>
#include <pbd/pthread_utils.h>
@ -346,7 +347,7 @@ UI::get_request (RequestType rt)
if (rbuf == 0) {
/* Cannot happen, but if it does we can't use the error reporting mechanism */
cerr << _("programming error: ")
<< compose (X_("no GUI request buffer found for thread %1"), pthread_self())
<< string_compose (X_("no GUI request buffer found for thread %1"), pthread_self())
<< endl;
abort ();
}
@ -357,7 +358,7 @@ UI::get_request (RequestType rt)
if (vec.len[0] == 0) {
if (vec.len[1] == 0) {
cerr << compose (X_("no space in GUI request buffer for thread %1"), pthread_self())
cerr << string_compose (X_("no space in GUI request buffer for thread %1"), pthread_self())
<< endl;
return 0;
} else {
@ -541,7 +542,7 @@ UI::send_request (Request *req)
thread isn't registered!
*/
cerr << _("programming error: ")
<< compose (X_("UI::send_request() called from %1, but no request buffer exists for that thread"),
<< string_compose (X_("UI::send_request() called from %1, but no request buffer exists for that thread"),
pthread_self())
<< endl;
abort ();

View File

@ -197,13 +197,13 @@ namespace StringPrivate
}
// now for the real thing(s)
namespace PBD
{
//namespace PBD
//{
// a series of functions which accept a format string on the form "text %1
// more %2 less %3" and a number of templated parameters and spits out the
// composited string
template <typename T1>
inline std::string compose(const std::string &fmt, const T1 &o1)
inline std::string string_compose(const std::string &fmt, const T1 &o1)
{
StringPrivate::Composition c(fmt);
c.arg(o1);
@ -211,7 +211,7 @@ namespace PBD
}
template <typename T1, typename T2>
inline std::string compose(const std::string &fmt,
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2)
{
StringPrivate::Composition c(fmt);
@ -220,7 +220,7 @@ namespace PBD
}
template <typename T1, typename T2, typename T3>
inline std::string compose(const std::string &fmt,
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3)
{
StringPrivate::Composition c(fmt);
@ -229,7 +229,7 @@ namespace PBD
}
template <typename T1, typename T2, typename T3, typename T4>
inline std::string compose(const std::string &fmt,
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4)
{
@ -239,7 +239,7 @@ namespace PBD
}
template <typename T1, typename T2, typename T3, typename T4, typename T5>
inline std::string compose(const std::string &fmt,
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5)
{
@ -250,7 +250,7 @@ namespace PBD
template <typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6>
inline std::string compose(const std::string &fmt,
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6)
{
@ -261,7 +261,7 @@ namespace PBD
template <typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7>
inline std::string compose(const std::string &fmt,
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6,
const T7 &o7)
@ -273,7 +273,7 @@ namespace PBD
template <typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7, typename T8>
inline std::string compose(const std::string &fmt,
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6,
const T7 &o7, const T8 &o8)
@ -285,7 +285,7 @@ namespace PBD
template <typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7, typename T8, typename T9>
inline std::string compose(const std::string &fmt,
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6,
const T7 &o7, const T8 &o8, const T9 &o9)
@ -297,7 +297,7 @@ namespace PBD
template <typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7, typename T8, typename T9, typename T10>
inline std::string compose(const std::string &fmt,
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6,
const T7 &o7, const T8 &o8, const T9 &o9,
@ -312,7 +312,7 @@ namespace PBD
template <typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7, typename T8, typename T9, typename T10,
typename T11>
inline std::string compose(const std::string &fmt,
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6,
const T7 &o7, const T8 &o8, const T9 &o9,
@ -327,7 +327,7 @@ namespace PBD
template <typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7, typename T8, typename T9, typename T10,
typename T11, typename T12>
inline std::string compose(const std::string &fmt,
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6,
const T7 &o7, const T8 &o8, const T9 &o9,
@ -342,7 +342,7 @@ namespace PBD
template <typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7, typename T8, typename T9, typename T10,
typename T11, typename T12, typename T13>
inline std::string compose(const std::string &fmt,
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6,
const T7 &o7, const T8 &o8, const T9 &o9,
@ -358,7 +358,7 @@ namespace PBD
template <typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7, typename T8, typename T9, typename T10,
typename T11, typename T12, typename T13, typename T14>
inline std::string compose(const std::string &fmt,
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6,
const T7 &o7, const T8 &o8, const T9 &o9,
@ -375,7 +375,7 @@ namespace PBD
typename T6, typename T7, typename T8, typename T9, typename T10,
typename T11, typename T12, typename T13, typename T14,
typename T15>
inline std::string compose(const std::string &fmt,
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6,
const T7 &o7, const T8 &o8, const T9 &o9,
@ -387,7 +387,7 @@ namespace PBD
.arg(o10).arg(o11).arg(o12).arg(o13).arg(o14).arg(o15);
return c.str();
}
}
//}
#endif // STRING_COMPOSE_H