1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-02-02 15:09:23 -05:00
elinks/src/dom/sgml/sgml.c
2005-12-28 14:05:14 +01:00

42 lines
772 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 "util/error.h"
#include "util/string.h"
/* Backend includes: */
#include "dom/sgml/html/html.h"
#include "dom/sgml/rss/rss.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_html_info,
&sgml_rss_info,
};
struct sgml_info *
get_sgml_info(enum sgml_document_type doctype)
{
return doctype < SGML_DOCTYPES ? sgml_info[doctype] : NULL;
}