|
From: | Mark Lane |
Subject: | Re: [Swftools-common] png2swg not displaying first image in loop - no that's not it |
Date: | Tue, 12 Jul 2005 11:19:26 -0600 |
User-agent: | Mozilla Thunderbird 1.0.2-6 (X11/20050513) |
Matthias Kramm wrote:
On Mon, Jul 11, 2005 at 12:14:22PM -0600, Mark Lane wrote:Numerical arguments are fine but the routine for processing command line options should be able to know the difference between "-v 1" and "-v something.png".Agreed. The current implementation uses atoi(value), which just returns zero on failure, and doesn't output a warning to the user. Concering -v, I now changed the png2swf/jpeg2swf syntax to the -v, -vv, -vvv syntax used by all the other tools anyway, but it probably still needs to be fixed for things like -q <quality>.It all goes back to a design flaw in processing arguments AFAICT. It looks like you are try to break everything up into option/value pairs and you introduce the errors there.I only break things into option/value where the command itself dictates (in one of the callback functions), that it needs a value. I'm not sure why you think the argument processing itself is flawed- Could you elaborate?
Okay maybe I read the code wrong. I was having trouble following what exactly you were doing. I thought that the processargs function was spliting the arguments for you into option/value pairs before processing them. Sorry for the confusion.
I do thing that the way you handle the commandline arguments is flawed in that they need to be in a specific order. There are ways to handle the commandline arguments without require such a strict order.
-- Mark Lane, CET <address@hidden> Sales Manager, Hard Data Ltd. <http://www.harddata.com> 11060 166 Ave, Edmonton, Alberta, T5X 1Y3 Phone: 01-780-456-9771 Fax: 01-780-456-9772 ############## Check Out Our New Laptops ##############
[Prev in Thread] | Current Thread | [Next in Thread] |