-/*
- * Copyright (C) 1995-2005, Index Data ApS
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) Index Data
* See the file LICENSE for details.
- *
- * $Id: mime.c,v 1.1 2006-03-15 13:32:05 adam Exp $
*/
+/** \file mime.c
+ \brief Small utility to manage MIME types
+*/
+
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <stdio.h>
#include <string.h>
-#include <ctype.h>
#include <yaz/xmalloc.h>
#include "mime.h"
yaz_mime_types yaz_mime_types_create()
{
- yaz_mime_types p = xmalloc(sizeof(*p));
+ yaz_mime_types p = (yaz_mime_types) xmalloc(sizeof(*p));
p->table = 0;
return p;
}
void yaz_mime_types_add(yaz_mime_types t, const char *suffix,
const char *mime_type)
{
- struct yaz_mime_entry *e = xmalloc(sizeof(*e));
+ struct yaz_mime_entry *e = (struct yaz_mime_entry *) xmalloc(sizeof(*e));
e->mime_type = xstrdup(mime_type);
e->suffix = xstrdup(suffix);
e->next = t->table;
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab