Re: [c2man] remove hardcoded extension (try#2)

2006-09-21 Thread Kuba Ober
On Wednesday 20 September 2006 15:25, Vijay Kiran Kamuju wrote:
> Well then will this do good, if the file extension is 'spec', then we
> will take the default value as 'dll'.
> As the logic i am using to parse the filenames is, I am checking using
> the first part of the extension.
> Can you tell me a better method other than this?

Maybe he meant for you to use the file contentes to determine what it is, not 
the file name. Say, assume that file names are random gibberish, and work 
from there.

Cheers, Kuba




Re: [c2man] remove hardcoded extension (try#2)

2006-09-20 Thread Vijay Kiran Kamuju

Well then will this do good, if the file extension is 'spec', then we
will take the default value as 'dll'.
As the logic i am using to parse the filenames is, I am checking using
the first part of the extension.
Can you tell me a better method other than this?
I will cahnge to that.

On 9/20/06, Alexandre Julliard <[EMAIL PROTECTED]> wrote:

"Vijay Kiran Kamuju" <[EMAIL PROTECTED]> writes:

> well some spec files are like wnaspi32.spec, when we parse the names of those.
> We need to hard code them to dll.
> There is no other way unless you change the spec file names.

That doesn't mean you need to hardcode a list of extensions, any
extension is allowed, and the code should cope with that.

--
Alexandre Julliard
[EMAIL PROTECTED]






Re: [c2man] remove hardcoded extension (try#2)

2006-09-20 Thread Alexandre Julliard
"Vijay Kiran Kamuju" <[EMAIL PROTECTED]> writes:

> well some spec files are like wnaspi32.spec, when we parse the names of those.
> We need to hard code them to dll.
> There is no other way unless you change the spec file names.

That doesn't mean you need to hardcode a list of extensions, any
extension is allowed, and the code should cope with that.

-- 
Alexandre Julliard
[EMAIL PROTECTED]




Re: [c2man] remove hardcoded extension (try#2)

2006-09-20 Thread Vijay Kiran Kamuju

well some spec files are like wnaspi32.spec, when we parse the names of those.
We need to hard code them to dll.
There is no other way unless you change the spec file names.

On 9/20/06, Alexandre Julliard <[EMAIL PROTECTED]> wrote:

"Vijay Kiran Kamuju" <[EMAIL PROTECTED]> writes:

>my $uc_dll_name  = uc $dll_name;
> +
> +  if (($dll_ext ne 'ds') && ($dll_ext ne 'acm') && ($dll_ext ne 'drv')
> +  ($dll_ext ne 'exe') && ($dll_ext ne 'ocx') && ($dll_ext ne 'vxd'))
> +  {
> +$dll_ext='dll';
> +  }

You are still hardcoding things, there's really no reason to do that.

--
Alexandre Julliard
[EMAIL PROTECTED]






Re: [c2man] remove hardcoded extension (try#2)

2006-09-20 Thread Alexandre Julliard
"Vijay Kiran Kamuju" <[EMAIL PROTECTED]> writes:

>my $uc_dll_name  = uc $dll_name;
> +
> +  if (($dll_ext ne 'ds') && ($dll_ext ne 'acm') && ($dll_ext ne 'drv')
> +  ($dll_ext ne 'exe') && ($dll_ext ne 'ocx') && ($dll_ext ne 'vxd')) 
> +  {
> +$dll_ext='dll';
> +  }

You are still hardcoding things, there's really no reason to do that.

-- 
Alexandre Julliard
[EMAIL PROTECTED]