On Saturday 11 March 2006 15:55, Gernot Ziegler wrote:
> Hej !
>
> > > Interesting ... I guess that hints on an uninitialized variable
> > > somewhere ... anyone who remembers fixing similar issues ?
> >
> > Umm yes, I do. And so should you, as you committed my fix :-)
>
> *grin* garbage collection, garbage collection -
>  running twice a day over my long term memory ;)
>
> Ah, now I actually _read_ what it was all about ...
> hmm, so this fix works for you ?

Umm I'd say so :-)
I usually don't compile lib3ds myself but rather use the debian packages. 
However by now I have had 2 or 3 users complaining about this problem and it 
went away with this patch.

> (A union seems like slight overkill to me - reading to a char array,
> reshuffling the bytes based on endianness and then memcpy:ing them to the
> float is what i would have done, but I guess that would been the same
> number of lines ;) )

I actually don't care - I used the fix that was proposed in the bug report :-)

> A new release ?
> Sorry, no clue - I am just eavesdropping on this list once in a while and
> give a hand when I have some spare minutes ;)

Yes, I think that would be very useful. I propose 1.2.1 or so, as 1.3.0 seems 
like overkill to me.

In addition I propose to include a version.h header that defines the version 
number. Something like the attached file (shamelessy stolen from kde).

btw: in case you think these macros are overkill: believe me, in a larger 
project sooner or later you are _very_ happy to have every single one of 
them :-)


Why I bring this up again now?
Well, I am currently thinking about how to find out on compile time whether 
the lib3ds version installed is broken. I am planning to solve this either by 
requiring a certain lib3ds version (the attached header would make this very 
easy) or by including a copy of a fixed lib3ds version in my project.
The former method would be nicer, but for that I need a release somewhen in 
the future :-)

> Servus,
>   Gernot

CU
Andi
/* -*- c -*- */
#ifndef INCLUDED_LIB3DS_VERSION_H
#define INCLUDED_LIB3DS_VERSION_H
/*
 * The 3D Studio File Format Library
 * Copyright (C) 1996-2001 by J.E. Hoffmann <[EMAIL PROTECTED]>
 * All rights reserved.
 *
 * This program is  free  software;  you can redistribute it and/or modify it
 * under the terms of the  GNU Lesser General Public License  as published by 
 * the  Free Software Foundation;  either version 2.1 of the License,  or (at 
 * your option) any later version.
 *
 * This  program  is  distributed in  the  hope that it will  be useful,  but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or  FITNESS FOR A  PARTICULAR PURPOSE.  See the  GNU Lesser General Public  
 * License for more details.
 *
 * You should  have received  a copy of the GNU Lesser General Public License
 * along with  this program;  if not, write to the  Free Software Foundation,
 * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */


#define LIB3DS_VERSION_STRING "1.2.1"
#define LIB3DS_VERSION_MAJOR 1
#define LIB3DS_VERSION_MINOR 2
#define LIB3DS_VERSION_RELEASE 1
#define LIB3DS_MAKE_VERSION( a,b,c ) (((a) << 16) | ((b) << 8) | (c))

#define LIB3DS_VERSION \
  LIB3DS_MAKE_VERSION(LIB3DS_VERSION_MAJOR,LIB3DS_VERSION_MINOR,LIB3DS_VERSION_RELEASE)

#define LIB3DS_IS_VERSION(a,b,c) ( LIB3DS_VERSION >= LIB3DS_MAKE_VERSION(a,b,c) )

#endif

Reply via email to