projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more updates
[synfig.git]
/
synfig-studio
/
trunk
/
src
/
gtkmm
/
ipc.cpp
diff --git
a/synfig-studio/trunk/src/gtkmm/ipc.cpp
b/synfig-studio/trunk/src/gtkmm/ipc.cpp
index
630063c
..
a8ae83d
100644
(file)
--- a/
synfig-studio/trunk/src/gtkmm/ipc.cpp
+++ b/
synfig-studio/trunk/src/gtkmm/ipc.cpp
@@
-1,4
+1,4
@@
-/* === S
I N F G ==
========================================================= */
+/* === S
Y N F I G
========================================================= */
/*! \file ipc.cpp
** \brief Template File
**
/*! \file ipc.cpp
** \brief Template File
**
@@
-38,7
+38,7
@@
#include <sys/stat.h>
#endif
#include <sys/stat.h>
#endif
-#include <s
inf
g/main.h>
+#include <s
ynfi
g/main.h>
#include "app.h"
#ifdef HAVE_UNISTD_H
#include "app.h"
#ifdef HAVE_UNISTD_H
@@
-57,8
+57,8
@@
#include "toolbox.h"
#include <glibmm/dispatcher.h>
#include "toolbox.h"
#include <glibmm/dispatcher.h>
-#include <s
inf
g/mutex.h>
-#include <s
inf
g/string.h>
+#include <s
ynfi
g/mutex.h>
+#include <s
ynfi
g/string.h>
#include <glibmm/thread.h>
#endif
#include <glibmm/thread.h>
#endif
@@
-67,7
+67,7
@@
using namespace std;
using namespace etl;
using namespace std;
using namespace etl;
-using namespace s
inf
g;
+using namespace s
ynfi
g;
using namespace studio;
/* === M A C R O S ========================================================= */
using namespace studio;
/* === M A C R O S ========================================================= */
@@
-76,8
+76,8
@@
using namespace studio;
#ifdef _WIN32
#define WIN32_PIPE_PATH "\\\\.\\pipe\\SynfigStudio.Cmd"
#ifdef _WIN32
#define WIN32_PIPE_PATH "\\\\.\\pipe\\SynfigStudio.Cmd"
-static s
inf
g::Mutex cmd_mutex;
-static std::list<s
inf
g::String> cmd_queue;
+static s
ynfi
g::Mutex cmd_mutex;
+static std::list<s
ynfi
g::String> cmd_queue;
static Glib::Dispatcher* cmd_dispatcher;
static void
pipe_listen_thread()
static Glib::Dispatcher* cmd_dispatcher;
static void
pipe_listen_thread()
@@
-97,7
+97,7
@@
pipe_listen_thread()
);
if(pipe_handle==INVALID_HANDLE_VALUE)
{
);
if(pipe_handle==INVALID_HANDLE_VALUE)
{
- s
inf
g::error("IPC(): Call to CreateNamedPipe failed. Ignore next error. GetLastError=%d",GetLastError());
+ s
ynfi
g::error("IPC(): Call to CreateNamedPipe failed. Ignore next error. GetLastError=%d",GetLastError());
return;
}
return;
}
@@
-124,7
+124,7
@@
pipe_listen_thread()
if(success && read_bytes==1 && c!='\n')
data+=c;
}while(c!='\n');
if(success && read_bytes==1 && c!='\n')
data+=c;
}while(c!='\n');
- s
inf
g::Mutex::Lock lock(cmd_mutex);
+ s
ynfi
g::Mutex::Lock lock(cmd_mutex);
cmd_queue.push_back(data);
cmd_dispatcher->emit();
} while(success && read_bytes);
cmd_queue.push_back(data);
cmd_dispatcher->emit();
} while(success && read_bytes);
@@
-136,7
+136,7
@@
pipe_listen_thread()
static void
empty_cmd_queue()
{
static void
empty_cmd_queue()
{
- s
inf
g::Mutex::Lock lock(cmd_mutex);
+ s
ynfi
g::Mutex::Lock lock(cmd_mutex);
while(!cmd_queue.empty())
{
IPC::process_command(cmd_queue.front());
while(!cmd_queue.empty())
{
IPC::process_command(cmd_queue.front());
@@
-169,7
+169,7
@@
IPC::IPC()
if(mkfifo(fifo_path().c_str(), S_IRWXU)!=0)
{
if(mkfifo(fifo_path().c_str(), S_IRWXU)!=0)
{
- s
inf
g::error("IPC(): mkfifo failed for "+fifo_path());
+ s
ynfi
g::error("IPC(): mkfifo failed for "+fifo_path());
}
{
}
{
@@
-178,7
+178,7
@@
IPC::IPC()
if(fd<0)
{
if(fd<0)
{
- s
inf
g::error("IPC(): Failed to open fifo \"%s\". (errno=%d)",fifo_path().c_str(),errno);
+ s
ynfi
g::error("IPC(): Failed to open fifo \"%s\". (errno=%d)",fifo_path().c_str(),errno);
}
else
{
}
else
{
@@
-205,7
+205,7
@@
IPC::~IPC()
// close(fd);
}
// close(fd);
}
-s
inf
g::String
+s
ynfi
g::String
IPC::fifo_path()
{
#ifdef _WIN32
IPC::fifo_path()
{
#ifdef _WIN32
@@
-218,19
+218,19
@@
IPC::fifo_path()
bool
IPC::fifo_activity(Glib::IOCondition cond)
{
bool
IPC::fifo_activity(Glib::IOCondition cond)
{
- s
inf
g::info(__FILE__":%d: fifo activity",__LINE__);
+ s
ynfi
g::info(__FILE__":%d: fifo activity",__LINE__);
if(cond&(Glib::IO_ERR|Glib::IO_HUP|Glib::IO_NVAL))
{
if(cond&(Glib::IO_ERR))
if(cond&(Glib::IO_ERR|Glib::IO_HUP|Glib::IO_NVAL))
{
if(cond&(Glib::IO_ERR))
- s
inf
g::error("IPC::fifo_activity(): IO_ERR");
+ s
ynfi
g::error("IPC::fifo_activity(): IO_ERR");
if(cond&(Glib::IO_HUP))
if(cond&(Glib::IO_HUP))
- s
inf
g::error("IPC::fifo_activity(): IO_HUP");
+ s
ynfi
g::error("IPC::fifo_activity(): IO_HUP");
if(cond&(Glib::IO_NVAL))
if(cond&(Glib::IO_NVAL))
- s
inf
g::error("IPC::fifo_activity(): IO_NVAL");
+ s
ynfi
g::error("IPC::fifo_activity(): IO_NVAL");
return false;
}
return false;
}
- s
inf
g::info(__FILE__":%d: fifo activity",__LINE__);
+ s
ynfi
g::info(__FILE__":%d: fifo activity",__LINE__);
String command;
{
String command;
{
@@
-248,7
+248,7
@@
IPC::fifo_activity(Glib::IOCondition cond)
}
bool
}
bool
-IPC::process_command(const s
inf
g::String& command_line)
+IPC::process_command(const s
ynfi
g::String& command_line)
{
if(command_line.empty())
return false;
{
if(command_line.empty())
return false;
@@
-277,14
+277,14
@@
IPC::process_command(const sinfg::String& command_line)
App::quit();
break;
default:
App::quit();
break;
default:
- s
inf
g::warning("Received unknown command '%c' with arg '%s'",cmd,args.c_str());
+ s
ynfi
g::warning("Received unknown command '%c' with arg '%s'",cmd,args.c_str());
break;
}
return true;
}
break;
}
return true;
}
-s
inf
g::SmartFILE
+s
ynfi
g::SmartFILE
IPC::make_connection()
{
SmartFILE ret;
IPC::make_connection()
{
SmartFILE ret;
@@
-301,7
+301,7
@@
IPC::make_connection()
);
if(pipe_handle==INVALID_HANDLE_VALUE)
{
);
if(pipe_handle==INVALID_HANDLE_VALUE)
{
- s
inf
g::warning("IPC::make_connection(): Unable to connect to previous instance. GetLastError=%d",GetLastError());
+ s
ynfi
g::warning("IPC::make_connection(): Unable to connect to previous instance. GetLastError=%d",GetLastError());
}
int fd=_open_osfhandle(reinterpret_cast<long int>(pipe_handle),_O_APPEND|O_WRONLY);
#else
}
int fd=_open_osfhandle(reinterpret_cast<long int>(pipe_handle),_O_APPEND|O_WRONLY);
#else
@@
-318,7
+318,7
@@
IPC::make_connection()
if(fd>=0)
ret=SmartFILE(fdopen(fd,"w"));
if(fd>=0)
ret=SmartFILE(fdopen(fd,"w"));
- s
inf
g::info("uplink fd=%d",fd);
+ s
ynfi
g::info("uplink fd=%d",fd);
return ret;
}
return ret;
}