switch glibmm/giomm to 2.18

git-svn-id: svn://localhost/ardour2/branches/3.0@5306 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2009-07-02 16:00:45 +00:00
parent e6c240a691
commit a73d15e989
423 changed files with 142369 additions and 23979 deletions

View file

@ -10,16 +10,16 @@
/* Copyright (C) 2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* Library General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
@ -76,7 +76,6 @@ namespace Glib
/**** process spawning functions *******************************************/
#ifdef GLIBMM_EXCEPTIONS_ENABLED
void spawn_async_with_pipes(const std::string& working_directory,
const Glib::ArrayHandle<std::string>& argv,
const Glib::ArrayHandle<std::string>& envp,
@ -86,21 +85,10 @@ void spawn_async_with_pipes(const std::string& working_directory,
int* standard_input,
int* standard_output,
int* standard_error)
#else
void spawn_async_with_pipes(const std::string& working_directory,
const Glib::ArrayHandle<std::string>& argv,
const Glib::ArrayHandle<std::string>& envp,
SpawnFlags flags,
const sigc::slot<void>& child_setup,
Pid* child_pid,
int* standard_input,
int* standard_output,
int* standard_error, std::auto_ptr<Glib::Error>& error)
#endif //GLIBMM_EXCEPTIONS_ENABLED
{
const bool setup_slot = !child_setup.empty();
sigc::slot<void> child_setup_ = child_setup;
GError* gerror = 0;
GError* error = 0;
g_spawn_async_with_pipes(
working_directory.c_str(),
@ -111,18 +99,12 @@ void spawn_async_with_pipes(const std::string& working_directory,
(setup_slot) ? &child_setup_ : 0,
child_pid,
standard_input, standard_output, standard_error,
&gerror);
&error);
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
Glib::Error::throw_exception(gerror);
#else
if(gerror)
error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
if(error)
Glib::Error::throw_exception(error);
}
#ifdef GLIBMM_EXCEPTIONS_ENABLED
void spawn_async_with_pipes(const std::string& working_directory,
const Glib::ArrayHandle<std::string>& argv,
SpawnFlags flags,
@ -131,20 +113,10 @@ void spawn_async_with_pipes(const std::string& working_directory,
int* standard_input,
int* standard_output,
int* standard_error)
#else
void spawn_async_with_pipes(const std::string& working_directory,
const Glib::ArrayHandle<std::string>& argv,
SpawnFlags flags,
const sigc::slot<void>& child_setup,
Pid* child_pid,
int* standard_input,
int* standard_output,
int* standard_error, std::auto_ptr<Glib::Error>& error)
#endif //GLIBMM_EXCEPTIONS_ENABLED
{
const bool setup_slot = !child_setup.empty();
sigc::slot<void> child_setup_ = child_setup;
GError* gerror = 0;
GError* error = 0;
g_spawn_async_with_pipes(
working_directory.c_str(),
@ -154,36 +126,22 @@ void spawn_async_with_pipes(const std::string& working_directory,
(setup_slot) ? &child_setup_ : 0,
child_pid,
standard_input, standard_output, standard_error,
&gerror);
&error);
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
Glib::Error::throw_exception(gerror);
#else
if(gerror)
error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
if(error)
Glib::Error::throw_exception(error);
}
#ifdef GLIBMM_EXCEPTIONS_ENABLED
void spawn_async(const std::string& working_directory,
const Glib::ArrayHandle<std::string>& argv,
const Glib::ArrayHandle<std::string>& envp,
SpawnFlags flags,
const sigc::slot<void>& child_setup,
Pid* child_pid)
#else
void spawn_async(const std::string& working_directory,
const Glib::ArrayHandle<std::string>& argv,
const Glib::ArrayHandle<std::string>& envp,
SpawnFlags flags,
const sigc::slot<void>& child_setup,
Pid* child_pid, std::auto_ptr<Glib::Error>& error)
#endif //GLIBMM_EXCEPTIONS_ENABLED
{
const bool setup_slot = !child_setup.empty();
sigc::slot<void> child_setup_ = child_setup;
GError* gerror = 0;
GError* error = 0;
g_spawn_async(
working_directory.c_str(),
@ -193,34 +151,21 @@ void spawn_async(const std::string& working_directory,
(setup_slot) ? &child_setup_callback : 0,
(setup_slot) ? &child_setup_ : 0,
child_pid,
&gerror);
&error);
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
Glib::Error::throw_exception(gerror);
#else
if(gerror)
error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
if(error)
Glib::Error::throw_exception(error);
}
#ifdef GLIBMM_EXCEPTIONS_ENABLED
void spawn_async(const std::string& working_directory,
const Glib::ArrayHandle<std::string>& argv,
SpawnFlags flags,
const sigc::slot<void>& child_setup,
Pid* child_pid)
#else
void spawn_async(const std::string& working_directory,
const Glib::ArrayHandle<std::string>& argv,
SpawnFlags flags,
const sigc::slot<void>& child_setup,
Pid* child_pid, std::auto_ptr<Glib::Error>& error)
#endif //GLIBMM_EXCEPTIONS_ENABLED
{
const bool setup_slot = !child_setup.empty();
sigc::slot<void> child_setup_ = child_setup;
GError* gerror = 0;
GError* error = 0;
g_spawn_async(
working_directory.c_str(),
@ -229,18 +174,12 @@ void spawn_async(const std::string& working_directory,
(setup_slot) ? &child_setup_callback : 0,
(setup_slot) ? &child_setup_ : 0,
child_pid,
&gerror);
&error);
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
Glib::Error::throw_exception(gerror);
#else
if(gerror)
error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
if(error)
Glib::Error::throw_exception(error);
}
#ifdef GLIBMM_EXCEPTIONS_ENABLED
void spawn_sync(const std::string& working_directory,
const Glib::ArrayHandle<std::string>& argv,
const Glib::ArrayHandle<std::string>& envp,
@ -249,23 +188,13 @@ void spawn_sync(const std::string& working_directory,
std::string* standard_output,
std::string* standard_error,
int* exit_status)
#else
void spawn_sync(const std::string& working_directory,
const Glib::ArrayHandle<std::string>& argv,
const Glib::ArrayHandle<std::string>& envp,
SpawnFlags flags,
const sigc::slot<void>& child_setup,
std::string* standard_output,
std::string* standard_error,
int* exit_status, std::auto_ptr<Glib::Error>& error)
#endif //GLIBMM_EXCEPTIONS_ENABLED
{
const bool setup_slot = !child_setup.empty();
sigc::slot<void> child_setup_ = child_setup;
Glib::ScopedPtr<char> buf_standard_output;
Glib::ScopedPtr<char> buf_standard_error;
GError* gerror = 0;
GError* error = 0;
g_spawn_sync(
working_directory.c_str(),
@ -277,21 +206,15 @@ void spawn_sync(const std::string& working_directory,
(standard_output) ? buf_standard_output.addr() : 0,
(standard_error) ? buf_standard_error.addr() : 0,
exit_status,
&gerror);
&error);
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
Glib::Error::throw_exception(gerror);
#else
if(gerror)
error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
if(error)
Glib::Error::throw_exception(error);
copy_output_buf(standard_output, buf_standard_output.get());
copy_output_buf(standard_error, buf_standard_error.get());
}
#ifdef GLIBMM_EXCEPTIONS_ENABLED
void spawn_sync(const std::string& working_directory,
const Glib::ArrayHandle<std::string>& argv,
SpawnFlags flags,
@ -299,22 +222,13 @@ void spawn_sync(const std::string& working_directory,
std::string* standard_output,
std::string* standard_error,
int* exit_status)
#else
void spawn_sync(const std::string& working_directory,
const Glib::ArrayHandle<std::string>& argv,
SpawnFlags flags,
const sigc::slot<void>& child_setup,
std::string* standard_output,
std::string* standard_error,
int* exit_status, std::auto_ptr<Glib::Error>& error)
#endif //GLIBMM_EXCEPTIONS_ENABLED
{
const bool setup_slot = !child_setup.empty();
sigc::slot<void> child_setup_ = child_setup;
Glib::ScopedPtr<char> buf_standard_output;
Glib::ScopedPtr<char> buf_standard_error;
GError* gerror = 0;
GError* error = 0;
g_spawn_sync(
working_directory.c_str(),
@ -325,68 +239,42 @@ void spawn_sync(const std::string& working_directory,
(standard_output) ? buf_standard_output.addr() : 0,
(standard_error) ? buf_standard_error.addr() : 0,
exit_status,
&gerror);
&error);
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
Glib::Error::throw_exception(gerror);
#else
if(gerror)
error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
if(error)
Glib::Error::throw_exception(error);
copy_output_buf(standard_output, buf_standard_output.get());
copy_output_buf(standard_error, buf_standard_error.get());
}
#ifdef GLIBMM_EXCEPTIONS_ENABLED
void spawn_command_line_async(const std::string& command_line)
#else
void spawn_command_line_async(const std::string& command_line, std::auto_ptr<Glib::Error>& error)
#endif //GLIBMM_EXCEPTIONS_ENABLED
{
GError* gerror = 0;
g_spawn_command_line_async(command_line.c_str(), &gerror);
GError* error = 0;
g_spawn_command_line_async(command_line.c_str(), &error);
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
Glib::Error::throw_exception(gerror);
#else
if(gerror)
error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
if(error)
Glib::Error::throw_exception(error);
}
#ifdef GLIBMM_EXCEPTIONS_ENABLED
void spawn_command_line_sync(const std::string& command_line,
std::string* standard_output,
std::string* standard_error,
int* exit_status)
#else
void spawn_command_line_sync(const std::string& command_line,
std::string* standard_output,
std::string* standard_error,
int* exit_status, std::auto_ptr<Glib::Error>& error);
#endif //GLIBMM_EXCEPTIONS_ENABLED
{
Glib::ScopedPtr<char> buf_standard_output;
Glib::ScopedPtr<char> buf_standard_error;
GError* gerror = 0;
GError* error = 0;
g_spawn_command_line_sync(
command_line.c_str(),
(standard_output) ? buf_standard_output.addr() : 0,
(standard_error) ? buf_standard_error.addr() : 0,
exit_status,
&gerror);
&error);
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
Glib::Error::throw_exception(gerror);
#else
if(gerror)
error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
if(error)
Glib::Error::throw_exception(error);
copy_output_buf(standard_output, buf_standard_output.get());
copy_output_buf(standard_error, buf_standard_error.get());