Re: Extend functionality of printf (Add colours)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?=

    Re: Extend functionality of printf (Add colours)

    On Nov 10, 12:08 pm, maverik <maverik.m...@g mail.comwrote:
    So, no need to call va_arg(), just not to forgive va_end().

    Sorry but I don't see how you can deduce that, I don't think that
    excerpt clarifies whether the "va_arg" calls made inside vfprintf will
    have an observable effect in my own function.

    And if I don't need to call va_arg, then why's my program segfaulting?
    Does anyone spot a bug?
  • maverik

    #2
    Re: Extend functionality of printf (Add colours)

    On Nov 10, 3:15 pm, Tomás Ó hÉilidhe <t...@lavabit.c omwrote:
    On Nov 10, 12:08 pm, maverik <maverik.m...@g mail.comwrote:
    >
    So, no need to call va_arg(), just not to forgive va_end().
    >
    Sorry but I don't see how you can deduce that, I don't think that
    excerpt clarifies whether the "va_arg" calls made inside vfprintf will
    have an observable effect in my own function.
    >
    And if I don't need to call va_arg, then why's my program segfaulting?
    Does anyone spot a bug?
    Sorry, I miss tne note (from the same document):

    As the functions vfprintf, vfscanf, vprintf, vscanf, vsnprintf, vspri
    vsscanf invoke the va_arg macro, the value of arg after the return is
    indeterminate.

    Comment

    Working...