|
From: <br...@us...> - 2009-05-28 02:43:55
|
Revision: 3911
http://openvrml.svn.sourceforge.net/openvrml/?rev=3911&view=rev
Author: braden
Date: 2009-05-28 02:43:46 +0000 (Thu, 28 May 2009)
Log Message:
-----------
Fixes to the conf refactoring to build with gcc on Linux.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/Makefile.am
trunk/src/libopenvrml/openvrml/local/conf.cpp
trunk/src/libopenvrml/openvrml/local/conf.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-05-28 02:26:51 UTC (rev 3910)
+++ trunk/ChangeLog 2009-05-28 02:43:46 UTC (rev 3911)
@@ -1,5 +1,17 @@
2009-05-27 Braden McDaniel <br...@en...>
+ Fixes to the conf refactoring to build with gcc on Linux.
+
+ * src/Makefile.am
+ (libopenvrml_libopenvrml_la_SOURCES): Added entries for
+ conf.{cpp,h}.
+ * src/libopenvrml/openvrml/local/conf.cpp: Don't include
+ <exception>.
+ * src/libopenvrml/openvrml/local/conf.h: Include <stdexcept>;
+ added exception specifications.
+
+2009-05-27 Braden McDaniel <br...@en...>
+
On Windows, use the registry to get the default data directory,
script module path, and node module path.
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2009-05-28 02:26:51 UTC (rev 3910)
+++ trunk/src/Makefile.am 2009-05-28 02:43:46 UTC (rev 3911)
@@ -96,6 +96,8 @@
libopenvrml/openvrml/rendering_context.cpp \
libopenvrml/openvrml/frustum.cpp \
libopenvrml/openvrml/node_impl_util.cpp \
+ libopenvrml/openvrml/local/conf.cpp \
+ libopenvrml/openvrml/local/conf.h \
libopenvrml/openvrml/local/dl.cpp \
libopenvrml/openvrml/local/dl.h \
libopenvrml/openvrml/local/uri.cpp \
Modified: trunk/src/libopenvrml/openvrml/local/conf.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/local/conf.cpp 2009-05-28 02:26:51 UTC (rev 3910)
+++ trunk/src/libopenvrml/openvrml/local/conf.cpp 2009-05-28 02:43:46 UTC (rev 3911)
@@ -27,7 +27,6 @@
# else
# include <cstdlib>
# endif
-# include <exception>
using namespace boost::multi_index::detail; // for scope_guard
Modified: trunk/src/libopenvrml/openvrml/local/conf.h
===================================================================
--- trunk/src/libopenvrml/openvrml/local/conf.h 2009-05-28 02:26:51 UTC (rev 3910)
+++ trunk/src/libopenvrml/openvrml/local/conf.h 2009-05-28 02:43:46 UTC (rev 3911)
@@ -22,6 +22,7 @@
# define OPENVRML_LOCAL_CONF_H
# include <openvrml-common.h>
+# include <stdexcept>
# include <string>
namespace openvrml {
@@ -30,9 +31,12 @@
namespace conf {
- OPENVRML_LOCAL const std::string datadir();
- OPENVRML_LOCAL const std::string node_path();
- OPENVRML_LOCAL const std::string script_path();
+ OPENVRML_LOCAL const std::string datadir()
+ OPENVRML_THROW2(std::runtime_error, std::bad_alloc);
+ OPENVRML_LOCAL const std::string node_path()
+ OPENVRML_THROW2(std::runtime_error, std::bad_alloc);
+ OPENVRML_LOCAL const std::string script_path()
+ OPENVRML_THROW2(std::runtime_error, std::bad_alloc);
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-05-28 02:46:30
|
Revision: 3912
http://openvrml.svn.sourceforge.net/openvrml/?rev=3912&view=rev
Author: braden
Date: 2009-05-28 02:46:21 +0000 (Thu, 28 May 2009)
Log Message:
-----------
Assert that type and uri are nonempty.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/libopenvrml-control/openvrml_control/browser.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-05-28 02:43:46 UTC (rev 3911)
+++ trunk/ChangeLog 2009-05-28 02:46:21 UTC (rev 3912)
@@ -1,5 +1,12 @@
2009-05-27 Braden McDaniel <br...@en...>
+ * src/libopenvrml-control/openvrml_control/browser.cpp
+ (openvrml_control::browser::new_stream(uint64_t, const
+ std::string&, const std::string &)): Assert that type and uri are
+ nonempty.
+
+2009-05-27 Braden McDaniel <br...@en...>
+
Fixes to the conf refactoring to build with gcc on Linux.
* src/Makefile.am
Modified: trunk/src/libopenvrml-control/openvrml_control/browser.cpp
===================================================================
--- trunk/src/libopenvrml-control/openvrml_control/browser.cpp 2009-05-28 02:43:46 UTC (rev 3911)
+++ trunk/src/libopenvrml-control/openvrml_control/browser.cpp 2009-05-28 02:46:21 UTC (rev 3912)
@@ -672,6 +672,9 @@
const std::string & uri)
OPENVRML_THROW1(unknown_stream)
{
+ assert(!type.empty());
+ assert(!uri.empty());
+
using boost::shared_ptr;
shared_ptr<plugin_streambuf> streambuf =
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-05-28 05:08:03
|
Revision: 3914
http://openvrml.svn.sourceforge.net/openvrml/?rev=3914&view=rev
Author: braden
Date: 2009-05-28 05:07:50 +0000 (Thu, 28 May 2009)
Log Message:
-----------
Link with the /MD variant of FreeType.
Modified Paths:
--------------
trunk/ChangeLog
trunk/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj
trunk/ide-projects/Windows/VisualC9_0/OpenVRML/vrml97/vrml97.vcproj
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-05-28 03:30:43 UTC (rev 3913)
+++ trunk/ChangeLog 2009-05-28 05:07:50 UTC (rev 3914)
@@ -1,3 +1,10 @@
+2009-05-28 Braden McDaniel <br...@en...>
+
+ Link with the /MD variant of FreeType.
+
+ * ide-projects/Windows/VisualC9_0/OpenVRML/vrml97/vrml97.vcproj
+ * ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj
+
2009-05-27 Braden McDaniel <br...@en...>
* src/libopenvrml-control/openvrml_control/browser.cpp
Modified: trunk/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj
===================================================================
--- trunk/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj 2009-05-28 03:30:43 UTC (rev 3913)
+++ trunk/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj 2009-05-28 05:07:50 UTC (rev 3914)
@@ -69,7 +69,7 @@
Name="VCLinkerTool"
AdditionalDependencies="gdi32.lib advapi32.lib shell32.lib shlwapi.lib XmlLite.lib"
OutputFile="$(OutDir)\bin\$(ProjectName).dll"
- IgnoreDefaultLibraryNames="libcmtd;msvcrt"
+ IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
@@ -153,7 +153,7 @@
Name="VCLinkerTool"
AdditionalDependencies="gdi32.lib advapi32.lib shell32.lib shlwapi.lib XmlLite.lib"
OutputFile="$(OutDir)\bin\$(ProjectName).dll"
- IgnoreDefaultLibraryNames="libcmt"
+ IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
LinkTimeCodeGeneration="1"
RandomizedBaseAddress="1"
Modified: trunk/ide-projects/Windows/VisualC9_0/OpenVRML/vrml97/vrml97.vcproj
===================================================================
--- trunk/ide-projects/Windows/VisualC9_0/OpenVRML/vrml97/vrml97.vcproj 2009-05-28 03:30:43 UTC (rev 3913)
+++ trunk/ide-projects/Windows/VisualC9_0/OpenVRML/vrml97/vrml97.vcproj 2009-05-28 05:07:50 UTC (rev 3914)
@@ -63,9 +63,9 @@
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="true"
- AdditionalDependencies="libpngd.lib zlibd.lib freetype239MT_D.lib"
+ AdditionalDependencies="libpngd.lib zlibd.lib freetype239_D.lib"
OutputFile="$(OutDir)\bin\node\$(ProjectName).dll"
- IgnoreDefaultLibraryNames="libcmtd"
+ IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
/>
<Tool
@@ -138,7 +138,7 @@
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="true"
- AdditionalDependencies="libpng.lib zlib.lib freetype239MT.lib"
+ AdditionalDependencies="libpng.lib zlib.lib freetype239.lib"
OutputFile="$(OutDir)\bin\node\$(ProjectName).dll"
GenerateDebugInformation="true"
/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-05-29 03:23:46
|
Revision: 3915
http://openvrml.svn.sourceforge.net/openvrml/?rev=3915&view=rev
Author: braden
Date: 2009-05-29 03:23:40 +0000 (Fri, 29 May 2009)
Log Message:
-----------
Don't propagate an exception if OpenVRML's registry key has not been set.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/libopenvrml/openvrml/local/conf.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-05-28 05:07:50 UTC (rev 3914)
+++ trunk/ChangeLog 2009-05-29 03:23:40 UTC (rev 3915)
@@ -1,5 +1,18 @@
2009-05-28 Braden McDaniel <br...@en...>
+ Don't propagate an exception if OpenVRML's registry key has not
+ been set.
+
+ * src/libopenvrml/openvrml/local/conf.cpp
+ (no_registry_key): Exception to indicate that a registry key was
+ not found.
+ (get_registry_setting(const std::string &): Throw no_registry_key
+ if OpenVRML's key is not found.
+ (openvrml::local::conf::node_path()): Swallow no_registry_key.
+ (openvrml::local::conf::script_path()): Swallow no_registry_key.
+
+2009-05-28 Braden McDaniel <br...@en...>
+
Link with the /MD variant of FreeType.
* ide-projects/Windows/VisualC9_0/OpenVRML/vrml97/vrml97.vcproj
Modified: trunk/src/libopenvrml/openvrml/local/conf.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/local/conf.cpp 2009-05-28 05:07:50 UTC (rev 3914)
+++ trunk/src/libopenvrml/openvrml/local/conf.cpp 2009-05-29 03:23:40 UTC (rev 3915)
@@ -107,6 +107,11 @@
return std::string(&data.front(), &data.front() + size - 1);
}
+ class no_registry_key : public std::runtime_error {
+ public:
+ no_registry_key(): std::runtime_error("no registry key") {}
+ };
+
const std::string get_registry_setting(const std::string & name)
OPENVRML_THROW2(std::runtime_error, std::bad_alloc)
{
@@ -118,6 +123,7 @@
KEY_READ,
&key);
if (result != ERROR_SUCCESS) {
+ if (result == ERROR_FILE_NOT_FOUND) { throw no_registry_key(); }
throw_runtime_error(result);
}
@@ -171,7 +177,9 @@
std::string system_path;
# ifdef _WIN32
- system_path = get_registry_setting("NodePath");
+ try {
+ system_path = get_registry_setting("NodePath");
+ } catch (no_registry_key &) {}
# else
system_path = OPENVRML_PKGLIBDIR_ "/node";
# endif
@@ -191,7 +199,9 @@
std::string system_path;
# ifdef _WIN32
- system_path = get_registry_setting("ScriptPath");
+ try {
+ system_path = get_registry_setting("ScriptPath");
+ } catch (no_registry_key &) {}
# else
system_path = OPENVRML_PKGLIBDIR_ "/script";
# endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-07 06:14:02
|
Revision: 3916
http://openvrml.svn.sourceforge.net/openvrml/?rev=3916&view=rev
Author: braden
Date: 2009-06-07 06:13:31 +0000 (Sun, 07 Jun 2009)
Log Message:
-----------
Use model/x3d-vrml instead of model/x3d+vrml.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/mozilla-plugin/openvrml.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-05-29 03:23:40 UTC (rev 3915)
+++ trunk/ChangeLog 2009-06-07 06:13:31 UTC (rev 3916)
@@ -1,3 +1,9 @@
+2009-06-07 Braden McDaniel <br...@en...>
+
+ * src/mozilla-plugin/openvrml.cpp
+ (NPP_GetMIMEDescription()): Use model/x3d-vrml instead of
+ model/x3d+vrml.
+
2009-05-28 Braden McDaniel <br...@en...>
Don't propagate an exception if OpenVRML's registry key has not
Modified: trunk/src/mozilla-plugin/openvrml.cpp
===================================================================
--- trunk/src/mozilla-plugin/openvrml.cpp 2009-05-29 03:23:40 UTC (rev 3915)
+++ trunk/src/mozilla-plugin/openvrml.cpp 2009-06-07 06:13:31 UTC (rev 3916)
@@ -391,7 +391,7 @@
char * NPP_GetMIMEDescription()
{
static const char mimeDescription[] =
- "model/x3d+vrml:x3dv:X3D world;"
+ "model/x3d-vrml:x3dv:X3D world;"
"model/vrml:wrl:VRML world;"
"x-world/x-vrml:wrl:VRML world";
return const_cast<char *>(&mimeDescription[0]);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-17 05:30:27
|
Revision: 3917
http://openvrml.svn.sourceforge.net/openvrml/?rev=3917&view=rev
Author: braden
Date: 2009-06-17 05:30:24 +0000 (Wed, 17 Jun 2009)
Log Message:
-----------
Added check for ltdl.h.
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-07 06:13:31 UTC (rev 3916)
+++ trunk/ChangeLog 2009-06-17 05:30:24 UTC (rev 3917)
@@ -1,3 +1,7 @@
+2009-06-17 Braden McDaniel <br...@en...>
+
+ * configure.ac: Added check for ltdl.h.
+
2009-06-07 Braden McDaniel <br...@en...>
* src/mozilla-plugin/openvrml.cpp
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2009-06-07 06:13:31 UTC (rev 3916)
+++ trunk/configure.ac 2009-06-17 05:30:24 UTC (rev 3917)
@@ -87,6 +87,7 @@
# Checks for libraries/headers.
#
ACX_PTHREAD(, [AC_MSG_FAILURE([pthread support not found])])
+AC_CHECK_HEADER([ltdl.h], , [AC_MSG_FAILURE([ltdl.h not found])])
AC_CHECK_HEADER([jni.h], [have_jni=yes])
#
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-17 05:33:26
|
Revision: 3918
http://openvrml.svn.sourceforge.net/openvrml/?rev=3918&view=rev
Author: braden
Date: 2009-06-17 05:33:18 +0000 (Wed, 17 Jun 2009)
Log Message:
-----------
Fixed error message to note missing GtkGLExt rather than just GTK+.
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-17 05:30:24 UTC (rev 3917)
+++ trunk/ChangeLog 2009-06-17 05:33:18 UTC (rev 3918)
@@ -1,5 +1,10 @@
2009-06-17 Braden McDaniel <br...@en...>
+ * configure.ac: Fixed error message to note missing GtkGLExt
+ rather than just GTK+.
+
+2009-06-17 Braden McDaniel <br...@en...>
+
* configure.ac: Added check for ltdl.h.
2009-06-07 Braden McDaniel <br...@en...>
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2009-06-17 05:30:24 UTC (rev 3917)
+++ trunk/configure.ac 2009-06-17 05:33:18 UTC (rev 3918)
@@ -174,7 +174,7 @@
#
PKG_CHECK_MODULES([GTKGL],
[gtkglext-1.0 gtk+-2.0 >= 2.12 gthread-2.0 glib-2.0 >= 2.6], ,
- [have_gtk=no])
+ [have_gtkgl=no])
#
# openvrml-player uses GNOME_PARAM_GOPTION_CONTEXT, which was
# introduced in libgnome 2.14.
@@ -406,8 +406,8 @@
AS_IF([test X$enable_xembed != Xno],
[AS_IF([test X$have_dbus_glib = Xno],
[AC_MSG_FAILURE([D-Bus GLib bindings are required to build the XEmbed control])])
- AS_IF([test X$have_gtk = Xno],
- [AC_MSG_FAILURE([GTK+ is required to build the XEmbed control])])
+ AS_IF([test X$have_gtkgl = Xno],
+ [AC_MSG_FAILURE([GtkGLExt is required to build the XEmbed control])])
AS_IF([test X$enable_gl_renderer = Xno],
[AC_MSG_FAILURE([the XEmbed control cannot be built without the GL renderer])])])
AM_CONDITIONAL([ENABLE_XEMBED], [test X$enable_xembed != Xno])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-18 04:28:05
|
Revision: 3919
http://openvrml.svn.sourceforge.net/openvrml/?rev=3919&view=rev
Author: braden
Date: 2009-06-18 04:26:38 +0000 (Thu, 18 Jun 2009)
Log Message:
-----------
Conditionally apply "const" when using the JNI functions SetFloatArrayRegion and SetDoubleArrayRegion.
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
trunk/src/script/java.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-17 05:33:18 UTC (rev 3918)
+++ trunk/ChangeLog 2009-06-18 04:26:38 UTC (rev 3919)
@@ -1,3 +1,14 @@
+2009-06-18 Braden McDaniel <br...@en...>
+
+ Conditionally apply "const" when using the JNI functions
+ SetFloatArrayRegion and SetDoubleArrayRegion.
+
+ * configure.ac: Check to see whether JNI function signatures use
+ "const".
+ * src/script/java.cpp: Use OPENVRML_JNI_CONST to conditionally
+ apply "const" when using SetFloatArrayRegion and
+ SetDoubleArrayRegion.
+
2009-06-17 Braden McDaniel <br...@en...>
* configure.ac: Fixed error message to note missing GtkGLExt
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2009-06-17 05:33:18 UTC (rev 3918)
+++ trunk/configure.ac 2009-06-18 04:26:38 UTC (rev 3919)
@@ -91,6 +91,25 @@
AC_CHECK_HEADER([jni.h], [have_jni=yes])
#
+# Some jni.h implementations (well, GCJ, at least), don't apply const
+# in function signatures.
+#
+AS_IF([test X$have_jni != Xno],
+ [AC_MSG_CHECKING([if JNI function signatures use const])
+ AC_CACHE_VAL([ov_cv_jni_const],
+[AC_LANG_PUSH([C++])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [#include <jni.h>],
+ [void (*fn)(jfloatArray, jsize, jsize, const jfloat *) = &JNIEnv::SetFloatArrayRegion])],
+ [ov_cv_jni_const=const],
+ [ov_cv_jni_const= ])
+AC_LANG_POP])
+ AS_IF([test -n "$ov_cv_jni_const"],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])])
+])
+
+#
# Allow users to specify any Boost library name suffix
#
AC_ARG_VAR([BOOST_LIB_SUFFIX], [Boost library name suffix])
@@ -365,6 +384,8 @@
AS_IF([test X$enable_script_node_java != Xno],
[AS_IF([test X$have_jni != Xyes],
[AC_MSG_FAILURE([The Java Native Interface is required for Script node Java support.])])
+AC_DEFINE_UNQUOTED([OPENVRML_JNI_CONST], [$ov_cv_jni_const],
+ [const for JNI function signatures.])
AS_IF([test -z "$JAVA_HOME"],
[AC_MSG_WARN([JAVA_HOME has not been set. JAVA_HOME must be set at run time to locate libjvm.])],
[ov_save_LDFLAGS=$LDFLAGS
Modified: trunk/src/script/java.cpp
===================================================================
--- trunk/src/script/java.cpp 2009-06-17 05:33:18 UTC (rev 3918)
+++ trunk/src/script/java.cpp 2009-06-18 04:26:38 UTC (rev 3919)
@@ -4492,20 +4492,22 @@
template <> struct set_array_region_t<jfloat> {
static void (JNIEnv::* const value)(
- array_type<jfloat>::type, jsize, jsize, const jfloat *);
+ array_type<jfloat>::type, jsize, jsize,
+ OPENVRML_JNI_CONST jfloat *);
};
void (JNIEnv::* const set_array_region_t<jfloat>::value)(
- array_type<jfloat>::type, jsize, jsize, const jfloat *) =
+ array_type<jfloat>::type, jsize, jsize, OPENVRML_JNI_CONST jfloat *) =
&JNIEnv::SetFloatArrayRegion;
template <> struct set_array_region_t<jdouble> {
static void (JNIEnv::* const value)(
- array_type<jdouble>::type, jsize, jsize, const jdouble *);
+ array_type<jdouble>::type, jsize, jsize,
+ OPENVRML_JNI_CONST jdouble *);
};
void (JNIEnv::* const set_array_region_t<jdouble>::value)(
- array_type<jdouble>::type, jsize, jsize, const jdouble *) =
+ array_type<jdouble>::type, jsize, jsize, OPENVRML_JNI_CONST jdouble *) =
&JNIEnv::SetDoubleArrayRegion;
template <typename T>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-18 16:10:05
|
Revision: 3921
http://openvrml.svn.sourceforge.net/openvrml/?rev=3921&view=rev
Author: braden
Date: 2009-06-18 16:09:54 +0000 (Thu, 18 Jun 2009)
Log Message:
-----------
Fixed JNI const test.
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-18 05:20:18 UTC (rev 3920)
+++ trunk/ChangeLog 2009-06-18 16:09:54 UTC (rev 3921)
@@ -1,5 +1,9 @@
2009-06-18 Braden McDaniel <br...@en...>
+ * configure.ac: Fixed JNI const test.
+
+2009-06-18 Braden McDaniel <br...@en...>
+
Build the Mozilla plug-in with XULRunner 1.9.1. Removed the NPN_*
function implementations in favor of directly using the function
pointers provided by the browser.
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2009-06-18 05:20:18 UTC (rev 3920)
+++ trunk/configure.ac 2009-06-18 16:09:54 UTC (rev 3921)
@@ -88,19 +88,19 @@
#
ACX_PTHREAD(, [AC_MSG_FAILURE([pthread support not found])])
AC_CHECK_HEADER([ltdl.h], , [AC_MSG_FAILURE([ltdl.h not found])])
-AC_CHECK_HEADER([jni.h], [have_jni=yes])
+AC_CHECK_HEADER([jni.h], [have_jni=yes], [have_jni=no])
#
# Some jni.h implementations (well, GCJ, at least), don't apply const
# in function signatures.
#
-AS_IF([test X$have_jni != Xno],
+AS_IF([test X$have_jni = Xyes],
[AC_MSG_CHECKING([if JNI function signatures use const])
AC_CACHE_VAL([ov_cv_jni_const],
[AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[#include <jni.h>],
- [void (*fn)(jfloatArray, jsize, jsize, const jfloat *) = &JNIEnv::SetFloatArrayRegion])],
+ [void (JNIEnv::*fn)(jfloatArray, jsize, jsize, const jfloat *) = &JNIEnv::SetFloatArrayRegion])],
[ov_cv_jni_const=const],
[ov_cv_jni_const= ])
AC_LANG_POP])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-19 12:29:43
|
Revision: 3920
http://openvrml.svn.sourceforge.net/openvrml/?rev=3920&view=rev
Author: braden
Date: 2009-06-18 05:20:18 +0000 (Thu, 18 Jun 2009)
Log Message:
-----------
Build the Mozilla plug-in with XULRunner 1.9.1. Removed the NPN_* function implementations in favor of directly using the function pointers provided by the browser.
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
trunk/src/mozilla-plugin/openvrml.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-18 04:26:38 UTC (rev 3919)
+++ trunk/ChangeLog 2009-06-18 05:20:18 UTC (rev 3920)
@@ -1,5 +1,70 @@
2009-06-18 Braden McDaniel <br...@en...>
+ Build the Mozilla plug-in with XULRunner 1.9.1. Removed the NPN_*
+ function implementations in favor of directly using the function
+ pointers provided by the browser.
+
+ * configure.ac: Require mozilla-plugin.pc version 1.9.1.
+ * src/mozilla-plugin/openvrml.cpp
+ (openvrml_np_browser_host_get_url(OpenvrmlNpBrowserHost *, const
+ char *, GError **)): Call mozillaFuncs.geturl directly.
+ (NP_Initialize(NPNetscapeFuncs *, NPPluginFuncs *)): Call
+ mozillaFuncs.getvalue directly.
+ (NPP_GetValue(NPP, NPPVariable, void *)): Call
+ mozillaFuncs.retainobject directly.
+ (NPN_Version(int *, int *, int *, int *)): Removed.
+ (NPN_GetURLNotify(NPP, const char *, const char *, void *)):
+ Removed.
+ (NPN_GetURL(NPP, const char *, const char *)): Removed.
+ (NPN_PostURLNotify(NPP, const char *, const char *, uint32, const
+ char *, NPBool, void *)): Removed.
+ (NPN_PostURL(NPP, const char *, const char *, uint32, const
+ char *, NPBool)): Removed.
+ (NPN_RequestRead(NPStream *, NPByteRange *)): Removed.
+ (NPN_NewStream(NPP, NPMIMEType, const char *, NPStream **)):
+ Removed.
+ (NPN_Write(NPP, NPStream *, int32, void *)): Removed.
+ (NPN_DestryStream(NPP, NPStream *, NPError)): Removed.
+ (NPN_Status(NPP, const char *)): Removed.
+ (NPN_UserAgent(NPP)): Removed.
+ (NPN_MemAlloc(uint32)): Removed.
+ (NPN_MemFree(void *)): Removed.
+ (NPN_MemFlush(uint32)): Removed.
+ (NPN_ReloadPlugins(NPBool)): Removed.
+ (NPN_GetJavaEnv()): Removed.
+ (NPN_GetJavaPeer(NPP)): Removed.
+ (NPN_GetValue(NPP, NPNVariable, void *)): Removed.
+ (NPN_SetValue(NPP, NPPVariable, void *)): Removed.
+ (NPN_InvalidateRect(NPP, NPRect *)): Removed.
+ (NPN_InvalidateRegion(NPP, NPRegion)): Removed.
+ (NPN_ForceRedraw(NPP)): Removed.
+ (NPN_ReleaseVariantValue(NPVariant *)): Removed.
+ (NPN_GetStringIdentifier(const NPUTF8 *)): Removed.
+ (NPN_GetStringIdentifiers(const NPUTF8 **, int32_t,
+ NPIdentifier *)): Removed.
+ (NPN_GetIdentifier(int32_t)): Removed.
+ (NPN_IdentifierIsString(NPIdentifier *)): Removed.
+ (NPN_UTF8FromIdentifier(NPIdentifier)): Removed.
+ (NPN_IntFromIdentifier(NPIdentifier)): Removed.
+ (NPN_CreateObject(NPP, NPClass *)): Removed.
+ (NPN_RetainObject(NPObject *)): Removed.
+ (NPN_ReleaseObject(NPObject *)): Removed.
+ (NPN_Invoke(NPP, NPObject *, NPIdentifier, const NPVariant *,
+ uint32_t, NPVariant *)): Removed.
+ (NPN_InvokeDefault(NPP, NPObject *, const NPVariant *, uint32_t,
+ NPVariant *)): Removed.
+ (NPN_Evaluate(NPP, NPObject *, NPString *, NPVariant *)): Removed.
+ (NPN_GetProperty(NPP, NPObject *, NPIdentifier, NPVariant *)):
+ Removed.
+ (NPN_SetProperty(NPP, NPObject *, NPIdentifier, const
+ NPVariant *)): Removed.
+ (NPN_RemoveProperty(NPP, NPObject *, NPIdentifier)): Removed.
+ (NPN_HasProperty(NPP, NPObject *, NPIdentifier)): Removed.
+ (NPN_HasMethod(NPP, NPObject *, NPIdentifier)): Removed.
+ (NPN_SetException(NPObject *, const NPUTF8 *)): Removed.
+
+2009-06-18 Braden McDaniel <br...@en...>
+
Conditionally apply "const" when using the JNI functions
SetFloatArrayRegion and SetDoubleArrayRegion.
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2009-06-18 04:26:38 UTC (rev 3919)
+++ trunk/configure.ac 2009-06-18 05:20:18 UTC (rev 3920)
@@ -201,15 +201,13 @@
PKG_CHECK_MODULES([GNOMEUI], [libgnomeui-2.0 libgnome-2.0 >= 2.14], ,
[have_gnomeui=no])
PKG_CHECK_MODULES([CURL], [libcurl], , [have_libcurl=no])
-PKG_CHECK_MODULES([MOZILLA_PLUGIN], [xulrunner-plugin],
- [mozilla_plugin_pkg=xulrunner-plugin],
- [PKG_CHECK_MODULES([MOZILLA_PLUGIN], [firefox-plugin],
- [mozilla_plugin_pkg=firefox-plugin],
- [PKG_CHECK_MODULES([MOZILLA_PLUGIN], [seamonkey-plugin],
- [mozilla_plugin_pkg=seamonkey-plugin],
- [PKG_CHECK_MODULES([MOZILLA_PLUGIN], [mozilla-plugin >= 1.6],
- [mozilla_plugin_pkg=mozilla-plugin],
- [have_mozilla_plugin=no])])])])
+#
+# The Mozilla plug-in uses the npfunctions.h header introduced in
+# XULRunner 1.9.1.
+#
+PKG_CHECK_MODULES([MOZILLA_PLUGIN], [mozilla-plugin >= 1.9.1],
+ [have_mozilla_plugin=yes],
+ [have_mozilla_plugin=no])
AC_PATH_XTRA
AX_CHECK_GLU
@@ -460,7 +458,7 @@
AS_IF([test X$enable_mozilla_plugin != Xno],
[AS_IF([test X$enable_xembed = Xno],
[AC_MSG_FAILURE([the Mozilla plug-in cannot be built without the XEmbed control])])
- AS_IF([test "X$have_mozilla_plugin" = "Xno"],
+ AS_IF([test X$have_mozilla_plugin = Xno],
[AC_MSG_FAILURE([Mozilla plug-in development headers are required to build the Mozilla plug-in.])])
AS_IF([test "X$have_dbus_glib" = "Xno"],
[AC_MSG_FAILURE([The D-Bus GLib binding is required to build the Mozilla plug-in])])])
Modified: trunk/src/mozilla-plugin/openvrml.cpp
===================================================================
--- trunk/src/mozilla-plugin/openvrml.cpp 2009-06-18 04:26:38 UTC (rev 3919)
+++ trunk/src/mozilla-plugin/openvrml.cpp 2009-06-18 05:20:18 UTC (rev 3920)
@@ -31,7 +31,7 @@
# include <boost/noncopyable.hpp>
# include <boost/ref.hpp>
# include <boost/scoped_ptr.hpp>
-# include <npupp.h>
+# include <npfunctions.h>
# if defined MOZ_X11
# include <dbus/dbus-glib-bindings.h>
# else
@@ -149,6 +149,8 @@
}
namespace {
+ NPNetscapeFuncs mozillaFuncs;
+
enum np_host_signal_id {
shutdown_id,
last_signal_id
@@ -207,7 +209,7 @@
const char * const url,
GError ** /* error */)
{
- return NPN_GetURL(host->npp, url, 0);
+ return mozillaFuncs.geturl(host->npp, url, 0);
}
void openvrml_np_browser_host_set_world_url(OpenvrmlNpBrowserHost * /* host */,
@@ -221,10 +223,6 @@
return NPP_GetMIMEDescription();
}
-namespace {
- NPNetscapeFuncs mozillaFuncs;
-}
-
/**
* @brief Provides global initialization for a plug-in.
*
@@ -340,10 +338,7 @@
// Make sure the browser supports XEmbed plug-ins.
//
PRBool supportsXEmbed = PR_FALSE;
- err = CallNPN_GetValueProc(mozillaFuncs.getvalue,
- 0,
- NPNVSupportsXEmbedBool,
- &supportsXEmbed);
+ err = mozillaFuncs.getvalue(0, NPNVSupportsXEmbedBool, &supportsXEmbed);
if (err != NPERR_NO_ERROR || !supportsXEmbed) {
return NPERR_INCOMPATIBLE_VERSION_ERROR;
@@ -353,10 +348,7 @@
// Make sure the browser tookit is Gtk2.
//
NPNToolkitType toolkit = NPNToolkitType();
- err = CallNPN_GetValueProc(mozillaFuncs.getvalue,
- 0,
- NPNVToolkit,
- &toolkit);
+ err = mozillaFuncs.getvalue(0, NPNVToolkit, &toolkit);
if (err != NPERR_NO_ERROR || toolkit != NPNVGtk2) {
return NPERR_INCOMPATIBLE_VERSION_ERROR;
@@ -692,7 +684,7 @@
case NPPVpluginScriptableNPObject:
assert(npp->pdata);
instance = static_cast<plugin_instance *>(npp->pdata);
- NPN_RetainObject(instance->npobj);
+ mozillaFuncs.retainobject(instance->npobj);
*static_cast<NPObject **>(value) = instance->npobj;
break;
default:
@@ -706,307 +698,6 @@
return NPERR_NO_ERROR;
}
-void NPN_Version(int * plugin_major,
- int * plugin_minor,
- int * mozilla_major,
- int * mozilla_minor)
-{
- *plugin_major = NP_VERSION_MAJOR;
- *plugin_minor = NP_VERSION_MINOR;
- *mozilla_major = mozillaFuncs.version >> 8;
- *mozilla_minor = mozillaFuncs.version & 0xff;
-}
-
-NPError NPN_GetURLNotify(NPP instance,
- const char * url,
- const char * target,
- void * notifyData)
-{
- const int navMinorVers = mozillaFuncs.version & 0xFF;
- return (navMinorVers >= NPVERS_HAS_NOTIFICATION)
- ? CallNPN_GetURLNotifyProc(mozillaFuncs.geturlnotify,
- instance,
- url,
- target,
- notifyData)
- : NPERR_INCOMPATIBLE_VERSION_ERROR;
-}
-
-NPError NPN_GetURL(NPP instance, const char * url, const char * target)
-{
- return CallNPN_GetURLProc(mozillaFuncs.geturl, instance, url, target);
-}
-
-NPError NPN_PostURLNotify(NPP instance,
- const char * url,
- const char * window,
- uint32 len,
- const char * buf,
- NPBool file,
- void * notifyData)
-{
- const int navMinorVers = mozillaFuncs.version & 0xFF;
- return (navMinorVers >= NPVERS_HAS_NOTIFICATION)
- ? CallNPN_PostURLNotifyProc(mozillaFuncs.posturlnotify,
- instance,
- url,
- window,
- len,
- buf,
- file,
- notifyData)
- : NPERR_INCOMPATIBLE_VERSION_ERROR;
-}
-
-NPError NPN_PostURL(NPP instance,
- const char * url,
- const char * window,
- uint32 len,
- const char * buf,
- NPBool file)
-{
- return CallNPN_PostURLProc(mozillaFuncs.posturl,
- instance,
- url,
- window,
- len,
- buf,
- file);
-}
-
-NPError NPN_RequestRead(NPStream * stream, NPByteRange * rangeList)
-{
- return CallNPN_RequestReadProc(mozillaFuncs.requestread,
- stream,
- rangeList);
-}
-
-NPError NPN_NewStream(NPP instance,
- NPMIMEType type,
- const char * target,
- NPStream ** stream)
-{
- const int navMinorVersion = mozillaFuncs.version & 0xFF;
- return (navMinorVersion >= NPVERS_HAS_STREAMOUTPUT)
- ? CallNPN_NewStreamProc(mozillaFuncs.newstream,
- instance,
- type,
- target,
- stream)
- : NPERR_INCOMPATIBLE_VERSION_ERROR;
-}
-
-int32 NPN_Write(NPP instance, NPStream * stream, int32 len, void * buffer)
-{
- const int navMinorVersion = mozillaFuncs.version & 0xFF;
- return (navMinorVersion >= NPVERS_HAS_STREAMOUTPUT)
- ? CallNPN_WriteProc(mozillaFuncs.write, instance, stream, len, buffer)
- : -1;
-}
-
-NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason)
-{
- const int navMinorVersion = mozillaFuncs.version & 0xFF;
- return (navMinorVersion >= NPVERS_HAS_STREAMOUTPUT)
- ? CallNPN_DestroyStreamProc(mozillaFuncs.destroystream,
- instance,
- stream,
- reason)
- : NPERR_INCOMPATIBLE_VERSION_ERROR;
-}
-
-void NPN_Status(NPP instance, const char * message)
-{
- CallNPN_StatusProc(mozillaFuncs.status, instance, message);
-}
-
-const char * NPN_UserAgent(NPP instance)
-{
- return CallNPN_UserAgentProc(mozillaFuncs.uagent, instance);
-}
-
-void * NPN_MemAlloc(uint32 size)
-{
- return CallNPN_MemAllocProc(mozillaFuncs.memalloc, size);
-}
-
-void NPN_MemFree(void * ptr)
-{
- CallNPN_MemFreeProc(mozillaFuncs.memfree, ptr);
-}
-
-uint32 NPN_MemFlush(uint32 size)
-{
- return CallNPN_MemFlushProc(mozillaFuncs.memflush, size);
-}
-
-void NPN_ReloadPlugins(NPBool reloadPages)
-{
- CallNPN_ReloadPluginsProc(mozillaFuncs.reloadplugins, reloadPages);
-}
-
-JRIEnv * NPN_GetJavaEnv()
-{
- return CallNPN_GetJavaEnvProc(mozillaFuncs.getJavaEnv);
-}
-
-jref NPN_GetJavaPeer(NPP instance)
-{
- return CallNPN_GetJavaPeerProc(mozillaFuncs.getJavaPeer, instance);
-}
-
-NPError NPN_GetValue(NPP instance, NPNVariable variable, void * value)
-{
- return CallNPN_GetValueProc(mozillaFuncs.getvalue,
- instance,
- variable,
- value);
-}
-
-NPError NPN_SetValue(NPP instance, NPPVariable variable, void * value)
-{
- return CallNPN_SetValueProc(mozillaFuncs.setvalue,
- instance,
- variable,
- value);
-}
-
-void NPN_InvalidateRect(NPP instance, NPRect * invalidRect)
-{
- CallNPN_InvalidateRectProc(mozillaFuncs.invalidaterect,
- instance,
- invalidRect);
-}
-
-void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion)
-{
- CallNPN_InvalidateRegionProc(mozillaFuncs.invalidateregion,
- instance,
- invalidRegion);
-}
-
-void NPN_ForceRedraw(NPP instance)
-{
- CallNPN_ForceRedrawProc(mozillaFuncs.forceredraw, instance);
-}
-
-void NPN_ReleaseVariantValue(NPVariant * variant)
-{
- CallNPN_ReleaseVariantValueProc(mozillaFuncs.releasevariantvalue, variant);
-}
-
-NPIdentifier NPN_GetStringIdentifier(const NPUTF8 * name)
-{
- return CallNPN_GetStringIdentifierProc(mozillaFuncs.getstringidentifier,
- name);
-}
-
-void NPN_GetStringIdentifiers(const NPUTF8 ** names,
- int32_t nameCount,
- NPIdentifier * identifiers)
-{
- CallNPN_GetStringIdentifiersProc(mozillaFuncs.getstringidentifiers,
- names,
- nameCount,
- identifiers);
-}
-
-NPIdentifier NPN_GetIntIdentifier(int32_t intid)
-{
- return CallNPN_GetIntIdentifierProc(mozillaFuncs.getintidentifier, intid);
-}
-
-bool NPN_IdentifierIsString(NPIdentifier * identifier)
-{
- return CallNPN_IdentifierIsStringProc(mozillaFuncs.identifierisstring,
- identifier);
-}
-
-NPUTF8 * NPN_UTF8FromIdentifier(NPIdentifier identifier)
-{
- return CallNPN_UTF8FromIdentifierProc(mozillaFuncs.utf8fromidentifier,
- identifier);
-}
-
-int32_t NPN_IntFromIdentifier(NPIdentifier identifier)
-{
- return CallNPN_IntFromIdentifierProc(mozillaFuncs.intfromidentifier,
- identifier);
-}
-
-NPObject * NPN_CreateObject(NPP npp, NPClass * aClass)
-{
- return CallNPN_CreateObjectProc(mozillaFuncs.createobject, npp, aClass);
-}
-
-NPObject * NPN_RetainObject(NPObject * npobj)
-{
- return CallNPN_RetainObjectProc(mozillaFuncs.retainobject, npobj);
-}
-
-void NPN_ReleaseObject(NPObject * npobj)
-{
- CallNPN_ReleaseObjectProc(mozillaFuncs.releaseobject, npobj);
-}
-
-bool NPN_Invoke(NPP npp, NPObject * npobj, NPIdentifier methodName,
- const NPVariant * args, uint32_t argCount, NPVariant * result)
-{
- return CallNPN_InvokeProc(mozillaFuncs.invoke,
- npp, npobj, methodName, args, argCount, result);
-}
-
-bool NPN_InvokeDefault(NPP npp, NPObject * npobj, const NPVariant * args,
- uint32_t argCount, NPVariant * result)
-{
- return CallNPN_InvokeDefaultProc(mozillaFuncs.invokeDefault,
- npp, npobj, args, argCount, result);
-}
-
-bool NPN_Evaluate(NPP npp, NPObject * npobj, NPString * script,
- NPVariant * result)
-{
- return CallNPN_EvaluateProc(mozillaFuncs.evaluate, npp, npobj, script,
- result);
-}
-
-bool NPN_GetProperty(NPP npp, NPObject * npobj, NPIdentifier propertyName,
- NPVariant * result)
-{
- return CallNPN_GetPropertyProc(mozillaFuncs.getproperty,
- npp, npobj, propertyName, result);
-}
-
-bool NPN_SetProperty(NPP npp, NPObject * npobj, NPIdentifier propertyName,
- const NPVariant * result)
-{
- return CallNPN_SetPropertyProc(mozillaFuncs.setproperty,
- npp, npobj, propertyName, result);
-}
-
-bool NPN_RemoveProperty(NPP npp, NPObject * npobj, NPIdentifier propertyName)
-{
- return CallNPN_RemovePropertyProc(mozillaFuncs.removeproperty,
- npp, npobj, propertyName);
-}
-
-bool NPN_HasProperty(NPP npp, NPObject * npobj, NPIdentifier propertyName)
-{
- return CallNPN_HasPropertyProc(mozillaFuncs.hasproperty,
- npp, npobj, propertyName);
-}
-
-bool NPN_HasMethod(NPP npp, NPObject * npobj, NPIdentifier methodName)
-{
- return CallNPN_HasMethodProc(mozillaFuncs.hasmethod,
- npp, npobj, methodName);
-}
-
-void NPN_SetException(NPObject * npobj, const NPUTF8 * message)
-{
- return CallNPN_SetExceptionProc(mozillaFuncs.setexception, npobj, message);
-}
-
namespace {
boost::scoped_ptr<const script_callback_map> script_callback_map::instance_;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-22 01:14:13
|
Revision: 3922
http://openvrml.svn.sourceforge.net/openvrml/?rev=3922&view=rev
Author: braden
Date: 2009-06-22 01:14:04 +0000 (Mon, 22 Jun 2009)
Log Message:
-----------
The Web browser still wants the plug-in to have the NPN_* entry points.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/mozilla-plugin/openvrml.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-18 16:09:54 UTC (rev 3921)
+++ trunk/ChangeLog 2009-06-22 01:14:04 UTC (rev 3922)
@@ -1,3 +1,60 @@
+2009-06-21 Braden McDaniel <br...@en...>
+
+ The Web browser still wants the plug-in to have the NPN_* entry
+ points.
+
+ * src/mozilla-plugin/openvrml.cpp
+ (NPN_Version(int *, int *, int *, int *)): Replaced.
+ (NPN_GetURLNotify(NPP, const char *, const char *, void *)):
+ Replaced.
+ (NPN_GetURL(NPP, const char *, const char *)): Replaced.
+ (NPN_PostURLNotify(NPP, const char *, const char *, uint32, const
+ char *, NPBool, void *)): Replaced.
+ (NPN_PostURL(NPP, const char *, const char *, uint32, const
+ char *, NPBool)): Replaced.
+ (NPN_RequestRead(NPStream *, NPByteRange *)): Replaced.
+ (NPN_NewStream(NPP, NPMIMEType, const char *, NPStream **)):
+ Replaced.
+ (NPN_Write(NPP, NPStream *, int32, void *)): Replaced.
+ (NPN_DestryStream(NPP, NPStream *, NPError)): Replaced.
+ (NPN_Status(NPP, const char *)): Replaced.
+ (NPN_UserAgent(NPP)): Replaced.
+ (NPN_MemAlloc(uint32)): Replaced.
+ (NPN_MemFree(void *)): Replaced.
+ (NPN_MemFlush(uint32)): Replaced.
+ (NPN_ReloadPlugins(NPBool)): Replaced.
+ (NPN_GetJavaEnv()): Replaced.
+ (NPN_GetJavaPeer(NPP)): Replaced.
+ (NPN_GetValue(NPP, NPNVariable, void *)): Replaced.
+ (NPN_SetValue(NPP, NPPVariable, void *)): Replaced.
+ (NPN_InvalidateRect(NPP, NPRect *)): Replaced.
+ (NPN_InvalidateRegion(NPP, NPRegion)): Replaced.
+ (NPN_ForceRedraw(NPP)): Replaced.
+ (NPN_ReleaseVariantValue(NPVariant *)): Replaced.
+ (NPN_GetStringIdentifier(const NPUTF8 *)): Replaced.
+ (NPN_GetStringIdentifiers(const NPUTF8 **, int32_t,
+ NPIdentifier *)): Replaced.
+ (NPN_GetIdentifier(int32_t)): Replaced.
+ (NPN_IdentifierIsString(NPIdentifier *)): Replaced.
+ (NPN_UTF8FromIdentifier(NPIdentifier)): Replaced.
+ (NPN_IntFromIdentifier(NPIdentifier)): Replaced.
+ (NPN_CreateObject(NPP, NPClass *)): Replaced.
+ (NPN_RetainObject(NPObject *)): Replaced.
+ (NPN_ReleaseObject(NPObject *)): Replaced.
+ (NPN_Invoke(NPP, NPObject *, NPIdentifier, const NPVariant *,
+ uint32_t, NPVariant *)): Replaced.
+ (NPN_InvokeDefault(NPP, NPObject *, const NPVariant *, uint32_t,
+ NPVariant *)): Replaced.
+ (NPN_Evaluate(NPP, NPObject *, NPString *, NPVariant *)): Replaced.
+ (NPN_GetProperty(NPP, NPObject *, NPIdentifier, NPVariant *)):
+ Replaced.
+ (NPN_SetProperty(NPP, NPObject *, NPIdentifier, const
+ NPVariant *)): Replaced.
+ (NPN_RemoveProperty(NPP, NPObject *, NPIdentifier)): Replaced.
+ (NPN_HasProperty(NPP, NPObject *, NPIdentifier)): Replaced.
+ (NPN_HasMethod(NPP, NPObject *, NPIdentifier)): Replaced.
+ (NPN_SetException(NPObject *, const NPUTF8 *)): Replaced.
+
2009-06-18 Braden McDaniel <br...@en...>
* configure.ac: Fixed JNI const test.
Modified: trunk/src/mozilla-plugin/openvrml.cpp
===================================================================
--- trunk/src/mozilla-plugin/openvrml.cpp 2009-06-18 16:09:54 UTC (rev 3921)
+++ trunk/src/mozilla-plugin/openvrml.cpp 2009-06-22 01:14:04 UTC (rev 3922)
@@ -149,8 +149,6 @@
}
namespace {
- NPNetscapeFuncs mozillaFuncs;
-
enum np_host_signal_id {
shutdown_id,
last_signal_id
@@ -209,7 +207,7 @@
const char * const url,
GError ** /* error */)
{
- return mozillaFuncs.geturl(host->npp, url, 0);
+ return NPN_GetURL(host->npp, url, 0);
}
void openvrml_np_browser_host_set_world_url(OpenvrmlNpBrowserHost * /* host */,
@@ -223,6 +221,10 @@
return NPP_GetMIMEDescription();
}
+namespace {
+ NPNetscapeFuncs mozillaFuncs;
+}
+
/**
* @brief Provides global initialization for a plug-in.
*
@@ -338,7 +340,7 @@
// Make sure the browser supports XEmbed plug-ins.
//
PRBool supportsXEmbed = PR_FALSE;
- err = mozillaFuncs.getvalue(0, NPNVSupportsXEmbedBool, &supportsXEmbed);
+ err = NPN_GetValue(0, NPNVSupportsXEmbedBool, &supportsXEmbed);
if (err != NPERR_NO_ERROR || !supportsXEmbed) {
return NPERR_INCOMPATIBLE_VERSION_ERROR;
@@ -348,7 +350,7 @@
// Make sure the browser tookit is Gtk2.
//
NPNToolkitType toolkit = NPNToolkitType();
- err = mozillaFuncs.getvalue(0, NPNVToolkit, &toolkit);
+ err = NPN_GetValue(0, NPNVToolkit, &toolkit);
if (err != NPERR_NO_ERROR || toolkit != NPNVGtk2) {
return NPERR_INCOMPATIBLE_VERSION_ERROR;
@@ -684,7 +686,7 @@
case NPPVpluginScriptableNPObject:
assert(npp->pdata);
instance = static_cast<plugin_instance *>(npp->pdata);
- mozillaFuncs.retainobject(instance->npobj);
+ NPN_RetainObject(instance->npobj);
*static_cast<NPObject **>(value) = instance->npobj;
break;
default:
@@ -698,6 +700,262 @@
return NPERR_NO_ERROR;
}
+void NPN_Version(int * plugin_major,
+ int * plugin_minor,
+ int * mozilla_major,
+ int * mozilla_minor)
+{
+ *plugin_major = NP_VERSION_MAJOR;
+ *plugin_minor = NP_VERSION_MINOR;
+ *mozilla_major = mozillaFuncs.version >> 8;
+ *mozilla_minor = mozillaFuncs.version & 0xff;
+}
+
+NPError NPN_GetURLNotify(NPP instance,
+ const char * url,
+ const char * target,
+ void * notifyData)
+{
+ const int navMinorVers = mozillaFuncs.version & 0xFF;
+ return (navMinorVers >= NPVERS_HAS_NOTIFICATION)
+ ? mozillaFuncs.geturlnotify(instance, url, target, notifyData)
+ : NPERR_INCOMPATIBLE_VERSION_ERROR;
+}
+
+NPError NPN_GetURL(NPP instance, const char * url, const char * target)
+{
+ return mozillaFuncs.geturl(instance, url, target);
+}
+
+NPError NPN_PostURLNotify(NPP instance,
+ const char * url,
+ const char * window,
+ uint32 len,
+ const char * buf,
+ NPBool file,
+ void * notifyData)
+{
+ const int navMinorVers = mozillaFuncs.version & 0xFF;
+ return (navMinorVers >= NPVERS_HAS_NOTIFICATION)
+ ? mozillaFuncs.posturlnotify(instance,
+ url,
+ window,
+ len,
+ buf,
+ file,
+ notifyData)
+ : NPERR_INCOMPATIBLE_VERSION_ERROR;
+}
+
+NPError NPN_PostURL(NPP instance,
+ const char * url,
+ const char * window,
+ uint32 len,
+ const char * buf,
+ NPBool file)
+{
+ return mozillaFuncs.posturl(instance, url, window, len, buf, file);
+}
+
+NPError NPN_RequestRead(NPStream * stream, NPByteRange * rangeList)
+{
+ return mozillaFuncs.requestread(stream, rangeList);
+}
+
+NPError NPN_NewStream(NPP instance,
+ NPMIMEType type,
+ const char * target,
+ NPStream ** stream)
+{
+ const int navMinorVersion = mozillaFuncs.version & 0xFF;
+ return (navMinorVersion >= NPVERS_HAS_STREAMOUTPUT)
+ ? mozillaFuncs.newstream(instance, type, target, stream)
+ : NPERR_INCOMPATIBLE_VERSION_ERROR;
+}
+
+int32 NPN_Write(NPP instance, NPStream * stream, int32 len, void * buffer)
+{
+ const int navMinorVersion = mozillaFuncs.version & 0xFF;
+ return (navMinorVersion >= NPVERS_HAS_STREAMOUTPUT)
+ ? mozillaFuncs.write(instance, stream, len, buffer)
+ : -1;
+}
+
+NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason)
+{
+ const int navMinorVersion = mozillaFuncs.version & 0xFF;
+ return (navMinorVersion >= NPVERS_HAS_STREAMOUTPUT)
+ ? mozillaFuncs.destroystream(instance, stream, reason)
+ : NPERR_INCOMPATIBLE_VERSION_ERROR;
+}
+
+void NPN_Status(NPP instance, const char * message)
+{
+ mozillaFuncs.status(instance, message);
+}
+
+const char * NPN_UserAgent(NPP instance)
+{
+ return mozillaFuncs.uagent(instance);
+}
+
+void * NPN_MemAlloc(uint32 size)
+{
+ return mozillaFuncs.memalloc(size);
+}
+
+void NPN_MemFree(void * ptr)
+{
+ mozillaFuncs.memfree(ptr);
+}
+
+uint32 NPN_MemFlush(uint32 size)
+{
+ return mozillaFuncs.memflush(size);
+}
+
+void NPN_ReloadPlugins(NPBool reloadPages)
+{
+ mozillaFuncs.reloadplugins(reloadPages);
+}
+
+JRIEnv * NPN_GetJavaEnv()
+{
+ return static_cast<JRIEnv *>(mozillaFuncs.getJavaEnv());
+}
+
+jref NPN_GetJavaPeer(NPP instance)
+{
+ return static_cast<jref>(mozillaFuncs.getJavaPeer(instance));
+}
+
+NPError NPN_GetValue(NPP instance, NPNVariable variable, void * value)
+{
+ return mozillaFuncs.getvalue(instance, variable, value);
+}
+
+NPError NPN_SetValue(NPP instance, NPPVariable variable, void * value)
+{
+ return mozillaFuncs.setvalue(instance, variable, value);
+}
+
+void NPN_InvalidateRect(NPP instance, NPRect * invalidRect)
+{
+ mozillaFuncs.invalidaterect(instance, invalidRect);
+}
+
+void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion)
+{
+ mozillaFuncs.invalidateregion(instance, invalidRegion);
+}
+
+void NPN_ForceRedraw(NPP instance)
+{
+ mozillaFuncs.forceredraw(instance);
+}
+
+void NPN_ReleaseVariantValue(NPVariant * variant)
+{
+ mozillaFuncs.releasevariantvalue(variant);
+}
+
+NPIdentifier NPN_GetStringIdentifier(const NPUTF8 * name)
+{
+ return mozillaFuncs.getstringidentifier(name);
+}
+
+void NPN_GetStringIdentifiers(const NPUTF8 ** names,
+ int32_t nameCount,
+ NPIdentifier * identifiers)
+{
+ mozillaFuncs.getstringidentifiers(names, nameCount, identifiers);
+}
+
+NPIdentifier NPN_GetIntIdentifier(int32_t intid)
+{
+ return mozillaFuncs.getintidentifier(intid);
+}
+
+bool NPN_IdentifierIsString(NPIdentifier * identifier)
+{
+ return mozillaFuncs.identifierisstring(identifier);
+}
+
+NPUTF8 * NPN_UTF8FromIdentifier(NPIdentifier identifier)
+{
+ return mozillaFuncs.utf8fromidentifier(identifier);
+}
+
+int32_t NPN_IntFromIdentifier(NPIdentifier identifier)
+{
+ return mozillaFuncs.intfromidentifier(identifier);
+}
+
+NPObject * NPN_CreateObject(NPP npp, NPClass * aClass)
+{
+ return mozillaFuncs.createobject(npp, aClass);
+}
+
+NPObject * NPN_RetainObject(NPObject * npobj)
+{
+ return mozillaFuncs.retainobject(npobj);
+}
+
+void NPN_ReleaseObject(NPObject * npobj)
+{
+ mozillaFuncs.releaseobject(npobj);
+}
+
+bool NPN_Invoke(NPP npp, NPObject * npobj, NPIdentifier methodName,
+ const NPVariant * args, uint32_t argCount, NPVariant * result)
+{
+ return mozillaFuncs.invoke(npp, npobj, methodName, args, argCount, result);
+}
+
+bool NPN_InvokeDefault(NPP npp, NPObject * npobj, const NPVariant * args,
+ uint32_t argCount, NPVariant * result)
+{
+ return mozillaFuncs.invokeDefault(npp, npobj, args, argCount, result);
+}
+
+bool NPN_Evaluate(NPP npp, NPObject * npobj, NPString * script,
+ NPVariant * result)
+{
+ return mozillaFuncs.evaluate(npp, npobj, script, result);
+}
+
+bool NPN_GetProperty(NPP npp, NPObject * npobj, NPIdentifier propertyName,
+ NPVariant * result)
+{
+ return mozillaFuncs.getproperty(npp, npobj, propertyName, result);
+}
+
+bool NPN_SetProperty(NPP npp, NPObject * npobj, NPIdentifier propertyName,
+ const NPVariant * result)
+{
+ return mozillaFuncs.setproperty(npp, npobj, propertyName, result);
+}
+
+bool NPN_RemoveProperty(NPP npp, NPObject * npobj, NPIdentifier propertyName)
+{
+ return mozillaFuncs.removeproperty(npp, npobj, propertyName);
+}
+
+bool NPN_HasProperty(NPP npp, NPObject * npobj, NPIdentifier propertyName)
+{
+ return mozillaFuncs.hasproperty(npp, npobj, propertyName);
+}
+
+bool NPN_HasMethod(NPP npp, NPObject * npobj, NPIdentifier methodName)
+{
+ return mozillaFuncs.hasmethod(npp, npobj, methodName);
+}
+
+void NPN_SetException(NPObject * npobj, const NPUTF8 * message)
+{
+ return mozillaFuncs.setexception(npobj, message);
+}
+
namespace {
boost::scoped_ptr<const script_callback_map> script_callback_map::instance_;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-22 06:25:01
|
Revision: 3923
http://openvrml.svn.sourceforge.net/openvrml/?rev=3923&view=rev
Author: braden
Date: 2009-06-22 06:24:57 +0000 (Mon, 22 Jun 2009)
Log Message:
-----------
Use boost::shared_mutex instead of openvrml::read_write_mutex.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/Makefile.am
trunk/src/libopenvrml/openvrml/browser.cpp
trunk/src/libopenvrml/openvrml/browser.h
trunk/src/libopenvrml/openvrml/event.cpp
trunk/src/libopenvrml/openvrml/event.h
trunk/src/libopenvrml/openvrml/field_value.cpp
trunk/src/libopenvrml/openvrml/field_value.h
trunk/src/libopenvrml/openvrml/local/node_metatype_registry_impl.cpp
trunk/src/libopenvrml/openvrml/local/node_metatype_registry_impl.h
trunk/src/libopenvrml/openvrml/node.cpp
trunk/src/libopenvrml/openvrml/node.h
trunk/src/libopenvrml/openvrml/scene.cpp
trunk/src/libopenvrml/openvrml/scene.h
trunk/src/libopenvrml-control/openvrml_control/browser.cpp
trunk/src/libopenvrml-control/openvrml_control/browser.h
trunk/src/node/vrml97/image_stream_listener.cpp
trunk/src/node/vrml97/image_stream_listener.h
trunk/src/node/vrml97/image_texture.cpp
Removed Paths:
-------------
trunk/src/libopenvrml/openvrml/read_write_mutex.cpp
trunk/src/libopenvrml/openvrml/read_write_mutex.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-22 01:14:04 UTC (rev 3922)
+++ trunk/ChangeLog 2009-06-22 06:24:57 UTC (rev 3923)
@@ -1,3 +1,30 @@
+2009-06-22 Braden McDaniel <br...@en...>
+
+ Use boost::shared_mutex instead of openvrml::read_write_mutex.
+
+ * src/Makefile.am
+ (openvrml_include_HEADERS): Removed read_write_mutex.h.
+ (libopenvrml_libopenvrml_la_SOURCES): Removed read_write_mutex.cpp.
+ * src/libopenvrml/openvrml/browser.cpp
+ * src/libopenvrml/openvrml/browser.h
+ * src/libopenvrml/openvrml/event.cpp
+ * src/libopenvrml/openvrml/event.h
+ * src/libopenvrml/openvrml/field_value.cpp
+ * src/libopenvrml/openvrml/field_value.h
+ * src/libopenvrml/openvrml/node.cpp
+ * src/libopenvrml/openvrml/node.h
+ * src/libopenvrml/openvrml/read_write_mutex.cpp: Removed.
+ * src/libopenvrml/openvrml/read_write_mutex.h: Removed.
+ * src/libopenvrml/openvrml/scene.cpp
+ * src/libopenvrml/openvrml/scene.h
+ * src/libopenvrml/openvrml/local/node_metatype_registry_impl.cpp
+ * src/libopenvrml/openvrml/local/node_metatype_registry_impl.h
+ * src/libopenvrml-control/openvrml_control/browser.cpp
+ * src/libopenvrml-control/openvrml_control/browser.h
+ * src/node/vrml97/image_stream_listener.cpp
+ * src/node/vrml97/image_stream_listener.h
+ * src/node/vrml97/image_texture.cpp
+
2009-06-21 Braden McDaniel <br...@en...>
The Web browser still wants the plug-in to have the NPN_* entry
@@ -16,7 +43,7 @@
(NPN_NewStream(NPP, NPMIMEType, const char *, NPStream **)):
Replaced.
(NPN_Write(NPP, NPStream *, int32, void *)): Replaced.
- (NPN_DestryStream(NPP, NPStream *, NPError)): Replaced.
+ (NPN_DestroyStream(NPP, NPStream *, NPError)): Replaced.
(NPN_Status(NPP, const char *)): Replaced.
(NPN_UserAgent(NPP)): Replaced.
(NPN_MemAlloc(uint32)): Replaced.
@@ -85,7 +112,7 @@
(NPN_NewStream(NPP, NPMIMEType, const char *, NPStream **)):
Removed.
(NPN_Write(NPP, NPStream *, int32, void *)): Removed.
- (NPN_DestryStream(NPP, NPStream *, NPError)): Removed.
+ (NPN_DestroyStream(NPP, NPStream *, NPError)): Removed.
(NPN_Status(NPP, const char *)): Removed.
(NPN_UserAgent(NPP)): Removed.
(NPN_MemAlloc(uint32)): Removed.
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2009-06-22 01:14:04 UTC (rev 3922)
+++ trunk/src/Makefile.am 2009-06-22 06:24:57 UTC (rev 3923)
@@ -23,7 +23,6 @@
libopenvrml/openvrml/basetypes.h \
libopenvrml/openvrml/vrml97_grammar.h \
libopenvrml/openvrml/x3d_vrml_grammar.h \
- libopenvrml/openvrml/read_write_mutex.h \
libopenvrml/openvrml/field_value.h \
libopenvrml/openvrml/event.h \
libopenvrml/openvrml/exposedfield.h \
@@ -81,7 +80,6 @@
libopenvrml/openvrml/bad_url.cpp \
libopenvrml/openvrml/vrml97_grammar.cpp \
libopenvrml/openvrml/x3d_vrml_grammar.cpp \
- libopenvrml/openvrml/read_write_mutex.cpp \
libopenvrml/openvrml/basetypes.cpp \
libopenvrml/openvrml/field_value.cpp \
libopenvrml/openvrml/event.cpp \
Modified: trunk/src/libopenvrml/openvrml/browser.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/browser.cpp 2009-06-22 01:14:04 UTC (rev 3922)
+++ trunk/src/libopenvrml/openvrml/browser.cpp 2009-06-22 06:24:57 UTC (rev 3923)
@@ -1107,7 +1107,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::browser::load_root_scene_thread_mutex_
+ * @var boost::shared_mutex openvrml::browser::load_root_scene_thread_mutex_
*
* @brief Mutex protecting @c #load_root_scene_thread_.
*/
@@ -1153,7 +1153,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::browser::scene_mutex_
+ * @var boost::shared_mutex openvrml::browser::scene_mutex_
*
* @brief Mutex protecting @c #scene_.
*/
@@ -1178,7 +1178,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::browser::active_viewpoint_mutex_
+ * @var boost::shared_mutex openvrml::browser::active_viewpoint_mutex_
*
* @brief Mutex protecting @c #active_viewpoint_.
*/
@@ -1203,7 +1203,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::browser::active_navigation_info_mutex_
+ * @var boost::shared_mutex openvrml::browser::active_navigation_info_mutex_
*
* @brief Mutex protecting @c #active_navigation_info_.
*/
@@ -1219,7 +1219,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::browser::viewpoint_list_mutex_
+ * @var boost::shared_mutex openvrml::browser::viewpoint_list_mutex_
*
* @brief Mutex protecting @c #viewpoint_list_.
*/
@@ -1235,7 +1235,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::browser::scoped_lights_mutex_
+ * @var boost::shared_mutex openvrml::browser::scoped_lights_mutex_
*
* @brief Mutex protecting @c #scoped_lights_.
*/
@@ -1251,7 +1251,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::browser::scripts_mutex_
+ * @var boost::shared_mutex openvrml::browser::scripts_mutex_
*
* @brief Mutex protecting @c #scripts_.
*/
@@ -1267,7 +1267,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::browser::timers_mutex_
+ * @var boost::shared_mutex openvrml::browser::timers_mutex_
*
* @brief Mutex protecting @c #timers_.
*/
@@ -1307,7 +1307,7 @@
*/
/**
- * @var openvrml::read_write_mutex openvrml::browser::modified_mutex_
+ * @var boost::shared_mutex openvrml::browser::modified_mutex_
*
* @brief Mutex protecting @c #modified_.
*/
@@ -1323,7 +1323,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::browser::delta_time_mutex_
+ * @var boost::shared_mutex openvrml::browser::delta_time_mutex_
*
* @brief Mutex protecting @c #delta_time.
*/
@@ -1339,7 +1339,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::browser::viewer_mutex_
+ * @var boost::shared_mutex openvrml::browser::viewer_mutex_
*
* @brief Mutex protecting @c #viewer_.
*/
@@ -1355,7 +1355,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::browser::frame_rate_mutex_
+ * @var boost::shared_mutex openvrml::browser::frame_rate_mutex_
*
* @brief Mutex protecting @c #frame_rate_.
*/
@@ -1468,8 +1468,10 @@
*/
openvrml::browser::~browser() OPENVRML_NOTHROW
{
- read_write_mutex::scoped_read_lock
- lock(this->load_root_scene_thread_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+
+ shared_lock<shared_mutex> lock(this->load_root_scene_thread_mutex_);
if (this->load_root_scene_thread_) {
this->load_root_scene_thread_->join();
}
@@ -1478,7 +1480,7 @@
const double now = browser::current_time();
- read_write_mutex::scoped_read_lock scene_lock(this->scene_mutex_);
+ shared_lock<shared_mutex> scene_lock(this->scene_mutex_);
if (this->scene_) { this->scene_->shutdown(now); }
this->node_metatype_registry_->impl_->shutdown(now);
@@ -1536,7 +1538,9 @@
*/
openvrml::scene * openvrml::browser::root_scene() const OPENVRML_NOTHROW
{
- read_write_mutex::scoped_read_lock lock(this->scene_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->scene_mutex_);
return this->scene_.get();
}
@@ -1554,7 +1558,9 @@
const openvrml::node_path openvrml::browser::find_node(const node & n) const
OPENVRML_THROW1(std::bad_alloc)
{
- read_write_mutex::scoped_read_lock lock(this->scene_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->scene_mutex_);
assert(this->scene_);
class FindNodeTraverser : public node_traverser {
@@ -1600,7 +1606,9 @@
openvrml::viewpoint_node & openvrml::browser::active_viewpoint() const
OPENVRML_NOTHROW
{
- read_write_mutex::scoped_read_lock lock(this->active_viewpoint_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->active_viewpoint_mutex_);
return *this->active_viewpoint_;
}
@@ -1614,8 +1622,11 @@
void openvrml::browser::active_viewpoint(viewpoint_node & viewpoint)
OPENVRML_NOTHROW
{
- read_write_mutex::scoped_read_lock scene_lock(this->scene_mutex_);
- read_write_mutex::scoped_write_lock
+ using boost::unique_lock;
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> scene_lock(this->scene_mutex_);
+ unique_lock<shared_mutex>
active_viewpoint_lock(this->active_viewpoint_mutex_);
# ifndef NDEBUG
scene * root_scene = 0;
@@ -1633,7 +1644,9 @@
*/
void openvrml::browser::reset_default_viewpoint() OPENVRML_NOTHROW
{
- read_write_mutex::scoped_write_lock lock(this->active_viewpoint_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->active_viewpoint_mutex_);
assert(this->default_viewpoint_);
this->active_viewpoint_ =
node_cast<viewpoint_node *>(this->default_viewpoint_.get());
@@ -1651,8 +1664,9 @@
openvrml::navigation_info_node &
openvrml::browser::active_navigation_info() const OPENVRML_NOTHROW
{
- read_write_mutex::scoped_read_lock
- lock(this->active_navigation_info_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->active_navigation_info_mutex_);
return *this->active_navigation_info_;
}
@@ -1666,8 +1680,11 @@
void openvrml::browser::active_navigation_info(navigation_info_node & nav_info)
OPENVRML_NOTHROW
{
- read_write_mutex::scoped_read_lock scene_lock(this->scene_mutex_);
- read_write_mutex::scoped_write_lock
+ using boost::unique_lock;
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> scene_lock(this->scene_mutex_);
+ unique_lock<shared_mutex>
active_navigation_info_lock(this->active_navigation_info_mutex_);
# ifndef NDEBUG
scene * root_scene = 0;
@@ -1685,8 +1702,9 @@
*/
void openvrml::browser::reset_default_navigation_info() OPENVRML_NOTHROW
{
- read_write_mutex::scoped_write_lock
- lock(this->active_navigation_info_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->active_navigation_info_mutex_);
assert(this->default_navigation_info_);
this->active_navigation_info_ =
node_cast<navigation_info_node *>(
@@ -1708,7 +1726,9 @@
void openvrml::browser::add_viewpoint(viewpoint_node & viewpoint)
OPENVRML_THROW1(std::bad_alloc)
{
- read_write_mutex::scoped_write_lock lock(this->viewpoint_list_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->viewpoint_list_mutex_);
assert(std::find(this->viewpoint_list_.begin(), this->viewpoint_list_.end(),
&viewpoint) == this->viewpoint_list_.end());
this->viewpoint_list_.push_back(&viewpoint);
@@ -1725,7 +1745,9 @@
void openvrml::browser::remove_viewpoint(viewpoint_node & viewpoint)
OPENVRML_NOTHROW
{
- read_write_mutex::scoped_write_lock lock(this->viewpoint_list_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->viewpoint_list_mutex_);
assert(!this->viewpoint_list_.empty());
typedef std::list<viewpoint_node *> viewpoint_list_t;
const viewpoint_list_t::iterator end = this->viewpoint_list_.end();
@@ -1743,7 +1765,9 @@
const std::list<openvrml::viewpoint_node *>
openvrml::browser::viewpoints() const OPENVRML_NOTHROW
{
- read_write_mutex::scoped_read_lock lock(this->viewpoint_list_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->viewpoint_list_mutex_);
return this->viewpoint_list_;
}
@@ -1758,7 +1782,9 @@
void openvrml::browser::viewer(openvrml::viewer * v)
OPENVRML_THROW1(viewer_in_use)
{
- read_write_mutex::scoped_write_lock lock(this->viewer_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->viewer_mutex_);
if (v && v->browser_) { throw viewer_in_use(); }
if (this->viewer_) { this->viewer_->browser_ = 0; }
this->viewer_ = v;
@@ -1772,7 +1798,9 @@
*/
openvrml::viewer * openvrml::browser::viewer() const OPENVRML_NOTHROW
{
- read_write_mutex::scoped_read_lock lock(this->viewer_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->viewer_mutex_);
return this->viewer_;
}
@@ -1807,8 +1835,9 @@
*/
float openvrml::browser::current_speed()
{
- read_write_mutex::scoped_read_lock
- lock(this->active_navigation_info_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->active_navigation_info_mutex_);
navigation_info_node & nav_info = this->active_navigation_info();
return nav_info.speed();
}
@@ -1821,7 +1850,9 @@
const std::string openvrml::browser::world_url() const
OPENVRML_THROW1(std::bad_alloc)
{
- read_write_mutex::scoped_read_lock lock(this->scene_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->scene_mutex_);
assert(this->scene_);
return this->scene_->url(); // Throws std::bad_alloc.
}
@@ -1838,12 +1869,16 @@
void openvrml::browser::set_world(resource_istream & in)
{
using std::for_each;
+ using boost::shared_lock;
+ using boost::shared_mutex;
{
- read_write_mutex::scoped_read_write_lock scene_lock(this->scene_mutex_);
-
using std::string;
+ using boost::upgrade_lock;
+ using boost::upgrade_to_unique_lock;
using local::uri;
+ upgrade_lock<shared_mutex> scene_lock(this->scene_mutex_);
+
//
// Clear out the current scene.
//
@@ -1851,29 +1886,29 @@
double now = browser::current_time();
if (this->scene_) { this->scene_->shutdown(now); }
this->node_metatype_registry_->impl_->shutdown(now);
- read_write_mutex::scoped_read_lock
- listeners_lock(this->listeners_mutex_);
+ shared_lock<shared_mutex> listeners_lock(this->listeners_mutex_);
for_each(this->listeners_.begin(), this->listeners_.end(),
boost::bind2nd(
boost::mem_fun(&browser_listener::browser_changed),
browser_event(*this, browser_event::shutdown)));
- scene_lock.promote();
+ {
+ upgrade_to_unique_lock<shared_mutex> scene_write_lock(scene_lock);
- this->scene_.reset();
- assert(this->viewpoint_list_.empty());
- assert(this->scoped_lights_.empty());
- assert(this->scripts_.empty());
- assert(this->timers_.empty());
+ this->scene_.reset();
+ assert(this->viewpoint_list_.empty());
+ assert(this->scoped_lights_.empty());
+ assert(this->scripts_.empty());
+ assert(this->timers_.empty());
- //
- // Create the new scene.
- //
- this->node_metatype_registry_.reset(new node_metatype_registry(*this));
- this->scene_.reset(new scene(*this));
+ //
+ // Create the new scene.
+ //
+ this->node_metatype_registry_.reset(
+ new node_metatype_registry(*this));
+ this->scene_.reset(new scene(*this));
+ }
- scene_lock.demote();
-
this->scene_->load(in);
//
@@ -1904,8 +1939,8 @@
this->node_metatype_registry_->impl_->init(initial_viewpoint, now);
if (!this->active_viewpoint_) {
- read_write_mutex::scoped_write_lock
- lock(this->active_viewpoint_mutex_);
+ using boost::unique_lock;
+ unique_lock<shared_mutex> lock(this->active_viewpoint_mutex_);
this->active_viewpoint_ = this->default_viewpoint_.get();
}
@@ -1913,8 +1948,7 @@
this->new_view = true; // Force resetUserNav
} // unlock this->scene_mutex_, this->active_viewpoint_mutex_
- read_write_mutex::scoped_read_lock
- listeners_lock(this->listeners_mutex_);
+ shared_lock<shared_mutex> listeners_lock(this->listeners_mutex_);
for_each(this->listeners_.begin(), this->listeners_.end(),
boost::bind2nd(boost::mem_fun(&browser_listener::browser_changed),
browser_event(*this, browser_event::initialized)));
@@ -1929,7 +1963,9 @@
openvrml::browser::replace_world(
const std::vector<boost::intrusive_ptr<node> > & nodes)
{
- read_write_mutex::scoped_read_lock lock(this->scene_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->scene_mutex_);
const double now = browser::current_time();
this->scene_->nodes(nodes);
this->scene_->initialize(now);
@@ -1959,8 +1995,9 @@
try {
std::auto_ptr<resource_istream> in;
{
- read_write_mutex::scoped_read_lock
- lock(browser.scene_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(browser.scene_mutex_);
in = browser.scene_->get_resource(this->url_);
}
if (!(*in)) { throw unreachable_url(); }
@@ -2008,9 +2045,12 @@
const std::vector<std::string> &)
OPENVRML_THROW2(std::bad_alloc, boost::thread_resource_error)
{
+ using boost::unique_lock;
+ using boost::shared_mutex;
+
{
- read_write_mutex::scoped_read_lock
- lock(this->load_root_scene_thread_mutex_);
+ using boost::shared_lock;
+ shared_lock<shared_mutex> lock(this->load_root_scene_thread_mutex_);
if (this->load_root_scene_thread_) {
this->load_root_scene_thread_->join();
}
@@ -2018,8 +2058,7 @@
boost::function0<void> f = root_scene_loader(*this, url);
- read_write_mutex::scoped_write_lock
- lock(this->load_root_scene_thread_mutex_);
+ unique_lock<shared_mutex> lock(this->load_root_scene_thread_mutex_);
this->load_root_scene_thread_.reset(new boost::thread(f));
}
@@ -2086,7 +2125,9 @@
std::vector<boost::intrusive_ptr<node> > nodes;
try {
- read_write_mutex::scoped_read_lock lock(this->scene_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->scene_mutex_);
assert(this->scene_);
std::map<string, string> meta;
local::parse_vrml(in, stream_id.str(), type,
@@ -2125,7 +2166,9 @@
OPENVRML_THROW3(unsupported_interface, std::bad_cast,
boost::thread_resource_error)
{
- read_write_mutex::scoped_read_lock lock(this->scene_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->scene_mutex_);
assert(this->scene_);
this->scene_->create_vrml_from_url(url, node, event);
}
@@ -2144,7 +2187,9 @@
bool openvrml::browser::add_listener(browser_listener & listener)
OPENVRML_THROW1(std::bad_alloc)
{
- read_write_mutex::scoped_write_lock lock(this->listeners_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->listeners_mutex_);
return this->listeners_.insert(&listener).second;
}
@@ -2160,7 +2205,9 @@
bool openvrml::browser::remove_listener(browser_listener & listener)
OPENVRML_NOTHROW
{
- read_write_mutex::scoped_write_lock lock(this->listeners_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->listeners_mutex_);
return this->listeners_.erase(&listener) > 0;
}
@@ -2171,7 +2218,9 @@
*/
double openvrml::browser::frame_rate() const
{
- read_write_mutex::scoped_read_lock lock(this->frame_rate_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->frame_rate_mutex_);
return this->frame_rate_;
}
@@ -2216,8 +2265,10 @@
bool openvrml::browser::update(double current_time)
{
using std::for_each;
+ using boost::shared_lock;
+ using boost::shared_mutex;
- read_write_mutex::scoped_read_lock
+ shared_lock<shared_mutex>
timers_lock(this->timers_mutex_),
scripts_lock(this->scripts_mutex_);
@@ -2259,7 +2310,10 @@
*/
void openvrml::browser::render()
{
- read_write_mutex::scoped_read_lock
+ using boost::shared_lock;
+ using boost::shared_mutex;
+
+ shared_lock<shared_mutex>
scene_lock(this->scene_mutex_),
active_viewpoint_lock_(this->active_viewpoint_mutex_);
@@ -2322,7 +2376,7 @@
// Do the browser-level lights (Points and Spots)
{
using std::for_each;
- read_write_mutex::scoped_read_lock
+ shared_lock<shared_mutex>
scoped_lights_lock(this->scoped_lights_mutex_);
for_each(this->scoped_lights_.begin(), this->scoped_lights_.end(),
boost::bind2nd(
@@ -2340,8 +2394,7 @@
this->viewer_->end_object();
// This is actually one frame late...
- read_write_mutex::scoped_write_lock
- frame_rate_lock(this->frame_rate_mutex_);
+ boost::unique_lock<shared_mutex> frame_rate_lock(this->frame_rate_mutex_);
this->frame_rate_ = this->viewer_->frame_rate();
this->modified(false);
@@ -2356,7 +2409,9 @@
*/
void openvrml::browser::modified(const bool value)
{
- read_write_mutex::scoped_write_lock lock(this->modified_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->modified_mutex_);
this->modified_ = value;
}
@@ -2367,7 +2422,9 @@
*/
bool openvrml::browser::modified() const
{
- read_write_mutex::scoped_read_lock lock(this->modified_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->modified_mutex_);
return this->modified_;
}
@@ -2378,7 +2435,9 @@
*/
void openvrml::browser::delta(const double d)
{
- read_write_mutex::scoped_write_lock lock(this->delta_time_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->delta_time_mutex_);
if (d < this->delta_time) { this->delta_time = d; }
}
@@ -2389,7 +2448,9 @@
*/
double openvrml::browser::delta() const
{
- read_write_mutex::scoped_read_lock lock(this->delta_time_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->delta_time_mutex_);
return this->delta_time;
}
@@ -2403,7 +2464,9 @@
void
openvrml::browser::add_scoped_light(scoped_light_node & light)
{
- read_write_mutex::scoped_write_lock lock(this->scoped_lights_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->scoped_lights_mutex_);
assert(std::find(this->scoped_lights_.begin(), this->scoped_lights_.end(),
&light) == this->scoped_lights_.end());
this->scoped_lights_.push_back(&light);
@@ -2419,7 +2482,9 @@
void
openvrml::browser::remove_scoped_light(scoped_light_node & light)
{
- read_write_mutex::scoped_write_lock lock(this->scoped_lights_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->scoped_lights_mutex_);
assert(!this->scoped_lights_.empty());
const std::list<scoped_light_node *>::iterator end =
this->scoped_lights_.end();
@@ -2438,7 +2503,9 @@
*/
void openvrml::browser::add_script(script_node & script)
{
- read_write_mutex::scoped_write_lock lock(this->scripts_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->scripts_mutex_);
assert(std::find(this->scripts_.begin(), this->scripts_.end(), &script)
== this->scripts_.end());
this->scripts_.push_back(&script);
@@ -2453,7 +2520,9 @@
*/
void openvrml::browser::remove_script(script_node & script)
{
- read_write_mutex::scoped_write_lock lock(this->scripts_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->scripts_mutex_);
assert(!this->scripts_.empty());
typedef std::list<script_node *> script_node_list_t;
const script_node_list_t::iterator end = this->scripts_.end();
@@ -2472,7 +2541,9 @@
*/
void openvrml::browser::add_time_dependent(time_dependent_node & n)
{
- read_write_mutex::scoped_write_lock lock(this->timers_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->timers_mutex_);
assert(std::find(this->timers_.begin(), this->timers_.end(), &n)
== this->timers_.end());
this->timers_.push_back(&n);
@@ -2488,7 +2559,9 @@
void
openvrml::browser::remove_time_dependent(time_dependent_node & n)
{
- read_write_mutex::scoped_write_lock lock(this->timers_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->timers_mutex_);
assert(!this->timers_.empty());
const std::list<time_dependent_node *>::iterator end = this->timers_.end();
const std::list<time_dependent_node *>::iterator pos =
Modified: trunk/src/libopenvrml/openvrml/browser.h
===================================================================
--- trunk/src/libopenvrml/openvrml/browser.h 2009-06-22 01:14:04 UTC (rev 3922)
+++ trunk/src/libopenvrml/openvrml/browser.h 2009-06-22 06:24:57 UTC (rev 3923)
@@ -221,54 +221,54 @@
const boost::scoped_ptr<null_node_metatype> null_node_metatype_;
const boost::scoped_ptr<null_node_type> null_node_type_;
- read_write_mutex load_root_scene_thread_mutex_;
+ boost::shared_mutex load_root_scene_thread_mutex_;
boost::scoped_ptr<boost::thread> load_root_scene_thread_;
boost::thread_group load_proto_thread_group_;
script_node_metatype script_node_metatype_;
resource_fetcher & fetcher_;
- mutable read_write_mutex scene_mutex_;
+ mutable boost::shared_mutex scene_mutex_;
boost::scoped_ptr<scene> scene_;
const boost::intrusive_ptr<viewpoint_node> default_viewpoint_;
- mutable read_write_mutex active_viewpoint_mutex_;
+ mutable boost::shared_mutex active_viewpoint_mutex_;
viewpoint_node * active_viewpoint_;
const boost::intrusive_ptr<navigation_info_node>
default_navigation_info_;
- mutable read_write_mutex active_navigation_info_mutex_;
+ mutable boost::shared_mutex active_navigation_info_mutex_;
navigation_info_node * active_navigation_info_;
- mutable read_write_mutex viewpoint_list_mutex_;
+ mutable boost::shared_mutex viewpoint_list_mutex_;
std::list<viewpoint_node *> viewpoint_list_;
- read_write_mutex scoped_lights_mutex_;
+ boost::shared_mutex scoped_lights_mutex_;
std::list<scoped_light_node *> scoped_lights_;
- read_write_mutex scripts_mutex_;
+ boost::shared_mutex scripts_mutex_;
std::list<script_node *> scripts_;
- read_write_mutex timers_mutex_;
+ boost::shared_mutex timers_mutex_;
std::list<time_dependent_node *> timers_;
- read_write_mutex listeners_mutex_;
+ boost::shared_mutex listeners_mutex_;
std::set<browser_listener *> listeners_;
bool new_view;
- mutable read_write_mutex delta_time_mutex_;
+ mutable boost::shared_mutex delta_time_mutex_;
double delta_time;
- mutable read_write_mutex viewer_mutex_;
+ mutable boost::shared_mutex viewer_mutex_;
openvrml::viewer * viewer_;
bool modified_;
- mutable read_write_mutex modified_mutex_;
+ mutable boost::shared_mutex modified_mutex_;
- mutable read_write_mutex frame_rate_mutex_;
+ mutable boost::shared_mutex frame_rate_mutex_;
double frame_rate_;
mutable boost::mutex out_mutex_;
Modified: trunk/src/libopenvrml/openvrml/event.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/event.cpp 2009-06-22 01:14:04 UTC (rev 3922)
+++ trunk/src/libopenvrml/openvrml/event.cpp 2009-06-22 06:24:57 UTC (rev 3923)
@@ -437,7 +437,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::event_emitter::listeners_mutex_
+ * @var boost::shared_mut...
[truncated message content] |
|
From: <br...@us...> - 2009-06-22 08:28:41
|
Revision: 3924
http://openvrml.svn.sourceforge.net/openvrml/?rev=3924&view=rev
Author: braden
Date: 2009-06-22 08:28:39 +0000 (Mon, 22 Jun 2009)
Log Message:
-----------
Use GIO instead of GnomeVFS in openvrml-player.
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
trunk/src/Makefile.am
trunk/src/openvrml-player/curlbrowserhost.cpp
trunk/src/openvrml-player/player.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-22 06:24:57 UTC (rev 3923)
+++ trunk/ChangeLog 2009-06-22 08:28:39 UTC (rev 3924)
@@ -1,5 +1,19 @@
2009-06-22 Braden McDaniel <br...@en...>
+ Use GIO instead of GnomeVFS in openvrml-player.
+
+ * configure.ac: Check for GIO.
+ * src/Makefile.am
+ (openvrml_player_openvrml_player_CXXFLAGS): Pass GIO_CFLAGS.
+ (openvrml_player_openvrml_player_LDFLAGS): Pass GIO_LIBS.
+ * src/openvrml-player/curlbrowserhost.cpp
+ (openvrml_player_curl_browser_host_curl_write(void *, size_t,
+ size_t, void *)): Use GIO to get the MIME media type.
+ * src/openvrml-player/player.cpp
+ (main(int, char *[])): Don't need to initialize GnomeVFS anymore.
+
+2009-06-22 Braden McDaniel <br...@en...>
+
Use boost::shared_mutex instead of openvrml::read_write_mutex.
* src/Makefile.am
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2009-06-22 06:24:57 UTC (rev 3923)
+++ trunk/configure.ac 2009-06-22 08:28:39 UTC (rev 3924)
@@ -188,18 +188,19 @@
AC_ARG_VAR([DBUS_BINDING_TOOL], [Generate stub code for dbus-glib])
AC_PATH_PROG([DBUS_BINDING_TOOL], [dbus-binding-tool])
-#
-# openvrml-player uses GtkBuilder, which was introduced in GTK+ 2.12.
-#
PKG_CHECK_MODULES([GTKGL],
- [gtkglext-1.0 gtk+-2.0 >= 2.12 gthread-2.0 glib-2.0 >= 2.6], ,
+ [gtkglext-1.0 gthread-2.0], ,
[have_gtkgl=no])
#
# openvrml-player uses GNOME_PARAM_GOPTION_CONTEXT, which was
# introduced in libgnome 2.14.
#
-PKG_CHECK_MODULES([GNOMEUI], [libgnomeui-2.0 libgnome-2.0 >= 2.14], ,
+# openvrml-player uses GtkBuilder, which was introduced in GTK+ 2.12.
+#
+PKG_CHECK_MODULES([GNOMEUI],
+ [libgnomeui-2.0 libgnome-2.0 >= 2.14 gtk+-2.0 >= 2.12], ,
[have_gnomeui=no])
+PKG_CHECK_MODULES([GIO], [gio-2.0], , [have_gio=no])
PKG_CHECK_MODULES([CURL], [libcurl], , [have_libcurl=no])
#
# The Mozilla plug-in uses the npfunctions.h header introduced in
@@ -440,8 +441,8 @@
AS_IF([test X$enable_player != Xno],
[AS_IF([test X$enable_xembed = Xno],
[AC_MSG_FAILURE([OpenVRML Player cannot be built without the XEmbed control])])
- AS_IF([test X$have_libglade = Xno],
- [AC_MSG_FAILURE([libglade is required to build OpenVRML Player])])
+ AS_IF([test X$have_gio = Xno],
+ [AC_MSG_FAILURE([GIO is required to build OpenVRML Player])])
AS_IF([test X$have_gnomeui = Xno],
[AC_MSG_FAILURE([libgnomeui is required to build OpenVRML Player])])
AS_IF([test X$have_libcurl = Xno],
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2009-06-22 06:24:57 UTC (rev 3923)
+++ trunk/src/Makefile.am 2009-06-22 08:28:39 UTC (rev 3924)
@@ -820,12 +820,14 @@
-Ilibopenvrml \
-I$(srcdir)/libopenvrml
openvrml_player_openvrml_player_CXXFLAGS = \
+ $(GNOMEUI_CFLAGS) \
+ $(GIO_CFLAGS) \
$(DBUS_G_CFLAGS) \
- $(GNOMEUI_CFLAGS) \
$(CURL_CFLAGS)
openvrml_player_openvrml_player_LDFLAGS = \
-export-dynamic \
$(GNOMEUI_LIBS) \
+ $(GIO_LIBS) \
$(DBUS_G_LIBS) \
$(CURL_LIBS)
Modified: trunk/src/openvrml-player/curlbrowserhost.cpp
===================================================================
--- trunk/src/openvrml-player/curlbrowserhost.cpp 2009-06-22 06:24:57 UTC (rev 3923)
+++ trunk/src/openvrml-player/curlbrowserhost.cpp 2009-06-22 08:28:39 UTC (rev 3924)
@@ -19,7 +19,7 @@
# include "curlbrowserhost.h"
# include <curl/curl.h>
-# include <libgnomevfs/gnome-vfs.h>
+# include <gio/gio.h>
# include <browser-host-server-glue.h>
# include <browser-factory-client-glue.h>
# include <browser-client-glue.h>
@@ -788,25 +788,35 @@
&type);
CURL_BROWSER_HOST_CURL_EASY_RETURN_VAL_IF_ERROR(getinfo_result, 0);
- GnomeVFSFileInfo * info = 0;
- scope_guard info_guard = make_guard(gnome_vfs_file_info_unref,
- ref(info));
+ GError * error = 0;
+ GFile * file = 0;
+ scope_guard file_guard = make_guard(g_object_unref, ref(file));
+ GFileInfo * info = 0;
+ scope_guard info_guard = make_guard(g_object_unref, ref(info));
if (!type) {
- info = gnome_vfs_file_info_new();
- GnomeVFSResult get_file_info_result =
- gnome_vfs_get_file_info(stream_data.url(),
- info,
- GNOME_VFS_FILE_INFO_GET_MIME_TYPE);
- if (get_file_info_result != GNOME_VFS_OK) {
- g_critical("%s",
- gnome_vfs_result_to_string(get_file_info_result));
+ file = g_file_new_for_uri(stream_data.url());
+ static GCancellable * const cancellable = 0;
+ info = g_file_query_info(file,
+ G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
+ G_FILE_QUERY_INFO_NONE,
+ cancellable,
+ &error);
+ if (error) {
+ g_warning(error->message);
+ g_error_free(error);
+ error = 0;
}
- type = gnome_vfs_file_info_get_mime_type(info);
+ if (info) {
+ type =
+ g_file_info_get_attribute_string(
+ info,
+ G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE);
+ }
} else {
info_guard.dismiss();
+ file_guard.dismiss();
}
- GError * error = 0;
scope_guard error_guard = make_guard(g_error_free, boost::ref(error));
gboolean new_stream_result =
org_openvrml_Browser_new_stream(
Modified: trunk/src/openvrml-player/player.cpp
===================================================================
--- trunk/src/openvrml-player/player.cpp 2009-06-22 06:24:57 UTC (rev 3923)
+++ trunk/src/openvrml-player/player.cpp 2009-06-22 08:28:39 UTC (rev 3924)
@@ -24,7 +24,6 @@
# include <boost/multi_index/detail/scope_guard.hpp>
# include <boost/ref.hpp>
# include <dbus/dbus-glib.h>
-# include <libgnomevfs/gnome-vfs.h>
# include <libgnomeui/libgnomeui.h>
# include <gtk/gtkbuilder.h>
# include <openvrml-config.h>
@@ -84,11 +83,6 @@
g_set_application_name(app_name);
- if (!gnome_vfs_init()) {
- g_critical("GnomeVFS initialization failed");
- return EXIT_FAILURE;
- }
-
if (curl_global_init(CURL_GLOBAL_ALL) != 0) {
g_critical("libcurl initialization failed");
return EXIT_FAILURE;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-22 21:12:14
|
Revision: 3925
http://openvrml.svn.sourceforge.net/openvrml/?rev=3925&view=rev
Author: braden
Date: 2009-06-22 21:11:18 +0000 (Mon, 22 Jun 2009)
Log Message:
-----------
Use Spirit Classic in the boost::spirit::classic namespace.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/libopenvrml/openvrml/basetypes.cpp
trunk/src/libopenvrml/openvrml/local/parse_vrml.cpp
trunk/src/libopenvrml/openvrml/local/uri.cpp
trunk/src/libopenvrml/openvrml/local/uri.h
trunk/src/libopenvrml/openvrml/node.cpp
trunk/src/libopenvrml/openvrml/vrml97_grammar.h
trunk/src/libopenvrml/openvrml/x3d_vrml_grammar.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-22 08:28:39 UTC (rev 3924)
+++ trunk/ChangeLog 2009-06-22 21:11:18 UTC (rev 3925)
@@ -1,5 +1,17 @@
2009-06-22 Braden McDaniel <br...@en...>
+ Use Spirit Classic in the boost::spirit::classic namespace.
+
+ * src/libopenvrml/openvrml/basetypes.cpp
+ * src/libopenvrml/openvrml/node.cpp
+ * src/libopenvrml/openvrml/vrml97_grammar.h
+ * src/libopenvrml/openvrml/x3d_vrml_grammar.h
+ * src/libopenvrml/openvrml/local/parse_vrml.cpp
+ * src/libopenvrml/openvrml/local/uri.cpp
+ * src/libopenvrml/openvrml/local/uri.h
+
+2009-06-22 Braden McDaniel <br...@en...>
+
Use GIO instead of GnomeVFS in openvrml-player.
* configure.ac: Check for GIO.
Modified: trunk/src/libopenvrml/openvrml/basetypes.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/basetypes.cpp 2009-06-22 08:28:39 UTC (rev 3924)
+++ trunk/src/libopenvrml/openvrml/basetypes.cpp 2009-06-22 21:11:18 UTC (rev 3925)
@@ -307,15 +307,15 @@
namespace {
typedef std::istream::char_type char_t;
- typedef boost::spirit::multi_pass<std::istreambuf_iterator<char_t> >
+ typedef boost::spirit::classic::multi_pass<std::istreambuf_iterator<char_t> >
iterator_t;
- typedef boost::spirit::skip_parser_iteration_policy<openvrml::vrml97_space_parser>
+ typedef boost::spirit::classic::skip_parser_iteration_policy<openvrml::vrml97_space_parser>
iter_policy_t;
- typedef boost::spirit::scanner_policies<iter_policy_t> scanner_policies_t;
- typedef boost::spirit::scanner<iterator_t, scanner_policies_t> scanner_t;
+ typedef boost::spirit::classic::scanner_policies<iter_policy_t> scanner_policies_t;
+ typedef boost::spirit::classic::scanner<iterator_t, scanner_policies_t> scanner_t;
- typedef boost::spirit::rule<scanner_t> rule_t;
+ typedef boost::spirit::classic::rule<scanner_t> rule_t;
}
/**
@@ -338,8 +338,8 @@
std::istream & openvrml::operator>>(std::istream & in, color & c)
{
using std::istreambuf_iterator;
- using boost::spirit::make_multi_pass;
- using boost::spirit::match;
+ using boost::spirit::classic::make_multi_pass;
+ using boost::spirit::classic::match;
using phoenix::arg1;
using phoenix::var;
@@ -620,8 +620,8 @@
std::istream & openvrml::operator>>(std::istream & in, color_rgba & c)
{
using std::istreambuf_iterator;
- using boost::spirit::make_multi_pass;
- using boost::spirit::match;
+ using boost::spirit::classic::make_multi_pass;
+ using boost::spirit::classic::match;
using phoenix::arg1;
using phoenix::var;
@@ -1036,8 +1036,8 @@
std::istream & openvrml::operator>>(std::istream & in, vec2f & v)
{
using std::istreambuf_iterator;
- using boost::spirit::make_multi_pass;
- using boost::spirit::match;
+ using boost::spirit::classic::make_multi_pass;
+ using boost::spirit::classic::match;
using phoenix::arg1;
using phoenix::var;
@@ -1451,9 +1451,9 @@
std::istream & openvrml::operator>>(std::istream & in, vec2d & v)
{
using std::istreambuf_iterator;
- using boost::spirit::make_multi_pass;
- using boost::spirit::match;
- using boost::spirit::real_p;
+ using boost::spirit::classic::make_multi_pass;
+ using boost::spirit::classic::match;
+ using boost::spirit::classic::real_p;
using phoenix::arg1;
using phoenix::var;
@@ -1995,8 +1995,8 @@
std::istream & openvrml::operator>>(std::istream & in, vec3f & v)
{
using std::istreambuf_iterator;
- using boost::spirit::make_multi_pass;
- using boost::spirit::match;
+ using boost::spirit::classic::make_multi_pass;
+ using boost::spirit::classic::match;
using phoenix::arg1;
using phoenix::var;
@@ -2538,9 +2538,9 @@
std::istream & openvrml::operator>>(std::istream & in, vec3d & v)
{
using std::istreambuf_iterator;
- using boost::spirit::make_multi_pass;
- using boost::spirit::match;
- using boost::spirit::real_p;
+ using boost::spirit::classic::make_multi_pass;
+ using boost::spirit::classic::match;
+ using boost::spirit::classic::real_p;
using phoenix::arg1;
using phoenix::var;
@@ -3058,14 +3058,14 @@
OPENVRML_LOCAL struct OPENVRML_LOCAL null_error_handler {
template <typename ScannerT, typename ErrorT>
- boost::spirit::error_status<> operator()(ScannerT, ErrorT) const
+ boost::spirit::classic::error_status<> operator()(ScannerT, ErrorT) const
{
- using boost::spirit::error_status;
+ using boost::spirit::classic::error_status;
return error_status<>(error_status<>::fail);
}
} error_handler;
- const boost::spirit::functor_parser<
+ const boost::spirit::classic::functor_parser<
openvrml::rotation_parser<null_error_handler> >
rotation_p(error_handler);
}
@@ -3090,10 +3090,10 @@
std::istream & openvrml::operator>>(std::istream & in, rotation & rot)
{
using std::istreambuf_iterator;
- using boost::spirit::make_multi_pass;
- using boost::spirit::match;
- using boost::spirit::eps_p;
- using boost::spirit::guard;
+ using boost::spirit::classic::make_multi_pass;
+ using boost::spirit::classic::match;
+ using boost::spirit::classic::eps_p;
+ using boost::spirit::classic::guard;
using phoenix::arg1;
using phoenix::var;
@@ -3980,8 +3980,8 @@
std::istream & openvrml::operator>>(std::istream & in, mat4f & m)
{
using std::istreambuf_iterator;
- using boost::spirit::make_multi_pass;
- using boost::spirit::ch_p;
+ using boost::spirit::classic::make_multi_pass;
+ using boost::spirit::classic::ch_p;
using phoenix::arg1;
using phoenix::var;
@@ -4023,7 +4023,7 @@
>> !ch_p(']')[var(row4_bracket_count) -= 1]
;
- boost::spirit::match<> match = r.parse(scan);
+ boost::spirit::classic::match<> match = r.parse(scan);
if (!match || row1_bracket_count != 0 || row2_bracket_count != 0
|| row3_bracket_count != 0 || row4_bracket_count != 0) {
@@ -4581,8 +4581,8 @@
std::istream & openvrml::operator>>(std::istream & in, quatf & q)
{
using std::istreambuf_iterator;
- using boost::spirit::make_multi_pass;
- using boost::spirit::match;
+ using boost::spirit::classic::make_multi_pass;
+ using boost::spirit::classic::match;
using phoenix::arg1;
using phoenix::var;
@@ -4993,10 +4993,10 @@
std::istream & openvrml::operator>>(std::istream & in, image & img)
{
using std::istreambuf_iterator;
- using boost::spirit::make_multi_pass;
- using boost::spirit::match;
- using boost::spirit::eps_p;
- using boost::spirit::guard;
+ using boost::spirit::classic::make_multi_pass;
+ using boost::spirit::classic::match;
+ using boost::spirit::classic::eps_p;
+ using boost::spirit::classic::guard;
using phoenix::arg1;
using phoenix::var;
Modified: trunk/src/libopenvrml/openvrml/local/parse_vrml.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/local/parse_vrml.cpp 2009-06-22 08:28:39 UTC (rev 3924)
+++ trunk/src/libopenvrml/openvrml/local/parse_vrml.cpp 2009-06-22 21:11:18 UTC (rev 3925)
@@ -47,13 +47,13 @@
{}
template <typename ScannerT, typename ErrorT>
- boost::spirit::error_status<> operator()(const ScannerT & scan,
+ boost::spirit::classic::error_status<> operator()(const ScannerT & scan,
const ErrorT & err) const
{
using std::endl;
using std::string;
- using boost::spirit::error_status;
- using boost::spirit::file_position;
+ using boost::spirit::classic::error_status;
+ using boost::spirit::classic::file_position;
const file_position fpos = err.where.get_position();
@@ -119,9 +119,9 @@
using std::istream;
using std::istreambuf_iterator;
using boost::algorithm::iequals;
- using boost::spirit::multi_pass;
- using boost::spirit::make_multi_pass;
- using boost::spirit::position_iterator;
+ using boost::spirit::classic::multi_pass;
+ using boost::spirit::classic::make_multi_pass;
+ using boost::spirit::classic::position_iterator;
typedef multi_pass<istreambuf_iterator<char> > multi_pass_iterator_t;
typedef istream::char_type char_t;
Modified: trunk/src/libopenvrml/openvrml/local/uri.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/local/uri.cpp 2009-06-22 08:28:39 UTC (rev 3924)
+++ trunk/src/libopenvrml/openvrml/local/uri.cpp 2009-06-22 21:11:18 UTC (rev 3925)
@@ -70,7 +70,7 @@
fragment_end(this->str_.begin())
{
using std::string;
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
actions a(*this);
uri_grammar<actions> g(a);
Modified: trunk/src/libopenvrml/openvrml/local/uri.h
===================================================================
--- trunk/src/libopenvrml/openvrml/local/uri.h 2009-06-22 08:28:39 UTC (rev 3924)
+++ trunk/src/libopenvrml/openvrml/local/uri.h 2009-06-22 21:11:18 UTC (rev 3925)
@@ -22,8 +22,8 @@
# define OPENVRML_LOCAL_URI_H
# include <openvrml/bad_url.h>
-# include <boost/spirit.hpp>
-# include <boost/spirit/phoenix.hpp>
+# include <boost/spirit/include/classic.hpp>
+# include <boost/spirit/include/phoenix1.hpp>
namespace openvrml {
@@ -88,7 +88,7 @@
struct OPENVRML_LOCAL uri_reserved_parser :
- public boost::spirit::char_parser<uri_reserved_parser> {
+ public boost::spirit::classic::char_parser<uri_reserved_parser> {
typedef uri_reserved_parser self_t;
@@ -112,7 +112,7 @@
struct OPENVRML_LOCAL uri_unreserved_parser :
- public boost::spirit::char_parser<uri_unreserved_parser> {
+ public boost::spirit::classic::char_parser<uri_unreserved_parser> {
typedef uri_unreserved_parser self_t;
@@ -137,24 +137,24 @@
struct OPENVRML_LOCAL uric_grammar :
- public boost::spirit::grammar<uric_grammar> {
+ public boost::spirit::classic::grammar<uric_grammar> {
template <typename ScannerT>
struct definition {
- typedef boost::spirit::rule<ScannerT> rule_type;
+ typedef boost::spirit::classic::rule<ScannerT> rule_type;
rule_type uric, escaped;
definition(const uric_grammar & self);
- const boost::spirit::rule<ScannerT> & start() const;
+ const boost::spirit::classic::rule<ScannerT> & start() const;
};
};
template <typename ScannerT>
uric_grammar::definition<ScannerT>::definition(const uric_grammar &)
{
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
uric
= uri_reserved_p
@@ -168,7 +168,7 @@
}
template <typename ScannerT>
- const boost::spirit::rule<ScannerT> &
+ const boost::spirit::classic::rule<ScannerT> &
uric_grammar::definition<ScannerT>::start() const
{
return this->uric;
@@ -177,20 +177,20 @@
template <typename Actions = null_actions>
struct uri_authority_grammar :
- public boost::spirit::grammar<uri_authority_grammar<Actions> > {
+ public boost::spirit::classic::grammar<uri_authority_grammar<Actions> > {
template <typename ScannerT>
struct definition {
struct server_closure :
- boost::spirit::closure<server_closure,
+ boost::spirit::classic::closure<server_closure,
typename ScannerT::iterator_t,
typename ScannerT::iterator_t> {
typename server_closure::member1 userinfo_begin;
typename server_closure::member2 userinfo_end;
};
- typedef boost::spirit::rule<ScannerT> rule_type;
- typedef boost::spirit::rule<ScannerT,
+ typedef boost::spirit::classic::rule<ScannerT> rule_type;
+ typedef boost::spirit::classic::rule<ScannerT,
typename server_closure::context_t>
server_rule_type;
@@ -209,7 +209,7 @@
explicit definition(const uri_authority_grammar & self);
- const boost::spirit::rule<ScannerT> & start() const;
+ const boost::spirit::classic::rule<ScannerT> & start() const;
};
const Actions & actions;
@@ -222,7 +222,7 @@
uri_authority_grammar<Actions>::definition<ScannerT>::
definition(const uri_authority_grammar & self)
{
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
using namespace phoenix;
authority
@@ -308,7 +308,7 @@
template <typename Actions>
template <typename ScannerT>
- const boost::spirit::rule<ScannerT> &
+ const boost::spirit::classic::rule<ScannerT> &
uri_authority_grammar<Actions>::definition<ScannerT>::start() const
{
return this->authority;
@@ -322,11 +322,11 @@
template <typename Actions>
struct uri_abs_path_grammar :
- public boost::spirit::grammar<uri_abs_path_grammar<Actions> > {
+ public boost::spirit::classic::grammar<uri_abs_path_grammar<Actions> > {
template <typename ScannerT>
struct definition {
- typedef boost::spirit::rule<ScannerT> rule_type;
+ typedef boost::spirit::classic::rule<ScannerT> rule_type;
rule_type abs_path;
rule_type path_segments;
@@ -338,7 +338,7 @@
explicit definition(const uri_abs_path_grammar & self);
- const boost::spirit::rule<ScannerT> & start() const;
+ const boost::spirit::classic::rule<ScannerT> & start() const;
};
const Actions & actions;
@@ -351,7 +351,7 @@
uri_abs_path_grammar<Actions>::definition<ScannerT>::
definition(const uri_abs_path_grammar & self)
{
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
using namespace phoenix;
abs_path
@@ -389,7 +389,7 @@
template <typename Actions>
template <typename ScannerT>
- const boost::spirit::rule<ScannerT> &
+ const boost::spirit::classic::rule<ScannerT> &
uri_abs_path_grammar<Actions>::definition<ScannerT>::start() const
{
return this->abs_path;
@@ -404,12 +404,12 @@
template <typename Actions = null_actions>
struct absolute_uri_grammar :
- public boost::spirit::grammar<absolute_uri_grammar<Actions> > {
+ public boost::spirit::classic::grammar<absolute_uri_grammar<Actions> > {
template <typename ScannerT>
struct definition {
struct absolute_uri_closure :
- boost::spirit::closure<absolute_uri_closure,
+ boost::spirit::classic::closure<absolute_uri_closure,
typename ScannerT::iterator_t,
typename ScannerT::iterator_t> {
typename absolute_uri_closure::member1 scheme_begin;
@@ -417,19 +417,19 @@
};
struct server_closure :
- boost::spirit::closure<server_closure,
+ boost::spirit::classic::closure<server_closure,
typename ScannerT::iterator_t,
typename ScannerT::iterator_t> {
typename server_closure::member1 userinfo_begin;
typename server_closure::member2 userinfo_end;
};
- typedef boost::spirit::rule<ScannerT> rule_type;
- typedef boost::spirit::rule<
+ typedef boost::spirit::classic::rule<ScannerT> rule_type;
+ typedef boost::spirit::classic::rule<
ScannerT,
typename absolute_uri_closure::context_t>
absolute_uri_rule_type;
- typedef boost::spirit::rule<ScannerT,
+ typedef boost::spirit::classic::rule<ScannerT,
typename server_closure::context_t>
server_rule_type;
@@ -461,7 +461,7 @@
abs_path(self.actions),
authority(self.actions)
{
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
using namespace phoenix;
absolute_uri
@@ -523,11 +523,11 @@
template <typename Actions = null_actions>
struct uri_grammar :
- public boost::spirit::grammar<uri_grammar<Actions> > {
+ public boost::spirit::classic::grammar<uri_grammar<Actions> > {
template <typename ScannerT>
struct definition {
- typedef boost::spirit::rule<ScannerT> rule_type;
+ typedef boost::spirit::classic::rule<ScannerT> rule_type;
rule_type uri_reference;
absolute_uri_grammar<Actions> absolute_uri;
@@ -544,7 +544,7 @@
explicit definition(const uri_grammar & self);
- const boost::spirit::rule<ScannerT> & start() const;
+ const boost::spirit::classic::rule<ScannerT> & start() const;
};
const Actions & actions;
@@ -566,7 +566,7 @@
abs_path(self.actions),
authority(self.actions)
{
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
using namespace phoenix;
BOOST_SPIRIT_DEBUG_NODE(uri_reference);
@@ -624,7 +624,7 @@
template <typename Actions>
template <typename ScannerT>
- const boost::spirit::rule<ScannerT> &
+ const boost::spirit::classic::rule<ScannerT> &
uri_grammar<Actions>::definition<ScannerT>::start() const
{
return this->uri_reference;
Modified: trunk/src/libopenvrml/openvrml/node.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/node.cpp 2009-06-22 08:28:39 UTC (rev 3924)
+++ trunk/src/libopenvrml/openvrml/node.cpp 2009-06-22 21:11:18 UTC (rev 3925)
@@ -595,11 +595,11 @@
namespace {
struct OPENVRML_LOCAL node_metatype_id_grammar :
- public boost::spirit::grammar<node_metatype_id_grammar> {
+ public boost::spirit::classic::grammar<node_metatype_id_grammar> {
template <typename ScannerT>
struct definition {
- typedef boost::spirit::rule<ScannerT> rule_type;
+ typedef boost::spirit::classic::rule<ScannerT> rule_type;
rule_type node_metatype_id;
openvrml::local::absolute_uri_grammar<> absolute_uri;
@@ -607,7 +607,7 @@
definition(const node_metatype_id_grammar & self);
- const boost::spirit::rule<ScannerT> & start() const;
+ const boost::spirit::classic::rule<ScannerT> & start() const;
};
};
@@ -621,7 +621,7 @@
}
template <typename ScannerT>
- const boost::spirit::rule<ScannerT> &
+ const boost::spirit::classic::rule<ScannerT> &
node_metatype_id_grammar::definition<ScannerT>::start() const
{
return this->node_metatype_id;
@@ -643,7 +643,7 @@
OPENVRML_THROW2(std::invalid_argument, std::bad_alloc):
id_(id)
{
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
node_metatype_id_grammar g;
if (!parse(this->id_.begin(), this->id_.end(), g, space_p).full) {
@@ -667,7 +667,7 @@
OPENVRML_THROW2(std::invalid_argument, std::bad_alloc):
id_(id)
{
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
node_metatype_id_grammar g;
if (!parse(this->id_.begin(), this->id_.end(), g, space_p).full) {
Modified: trunk/src/libopenvrml/openvrml/vrml97_grammar.h
===================================================================
--- trunk/src/libopenvrml/openvrml/vrml97_grammar.h 2009-06-22 08:28:39 UTC (rev 3924)
+++ trunk/src/libopenvrml/openvrml/vrml97_grammar.h 2009-06-22 21:11:18 UTC (rev 3925)
@@ -22,17 +22,17 @@
# define OPENVRML_VRML97_GRAMMAR_H
# include <openvrml/browser.h>
-# include <boost/spirit.hpp>
-# include <boost/spirit/actor.hpp>
-# include <boost/spirit/dynamic.hpp>
-# include <boost/spirit/phoenix.hpp>
+# include <boost/spirit/include/classic.hpp>
+# include <boost/spirit/include/classic_actor.hpp>
+# include <boost/spirit/include/classic_dynamic.hpp>
+# include <boost/spirit/include/phoenix1.hpp>
# include <boost/test/floating_point_comparison.hpp>
# include <stack>
namespace openvrml {
struct vrml97_space_parser :
- boost::spirit::char_parser<vrml97_space_parser> {
+ boost::spirit::classic::char_parser<vrml97_space_parser> {
typedef vrml97_space_parser self_t;
@@ -46,10 +46,11 @@
const vrml97_space_parser vrml97_space_p = vrml97_space_parser();
- struct vrml97_skip_grammar : boost::spirit::grammar<vrml97_skip_grammar> {
+ struct vrml97_skip_grammar :
+ boost::spirit::classic::grammar<vrml97_skip_grammar> {
template <typename ScannerT>
struct definition {
- typedef boost::spirit::rule<ScannerT> rule_t;
+ typedef boost::spirit::classic::rule<ScannerT> rule_t;
rule_t skip;
@@ -63,7 +64,7 @@
vrml97_skip_grammar::definition<ScannerT>::
definition(const vrml97_skip_grammar & /* self */)
{
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
BOOST_SPIRIT_DEBUG_NODE(skip);
@@ -135,7 +136,7 @@
struct get_mftype_parse_error;
template <>
- struct get_mftype_parse_error<boost::spirit::real_parser<float, boost::spirit::real_parser_policies<float> > > {
+ struct get_mftype_parse_error<boost::spirit::classic::real_parser<float, boost::spirit::classic::real_parser_policies<float> > > {
static const vrml_parse_error element_or_lbracket_value =
float_or_lbracket_expected;
static const vrml_parse_error element_or_rbracket_value =
@@ -143,7 +144,7 @@
};
template <>
- struct get_mftype_parse_error<boost::spirit::real_parser<double, boost::spirit::real_parser_policies<double> > > {
+ struct get_mftype_parse_error<boost::spirit::classic::real_parser<double, boost::spirit::classic::real_parser_policies<double> > > {
static const vrml_parse_error element_or_lbracket_value =
float_or_lbracket_expected;
static const vrml_parse_error element_or_rbracket_value =
@@ -203,7 +204,7 @@
return msg[error];
}
- typedef boost::spirit::assertion<vrml_parse_error> vrml_parse_assertion;
+ typedef boost::spirit::classic::assertion<vrml_parse_error> vrml_parse_assertion;
const vrml_parse_assertion expect_dot(dot_expected);
const vrml_parse_assertion expect_lbrace(lbrace_expected);
@@ -247,12 +248,12 @@
{}
template <typename ScannerT, typename ErrorT>
- boost::spirit::error_status<> operator()(const ScannerT & scan,
+ boost::spirit::classic::error_status<> operator()(const ScannerT & scan,
const ErrorT & err) const
{
using std::endl;
- using boost::spirit::error_status;
- using boost::spirit::file_position;
+ using boost::spirit::classic::error_status;
+ using boost::spirit::classic::file_position;
const file_position fpos = err.where.get_position();
if (err.descriptor == rotation_axis_not_normalized) {
@@ -276,9 +277,9 @@
};
- const boost::spirit::real_parser<float, boost::spirit::real_parser_policies<float> >
+ const boost::spirit::classic::real_parser<float, boost::spirit::classic::real_parser_policies<float> >
float_p =
- boost::spirit::real_parser<float, boost::spirit::real_parser_policies<float> >();
+ boost::spirit::classic::real_parser<float, boost::spirit::classic::real_parser_policies<float> >();
struct bool_parser {
@@ -288,7 +289,7 @@
std::ptrdiff_t operator()(const ScannerT & scan,
result_t & result) const
{
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
using namespace phoenix;
typedef typename match_result<ScannerT, result_t>::type match_t;
match_t match
@@ -299,7 +300,7 @@
}
};
- const boost::spirit::functor_parser<bool_parser> bool_p;
+ const boost::spirit::classic::functor_parser<bool_parser> bool_p;
struct int32_parser {
@@ -309,7 +310,7 @@
std::ptrdiff_t operator()(const ScannerT & scan,
result_t & result) const
{
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
using namespace phoenix;
typedef typename match_result<ScannerT, result_t>::type match_t;
match_t match
@@ -323,10 +324,10 @@
}
};
- const boost::spirit::functor_parser<int32_parser> int32_p;
+ const boost::spirit::classic::functor_parser<int32_parser> int32_p;
template <>
- struct get_mftype_parse_error<boost::spirit::functor_parser<int32_parser> > {
+ struct get_mftype_parse_error<boost::spirit::classic::functor_parser<int32_parser> > {
static const vrml_parse_error element_or_lbracket_value =
int32_or_lbracket_expected;
static const vrml_parse_error element_or_rbracket_value =
@@ -356,12 +357,12 @@
std::ptrdiff_t operator()(const ScannerT & scan,
result_t & result) const
{
- using boost::spirit::eps_p;
- using boost::spirit::match_result;
+ using boost::spirit::classic::eps_p;
+ using boost::spirit::classic::match_result;
using phoenix::arg1;
using phoenix::var;
typedef typename match_result<ScannerT, result_t>::type match_t;
- typedef typename boost::spirit::rule<ScannerT> rule_t;
+ typedef typename boost::spirit::classic::rule<ScannerT> rule_t;
rule_t rule
= float_p[var(result) = arg1] >> eps_p(valid(result))
@@ -371,7 +372,7 @@
}
};
- const boost::spirit::functor_parser<intensity_parser> intensity_p;
+ const boost::spirit::classic::functor_parser<intensity_parser> intensity_p;
struct color_parser {
@@ -382,10 +383,10 @@
std::ptrdiff_t operator()(const ScannerT & scan,
result_t & result) const
{
- using boost::spirit::match_result;
+ using boost::spirit::classic::match_result;
using phoenix::arg1;
using phoenix::var;
- typedef typename boost::spirit::rule<ScannerT> rule_t;
+ typedef typename boost::spirit::classic::rule<ScannerT> rule_t;
typedef typename match_result<ScannerT, result_t>::type match_t;
rule_t rule
@@ -398,10 +399,10 @@
}
};
- const boost::spirit::functor_parser<color_parser> color_p;
+ const boost::spirit::classic::functor_parser<color_parser> color_p;
template <>
- struct get_mftype_parse_error<boost::spirit::functor_parser<color_parser> > {
+ struct get_mftype_parse_error<boost::spirit::classic::functor_parser<color_parser> > {
static const vrml_parse_error element_or_lbracket_value =
color_or_lbracket_expected;
static const vrml_parse_error element_or_rbracket_value =
@@ -444,12 +445,12 @@
std::ptrdiff_t operator()(const ScannerT & scan,
result_t & result) const
{
- using boost::spirit::match_result;
- using boost::spirit::eps_p;
- using boost::spirit::guard;
+ using boost::spirit::classic::match_result;
+ using boost::spirit::classic::eps_p;
+ using boost::spirit::classic::guard;
using phoenix::arg1;
using phoenix::var;
- typedef typename boost::spirit::rule<ScannerT> rule_t;
+ typedef typename boost::spirit::classic::rule<ScannerT> rule_t;
typedef typename match_result<ScannerT, result_t>::type match_t;
guard<vrml_parse_error> g;
rule_t rule
@@ -475,7 +476,7 @@
};
template <typename RotationNotNormalizedHandler>
- struct get_mftype_parse_error<boost::spirit::functor_parser<rotation_parser<RotationNotNormalizedHandler> > > {
+ struct get_mftype_parse_error<boost::spirit::classic::functor_parser<r...
[truncated message content] |
|
From: <br...@us...> - 2009-06-23 03:30:25
|
Revision: 3926
http://openvrml.svn.sourceforge.net/openvrml/?rev=3926&view=rev
Author: braden
Date: 2009-06-23 03:30:22 +0000 (Tue, 23 Jun 2009)
Log Message:
-----------
Current Boost no longer provides <boost/thread.hpp>.
Modified Paths:
--------------
trunk/ChangeLog
trunk/tests/browser.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-22 21:11:18 UTC (rev 3925)
+++ trunk/ChangeLog 2009-06-23 03:30:22 UTC (rev 3926)
@@ -1,5 +1,10 @@
2009-06-22 Braden McDaniel <br...@en...>
+ * tests/browser.cpp: Current Boost no longer provides
+ <boost/thread.hpp>.
+
+2009-06-22 Braden McDaniel <br...@en...>
+
Use Spirit Classic in the boost::spirit::classic namespace.
* src/libopenvrml/openvrml/basetypes.cpp
Modified: trunk/tests/browser.cpp
===================================================================
--- trunk/tests/browser.cpp 2009-06-22 21:11:18 UTC (rev 3925)
+++ trunk/tests/browser.cpp 2009-06-23 03:30:22 UTC (rev 3926)
@@ -24,7 +24,7 @@
# include <sstream>
# include <boost/filesystem/operations.hpp>
# include <boost/multi_index/detail/scope_guard.hpp>
-# include <boost/thread.hpp>
+# include <boost/thread/condition.hpp>
# include <boost/test/unit_test.hpp>
# include "test_resource_fetcher.h"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-23 03:33:11
|
Revision: 3927
http://openvrml.svn.sourceforge.net/openvrml/?rev=3927&view=rev
Author: braden
Date: 2009-06-23 03:32:50 +0000 (Tue, 23 Jun 2009)
Log Message:
-----------
Use Spirit Classic in the boost::spirit::classic namespace.
Modified Paths:
--------------
trunk/ChangeLog
trunk/examples/pretty_print.cpp
trunk/tests/parse_vrml97.cpp
trunk/tests/parse_x3dvrml.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-23 03:30:22 UTC (rev 3926)
+++ trunk/ChangeLog 2009-06-23 03:32:50 UTC (rev 3927)
@@ -1,5 +1,13 @@
2009-06-22 Braden McDaniel <br...@en...>
+ Use Spirit Classic in the boost::spirit::classic namespace.
+
+ * tests/parse_x3dvrml.cpp
+ * tests/parse_vrml97.cpp
+ * examples/pretty_print.cpp
+
+2009-06-22 Braden McDaniel <br...@en...>
+
* tests/browser.cpp: Current Boost no longer provides
<boost/thread.hpp>.
Modified: trunk/examples/pretty_print.cpp
===================================================================
--- trunk/examples/pretty_print.cpp 2009-06-23 03:30:22 UTC (rev 3926)
+++ trunk/examples/pretty_print.cpp 2009-06-23 03:32:50 UTC (rev 3927)
@@ -27,7 +27,7 @@
# include <fstream>
using namespace std;
-using namespace boost::spirit;
+using namespace boost::spirit::classic;
using namespace openvrml;
class indent;
Modified: trunk/tests/parse_vrml97.cpp
===================================================================
--- trunk/tests/parse_vrml97.cpp 2009-06-23 03:30:22 UTC (rev 3926)
+++ trunk/tests/parse_vrml97.cpp 2009-06-23 03:32:50 UTC (rev 3927)
@@ -21,7 +21,7 @@
# include <openvrml/vrml97_grammar.h>
using namespace std;
-using namespace boost::spirit;
+using namespace boost::spirit::classic;
using namespace openvrml;
int main(int argc, char * argv[])
Modified: trunk/tests/parse_x3dvrml.cpp
===================================================================
--- trunk/tests/parse_x3dvrml.cpp 2009-06-23 03:30:22 UTC (rev 3926)
+++ trunk/tests/parse_x3dvrml.cpp 2009-06-23 03:32:50 UTC (rev 3927)
@@ -21,7 +21,7 @@
# include <openvrml/x3d_vrml_grammar.h>
using namespace std;
-using namespace boost::spirit;
+using namespace boost::spirit::classic;
using namespace openvrml;
int main(int argc, char * argv[])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-23 03:40:40
|
Revision: 3928
http://openvrml.svn.sourceforge.net/openvrml/?rev=3928&view=rev
Author: braden
Date: 2009-06-23 03:40:35 +0000 (Tue, 23 Jun 2009)
Log Message:
-----------
Check to see whether the pertinent precious variables have been set by the user before failing due to a missing dependency.
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-23 03:32:50 UTC (rev 3927)
+++ trunk/ChangeLog 2009-06-23 03:40:35 UTC (rev 3928)
@@ -1,5 +1,11 @@
2009-06-22 Braden McDaniel <br...@en...>
+ * configure.ac: Check to see whether the pertinent precious
+ variables have been set by the user before failing due to a
+ missing dependency.
+
+2009-06-22 Braden McDaniel <br...@en...>
+
Use Spirit Classic in the boost::spirit::classic namespace.
* tests/parse_x3dvrml.cpp
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2009-06-23 03:32:50 UTC (rev 3927)
+++ trunk/configure.ac 2009-06-23 03:40:35 UTC (rev 3928)
@@ -132,7 +132,9 @@
#
# The XmlTextReader interface appears in libxml 2.5.
#
-PKG_CHECK_MODULES([XML], [libxml-2.0 >= 2.5])
+PKG_CHECK_MODULES([XML], [libxml-2.0 >= 2.5], , [have_libxml=no])
+AS_IF([test X$have_libxml = Xno -a -z "$XML_LIBS"],
+ [AC_MSG_FAILURE([libxml not found])])
PKG_CHECK_MODULES([FONTCONFIG], [$REQUIRE_FONTCONFIG], , [have_fontconfig=no])
PKG_CHECK_MODULES([FREETYPE], [$REQUIRE_FREETYPE], , [have_freetype=no])
@@ -314,15 +316,15 @@
AC_ARG_ENABLE([render-text-node],
[AC_HELP_STRING([--disable-render-text-node],
[disable support for rendering Text nodes])])
-if test X$enable_render_text_node != Xno; then
- if test X$have_fontconfig = Xno -o X$have_freetype = Xno; then
- AC_MSG_FAILURE([fontconfig and FreeType are required for rendering Text nodes.])
- fi
- AC_DEFINE([OPENVRML_ENABLE_RENDER_TEXT_NODE], [1],
- [Defined if support for rendering Text nodes is enabled.])
- AC_DEFINE_UNQUOTED([OPENVRML_FT_CONST], [$ov_cv_ft_const],
- [const for FreeType callback function signatures.])
-fi
+AS_IF([test X$enable_render_text_node != Xno],
+ [AS_IF([test X$have_fontconfig = Xno -a -z "$FONTCONFIG_LIBS"],
+ [AC_MSG_FAILURE([fontconfig is required for rendering Text nodes])])
+ AS_IF([test X$have_freetype = Xno -a -z "$FREETYPE_LIBS"],
+ [AC_MSG_FAILURE([FreeType is required for rendering Text nodes])])
+ AC_DEFINE([OPENVRML_ENABLE_RENDER_TEXT_NODE], [1],
+ [Defined if support for rendering Text nodes is enabled.])
+ AC_DEFINE_UNQUOTED([OPENVRML_FT_CONST], [$ov_cv_ft_const],
+ [const for FreeType callback function signatures.])])
#
# Script node JavaScript support
@@ -334,13 +336,13 @@
AC_ARG_WITH([libjs],
[AC_HELP_STRING([--with-libjs],
[use libjs for JavaScript support])])
-AS_IF([test "X$enable_script_node_javascript" = "Xno"],
+AS_IF([test X$enable_script_node_javascript = Xno],
[JS_CFLAGS="" JS_LIBS=""],
[AS_IF([test X$with_libjs = Xyes -a X$have_libjs = Xyes],
[AS_IF([test -z "$JS_CFLAGS"], [JS_CFLAGS=""])
AS_IF([test -z "$JS_LIBS"], [JS_LIBS="-ljs"])])
-AS_IF([test X$have_libmozjs != Xyes -a \( X$with_libjs = Xyes -a X$have_libjs != Xyes \) -o X$have_jsapi_h != Xyes],
- [AC_MSG_FAILURE([SpiderMonkey is required for Script node JavaScript support.])])
+AS_IF([test \( \( X$have_libmozjs = Xno -o \( X$with_libjs = Xyes -a X$have_libjs = Xno \) \) -a -z "$JS_LIBS" \) -o X$have_jsapi_h != Xyes],
+ [AC_MSG_FAILURE([SpiderMonkey is required for Script node JavaScript support])])
AC_DEFINE([OPENVRML_ENABLE_SCRIPT_NODE_JAVASCRIPT], [1],
[Defined if Script node JavaScript support is enabled.])
#
@@ -424,9 +426,9 @@
[AC_HELP_STRING([--disable-xembed],
[do not build the XEmbed control])])
AS_IF([test X$enable_xembed != Xno],
- [AS_IF([test X$have_dbus_glib = Xno],
+ [AS_IF([test X$have_dbus_glib = Xno -a -z "$DBUS_G_LIBS"],
[AC_MSG_FAILURE([D-Bus GLib bindings are required to build the XEmbed control])])
- AS_IF([test X$have_gtkgl = Xno],
+ AS_IF([test X$have_gtkgl = Xno -a -z "$GTKGL_LIBS"],
[AC_MSG_FAILURE([GtkGLExt is required to build the XEmbed control])])
AS_IF([test X$enable_gl_renderer = Xno],
[AC_MSG_FAILURE([the XEmbed control cannot be built without the GL renderer])])])
@@ -441,11 +443,11 @@
AS_IF([test X$enable_player != Xno],
[AS_IF([test X$enable_xembed = Xno],
[AC_MSG_FAILURE([OpenVRML Player cannot be built without the XEmbed control])])
- AS_IF([test X$have_gio = Xno],
+ AS_IF([test X$have_gio = Xno -a -z "$GIO_LIBS"],
[AC_MSG_FAILURE([GIO is required to build OpenVRML Player])])
- AS_IF([test X$have_gnomeui = Xno],
+ AS_IF([test X$have_gnomeui = Xno -a -z "$GNOMEUI_LIBS"],
[AC_MSG_FAILURE([libgnomeui is required to build OpenVRML Player])])
- AS_IF([test X$have_libcurl = Xno],
+ AS_IF([test X$have_libcurl = Xno -a -z "$CURL_LIBS"],
[AC_MSG_FAILURE([libcurl is required to build OpenVRML Player])])
])
AM_CONDITIONAL([ENABLE_PLAYER], [test X$enable_player != Xno])
@@ -459,9 +461,9 @@
AS_IF([test X$enable_mozilla_plugin != Xno],
[AS_IF([test X$enable_xembed = Xno],
[AC_MSG_FAILURE([the Mozilla plug-in cannot be built without the XEmbed control])])
- AS_IF([test X$have_mozilla_plugin = Xno],
+ AS_IF([test X$have_mozilla_plugin = Xno -a -z "$MOZILLA_PLUGIN_CFLAGS"],
[AC_MSG_FAILURE([Mozilla plug-in development headers are required to build the Mozilla plug-in.])])
- AS_IF([test "X$have_dbus_glib" = "Xno"],
+ AS_IF([test X$have_dbus_glib = Xno -a -z "$DBUS_G_LIBS"],
[AC_MSG_FAILURE([The D-Bus GLib binding is required to build the Mozilla plug-in])])])
AM_CONDITIONAL([ENABLE_MOZILLA_PLUGIN],
[test "X$enable_mozilla_plugin" != "Xno" -a "X$have_dbus_glib" != "Xno"])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-24 03:20:46
|
Revision: 3929
http://openvrml.svn.sourceforge.net/openvrml/?rev=3929&view=rev
Author: braden
Date: 2009-06-24 03:20:41 +0000 (Wed, 24 Jun 2009)
Log Message:
-----------
Set OPENVRML_NODE_PATH and OPENVRML_SCRIPT_PATH when running the test programs.
Modified Paths:
--------------
trunk/ChangeLog
trunk/tests/Makefile.am
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-23 03:40:35 UTC (rev 3928)
+++ trunk/ChangeLog 2009-06-24 03:20:41 UTC (rev 3929)
@@ -1,3 +1,13 @@
+2009-06-23 Braden McDaniel <br...@en...>
+
+ Set OPENVRML_NODE_PATH and OPENVRML_SCRIPT_PATH when running the
+ test programs.
+
+ * tests/Makefile.am
+ (TESTS_ENVIRONMENT): Set OPENVRML_NODE_PATH and
+ OPENVRML_SCRIPT_PATH.
+ (check-local): Reuse TESTS_ENVIRONMENT.
+
2009-06-22 Braden McDaniel <br...@en...>
* configure.ac: Check to see whether the pertinent precious
Modified: trunk/tests/Makefile.am
===================================================================
--- trunk/tests/Makefile.am 2009-06-23 03:40:35 UTC (rev 3928)
+++ trunk/tests/Makefile.am 2009-06-24 03:20:41 UTC (rev 3929)
@@ -5,7 +5,12 @@
AM_CXXFLAGS = $(PTHREAD_CFLAGS)
AM_LDFLAGS = $(OPENVRML_RPATH)
-TESTS_ENVIRONMENT = BOOST_TEST_REPORT_LEVEL=no OPENVRML_DATADIR=$(abs_top_srcdir)/data
+TESTS_ENVIRONMENT = \
+ BOOST_TEST_REPORT_LEVEL=no \
+ OPENVRML_DATADIR=$(abs_top_srcdir)/data \
+ OPENVRML_NODE_PATH=$(abs_top_builddir)/src/node \
+ OPENVRML_SCRIPT_PATH=$(abs_top_builddir)/src/script
+
TESTS = color \
rotation \
mat4f \
@@ -122,7 +127,7 @@
TESTSUITE = $(srcdir)/testsuite
check-local: atconfig atlocal $(TESTSUITE)
- $(SHELL) $(TESTSUITE) OPENVRML_DATADIR=$(abs_top_srcdir)/data
+ $(SHELL) $(TESTSUITE) $(TESTS_ENVIRONMENT)
AUTOTEST = autom4te --language=autotest
$(TESTSUITE): $(srcdir)/package.m4 $(srcdir)/testsuite.at
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-26 02:33:27
|
Revision: 3931
http://openvrml.svn.sourceforge.net/openvrml/?rev=3931&view=rev
Author: braden
Date: 2009-06-26 02:33:26 +0000 (Fri, 26 Jun 2009)
Log Message:
-----------
Updated to reflect use of the boost::spirit::classic namespace.
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/parsing.doc
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-26 02:31:53 UTC (rev 3930)
+++ trunk/ChangeLog 2009-06-26 02:33:26 UTC (rev 3931)
@@ -1,3 +1,8 @@
+2009-06-25 Braden McDaniel <br...@en...>
+
+ * doc/parsing.doc: Updated to reflect use of the
+ boost::spirit::classic namespace.
+
2009-06-23 Braden McDaniel <br...@en...>
Set OPENVRML_NODE_PATH and OPENVRML_SCRIPT_PATH when running the
Modified: trunk/doc/parsing.doc
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-26 07:44:22
|
Revision: 3932
http://openvrml.svn.sourceforge.net/openvrml/?rev=3932&view=rev
Author: braden
Date: 2009-06-26 07:44:19 +0000 (Fri, 26 Jun 2009)
Log Message:
-----------
Updated the directory layout; note that at least Boost 1.37 is required.
Modified Paths:
--------------
trunk/ChangeLog
trunk/README
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-26 02:33:26 UTC (rev 3931)
+++ trunk/ChangeLog 2009-06-26 07:44:19 UTC (rev 3932)
@@ -1,3 +1,8 @@
+2009-06-26 Braden McDaniel <br...@en...>
+
+ * README: Updated the directory layout; note that at least Boost
+ 1.37 is required.
+
2009-06-25 Braden McDaniel <br...@en...>
* doc/parsing.doc: Updated to reflect use of the
Modified: trunk/README
===================================================================
--- trunk/README 2009-06-26 02:33:26 UTC (rev 3931)
+++ trunk/README 2009-06-26 07:44:19 UTC (rev 3932)
@@ -75,19 +75,54 @@
Package directory layout
========================
+ /data
+ /component : XML component definitions.
/doc
- /manual : API documentation.
- /examples : Example programs.
+ /manual : API documentation.
+ /examples : Example programs.
/ide-projects
/Windows
- /VisualC9_0 : Microsoft Visual C++ 9.0 project files.
- /lib : 3rd party library sources.
- /m4 : m4 macros used by the GNU build system.
- /models : Sample VRML models.
- /mozilla-plugin : Mozilla plug-in sources.
+ /VisualC9_0 : Microsoft Visual C++ 9.0 project files.
+ /m4 : m4 macros used by the GNU build system.
+ /models : Sample VRML models.
/src
- /libopenvrml : Runtime library sources.
- /libopenvrml-gl : OpenGL renderer library sources.
+ /libopenvrml : Runtime library sources.
+ /libopenvrml-gl : OpenGL renderer library sources.
+ /mozilla-plugin : Mozilla plug-in sources.
+ /node
+ /vrml97 : VRML97 node implementation sources.
+ /x3d-cad-geometry : X3D CAD Geometry component node
+ implementation sources.
+ /x3d-core : X3D Core component node implementation
+ sources.
+ /x3d-dis : X3D DIS component node implementation
+ sources.
+ /x3d-environmental-effects : X3D Environmental Effects component node
+ implementation sources.
+ /x3d-event-utilities : X3D Event Utilities component node
+ implementation sources.
+ /x3d-geometry2d : X3D Geometry2D component node
+ implementation sources.
+ /x3d-geospatial : X3D Geospatial component node
+ implementation sources.
+ /x3d-grouping : X3D Grouping component node
+ implementation sources.
+ /x3d-h-anim : X3D H-Anim component node implementation
+ sources.
+ /x3d-interpolation : X3D Interpolation component node
+ implementation sources.
+ /x3d-key-device-sensor : X3D Key Device Sensor component node
+ implementation sources.
+ /x3d-networking : X3D Networking component node
+ implementation sources.
+ /x3d-nurbs : X3D NURBS component node implementation
+ sources.
+ /x3d-rendering : X3D Rendering component node
+ implementation sources.
+ /x3d-shape : X3D Shape component node implementation
+ sources.
+ /x3d-texturing : X3D Texturing component node
+ implementation sources.
/openvrml-xembed : XEmbed control application sources.
/openvrml-player : OpenVRML Player application sources.
/script : Scripting engine module sources.
@@ -98,10 +133,11 @@
Prerequisites
=============
- OpenVRML requires the Boost C++ libraries to build. Boost is
-packaged for many systems; so you should consult your operating system
-vendor if Boost is not already installed on your system. Otherwise, you
-can obtain Boost from <http://boost.org>.
+ OpenVRML requires the Boost C++ libraries to build, at least
+version 1.37. Boost is packaged for many systems; so you should
+consult your operating system vendor if Boost is not already installed
+on your system. Otherwise, you can obtain Boost from
+<http://boost.org>.
Note that Boost binaries built from the boost.org distribution, as
well as some other distributions, apply a suffix to the library
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-26 08:22:37
|
Revision: 3933
http://openvrml.svn.sourceforge.net/openvrml/?rev=3933&view=rev
Author: braden
Date: 2009-06-26 08:22:36 +0000 (Fri, 26 Jun 2009)
Log Message:
-----------
Back off the system memory recommendation a bit.
Modified Paths:
--------------
trunk/ChangeLog
trunk/README
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-26 07:44:19 UTC (rev 3932)
+++ trunk/ChangeLog 2009-06-26 08:22:36 UTC (rev 3933)
@@ -1,5 +1,9 @@
2009-06-26 Braden McDaniel <br...@en...>
+ * README: Back off the system memory recommendation a bit.
+
+2009-06-26 Braden McDaniel <br...@en...>
+
* README: Updated the directory layout; note that at least Boost
1.37 is required.
Modified: trunk/README
===================================================================
--- trunk/README 2009-06-26 07:44:19 UTC (rev 3932)
+++ trunk/README 2009-06-26 08:22:36 UTC (rev 3933)
@@ -75,6 +75,7 @@
Package directory layout
========================
+
/data
/component : XML component definitions.
/doc
@@ -148,8 +149,8 @@
Building OpenVRML is fairly demanding of system resources;
especially, it seems, with modern versions of the GNU C++ compiler. It
-is recommended that 32-bit build hosts have at least 1.5 GB of system
-memory; the recommended minimum for 64-bit build hosts is 3 GB.
+is recommended that 32-bit build hosts have at least 1 GB of system
+memory; the recommended minimum for 64-bit build hosts is 2 GB.
Optional dependencies
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-29 06:12:55
|
Revision: 3934
http://openvrml.svn.sourceforge.net/openvrml/?rev=3934&view=rev
Author: braden
Date: 2009-06-29 06:12:52 +0000 (Mon, 29 Jun 2009)
Log Message:
-----------
Updated dependency list.
Modified Paths:
--------------
trunk/ChangeLog
trunk/README
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-26 08:22:36 UTC (rev 3933)
+++ trunk/ChangeLog 2009-06-29 06:12:52 UTC (rev 3934)
@@ -1,3 +1,7 @@
+2009-06-29 Braden McDaniel <br...@en...>
+
+ * README: Updated dependency list.
+
2009-06-26 Braden McDaniel <br...@en...>
* README: Back off the system memory recommendation a bit.
Modified: trunk/README
===================================================================
--- trunk/README 2009-06-26 08:22:36 UTC (rev 3933)
+++ trunk/README 2009-06-29 06:12:52 UTC (rev 3934)
@@ -124,11 +124,11 @@
sources.
/x3d-texturing : X3D Texturing component node
implementation sources.
- /openvrml-xembed : XEmbed control application sources.
- /openvrml-player : OpenVRML Player application sources.
- /script : Scripting engine module sources.
- /java : Script node Java API sources.
- /tests : Test programs.
+ /openvrml-xembed : XEmbed control application sources.
+ /openvrml-player : OpenVRML Player application sources.
+ /script : Scripting engine module sources.
+ /java : Script node Java API sources.
+ /tests : Test programs.
Prerequisites
@@ -165,10 +165,15 @@
libjpeg <http://www.ijg.org>
FreeType <http://freetype.org>
Fontconfig <http://fontconfig.org>
- Mozilla <http://mozilla.org>
+ libxml <http://xmlsoft.org>
+ XULRunner <https://developer.mozilla.org/En/XULRunner>
Java Development Kit <http://java.sun.com/j2se/>
OpenGL/Mesa <http://mesa3d.org>
GTK+ <http://gtk.org>
+ GtkGLExt <http://gtkglext.sourceforge.net>
+ libcurl <http://curl.haxx.se/libcurl/>
+ D-Bus <http://www.freedesktop.org/wiki/Software/dbus>
+ GNOME <http://gnome.org>
SDL <http://libsdl.org>
Doxygen <http://doxygen.org>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-07-02 05:24:34
|
Revision: 3935
http://openvrml.svn.sourceforge.net/openvrml/?rev=3935&view=rev
Author: braden
Date: 2009-07-02 05:24:32 +0000 (Thu, 02 Jul 2009)
Log Message:
-----------
Note componentization features in the introduction.
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/intro.doc
Property Changed:
----------------
trunk/doc/conformance.doc
trunk/doc/gpl.doc
trunk/doc/index.doc
trunk/doc/intro.doc
trunk/doc/lgpl.doc
trunk/doc/libopenvrml.doc
trunk/doc/parsing.doc
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-29 06:12:52 UTC (rev 3934)
+++ trunk/ChangeLog 2009-07-02 05:24:32 UTC (rev 3935)
@@ -1,3 +1,7 @@
+2009-07-02 Braden McDaniel <br...@en...>
+
+ * doc/intro.doc: Note componentization features in the introduction.
+
2009-06-29 Braden McDaniel <br...@en...>
* README: Updated dependency list.
Property changes on: trunk/doc/conformance.doc
___________________________________________________________________
Modified: svn:mime-type
- application/msword
+ text/plain
Property changes on: trunk/doc/gpl.doc
___________________________________________________________________
Modified: svn:mime-type
- application/msword
+ text/plain
Property changes on: trunk/doc/index.doc
___________________________________________________________________
Modified: svn:mime-type
- application/msword
+ text/plain
Modified: trunk/doc/intro.doc
===================================================================
(Binary files differ)
Property changes on: trunk/doc/intro.doc
___________________________________________________________________
Modified: svn:mime-type
- application/msword
+ text/plain
Property changes on: trunk/doc/lgpl.doc
___________________________________________________________________
Modified: svn:mime-type
- application/msword
+ text/plain
Property changes on: trunk/doc/libopenvrml.doc
___________________________________________________________________
Modified: svn:mime-type
- application/msword
+ text/plain
Property changes on: trunk/doc/parsing.doc
___________________________________________________________________
Modified: svn:mime-type
- application/msword
+ text/plain
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-07-02 05:54:59
|
Revision: 3936
http://openvrml.svn.sourceforge.net/openvrml/?rev=3936&view=rev
Author: braden
Date: 2009-07-02 05:54:22 +0000 (Thu, 02 Jul 2009)
Log Message:
-----------
Point to trac resources rather than the old SourceForge ones.
Modified Paths:
--------------
trunk/ChangeLog
trunk/README
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-07-02 05:24:32 UTC (rev 3935)
+++ trunk/ChangeLog 2009-07-02 05:54:22 UTC (rev 3936)
@@ -1,5 +1,10 @@
2009-07-02 Braden McDaniel <br...@en...>
+ * README: Point to trac resources rather than the old SourceForge
+ ones.
+
+2009-07-02 Braden McDaniel <br...@en...>
+
* doc/intro.doc: Note componentization features in the introduction.
2009-06-29 Braden McDaniel <br...@en...>
Modified: trunk/README
===================================================================
--- trunk/README 2009-07-02 05:24:32 UTC (rev 3935)
+++ trunk/README 2009-07-02 05:54:22 UTC (rev 3936)
@@ -340,10 +340,10 @@
Bug reports
===========
- Please report any bugs you encounter via the SourceForge bug tracking
+ Please report any bugs you encounter using OpenVRML's bug tracking
system:
- <http://sf.net/bugs/?group_id=7151>
+ <https://sourceforge.net/apps/trac/openvrml/newticket>
Note that you will need to log into SourceForge before reporting a
bug.
@@ -371,13 +371,13 @@
============
We're always grateful for help in improving OpenVRML. Consult the
-SourceForge Task Manager for a list of planned improvements:
+list of active tickets:
- <http://sf.net/pm/task.php?group_project_id=2579&group_id=7151&func=browse>
+ <https://sourceforge.net/apps/trac/openvrml/report/1>
- Unassigned tasks are up for grabs, but please post to the
-openvrml-develop mailing list to alert others of your intention to take
-a task. This helps avoid duplicated effort. If you do not see the task
-you'd like to pursue listed in the Task Manager, but you think the
-library could benefit from your contribution, post a proposal to the
+ Unassigned tasks are up for grabs; but please post to the
+openvrml-develop mailing list to alert others of your intention to
+take a task. This helps avoid duplicated effort. If you do not see
+the task you'd like to pursue listed, but you think the library could
+benefit from your contribution, post a proposal to the
openvrml-develop mailing list.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-07-02 08:58:53
|
Revision: 3937
http://openvrml.svn.sourceforge.net/openvrml/?rev=3937&view=rev
Author: braden
Date: 2009-07-02 08:57:53 +0000 (Thu, 02 Jul 2009)
Log Message:
-----------
Removed obsolete AC_DEFINE of OPENVRML_ENABLE_SCRIPT_NODE_JAVASCRIPT.
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-07-02 05:54:22 UTC (rev 3936)
+++ trunk/ChangeLog 2009-07-02 08:57:53 UTC (rev 3937)
@@ -1,5 +1,10 @@
2009-07-02 Braden McDaniel <br...@en...>
+ * configure.ac: Removed obsolete AC_DEFINE of
+ OPENVRML_ENABLE_SCRIPT_NODE_JAVASCRIPT.
+
+2009-07-02 Braden McDaniel <br...@en...>
+
* README: Point to trac resources rather than the old SourceForge
ones.
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2009-07-02 05:54:22 UTC (rev 3936)
+++ trunk/configure.ac 2009-07-02 08:57:53 UTC (rev 3937)
@@ -343,8 +343,6 @@
AS_IF([test -z "$JS_LIBS"], [JS_LIBS="-ljs"])])
AS_IF([test \( \( X$have_libmozjs = Xno -o \( X$with_libjs = Xyes -a X$have_libjs = Xno \) \) -a -z "$JS_LIBS" \) -o X$have_jsapi_h != Xyes],
[AC_MSG_FAILURE([SpiderMonkey is required for Script node JavaScript support])])
-AC_DEFINE([OPENVRML_ENABLE_SCRIPT_NODE_JAVASCRIPT], [1],
- [Defined if Script node JavaScript support is enabled.])
#
# Figure out whether we need to add -DJS_THREADSAFE to JS_CFLAGS.
#
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|