mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
56d634b946
This means the RSS source will be highlighted, but by default the HTML renderer will be used for the default rendering.
42 lines
796 B
C
42 lines
796 B
C
/* SGML generics */
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
#include "config.h"
|
|
#endif
|
|
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
#include "elinks.h"
|
|
|
|
#include "document/dom/node.h"
|
|
#include "document/sgml/sgml.h"
|
|
#include "util/error.h"
|
|
#include "util/string.h"
|
|
|
|
/* Backend includes: */
|
|
|
|
#include "document/sgml/html/html.h"
|
|
#include "document/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;
|
|
}
|