1 #ifndef INCLUDED_UTIL_H_ 2 #define INCLUDED_UTIL_H_ 3 4 #include <stdio.h> 5 #include <sys/types.h> 6 #include <regex.h> 7 #include <dirent.h> 8 9 #include "../vector/vector.h" 10 11 void regComp(regex_t *regex, char const *pattern); 12 Vector const *regMatch(regex_t *regex, char const *line); 13 14 char *getLine(FILE *in); 15 FILE *openFile(char const *name, char const *mode); // "r" or "w" 16 17 void toCwd(); 18 void tryChdir(char const *subdir); 19 void UtilInit(); 20 21 int **initTable(int size); 22 int *initRow(int size); 23 void freeTable(int **table, int size); 24 char const *strcatN(int count, ...); // all char const *args are cat-ed and 25 // the result is returned as a NTBS 26 27 #endif 28