Method __handle_sscanf_format()
- Method
__handle_sscanf_format
type__handle_sscanf_format(stringattribute_name,string|zerofmt,typearg_type,type(function(:void))|zerocont_type,mappingstate)- Description
Type attribute handler for
"sscanf_input".- Parameter
attr Attribute to handle, one of
"sscanf_input","sscanf_format"or"sscanf_80_format".- Parameter
fmt Sscanf-style formatting string to generate type information from.
- Parameter
arg_type Declared type of the
fmtargument (typicallystring).- Parameter
cont_type Continuation function type after the
fmtargument. This is scanned for the type attribute"sscanf_args"to determine where sscanf() will put its extracted values.- Parameter
state State mapping.
This function is typically called from CompilerEnvironment.PikeCompiler()->apply_attribute_constant() and is used to perform stricter compile-time argument checking of sscanf()-style functions.
- Returns
Returns
cont_typewith"sscanf_args"replaced by the arguments required by thefmtformatting string. May return UNDEFINED in case of non-fatal failure (eg whenfmtis not a literal string constant).- See also
CompilerEnvironment.PikeCompiler()->apply_attribute_constant(), sprintf(), __handle_sprintf_format()