Re: [flac-dev] Patch to add Unicode filename support for win32 flac

2013-03-20 Thread Erik de Castro Lopo
Janne Hyvärinen wrote:

 Seems safe indeed.
 Attached an updated patch where metaflac works too.

Janne, thanks for your hard work on this.

Unfortunately this patch fails to apply for me. The problem is that
all the Visual Studio files have CRLF newlines, while all the C files
have just LF and the patch has only LF. I'm sure there must be a 
better way around this, but I haven't found it.

Currently I'm opening the patch, selecting the VS patch chunks one
by one and converting those chunks to CRLF before applying them.
Obviously, this is a huge pain in the neck and there us a chance
that I mess something up :-).

I think it would help if you split patches like this in two; one
with just C files and the other with just VS project files. I could
then run unix2dos on the VS project patch file and hopefully get
something that applies correctly first time.

So, comments on the actual code:

a) There's a couple of files and a directory call 'utf8_io' whereas
   I think they would be better called 'win_utf8' or 'win_utf8_io'.

b) Similarly, the 'FLAC__STRINGS_IN_UTF8' should also have 'WIN' in
   it to make it clear that this is a windows feature. However, it
   would be nice if this worked for MinGW as well so this should 
   probaby be:

  #if defined(_MSC_VER) || defined(__MINGW__)

c) Not keen on the '_flac_stat' identifier. According to the ISO 
   C standard, all identifiers starting with an underscore are reserved
   for the compiler implementor. Should probably be using flac_stat_
   instead.

d) Would be nice to reduce the #ifdef hackery.

I'll have a look at this some more and probably hack the above myself.
Then I'm commit it and get you to check it.

Cheers,
Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/
___
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev


[flac-dev] Invitation to connect on LinkedIn

2013-03-20 Thread Tarun Chauhan
LinkedIn




I'd like to add you to my professional network on LinkedIn.

- Tarun

Tarun Chauhan
Software Engineer at Stellar Information System
Gurgaon, India

Confirm that you know Tarun Chauhan:
https://www.linkedin.com/e/e1z967-heimyxrr-3z/isd/7475510131/In-2j-qt/?hs=falsetok=1olxLuffGmR5E1

--
You are receiving Invitation to Connect emails. Click to unsubscribe:
http://www.linkedin.com/e/e1z967-heimyxrr-3z/-KaEbW8fLA_55DqOfC6fQGjZ6sVm/goo/flac-dev%40xiph%2Eorg/20061/I3913968919_1/?hs=falsetok=2o5GK7ONumR5E1

(c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA.


  
___
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev


Re: [flac-dev] [PATCH] Change test scripts shell to bash, to avoid lack of arithmetic support in dash, which is sh on Ubuntu 10.04

2013-03-20 Thread Jaren Stangret

 Your's is probably better and this is probably an improvement:



awk 'BEGIN { srand(); print int(rand() * 255 + 1) }'



Awk's rand seems to be seeded by the current epoch seconds, but in this
 case that doesn't matter.


Looks good to me.  I'd even go as far as implementing your nanosecond
approach as the seed for AWK's 'srand()'.  Maybe set up a tiny function to
use whenever we want a random integer:

random_int () {

awk \

-v nanosecond_seed=$(date +%N) \

'BEGIN {

srand( nanosecond_seed )

print int ( rand() * 255 + 1 )

}'

}

Then we can just call 'random_int' in place of $RANDOM...


On Wed, Mar 20, 2013 at 1:24 AM, Erik de Castro Lopo
mle...@mega-nerd.comwrote:

 Jaren Stangret wrote:

  Erik,
 
  I was thinking of doing this:
  export MALLOC_PERTURB_=$(awk 'BEGIN { srand(); print int(rand() * 32767 %
  255 + 1) }')
 
  Or would you prefer using 'date'?

 Your's is probably better and this is probably an improvement:

 awk 'BEGIN { srand(); print int(rand() * 255 + 1) }'

 Awk's rand seems to be seeded by the current epoch seconds, but in this
 case that doesn't matter.

 Erik
 --
 --
 Erik de Castro Lopo
 http://www.mega-nerd.com/
 ___
 flac-dev mailing list
 flac-dev@xiph.org
 http://lists.xiph.org/mailman/listinfo/flac-dev

___
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev