X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fpivot-table.h;h=2770c611d61b3ff27a083e089ea7eb1487b86133;hb=e91782a2d25dec932c93b7a57bd03d836614ba43;hp=cc61377fc29818160b438e8866ca001873d51af0;hpb=5164eb1bfa0527dcb32248fb1fc7db55c2bcc94c;p=pspp diff --git a/src/output/pivot-table.h b/src/output/pivot-table.h index cc61377fc2..2770c611d6 100644 --- a/src/output/pivot-table.h +++ b/src/output/pivot-table.h @@ -107,7 +107,6 @@ enum pivot_area }; const char *pivot_area_to_string (enum pivot_area); -const struct table_area_style *pivot_area_get_default_style (enum pivot_area); /* Table borders for styling purposes. */ enum pivot_border @@ -146,8 +145,6 @@ enum pivot_border }; const char *pivot_border_to_string (enum pivot_border); -void pivot_border_get_default_style (enum pivot_border, - struct table_border_style *); /* Sizing for rows or columns of a rendered table. The comments below talk about columns and their widths but they apply equally to rows and their @@ -376,6 +373,11 @@ bool pivot_result_class_change (const char *, const struct fmt_spec *); because that's how SPSS documentation and file formats do it. */ struct pivot_table_look { + /* Reference count. A pivot_table_look may be shared between multiple + owners, indicated by a reference count greater than 1. When this is the + case, the pivot_table must not be modified. */ + int ref_cnt; + char *name; /* May be null. */ /* General properties. */ @@ -400,10 +402,18 @@ struct pivot_table_look size_t n_orphan_lines; }; -void pivot_table_look_init (struct pivot_table_look *); -void pivot_table_look_uninit (struct pivot_table_look *); -void pivot_table_look_copy (struct pivot_table_look *, - const struct pivot_table_look *); +const struct pivot_table_look *pivot_table_look_get_default (void); +void pivot_table_look_set_default (const struct pivot_table_look *); + +char *pivot_table_look_read (const char *, struct pivot_table_look **) + WARN_UNUSED_RESULT; + +const struct pivot_table_look *pivot_table_look_builtin_default (void); +struct pivot_table_look *pivot_table_look_new_builtin_default (void); +struct pivot_table_look *pivot_table_look_ref ( + const struct pivot_table_look *); +void pivot_table_look_unref (struct pivot_table_look *); +struct pivot_table_look *pivot_table_look_unshare (struct pivot_table_look *); /* A pivot table. See the top of this file for more information. */ struct pivot_table @@ -414,7 +424,7 @@ struct pivot_table int ref_cnt; /* Styling. */ - struct pivot_table_look look; + struct pivot_table_look *look; /* Display settings. */ bool rotate_inner_column_labels; @@ -457,7 +467,7 @@ struct pivot_table struct pivot_value *subtype; /* Same as spv_item's subtype. */ struct pivot_value *corner_text; struct pivot_value *caption; - char *notes; + char *notes; /* Shown as tooltip. */ /* Dimensions. */ struct pivot_dimension **dimensions; @@ -706,7 +716,11 @@ struct pivot_value *pivot_value_new_variable (const struct variable *); /* Values from text strings. */ struct pivot_value *pivot_value_new_text (const char *); struct pivot_value *pivot_value_new_text_format (const char *, ...) +#if defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__>= 4) || __GNUC__ > 4) __attribute__((format(gnu_printf, 1, 2))); +#else + __attribute__((format(__printf__, 1, 2))); +#endif struct pivot_value *pivot_value_new_user_text (const char *, size_t length); struct pivot_value *pivot_value_new_user_text_nocopy (char *);