[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swftools-common] png2swg not displaying first image in loop - no th

From: Mark Lane
Subject: Re: [Swftools-common] png2swg not displaying first image in loop - no that's not it
Date: Mon, 11 Jul 2005 12:14:22 -0600
User-agent: Mozilla Thunderbird 1.0.2-6 (X11/20050513)

Matthias Kramm wrote:
On Wed, Jul 06, 2005 at 04:39:49PM -0600, Mark Lane wrote:

Okay that wasn't it either I think I know what the problem I am having is. -v expects value after it and is taking the first image name as that value.

Yes, that's right- in png2swf, -v expects a numeric argument as the log
level. Maybe that should be changed to the -v, -vv, -vvv syntax all
other tools use.

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". Even if it gives an error for second case. 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 have written command processing stuff with PHP from time to time and normally process the arguments as I go through the argv array and not try and preprocess the array like you have. You should be able to write a routine that will process the arguments in random order (save the option/value pairs of course) and do proper error checking.

I think I could probably rewrite it to properly handle error checking but it's been along time since I wrote those types of routines in C.

Of course at this point it makes more sense to look at fixing the cvs code and not a previous release.


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 ##############

reply via email to

[Prev in Thread] Current Thread [Next in Thread]