Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
swscanf(3) Guardian Native C Library Calls Reference Manual
RETURN VALUES
The swscanf() function returns the number of successfully matched and assigned input items.
This value can be 0 (zero) if there was an early conflict between an input character and the
conversion specification. If the input ends before the first conflict or conversion, EOF (End-of-
File) is returned.
ERRORS
If any of the following conditions occur, the swscanf() function sets errno to the corresponding
value:
[EINTR] The read operation was interrupted by a signal that was caught and no data was
transferred.
[EINVAL] The function call contains an invalid argument.
[EIO] The call is attempting to read from the process’s controlling terminal and either
the process is ignoring or blocking the SIGTTIN signal or the process group is
orphaned.
[ENOMEM] Insufficient memory is available for the operation.
[ENXIO] A request was made to a nonexistent device, or the request was outside the capa-
bilities of the device.
RELATED INFORMATION
Functions: atof(3), atoi(3), fp_class(3), fscanf(3), getc(3), getwc(3), isnan(3), printf(3),
scanf(3).
STANDARDS CONFORMANCE
The [EINVAL] errno value is an extension to the ISO/IEC 9899:1999 specification.
The POSIX standards leave some features to the implementing vendor to define. The following
features are affected in the HP implementation:
• The input for a %p conversion by the swscanf() function must be a pointer to a pointer
to void.
• A - (dash) character that is neither the first nor last character in a scanset for %[scanset]
conversion indicates a range of values. The value preceding a - (dash) character must be
lexically less than or equal to the value after the - (dash).
The following are HP extensions to the ISO/IEC 9899:1999 specification:
• The conversion specifier L followed by a d, i, o, u, x,orX conversion specifier indicates
that the argument will be treated as a long long or an unsigned long long, which is a 64-
bit integer data type.
6−160 Hewlett-Packard Company 527192-018