25 #include <sys/types.h>
41 if (0 == access(CONFIGDIR
"/mime.types", O_RDONLY)) {
42 FILE * handle = fopen(CONFIGDIR
"/mime.types",
"r");
50 while (NULL != fgets(buffer, 511, handle)) {
57 tmp = memchr(key,
' ', 512);
65 for (; *value ==
' ' && value < buffer+511; value++);
67 nvalue = strlen(value);
69 if (
'\n' == value[nvalue-1]) {
75 new(HashValue, key, nkey, value, nvalue));
102 return (
char *)type->value;
void * hashGet(Hash, const char *, size_t)
void * hashAdd(Hash, void *)
char * getMimeType(const char *ext, size_t len)
void clearMimeTypes(void)