added table system
[NeonServV5.git] / tools.h
diff --git a/tools.h b/tools.h
index 089a760693d69f2e3d341997e2d429b4e7d54452..22c1301ef0f236512ce32f8f3ade670238bdaa20 100644 (file)
--- a/tools.h
+++ b/tools.h
@@ -3,6 +3,28 @@
 
 #include "main.h"
 
+#define TABLE_FLAG_USE_POINTER 0x01
+#define TABLE_FLAG_COL_BOLD    0x02
+
+struct Table {
+    char ***contents;
+    int length;
+    int width;
+    int flags;
+    int *col_flags;
+    
+    int c_entry;
+    int *maxwidth;
+    
+    char **table; //we just store this to free it in table_free
+};
+
 int match(const char *mask, const char *name);
 
+struct Table *table_init(int width, int length, int flags);
+int table_add(struct Table *table, char **entry);
+int table_set_bold(struct Table *table, int collum, int bold);
+char **table_end(struct Table *table);
+void table_free(struct Table *table);
+
 #endif
\ No newline at end of file