cctools
jx_table.h
1 #ifndef JX_TABLE_H
2 #define JX_TABLE_H
3 
4 #include "jx.h"
5 #include <stdio.h>
6 
7 typedef enum {
8  JX_TABLE_MODE_PLAIN,
9  JX_TABLE_MODE_METRIC,
10  JX_TABLE_MODE_GIGABYTES,
11  JX_TABLE_MODE_URL
12 } jx_table_mode_t;
13 
14 typedef enum {
15  JX_TABLE_ALIGN_LEFT,
16  JX_TABLE_ALIGN_RIGHT
17 } jx_table_align_t;
18 
19 struct jx_table {
20  const char *name;
21  const char *title;
22  jx_table_mode_t mode;
23  jx_table_align_t align;
24  int width;
25 };
26 
27 void jx_table_print_header( struct jx_table *t, FILE *f, int columns );
28 void jx_table_print( struct jx_table *t, struct jx *j, FILE *f, int columns );
29 void jx_table_print_footer( struct jx_table *t, FILE *f, int columns );
30 
31 #endif
Definition: jx_table.h:19
JSON Expressions (JX) library.
JX value representing any expression type.
Definition: jx.h:117