1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

New macro LIST_OF for better Doxygen support.

This commit is contained in:
Kalle Olavi Niemitalo 2007-07-26 19:04:35 +03:00 committed by Kalle Olavi Niemitalo
parent 2433150058
commit d3d2bb26c5
19 changed files with 42 additions and 37 deletions

View File

@ -67,7 +67,7 @@ static void write_bookmarks_xbel(struct secure_save_info *ssi,
struct tree_node {
unsigned char *name; /* Name of the element */
unsigned char *text; /* Text inside the element */
struct list_head attrs; /* {struct attributes} */
LIST_OF(struct attributes) attrs;
struct tree_node *parent;
struct tree_node *children;

View File

@ -25,7 +25,7 @@ struct bookmark {
/* Bookmark lists */
extern struct list_head bookmarks; /* struct bookmark */
extern LIST_OF(struct bookmark) bookmarks;
/* The bookmarks module */

2
src/cache/cache.h vendored
View File

@ -29,7 +29,7 @@ struct cache_entry {
/* Items in this list are ALLOCATED IN A NON-STANDARD WAY! Thus if you
* are gonna mess with them (you shouldn't), you need to use the
* mmap suite. */
struct list_head frag; /* -> struct fragment */
LIST_OF(struct fragment) frag;
struct uri *uri; /* Identifier for the cached data */
struct uri *proxy_uri; /* Proxy identifier or same as @uri */

View File

@ -27,7 +27,7 @@
static struct action_list action_table[KEYMAP_MAX];
static struct keymap keymap_table[KEYMAP_MAX];
static struct list_head keymaps[KEYMAP_MAX]; /* struct keybinding */
static LIST_OF(struct keybinding) keymaps[KEYMAP_MAX];
static void add_default_keybindings(void);

View File

@ -84,7 +84,7 @@ struct session; /* session/session.h */
union option_value {
/* XXX: Keep first to make @options_root initialization possible. */
/* The OPT_TREE list_head is allocated. */
struct list_head *tree;
LIST_OF(struct option) *tree;
/* Used by OPT_BOOL, OPT_INT, OPT_CODEPAGE and OPT_LANGUAGE */
int number;

View File

@ -49,7 +49,7 @@ struct css_selector {
CSR_ANCESTOR, /* Ancestor, i.e. the "p" in "p a". */
CSR_PARENT, /* Direct parent, i.e. the "div" in "div>img". */
} relation;
struct list_head leaves; /* -> struct css_selector */
LIST_OF(struct css_selector) leaves;
enum css_selector_type {
CST_ELEMENT,
@ -60,7 +60,7 @@ struct css_selector {
} type;
unsigned char *name;
struct list_head properties; /* -> struct css_property */
LIST_OF(struct css_property) properties;
};
@ -81,7 +81,7 @@ struct css_stylesheet {
/* The list of basic element selectors (which can then somehow
* tree up on inside). */
struct list_head selectors; /* -> struct css_selector */
LIST_OF(struct css_selector) selectors;
/* How deeply nested are we. Limited by MAX_REDIRECTS. */
int import_level;

View File

@ -97,7 +97,7 @@ struct link {
/* XXX: They don't neccessary need to be link-specific, but we just
* don't support them for any other elements for now. Well, we don't
* even have a good place where to store them in that case. */
struct list_head *event_hooks; /* -> struct script_event_hook */
LIST_OF(struct script_event_hook) *event_hooks;
union {
unsigned char *name;
@ -138,9 +138,9 @@ struct document {
struct document_options options;
struct list_head forms; /* -> struct form */
struct list_head tags; /* -> struct tag */
struct list_head nodes; /* -> struct node */
LIST_OF(struct form) forms;
LIST_OF(struct tag) tags;
LIST_OF(struct node) nodes;
#ifdef CONFIG_ECMASCRIPT
/* ECMAScript snippets to be executed during loading the document into
@ -149,7 +149,7 @@ struct document {
* by an external reference - you must wait with processing other items
* until it gets resolved and loaded. New items are guaranteed to
* always appear at the list end. */
struct list_head onload_snippets; /* -> struct string_list_item */
LIST_OF(struct string_list_item) onload_snippets;
/* FIXME: We should externally maybe using cache_entry store the
* dependencies between the various entries so nothing gets removed
* unneeded. */

View File

@ -36,7 +36,7 @@ struct form {
unsigned char *target;
enum form_method method;
struct list_head items; /* -> struct form_control */
LIST_OF(struct form_control) items;
};

View File

@ -188,12 +188,12 @@ PERLMOD_MAKEVAR_PREFIX =
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
PREDEFINED = LIST_OF(element_T)="element_T list"
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------

View File

@ -39,7 +39,7 @@ struct ecmascript_interpreter {
* any new snippets in document.onload_snippets). Instead, as we
* go through the list we maintain a pointer to the last processed
* entry. */
struct list_head onload_snippets; /* -> struct string_list_item */
LIST_OF(struct string_list_item) onload_snippets;
struct string_list_item *current_onload_snippet;
/* ID of the {struct document} where those onload_snippets belong to.

View File

@ -42,7 +42,7 @@
struct mailcap_hash_item {
/* The entries associated with the type */
struct list_head entries; /* -> struct mailcap_entry */
LIST_OF(struct mailcap_entry) entries;
/* The content type of all @entries. Must be last! */
unsigned char type[1];
@ -683,7 +683,7 @@ int default_mime_backend,
install_signal_handler,
mimetypes_mime_backend,
program;
struct list_head terminals;
LIST_OF(struct terminal) terminals;
void die(const char *msg, ...)
{

View File

@ -117,7 +117,7 @@ struct bittorrent_peer_request {
struct bittorrent_peer_status {
/* FIFO-like recording of requests. */
struct list_head requests; /* -> struct bittorrent_peer_request */
LIST_OF(struct bittorrent_peer_request) requests;
/* Flags for scheduling updating of the peer state. */
unsigned int choked:1; /* The peer was choked. */
@ -170,7 +170,7 @@ struct bittorrent_peer_connection {
/* Outgoing message queue. Note piece messages are maintained entirely
* in the request list in the bittorrent_peer_status struct. */
struct list_head queue; /* -> struct bittorrent_peer_request */
LIST_OF(struct bittorrent_peer_request) queue;
/* A bitfield of the available pieces from the peer. */
/* The size depends on the number of pieces. */
@ -270,7 +270,7 @@ struct bittorrent_meta {
/* A list with information about files in the torrent. */
/* The list is a singleton for single-file torrents. */
struct list_head files; /* -> struct bittorrent_file */
LIST_OF(struct bittorrent_file) files;
};
enum bittorrent_connection_mode {
@ -304,11 +304,11 @@ struct bittorrent_connection {
/* Active peer list */
/* The size is controlled by the protocol.bittorrent.max_active_peers
* option. */
struct list_head peers; /* -> struct bittorrent_peer_connection */
LIST_OF(struct bittorrent_peer_connection) peers;
/* List of information about potential peers. */
/* TODO: Use hash. */
struct list_head peer_pool; /* -> struct bittorrent_peer */
LIST_OF(struct bittorrent_peer) peer_pool;
/* The peer ID of the client. */
bittorrent_id_T peer_id;

View File

@ -26,7 +26,7 @@
struct bittorrent_download_info {
struct list_head labels; /* -> struct string_list_item */
LIST_OF(struct string_list_item) labels;
unsigned char *name;
int *selection;
size_t size;

View File

@ -60,7 +60,7 @@ struct bittorrent_piece_cache {
/* A list of completed and saved entries which has been loaded into
* memory. The allocated memory for all these entries is disposable. The
* entries are sorted in a LRU-manner. */
struct list_head queue; /* -> struct bittorrent_piece_cache_entry */
LIST_OF(struct bittorrent_piece_cache_entry) queue;
/* Remaining pieces are tracked using the remaining_blocks member of the
* piece cache entry and a free list of piece blocks to be requested.
@ -84,7 +84,7 @@ struct bittorrent_piece_cache {
* cloned flag. The flag is set when piece block requests are cloned. If
* the cloned flag is set when receiving a block then the peer-list is
* searched and requests for the same piece is canceled. */
struct list_head free_list; /* -> struct bittorrent_piece_request */
LIST_OF(struct bittorrent_piece_request) free_list;
struct bittorrent_piece_cache_entry entries[1];
};

View File

@ -8,7 +8,7 @@ struct ses_history {
/* The first list item is the first visited location. The last list
* item is the last location in the unhistory. The @current location is
* included in this list. */
struct list_head history; /* -> struct location */
LIST_OF(struct location) history;
/* The current location. This is moveable pivot pointing somewhere at
* the middle of @history. */

View File

@ -145,7 +145,7 @@ struct session {
/* The current document */
struct list_head more_files; /* -> struct file_to_load */
LIST_OF(struct file_to_load) more_files;
struct download loading;
struct uri *loading_uri;
@ -154,7 +154,7 @@ struct session {
int redirect_cnt;
struct document_view *doc_view;
struct list_head scrn_frames; /* -> struct document_view */
LIST_OF(struct document_view) scrn_frames;
struct uri *download_uri;
@ -192,13 +192,13 @@ struct session {
/* The possibly running type queries (what-to-do-with-that-file?) */
struct list_head type_queries; /* -> struct type_query */
LIST_OF(struct type_query) type_queries;
/* The info for status displaying */
struct session_status status;
};
extern struct list_head sessions; /* -> struct session */
extern LIST_OF(struct session) sessions;
extern enum remote_session_flags remote_session_flags;
/* This returns a pointer to the current location inside of the given session.

View File

@ -90,7 +90,7 @@ struct terminal {
* tab numbers explicitly, rather than computing them from the
* stack order as is done now. Also, what should be done with the
* inactive main menu? --KON */
struct list_head windows; /* {struct window} */
LIST_OF(struct window) windows;
/* The specification of terminal in terms of terminal options. */
struct option *spec;
@ -159,7 +159,7 @@ struct terminal {
memset(&(term)->prev_mouse_event, 0, sizeof((term)->prev_mouse_event))
/* We keep track about all the terminals in this list. */
extern struct list_head terminals;
extern LIST_OF(struct terminal) terminals;
extern const unsigned char frame_dumb[];

View File

@ -56,7 +56,6 @@ struct xlist_head {
#define LIST_HEAD(x) x *next; x *prev
#define LIST_SET_MAGIC(x) list_magic_set(*(x))
#else /* LISTDEBUG */
#define LISTMAGIC1 ((void *) 0xdadababa)
@ -118,6 +117,12 @@ struct xlist_head {
#define INIT_LIST_HEAD(x) struct list_head x = { D_LIST_HEAD(x) }
/** A list intended to contain elements of a specific type. The
* parameter currently serves as documentation only. Doxyfile defines
* this macro differently in order to get better collaboration
* diagrams. */
#define LIST_OF(element_T) struct list_head
#ifdef HAVE_TYPEOF
#define list_typeof(x) typeof(x)
#else

View File

@ -14,7 +14,7 @@ struct view_state {
struct document_view *doc_view;
struct uri *uri;
struct list_head forms; /* -> struct form_view */
LIST_OF(struct form_view) forms;
struct form_state *form_info;
int form_info_len;