1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-01-03 14:57:44 -05:00

Merge branch 'master' of ssh://pasky.or.cz/srv/git/elinks

This commit is contained in:
Miciah Dashiel Butler Masters 2007-09-01 12:50:57 +00:00 committed by Miciah Dashiel Butler Masters
commit 312a48a24a
10 changed files with 26 additions and 31 deletions

View File

@ -17,7 +17,6 @@
#include "cache/cache.h"
#include "dialogs/document.h"
#include "document/document.h"
#include "document/html/renderer.h"
#include "document/view.h"
#include "globhist/globhist.h"
#include "intl/gettext/libintl.h"

View File

@ -18,7 +18,7 @@
#include "config/kbdbind.h"
#include "config/options.h"
#include "dialogs/info.h"
#include "document/html/renderer.h"
#include "document/renderer.h"
#include "intl/gettext/libintl.h"
#include "main/select.h"
#include "main/timer.h"

View File

@ -182,6 +182,18 @@ release_document(struct document *document)
move_to_top_of_list(format_cache, document);
}
int
find_tag(struct document *document, unsigned char *name, int namelen)
{
struct tag *tag;
foreach (tag, document->tags)
if (!strlcasecmp(tag->name, -1, name, namelen))
return tag->y;
return -1;
}
/* Formatted document cache management */
/* ECMAScript doesn't like anything like CSS since it doesn't modify the

View File

@ -48,6 +48,16 @@ struct point {
};
/* Tags are used for ``id''s or anchors in the document referenced by the
* fragment part of the URI. */
struct tag {
LIST_HEAD(struct tag);
int x, y;
unsigned char name[1]; /* must be last of struct. --Zas */
};
enum link_type {
LINK_HYPERTEXT,
LINK_MAP,
@ -245,4 +255,6 @@ extern struct module document_module;
* For now, we only support simple printable character. */
#define accesskey_string_to_unicode(s) (((s)[0] && !(s)[1] && isprint((s)[0])) ? (s)[0] : 0)
int find_tag(struct document *document, unsigned char *name, int namelen);
#endif

View File

@ -45,17 +45,6 @@
/* Types and structs */
/* Tags are used for ``id''s or anchors in the document referenced by the
* fragment part of the URI. */
/* FIXME: This and find_tag() should be part of the general infrastructure
* in document/document.*. --pasky */
struct tag {
LIST_HEAD(struct tag);
int x, y;
unsigned char name[1]; /* must be last of struct. --Zas */
};
enum link_state {
LINK_STATE_NONE,
LINK_STATE_NEW,
@ -2334,15 +2323,3 @@ render_html_document(struct cache_entry *cached, struct document *document,
}
#endif
}
int
find_tag(struct document *document, unsigned char *name, int namelen)
{
struct tag *tag;
foreach (tag, document->tags)
if (!strlcasecmp(tag->name, -1, name, namelen))
return tag->y;
return -1;
}

View File

@ -68,6 +68,4 @@ void free_table_cache(void);
struct part *format_html_part(struct html_context *html_context, unsigned char *, unsigned char *, int, int, int, struct document *, int, int, unsigned char *, int);
int find_tag(struct document *document, unsigned char *name, int namelen);
#endif

View File

@ -18,8 +18,8 @@
#include "config/options.h"
#include "dialogs/menu.h"
#include "dialogs/status.h"
#include "document/document.h"
#include "document/html/frames.h"
#include "document/html/renderer.h"
#include "document/refresh.h"
#include "document/view.h"
#include "globhist/globhist.h"

View File

@ -17,7 +17,6 @@
#include "cache/cache.h"
#include "document/document.h"
#include "document/html/frames.h"
#include "document/html/renderer.h"
#include "document/options.h"
#include "document/refresh.h"
#include "document/renderer.h"

View File

@ -16,7 +16,6 @@
#include "dialogs/status.h"
#include "document/document.h"
#include "document/forms.h"
#include "document/html/renderer.h"
#include "document/options.h"
#include "document/view.h"
#include "ecmascript/ecmascript.h"

View File

@ -21,7 +21,6 @@
#include "bfu/dialog.h"
#include "document/document.h"
#include "document/forms.h"
#include "document/html/renderer.h"
#include "document/view.h"
#include "intl/gettext/libintl.h"
#include "session/session.h"