Re: XForms: [patch]: reworking the snprintf stuff

From: Angus Leeming (angus.leeming@btopenworld.com)
Date: Sun Apr 20 2003 - 18:36:53 EDT

  • Next message: David Scriven: "XForms: Nvidia GL files require alterations in glcanvas.h"

    # To subscribers of the xforms list from Angus Leeming <angus.leeming@btopenworld.com> :

    > On Thursday 17 April 2003 11:10 am, Jean-Marc Lasgouttes wrote:
    > > >>>>> "Angus" == Angus Leeming <angus.leeming@btopenworld.com> writes:
    > >
    > > Angus> On Thursday 17 April 2003 9:53 am, Jean-Marc Lasgouttes wrote:
    > > >> A few comments: do we really want to make this public? It would
    > > >> seem simpler to have the function internal, in which case a define
    > > >> in some header would work. Also, this would avoid the wrapper
    > > >> around the real snprintf, which is bloat...
    > > Angus> I'll move flsnprintf.h to private/ and rewrite it analogous to
    > > Angus> LyX's snprintf.h but refering to these new names.
    > > Angus> Does this sound reasonable?
    > > Very reasonable.

    > Perhaps it sounds reasonable, but I can't get it to work :-(

    Ok, I got it to work and have committed it to the repository. However, I don't
    understand why I need #if 0 ... #endif to enable the DEC linker to find
    fl_portable_v?snprintf. I thought that both the #define and the function
    could exist side by side and the linker was sufficiently intelligent to
    differentiate between them.

    #if 0
    #if defined(HAVE_SNPRINTF)
    /* declare our portable snprintf routine under name fl_portable_snprintf */
    /* declare our portable vsnprintf routine under name fl_portable_vsnprintf */
    #else
    /* declare our portable routines under names snprintf and vsnprintf */
    #define fl_portable_snprintf snprintf
    #if !defined(NEED_SNPRINTF_ONLY)
    #define fl_portable_vsnprintf vsnprintf
    #endif
    #endif
    #endif /* 0 */

    Could you advise?
    Shall I just remove the block of code? It serves no useful purpose.
    Why does the same block of code work in LyX?

    Confused,
    Angus

    ps, once this stuff stabilises, I think we're ready to move on to the
    autoconf/make stuff.

    A

    _________________________________________________
    To unsubscribe, send the message "unsubscribe" to
    xforms-request@bob.usuhs.mil or see
    http://bob.usuhs.mil/mailserv/xforms.html
    XForms Home Page: http://world.std.com/~xforms
    List Archive: http://bob.usuhs.mil/mailserv/list-archives/
    Development: http://savannah.nongnu.org/files/?group=xforms



    This archive was generated by hypermail 2b29 : Sun Apr 20 2003 - 17:33:11 EDT