**
** \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
enum exit_code
{
- SYNFIGTOOL_OK =0,
- SYNFIGTOOL_FILENOTFOUND =1,
- SYNFIGTOOL_BORRED =2,
- SYNFIGTOOL_HELP =3,
- SYNFIGTOOL_UNKNOWNARGUMENT =4,
- SYNFIGTOOL_UNKNOWNERROR =5,
- SYNFIGTOOL_INVALIDTARGET =6,
- SYNFIGTOOL_RENDERFAILURE =7,
- SYNFIGTOOL_BLANK =8,
- SYNFIGTOOL_BADVERSION =9,
+ SYNFIGTOOL_OK = 0,
+ SYNFIGTOOL_FILENOTFOUND = 1,
+ SYNFIGTOOL_BORED = 2,
+ SYNFIGTOOL_HELP = 3,
+ SYNFIGTOOL_UNKNOWNARGUMENT = 4,
+ SYNFIGTOOL_UNKNOWNERROR = 5,
+ SYNFIGTOOL_INVALIDTARGET = 6,
+ SYNFIGTOOL_RENDERFAILURE = 7,
+ SYNFIGTOOL_BLANK = 8,
+ SYNFIGTOOL_BADVERSION = 9,
SYNFIGTOOL_MISSINGARGUMENT =10
};
}
virtual bool
- amount_complete(int current, int total)
+ amount_complete(int /*current*/, int /*total*/)
{
return true;
}
// 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
if(!job_list.size())
{
cerr<<_("Nothing to do!")<<endl;
- return SYNFIGTOOL_BORRED;
+ return SYNFIGTOOL_BORED;
}
for(;job_list.size();job_list.pop_front())