11.07.2015 Views

CrossWorks for ARM User Guide

CrossWorks for ARM User Guide

CrossWorks for ARM User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

DescriptionNotesPortabilityvsprintf writes to the string pointed to by s under control of the string pointed to by<strong>for</strong>mat that specifies how subsequent arguments are converted <strong>for</strong> output. Be<strong>for</strong>ecalling vsprintf, arg must be initialized by the va_start macro (and possiblysubsequent va_arg calls). vsprintf does not invoke the va_end macro.A null character is written at the end of the characters written; it is not counted as partof the returned value.If there are insufficient arguments <strong>for</strong> the <strong>for</strong>mat, the behavior is undefined. If the<strong>for</strong>mat is exhausted while arguments remain, the excess arguments are evaluated butare otherwise ignored.If copying takes place between objects that overlap, the behavior is undefined.vsprintf returns number of characters transmitted (not counting the terminating null),or a negative value if an output or encoding error occurred.vsprintf is equivalent to sprintf with the variable argument list replaced by arg,vsprintf con<strong>for</strong>ms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).See Also Formatted output control strings (page 281)vsscanfSynopsisDescriptionNotesPortability#include int vsscanf(const char *s, const char *<strong>for</strong>mat, va_list arg);vsscanf reads input from the string s under control of the string pointed to by <strong>for</strong>matthat specifies the admissible input sequences and how they are to be converted <strong>for</strong>assignment, using subsequent arguments as pointers to the objects to receive theconverted input. Be<strong>for</strong>e calling vsscanf, arg must be initialized by the va_start macro(and possibly subsequent va_arg calls). vsscanf does not invoke the va_end macro.If there are insufficient arguments <strong>for</strong> the <strong>for</strong>mat, the behavior is undefined.vsscanf returns the value of the macro EOF if an input failure occurs be<strong>for</strong>e anyconversion. Otherwise, vsscanf returns the number of input items assigned, which canbe fewer than provided <strong>for</strong>, or even zero, in the event of an early matching failure.vsscanf is equivalent to sscanf with the variable argument list replaced by arg.vsscanf con<strong>for</strong>ms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).See Also Formatted input control strings (page 285)294 Chapter 28 Standard C Library Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!