gnokii-users
[Top][All Lists]
Advanced

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

Re: gnokii + kaddressbook + encoding


From: Helge Deller
Subject: Re: gnokii + kaddressbook + encoding
Date: Mon, 31 May 2004 23:00:21 +0200
User-agent: KMail/1.6.52

On Monday 31 May 2004 21:32, Pawel Kot wrote:
> On Mon, 31 May 2004, Helge Deller wrote:
> 
> > > If so I'll revert it, but also the bindir argument is a subject to be 
> > > gone soon...
> >
> > No problem, if you choose a #define LIBGNOKII_VERSION and then go to a 
> > stable and clean api.
> 
> You mean something like:
> #if LIBGNOKII_VERSION < 1.0
> gn_cfg_read(char **bindir)
> #elif LIBGNOKII_VERSION < 2.0
> gn_cfg_read(char *filename, char **bindir);
> #else
> gn_cfg_read(char *filename)
> #endif
> ?

Yes, that's possible but really ugly. And, you would need it in each external 
application.
I would prefer, if you just revert to the original gn_cfg_read(char **bindir), 
which keeps sources clean.


> > No really. It produces a #define VERSION "0.6.1" (or similiar), and this 
> > "VERSION" define is a) a string and not usable for #ifdefs, and b) not 
> > included in distros, since it's not a unique name.
> 
> Okay. Will add LIBGNOKII_VERSION then.

Ok, but please code the version in HEX, e.g.
#define LIBGNOKII_VERSION 0x062

or you could even copy from KDE:

#define LIBGNOKII_VERSION_STRING "0.6.2"   // could be set by libtool.
#define LIBGNOKII_VERSION_MAJOR 0
#define LIBGNOKII_VERSION_MINOR 6
#define LIBGNOKII_VERSION_RELEASE 2
#define LIBGNOKII_MAKE_VERSION( a,b,c ) (((a) << 16) | ((b) << 8) | (c))

#define LIBGNOKII_VERSION \
  
GNOKII_MAKE_VERSION(GNOKII_VERSION_MAJOR,GNOKII_VERSION_MINOR,GNOKII_VERSION_RELEASE)

Helge




reply via email to

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