1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-27 02:56:18 -04:00
elinks/src/dom/sgml/sgml.c
Jonas Fonseca 021af4e87c Although aware ELinks doesn't need another sgml/doctype here is DocBook
It was created a long time ago so (I think) it deserves to survive. It
maps .sgml files to applicatino/docbook+xml and uses the highlighter.
2006-01-01 23:22:10 +01:00

46 lines
880 B
C

/* SGML generics */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdlib.h>
#include <string.h>
#include "elinks.h"
#include "dom/node.h"
#include "dom/sgml/sgml.h"
#include "dom/string.h"
#include "util/error.h"
/* Backend includes: */
#include "dom/sgml/docbook/docbook.h"
#include "dom/sgml/html/html.h"
#include "dom/sgml/rss/rss.h"
#include "dom/sgml/xbel/xbel.h"
int
sgml_info_strcmp(const void *key_, const void *node_)
{
struct dom_node *key = (struct dom_node *) key_;
struct sgml_node_info *node = (struct sgml_node_info *) node_;
return dom_string_casecmp(&key->string, &node->string);
}
struct sgml_info *sgml_info[SGML_DOCTYPES] = {
&sgml_docbook_info,
&sgml_html_info,
&sgml_rss_info,
&sgml_xbel_info,
};
struct sgml_info *
get_sgml_info(enum sgml_document_type doctype)
{
return doctype < SGML_DOCTYPES ? sgml_info[doctype] : NULL;
}