[MPlayer-dev-eng] awk and stuff

Nick Kurshev nickols_k at mail.ru
Sat Jan 12 18:30:56 CET 2002


Hello, Attila!

On Sat, 12 Jan 2002 18:16:47 +0100 you wrote:

> On Sat, 12 Jan 2002 19:05:43 +0300
> Nick Kurshev <nickols_k at mail.ru> wrote:
> 
> 
> > > I had a quick look at the file, couldnt see anything gawk specific.
> > > Ie, change it to awk and everything is fine (you can safely assume
> > > there is an awk installed on a unix)
> > > 
> > Do I need with version checking for awk?
> 
> I would do a check whether a gawk is available and if not
> check for mawk, than for nawk and if those do not exist, check whether normal
> awk can eat the awk file with a small sample.
> 
> I just checked whether it does work with solaris awk and it does not
> (looks like this old and shitty thing doesnt support functions)
> And nawk cant delete whole arrays. This should fix it.
> 
> ---schnipp---
> diff -u -r1.1 pci_db2c.awk
> --- pci_db2c.awk        9 Jan 2002 19:03:50 -0000       1.1
> +++ pci_db2c.awk        12 Jan 2002 17:07:56 -0000
> @@ -196,9 +196,11 @@
>  
>  function init_device_db()
>  {
> -  delete device_names
> +  for( i in device_names) delete device_names[i];
> +  #delete device_names
>    device_names[1]=""
> -  delete subdevice_names
> +  for( i in subdevice_names) delete subdevice_names[i];
> +  #delete subdevice_names
>    subdevice_names[1] = ""
>  }
>  
> @@ -265,4 +267,4 @@
>  # Add new name in array of subdevice names
>    subdevice_names[new_name] = new_name
>    return new_name;
> -}
> \ No newline at end of file
> +}
> ---schnapp---
> 
O'k - but we'll lose speed

> next thing is: not all ls are as bright as gnu ls:
> (on a solaris 8 box):
> ---schnipp---
> ls: illegal option -- -
> ls: illegal option -- e
> ls: illegal option -- =
> ls: illegal option -- e
> usage: ls -1RaAdCxmnlogrtucpFbqisfL [files]
> ---schnapp---
> 
> --time=ctime is not legal on a non-gnu ls.
> I couldnt find out how to acces ctime on a solaris ls.
> I even couldnt find out on my netbsd box :-(
> Can someone help ?
> 
I can remove it out - it's not significand stuff
> 
> 
> -- 
> I am a moslem, i am a terrorist.
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
> 


Best regards! Nick



More information about the MPlayer-dev-eng mailing list