+/* Reference counting. */
+struct table *table_ref (const struct table *);
+void table_unref (struct table *);
+bool table_is_shared (const struct table *);
+struct table *table_unshare (struct table *);
+
+/* Returns the number of columns or rows, respectively, in T. */
+static inline int table_nc (const struct table *t)
+ { return t->n[TABLE_HORZ]; }
+static inline int table_nr (const struct table *t)
+ { return t->n[TABLE_VERT]; }
+
+/* Returns the number of left, right, top, or bottom headers, respectively, in
+ T. */
+static inline int table_hl (const struct table *t)
+ { return t->h[TABLE_HORZ][0]; }
+static inline int table_hr (const struct table *t)
+ { return t->h[TABLE_HORZ][1]; }
+static inline int table_ht (const struct table *t)
+ { return t->h[TABLE_VERT][0]; }
+static inline int table_hb (const struct table *t)
+ { return t->h[TABLE_VERT][1]; }
+
+/* Set headers. */
+void table_set_hl (struct table *, int hl);
+void table_set_hr (struct table *, int hr);
+void table_set_ht (struct table *, int ht);
+void table_set_hb (struct table *, int hb);
+\f
+/* Table classes. */
+
+/* Simple kinds of tables. */
+struct table *table_from_string (unsigned int options, const char *);
+struct table *table_from_variables (unsigned int options,
+ struct variable **, size_t);
+struct table *table_from_casereader (const struct casereader *,
+ size_t column,
+ const char *heading,
+ const struct fmt_spec *);
+
+/* Combining tables. */
+struct table *table_paste (struct table *, struct table *,
+ enum table_axis orientation);
+struct table *table_hpaste (struct table *left, struct table *right);
+struct table *table_vpaste (struct table *top, struct table *bottom);
+
+/* Taking subsets of tables. */
+struct table *table_select (struct table *, int rect[TABLE_N_AXES][2]);
+struct table *table_select_slice (struct table *, enum table_axis,
+ int z0, int z1, bool add_headers);
+struct table *table_select_columns (struct table *,
+ int x0, int x1, bool add_headers);
+struct table *table_select_rows (struct table *,
+ int y0, int y1, bool add_headers);
+
+/* Miscellaneous table operations. */
+struct table *table_transpose (struct table *);
+
+#endif /* output/table.h */