cmd_trim added, fixed some bugs and added DATABASE modifications
[NeonServV5.git] / tools.h
diff --git a/tools.h b/tools.h
index 089a760693d69f2e3d341997e2d429b4e7d54452..60a590e5f178c3a71da39e22c50b220ec781f1ce 100644 (file)
--- a/tools.h
+++ b/tools.h
@@ -3,6 +3,35 @@
 
 #include "main.h"
 
+#define TABLE_FLAG_USE_POINTER 0x01
+#define TABLE_FLAG_COL_BOLD    0x02
+
+struct UserNode;
+
+struct Table {
+    char ***contents;
+    int length;
+    int width;
+    int flags;
+    int *col_flags;
+    
+    int entrys;
+    int *maxwidth;
+    
+    char **table_lines; //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);
+
+char* timeToStr(struct UserNode *user, int seconds, int items, char *buf);
+int strToTime(struct UserNode *user, char *str);
+
+void init_tools();
+
 #endif
\ No newline at end of file