Author: Diego Barrios Romero <[email protected]>
Date: Tue Mar 13 00:42:07 2012 +0100
Input file positional option
---
synfig-core/src/tool/main.cpp | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/synfig-core/src/tool/main.cpp b/synfig-core/src/tool/main.cpp
index 4bfeed6..f149695 100644
--- a/synfig-core/src/tool/main.cpp
+++ b/synfig-core/src/tool/main.cpp
@@ -325,6 +325,10 @@ int main(int ac, char* av[])
;
#endif
+ // The first positional option will be treated as the input file
+ po::positional_options_description po_positional;
+ po_positional.add("input-file", 1);
+
// Declare an options description instance which will include
// all the options
po::options_description po_all("");
@@ -341,7 +345,8 @@ int main(int ac, char* av[])
po::variables_map vm;
- po::store(po::command_line_parser(ac, av).options(po_all).run(), vm);
+ po::store(po::command_line_parser(ac, av).options(po_all).
+ positional(po_positional).run(), vm);
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl