Setjmp – Zilog EZ80F916 User Manual
Page 381

UM014423-0607
C Standard Library
ZiLOG Developer Studio II
eZ80Acclaim!
®
User Manual
361
If a conversion specification is invalid, the behavior is undefined.
The conversion characters
e
,
g
, and
x
can be capitalized. However, the use of upper case is
ignored.
If end-of-file is encountered during input, conversion is terminated. If end-of-file occurs
before any characters matching the current directive have been read (other than leading
white space, where permitted), execution of the current directive terminates with an input
failure; otherwise, unless execution of the current directive is terminated with a matching
failure, execution of the following directive (if any) is terminated with an input failure.
If conversion terminates on a conflicting input character, the offending input character is
left unread in the input stream. Trailing white space (including new-line characters) is left
unread unless matched by a directive. The success of literal matches and suppressed
assignments is not directly determinable other than using the
%n
directive.
setjmp
Saves its calling environment in its jmp_buf argument, for later use by the
longjmp
func-
tion.
s
Matches a sequence of non-white-space characters. The corresponding argument is a
pointer to the initial character of an array large enough to accept the sequence and a
terminating null character, which is added automatically.
[
Matches a sequence of expected characters (the scanset). The corresponding argument is a
pointer to the initial character of an array large enough to accept the sequence and a
terminating null character, which is added automatically. The conversion character
includes all subsequent characters is the format string, up to and including the matching
right bracket ( ] ). The characters between the brackets (the scanlist) comprise the scanset,
unless the character after the left bracket is a circumflex ( ^ ), in which case the scanset
contains all characters that do not appear in the scanlist between the circumflex and the
right bracket. As a special case, if the conversion character begins with [] or [^], the right
bracket character is in the scanlist and next right bracket character is the matching right
bracket that ends the specification. If a - character is in the scanlist and is neither the first
nor the last character, the behavior is indeterminate.
c
Matches a sequence of characters of the number specified by the field width (1 if no field
width is present in the directive). The corresponding argument is a pointer to the initial
character of an array large enough to accept the sequence. No null character is added.
p
Matches a hexadecimal number. The corresponding argument is a pointer to a pointer to
void.
n
No input is consumed. The corresponding argument is a pointer to integer into which is to
be written the number of characters read from the input stream so far by this call to the
scanf function. Execution of a %n directive does not increment the assignment count
returned at the completion of execution of the scanf function.
%
Matches a single %; no conversion or assignment occurs.