Next: struct x1f4_ffield_type, Previous: struct x1f4_efield_type, Up: Mk 6 Formatter Types
typedef struct x1f4_f6link_type { unsigned (*count_string) (void *, char *, unsigned); void (*put_space) (void *, unsigned, char *, unsigned), (*put_string) (void *, char *, unsigned), (*set_index) (void *, unsigned), (*set_scope) (void *, unsigned), (*get_scope) (void *, unsigned); } x1f4_f6link_type;
The struct x1f4_f6link_type
record describes the application formatting
context.
See x1f4_parse_format6.
count_string
count_string
field is the method that retrieves the formatted width
for strings that are to be formatted verbatim. The string for which the
formatted width is to be retrieved is passed as its method second argument.
Its length (expressed in bytes) is passed the method as its third argument.
The data formatting context is passed the method as its the first argument.
See x1f4_run_format6.
For actual text formatting the string formatted width is same as the string
length (and the method can output its third argument).
put_string
put_string
field is the method that does the actual formatting for
strings that are to be formatted verbatim. The string that is to be formatted
is passed as its method second argument. Its length (expressed in bytes) is
passed the method as its third argument. The data formatting context is passed
the method as its the first argument.
See x1f4_run_format6.
put_space
put_space
field is the method that inserts the required amount of
(white) space needed to meet the fields minimum width formatting
specifications. The data formatting context is passed the method as its first
argument. The amount of (white) space needed to be inserted is passed the
method as its second argument. If the directive being padded specified a fill
string, the string and its length are passed the method as its third and fourth
arguments, otherwise 0
and NULL
are passed the method as its
third and fourth arguments.
See x1f4_run_format6.
set_index
set_index
field is the method that selects the iteration for
iterative output subformat specifier formatting directives. The data
formatting context is passed the method as its first argument. The iteration
selection is passed the method as its second argument.
See x1f4_run_format6.
See Format Specification Syntax.
See Iterative Formatting.
set_scope
set_scope
field is the method that selects the formatting directives
interpretation scope. The data formatting context is passed the method as its
first argument. The formatting directives interpretation scope is passed the
method as its second argument.
See x1f4_run_format6.
The method is called by the data formatter whenever a broader formatting directives interpretation scope is entered from the current formatting directives interpretation scope.
See Mixing Scopes.
get_scope
get_scope
field is the method that reverts the formatting directives
interpretation scope. The data formatting context is passed the method as its
first argument. The formatting directives interpretation scope is passed the
method as its second argument.
See x1f4_run_format6.
The method is called by the data formatter whenever a broader formatting directives interpretation scope is exit from the current formatting directives interpretation scope.
See Mixing Scopes.