1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
6<META http-equiv="Content-Style-Type" content="text/css">
7<TITLE>STD_TVSNPrintf</TITLE>
8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
9</HEAD>
10<BODY>
11<H1 align="left">STD_TVSNPrintf <img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></h1>
12<h2>Syntax</h2>
13<DL>
14<DD><CODE>#include &lt;nitro/std.h&gt;<BR> <BR> int STD_TVSNPrintf( char *dst, size_t len, const char *fmt, va_list vlist );<BR> <BR></CODE>
15</DL>
16<H2>Arguments</H2>
17<TABLE border="1">
18  <TBODY>
19    <TR>
20<TD><I><B>dst</B></I></TD>
21<TD>Storage destination buffer for the output string.</TD>
22    </TR>
23    <TR>
24<TD><I><B>len</B></I></TD>
25<TD>Storage destination buffer size for the output string.</TD>
26    </TR>
27    <TR>
28<TD><I><B>fmt</B></I></TD>
29<TD>Output format string.</TD>
30    </TR>
31    <TR>
32<TD><I><B>vlist</B></I></TD>
33<TD>List containing a variable number of arguments.</TD>
34    </TR>
35  </TBODY>
36</TABLE>
37<H2>Return Values</H2>
38<P>Always returns the number of characters of a correctly formatted output string. The termination character (<code>\0</code>) is not included in this number.</P>
39<P>The output string is written to <SPAN class="argument">dst</SPAN>. If the output string is less than <SPAN class="argument">len</SPAN>, the entire string and the terminator (<code>\0</code>) are written.<BR><BR>If the output string is greater than or equal to <SPAN class="argument">len</SPAN> AND:<BR>(1) <SPAN class="argument">len</SPAN> is not zero, the terminator (<code>\0</code>) is written to <code><SPAN class="argument">dst</SPAN>[<SPAN class="argument">len</SPAN>&nbsp;-&nbsp;1]</code><BR>(2) <SPAN class="argument">len</SPAN> is zero, nothing is done to <SPAN class="argument">dst</SPAN>.
40</P>
41
42<H2>Description</H2>
43<P>Returns the simplified version of the format string.</P>
44<P>This function operates identically to the <code>vsnprintf</code> function from MSL, but the following features cannot be used.<br /></P>
45<BLOCKQUOTE>- CodeWarrior extension Pascal strings (<code>#s</code>) <BR>- MSL AltiVec extensions (<code>v</code>, <code>vh</code>, <code>vl</code>, <code>hv</code>, <code>lv</code>, <code>@</code>)<BR>- Floating Points (<code>e</code>, <code>E</code>, <code>f</code>, <code>g</code>, <code>G</code>, <code>a</code>, <code>A</code>)<BR>- Wide strings (<code>wchar_t</code>) <BR><B>Note:</B> Shift_JIS formatted multibyte strings can be used.</BLOCKQUOTE>
46<P>This function is compiled with weak symbols. Therefore, you can overwrite them with your own function definitions.<BR><BR><FONT color=#ff0000> However, this function may be used by TWL-SDK functions, high-level libraries, middleware, and other sources, so be careful not to change its behavior when you overwrite it.</FONT>
47</P>
48<H2>See Also</H2>
49<P><A href="STD_TSPrintf.html"><CODE>STD_TSPrintf</CODE></A><BR> <A href="STD_TVSPrintf.html"><CODE>STD_TVSPrintf</CODE></A><BR> <A href="STD_TSNPrintf.html"><CODE>STD_TSNPrintf</CODE></A></P>
50<H2>Revision History</H2>
51<P>
522009/03/27 Added a note related to user-defined functions. <BR>2007/04/20 Initial version.
53</P>
54<hr><p>CONFIDENTIAL</p></body>
55</HTML>
56