<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: vsnprintf in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/vsnprintf/m-p/2508970#M728518</link>
    <description>Robert,&lt;BR /&gt;&lt;BR /&gt;Investigation of the libc.1 file shows that vsnprintf() is indeed in the library, even if it is not included in the correct header files.  The following 3 lines at the beginning of your file should fix the problem:&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;STDARG.H&gt;&lt;BR /&gt;extern int vsnprintf( char *, int, const char *, va_list );&lt;BR /&gt;&lt;BR /&gt;I used the following piece of example code to illustrate the usage:&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;STDARG.H&gt;&lt;BR /&gt;&lt;BR /&gt;extern int vsnprintf( char *s, size_t maxsize, const char *format, va_list ap );&lt;BR /&gt;&lt;BR /&gt;int call_it( char *s, size_t maxsize, const char *format, ... ) {&lt;BR /&gt;    va_list ap;&lt;BR /&gt;    int i;&lt;BR /&gt;&lt;BR /&gt;    va_start( ap, format );&lt;BR /&gt;    i = vsnprintf( s, maxsize, format, ap );&lt;BR /&gt;    va_end( ap );&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;int main( ) {&lt;BR /&gt;    char buf[BUFSIZ];&lt;BR /&gt;    &lt;BR /&gt;    call_it( buf, BUFSIZ-1, "This is a test %d %c %s\n", 123, 'a', "test" );&lt;BR /&gt;    puts( buf );&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/STDARG.H&gt;&lt;/STDIO.H&gt;&lt;/STDARG.H&gt;&lt;/STDIO.H&gt;</description>
    <pubDate>Fri, 23 Mar 2001 12:34:38 GMT</pubDate>
    <dc:creator>Kenneth Platz</dc:creator>
    <dc:date>2001-03-23T12:34:38Z</dc:date>
    <item>
      <title>vsnprintf</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vsnprintf/m-p/2508969#M728517</link>
      <description>hi&lt;BR /&gt;one of our programmers has started using vsnprintf which is available on HP-UX 11.00  We have to support products on HP-UX 10.20 as well, but the function doesn't seem to be publicly available in libc patches on 10.20.&lt;BR /&gt;Any advice?&lt;BR /&gt;thanks&lt;BR /&gt;-robert-</description>
      <pubDate>Fri, 23 Mar 2001 11:41:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vsnprintf/m-p/2508969#M728517</guid>
      <dc:creator>Robert O'Brien</dc:creator>
      <dc:date>2001-03-23T11:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: vsnprintf</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vsnprintf/m-p/2508970#M728518</link>
      <description>Robert,&lt;BR /&gt;&lt;BR /&gt;Investigation of the libc.1 file shows that vsnprintf() is indeed in the library, even if it is not included in the correct header files.  The following 3 lines at the beginning of your file should fix the problem:&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;STDARG.H&gt;&lt;BR /&gt;extern int vsnprintf( char *, int, const char *, va_list );&lt;BR /&gt;&lt;BR /&gt;I used the following piece of example code to illustrate the usage:&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;STDARG.H&gt;&lt;BR /&gt;&lt;BR /&gt;extern int vsnprintf( char *s, size_t maxsize, const char *format, va_list ap );&lt;BR /&gt;&lt;BR /&gt;int call_it( char *s, size_t maxsize, const char *format, ... ) {&lt;BR /&gt;    va_list ap;&lt;BR /&gt;    int i;&lt;BR /&gt;&lt;BR /&gt;    va_start( ap, format );&lt;BR /&gt;    i = vsnprintf( s, maxsize, format, ap );&lt;BR /&gt;    va_end( ap );&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;int main( ) {&lt;BR /&gt;    char buf[BUFSIZ];&lt;BR /&gt;    &lt;BR /&gt;    call_it( buf, BUFSIZ-1, "This is a test %d %c %s\n", 123, 'a', "test" );&lt;BR /&gt;    puts( buf );&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/STDARG.H&gt;&lt;/STDIO.H&gt;&lt;/STDARG.H&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Fri, 23 Mar 2001 12:34:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vsnprintf/m-p/2508970#M728518</guid>
      <dc:creator>Kenneth Platz</dc:creator>
      <dc:date>2001-03-23T12:34:38Z</dc:date>
    </item>
  </channel>
</rss>

