Add my copyright to files I've modified.
[synfig.git] / synfig-core / trunk / src / tool / main.cpp
index 22f5f32..d74f3cf 100644 (file)
@@ -1,11 +1,12 @@
 /* === S Y N F I G ========================================================= */
-/*!    \file main.cpp
+/*!    \file tool/main.cpp
 **     \brief SYNFIG Tool
 **
-**     $Id: main.cpp,v 1.9 2005/01/23 04:41:10 darco Exp $
+**     $Id$
 **
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+**     Copyright (c) 2007 Chris Moore
 **
 **     This package is free software; you can redistribute it and/or
 **     modify it under the terms of the GNU General Public License as
@@ -122,7 +123,7 @@ public:
        }
 
        virtual bool
-       amount_complete(int current, int total)
+       amount_complete(int /*current*/, int /*total*/)
        {
                return true;
        }
@@ -682,10 +683,10 @@ int extract_RendDesc(arg_list_t &arg_list,RendDesc &desc)
                else if(*iter=="-g")
                {
                        synfig::warning("Gamma argument is currently ignored");
-                       //arg_list.erase(iter);
-                       //iter=next++;
+                       arg_list.erase(iter);
+                       iter=next++;
                        //desc.set_gamma(Gamma(atof(iter->c_str())));
-                       //arg_list.erase(iter);
+                       arg_list.erase(iter);
                }
        }
        if(w&&h)
@@ -955,19 +956,14 @@ int main(int argc, char *argv[])
                        // If the target type is not yet defined,
                        // try to figure it out from the outfile.
                        if(target_name.empty() && !job_list.front().outfilename.empty())
-                       try
                        {
                                VERBOSE_OUT(3)<<_("Target name undefined, attempting to figure it out")<<endl;
-                               string ext=string(find(job_list.front().outfilename.begin(),job_list.front().outfilename.end(),'.')+1,job_list.front().outfilename.end());
+                               string ext=job_list.front().outfilename.substr(job_list.front().outfilename.rfind('.')+1);
                                if(Target::ext_book().count(ext))
                                        target_name=Target::ext_book()[ext];
                                else
                                        target_name=ext;
                        }
-                       catch(std::length_error)
-                       {
-                               synfig::warning("Length error caught when attempting to figure out target name");
-                       }
 
                        // If the target type is STILL not yet defined, then
                        // set it to a some sort of default