For user defined quotation methods This class is used for customising formatting.
The library supports several standard quotations
like C strings or Lisp, Shell, etc. You may
want to define your own syntax by implementing
a few functions here and using
Vector_set_quotation_method() to define your style.
If this is != NULL, the empty string is exceptionally represent this way.
Similar to null_name, but this handles the empty string. E.g. in Unxi Shell
syntax quotation, which is currently implemented to not print string
delimiters, the empty string would in normal printing result in just that:
the empty string. But that's wrong, so this member has the value "''" for
If this is NULL, the string is normally printed using the other fields
and functions of this struct.
For checking individually whether to quote or not for each character:
NULL means: literal length 1 (no quotation)
The integer given to this function is the output of this function for the
previous characters. The function can then decide whether and how to quote
depending on the previous value. Initially, -1 is given.
If this function returns a negative value, its absolute value is taked as
the quoted string's length. This is useful for indicating that a string
needs quotation even if the current character's quoted length is 1.
Check that the quotation has worked and eventually fix it so
that it is properly quoted. The string passed is not
null-terminated, but instead the length is given.
This function pointer may be NULL: in that case it is not invoked.
This function must not change the length of the string!
E.g. this function is used for the Windows shell quotation method to
swap the last two characters if they are \". This is necessary because
the quotation method is really weird (the backslash has two meanings):
not "B\\"C D\"
The last one cannot be "B\\"C D\" since a backslash before a double quote
is interpreted as a quoted double quote. This is prevented by the