Some bug fixes, random stuff

This commit is contained in:
Joseph Redmon
2015-09-01 11:21:01 -07:00
parent 9d42f49a24
commit 8bcdee8658
30 changed files with 629 additions and 205 deletions

View File

@ -208,6 +208,13 @@ void strip_char(char *s, char bad)
s[len-offset] = '\0';
}
void free_ptrs(void **ptrs, int n)
{
int i;
for(i = 0; i < n; ++i) free(ptrs[i]);
free(ptrs);
}
char *fgetl(FILE *fp)
{
if(feof(fp)) return 0;