From: Braden M. <br...@us...> - 2007-02-05 05:36:12
|
Update of /cvsroot/openvrml/openvrml/mozilla-plugin/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12827/mozilla-plugin/src Modified Files: openvrml.cpp Log Message: Changed the name of openvrml-gtkplug to openvrml-xembed. Index: openvrml.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/mozilla-plugin/src/openvrml.cpp,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** openvrml.cpp 3 Jan 2007 23:08:39 -0000 1.50 --- openvrml.cpp 5 Feb 2007 05:36:11 -0000 1.51 *************** *** 1115,1147 **** // ! // The OPENVRML_GTKPLUG environment variable overrides the default ! // path to the child process executable. To allow OPENVRML_GTKPLUG ! // to include arguments (rather than just be a path to an ! // executable), it is parsed with g_shell_parse_argv. This is ! // particularly useful in case we want to run the child process in ! // a harness like valgrind. // ! gint openvrml_gtkplug_cmd_argc = 0; ! gchar ** openvrml_gtkplug_cmd_argv = 0; ! scope_guard openvrml_gtkplug_cmd_argv_guard = ! make_guard(g_strfreev, ref(openvrml_gtkplug_cmd_argv)); ! boost::ignore_unused_variable_warning(openvrml_gtkplug_cmd_argv_guard); ! const gchar * const openvrml_gtkplug_cmd = ! g_getenv("OPENVRML_GTKPLUG"); ! if (!openvrml_gtkplug_cmd) { ! openvrml_gtkplug_cmd_argc = 1; ! openvrml_gtkplug_cmd_argv = static_cast<gchar **>(g_malloc0(sizeof (gchar *) * 2)); ! if (!openvrml_gtkplug_cmd_argv) { throw std::bad_alloc(); } ! openvrml_gtkplug_cmd_argv[0] = ! g_strdup(OPENVRML_LIBEXECDIR_ "/openvrml-gtkplug"); ! if (!openvrml_gtkplug_cmd_argv[0]) { throw std::bad_alloc(); } } else { GError * error = 0; scope_guard error_guard = make_guard(g_error_free, ref(error)); gboolean succeeded = ! g_shell_parse_argv(openvrml_gtkplug_cmd, ! &openvrml_gtkplug_cmd_argc, ! &openvrml_gtkplug_cmd_argv, &error); if (!succeeded) { --- 1115,1146 ---- // ! // The OPENVRML_XEMBED environment variable overrides the default path ! // to the child process executable. To allow OPENVRML_XEMBED to ! // include arguments (rather than just be a path to an executable), it ! // is parsed with g_shell_parse_argv. This is particularly useful in ! // case we want to run the child process in a harness like valgrind. // ! gint openvrml_xembed_cmd_argc = 0; ! gchar ** openvrml_xembed_cmd_argv = 0; ! scope_guard openvrml_xembed_cmd_argv_guard = ! make_guard(g_strfreev, ref(openvrml_xembed_cmd_argv)); ! boost::ignore_unused_variable_warning(openvrml_xembed_cmd_argv_guard); ! const gchar * const openvrml_xembed_cmd = ! g_getenv("OPENVRML_XEMBED"); ! if (!openvrml_xembed_cmd) { ! openvrml_xembed_cmd_argc = 1; ! openvrml_xembed_cmd_argv = static_cast<gchar **>(g_malloc0(sizeof (gchar *) * 2)); ! if (!openvrml_xembed_cmd_argv) { throw std::bad_alloc(); } ! openvrml_xembed_cmd_argv[0] = ! g_strdup(OPENVRML_LIBEXECDIR_ "/openvrml-xembed"); ! if (!openvrml_xembed_cmd_argv[0]) { throw std::bad_alloc(); } } else { GError * error = 0; scope_guard error_guard = make_guard(g_error_free, ref(error)); gboolean succeeded = ! g_shell_parse_argv(openvrml_xembed_cmd, ! &openvrml_xembed_cmd_argc, ! &openvrml_xembed_cmd_argv, &error); if (!succeeded) { *************** *** 1166,1170 **** socket_id_arg_c_str + socket_id_arg.length() + 1); ! const gint argv_size = openvrml_gtkplug_cmd_argc + 3; gchar ** const argv = static_cast<gchar **>(g_malloc(sizeof (gchar *) * argv_size)); --- 1165,1169 ---- socket_id_arg_c_str + socket_id_arg.length() + 1); ! const gint argv_size = openvrml_xembed_cmd_argc + 3; gchar ** const argv = static_cast<gchar **>(g_malloc(sizeof (gchar *) * argv_size)); *************** *** 1173,1178 **** boost::ignore_unused_variable_warning(argv_guard); gint i; ! for (i = 0; i < openvrml_gtkplug_cmd_argc; ++i) { ! argv[i] = openvrml_gtkplug_cmd_argv[i]; } argv[i++] = &initial_stream_arg_vec.front(); --- 1172,1177 ---- boost::ignore_unused_variable_warning(argv_guard); gint i; ! for (i = 0; i < openvrml_xembed_cmd_argc; ++i) { ! argv[i] = openvrml_xembed_cmd_argv[i]; } argv[i++] = &initial_stream_arg_vec.front(); |