X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=synfig-core%2Ftrunk%2Fsrc%2Ftool%2Fmain.cpp;h=ed9cac2f60bcb07f2c5a189b12ce4cac855348de;hb=55463af233b3ca621964c09954d7a9ddac564524;hp=c7120def97b07775ebec4bc409d068381985a200;hpb=28f28705612902c15cd0702cc891fba35bf2d2df;p=synfig.git diff --git a/synfig-core/trunk/src/tool/main.cpp b/synfig-core/trunk/src/tool/main.cpp index c7120de..ed9cac2 100644 --- a/synfig-core/trunk/src/tool/main.cpp +++ b/synfig-core/trunk/src/tool/main.cpp @@ -5,16 +5,17 @@ ** $Id: main.cpp,v 1.9 2005/01/23 04:41:10 darco Exp $ ** ** \legal -** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** -** This software and associated documentation -** are CONFIDENTIAL and PROPRIETARY property of -** the above-mentioned copyright holder. +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. ** -** You may not copy, print, publish, or in any -** other way distribute this software without -** a prior written agreement with -** the copyright holder. +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. ** \endlegal */ /* ========================================================================= */ @@ -66,7 +67,8 @@ enum exit_code SYNFIGTOOL_INVALIDTARGET =6, SYNFIGTOOL_RENDERFAILURE =7, SYNFIGTOOL_BLANK =8, - SYNFIGTOOL_BADVERSION =9 + SYNFIGTOOL_BADVERSION =9, + SYNFIGTOOL_MISSINGARGUMENT =10 }; #ifndef VERSION @@ -137,7 +139,7 @@ class RenderProgress : public synfig::ProgressCallback float last_time; public: - RenderProgress():clk_scanline(0) { } + RenderProgress():clk_scanline(0), last_time(0) { } virtual bool task(const String &thetask) @@ -484,14 +486,12 @@ int process_global_flags(arg_list_t &arg_list) cerr<c_str()); arg_list.erase(iter); } - if(*iter=="-h") + else if(*iter=="-h") { arg_list.erase(iter); iter=next++; h=atoi(iter->c_str()); arg_list.erase(iter); } - if(*iter=="-a") + else if(*iter=="-a") { int a; arg_list.erase(iter); @@ -606,7 +610,7 @@ int extract_RendDesc(arg_list_t &arg_list,RendDesc &desc) VERBOSE_OUT(1)<