Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

Guardian Native C Library Calls (s) swscanf(3)
[scanset] Accepts as input the characters included in scanset. scanset explicitly
defines the characters that are accepted in the input string to be those
enclosed within [](square brackets). The corresponding pointer param-
eter should be an array of type char. The leading white space that is
normally skipped over is suppressed. A scanset in the form scanset] is
an exclusive scanset: the ˆ (circumflex) is a complement operator and the
characters in the following scanset are not accepted as input. Conven-
tions used in the construction of scanset are:
You can represent a range of characters by the construct first-
last. Thus, you can express [0123456789] as [0-9]. The first
value must be lexically less than or equal to the last value, or
else the - (dash) stands for itself. The - (dash) also stands for
itself whenever it is the first or the last character in scanset.
You can include the ] (right bracket) as an element of scanset if
it is the first character of scanset. In this case, it is not interpreted
as the bracket that closes scanset.Ifscanset is an exclusive
scanset, the ] is preceded by the ˆ (circumflex) to make the ] an
element of scanset. The corresponding pointer parameter must
point to a character array large enough to contain the output
string with a terminating 0 (zero) appended. The 0 (zero) is
added automatically.
The results from the conversion are placed in *pointer unless you specify assignment suppres-
sion with an * (asterisk). Assignment suppression provides a way to describe an input field that
is to be skipped. The input field is a string of non-white-space characters. It extends to the next
inappropriate character or until width, if specified, is reached.
The conversion code convcode indicates how to interpret the input field. The corresponding
pointer must usually be of a restricted type. You should not specify the pointer parameter for a
suppressed field.
swscanf() processing ends either at the end of the input string, the end of the conversion
specifications, or when an input character conflicts with the conversion specifications. If
swscanf() processing ends with an input character conflict, the conflicting character is not read
from the input string.
Unless
there is a match in the conversion specification, trailing white space (including a newline
character) is not read.
The success of literal matches and suppressed assignments cannot be directly determined. The
swscanf() function returns the number of successfully matched and assigned input items.
NOTES
This function supports both IEEE Std 754-1985 floating-point and Tandem floating-point values
in the native environment. IEEE values can include NaN and infinity, and the sign of 0.0 (zero)
can be either positive or negative. Refer to the fp_class(3) reference page for a description of
IEEE value classes.
Guardian functions are available to convert between floating-point formats. Refer to the Guar-
dian Programmers Guide for a discussion of floating-point conversions.
527192-018 Hewlett-Packard Company 6159