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

From: Angus Leeming (angus.leeming@btopenworld.com)
Date: Thu Apr 17 2003 - 10:56:40 EDT

  • Next message: Jean-Marc Lasgouttes: "Re: XForms: [patch]: reworking the snprintf stuff"

    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 hadn't thought of making it private, but you're right that
    > Angus> would be cleaner whilst remaining safe. I will have to rename
    > Angus> "portable_snprintf" et al. to avoid clashes with (say) the LyX
    > Angus> routines of the same name.
    >
    > Angus> I think I'll add an "fl_" prefix to them; otherwise
    > Angus> flsnprintf.c will then be otherwise identical to snprintf.c in
    > Angus> the LyX repository.
    >
    > 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 :-(

    I have made flsnprintf.h private; that change is already in the repository.
    However, I cannot yet typedef fl_snprint as either snprintf or
    portable_snprintf, depending on whether snprintf is included in the system's
    C library.

    At least, all works fine if snprintf exists, but on a machine without snprintf
    I get a warning on linking libforms.a

    ld:
    Warning: Unresolved:
    portable_snprintf

    Thereafter, fdesign etc fail to link, complaining of a missing function.

    I attach the patch; if you could see where I've gone wrong, then I would be
    very grateful.

    Angus



    _________________________________________________
    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 : Thu Apr 17 2003 - 09:53:12 EDT