Update of /cvsroot/openvrml/openvrml/src/openvrml-gtkplug
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31931/src/openvrml-gtkplug
Modified Files:
Tag: OpenVRML-0_16-BRANCH
main.cpp
Log Message:
Added --version option.
Index: main.cpp
===================================================================
RCS file: /cvsroot/openvrml/openvrml/src/openvrml-gtkplug/main.cpp,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -C2 -d -r1.2.2.1 -r1.2.2.2
*** main.cpp 1 Oct 2006 05:48:30 -0000 1.2.2.1
--- main.cpp 2 Oct 2006 22:34:06 -0000 1.2.2.2
***************
*** 29,32 ****
--- 29,36 ----
# include <openvrml/browser.h>
+ # ifdef HAVE_CONFIG_H
+ # include "config.h"
+ # endif
+
# include "gtkvrmlbrowser.h"
# include "command_istream.h"
***************
*** 164,171 ****
--- 168,185 ----
namespace {
+ gboolean version;
gchar ** args;
GOptionEntry options[] = {
{
+ "version",
+ 'v',
+ 0,
+ G_OPTION_ARG_NONE,
+ &version,
+ "Print the version information and exit",
+ 0
+ },
+ {
G_OPTION_REMAINING,
'\0',
***************
*** 258,261 ****
--- 272,276 ----
int main(int argc, char * argv[])
{
+ using std::cout;
using std::cerr;
using std::endl;
***************
*** 289,292 ****
--- 304,312 ----
}
+ if (version) {
+ cout << "OpenVRML GtkPlug " PACKAGE_VERSION << endl;
+ return EXIT_SUCCESS;
+ }
+
if (!args) {
cerr << argv[0] << ": missing required GTK-SOCKET-ID argument" << endl;
|