jx_table.h
00001 #ifndef JX_TABLE_H
00002 #define JX_TABLE_H
00003
00004 #include "jx.h"
00005 #include <stdio.h>
00006
00007 typedef enum {
00008 JX_TABLE_MODE_PLAIN,
00009 JX_TABLE_MODE_METRIC,
00010 JX_TABLE_MODE_URL
00011 } jx_table_mode_t;
00012
00013 typedef enum {
00014 JX_TABLE_ALIGN_LEFT,
00015 JX_TABLE_ALIGN_RIGHT
00016 } jx_table_align_t;
00017
00018 struct jx_table {
00019 const char *name;
00020 const char *title;
00021 jx_table_mode_t mode;
00022 jx_table_align_t align;
00023 int width;
00024 };
00025
00026 void jx_table_print_header( struct jx_table *t, FILE *f, int columns );
00027 void jx_table_print( struct jx_table *t, struct jx *j, FILE *f, int columns );
00028 void jx_table_print_footer( struct jx_table *t, FILE *f, int columns );
00029
00030 #endif