2020-12-20 13:58:10 -05:00
|
|
|
#ifndef UTIL_H
|
|
|
|
#define UTIL_H
|
|
|
|
#include <stdio.h>
|
|
|
|
|
2020-12-21 13:05:49 -05:00
|
|
|
/* util
|
|
|
|
* Random utilities. */
|
2020-12-20 13:58:10 -05:00
|
|
|
|
2020-12-21 13:05:49 -05:00
|
|
|
typedef struct stringlist {
|
2020-12-20 13:58:10 -05:00
|
|
|
char* content;
|
2020-12-21 13:05:49 -05:00
|
|
|
struct stringlist* next;
|
|
|
|
} STRINGLIST;
|
2020-12-20 13:58:10 -05:00
|
|
|
|
2020-12-21 13:05:49 -05:00
|
|
|
char* heapstr(char* str, int len);
|
|
|
|
char* ezheapstr(char* str);
|
|
|
|
int countplaces(int n);
|
2020-12-20 13:58:10 -05:00
|
|
|
char* itoa(int i);
|
2020-12-21 13:05:49 -05:00
|
|
|
|
|
|
|
void printstrlist(STRINGLIST* strlist, FILE* stream);
|
|
|
|
void freestrlist(STRINGLIST* strlist);
|
2020-12-20 13:58:10 -05:00
|
|
|
#endif
|