7 #include "cl_floatformat.h"
11 struct cl_print_rational_flags {
12 // Base in which rational numbers are to be printed.
13 unsigned int rational_base;
14 // Flag whether to print radix specifiers in Common Lisp syntax for
15 // rational numbers (#nR or #b or #o or #x prefixes, trailing dot).
16 cl_boolean rational_readably;
18 cl_print_rational_flags () :
20 rational_readably (cl_false) {}
23 struct cl_print_float_flags {
24 // Flag whether to prefer type specific exponent markers over 'E'.
25 cl_boolean float_readably;
26 // If !float_readably, the format which earns the 'E' exponent marker.
27 cl_float_format_t default_float_format;
29 cl_print_float_flags () :
30 float_readably (cl_false),
31 default_float_format (cl_float_format_ffloat) {}
34 struct cl_print_real_flags : cl_print_rational_flags, cl_print_float_flags {};
36 struct cl_print_complex_flags {
37 // Flag whether to use the Common Lisp #C(realpart imagpart) syntax,
38 cl_boolean complex_readably;
40 cl_print_complex_flags () :
41 complex_readably (cl_false) {}
44 struct cl_print_number_flags : cl_print_real_flags, cl_print_complex_flags {};
46 enum cl_print_vector_syntax_t {
47 vsyntax_algebraic, // [a, b, c]
48 vsyntax_pretty, // [a b c]
49 vsyntax_commonlisp // #(a b c)
52 struct cl_print_vector_flags {
53 cl_print_vector_syntax_t vector_syntax;
55 cl_print_vector_flags () :
56 vector_syntax (vsyntax_pretty) {}
59 struct cl_print_univpoly_flags {
60 cl_string univpoly_varname;
62 cl_print_univpoly_flags () :
63 univpoly_varname ("x") {}
66 struct cl_print_flags : cl_print_number_flags, cl_print_vector_flags, cl_print_univpoly_flags {};
68 extern cl_print_flags cl_default_print_flags;
70 #endif /* _CL_OUTPUT_H */