[Fribidi-discuss] type of fribidi_iso8859_8_to_unicode changed in CVS

Omer Zak omerz at actcom.co.il
Mon Dec 31 17:04:22 EST 2001


On Tue, 1 Jan 2002, Behdad Esfahbod wrote:

>
> Well, I will assume that for others it suffice too ;-), any idea about
> the new namespace? I want to deprecate the old ones, and ask people to
> use the new ones, but got no idea, fribidix_... (fribixi extended api,
> as will be extended more in 0.10.1) seems good to me...

I don't like the fribidix_ prefix.  What if you'll need to change the
interface from 1.* to 2.*?  Will we have to use fribidixx_ then?

I suggest to require people, who need the old interface, to define a macro
(say FRIBIDI_0_9_0_INTERFACE_WANTED) before #include <fribidi.h>. The
macro will cause all functions with incompatible interfaces to be
redefined as macros, which eventually invoke functions with the new
interfaces.

fribidi.h will include the following (for each function whose interface
has changed):

#ifdef FRIBIDI_0_9_0_INTERFACE_WANTED
void fribidi_old_func(a,b,c);
#define fribidi_func(a,b,c) fribidi_old_func((a),(b),(c))
#endif /* FRIBIDI_0_9_0_INTERFACE_WANTED */

fribidi.c will include the following:

#ifdef FRIBIDI_0_9_0_INTERFACE_WANTED
#undef fribidi_func
void fribidi_old_func(a,b,c)
{
  fribidi_func(a,strlen(a),b,c)
}
#endif /* FRIBIDI_0_9_0_INTERFACE_WANTED */
void fribidi_func(a,len_a,b,c)
{
  ... actual code ...
}


DISCLAIMER:  I haven't actually tried to compile or run the above.

                                             --- Omer
WARNING TO SPAMMERS:  at http://www.zak.co.il/spamwarning.html





More information about the FriBidi mailing list