File: parser.h

package info (click to toggle)
htmlcxx 0.87-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,412 kB
  • sloc: sh: 4,380; cpp: 4,355; yacc: 526; ansic: 205; lex: 159; makefile: 47; perl: 27
file content (47 lines) | stat: -rw-r--r-- 803 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef __CSS_PARSER_H__
#define __CSS_PARSER_H__

#define PS_CLASS_NONE 0
#define PS_CLASS_LINK 1
#define PS_CLASS_VISITED 2
#define PS_CLASS_ACTIVE 3

#define PS_ELEMENT_NONE 0
#define PS_ELEMENT_FIRST_LETTER 1
#define PS_ELEMENT_FIRST_LINE 2

#ifdef __cplusplus
extern "C" {
#endif

struct property_t {
	char *name;
	char *val;
	int important;
	int count;
	struct property_t *next;
};

struct selector_t {
	char *element_name;
	char *id;
	char *e_class;
	int pseudo_class;
	int pseudo_element;
	struct property_t *property;
	struct selector_t *next;
};

struct selector_list_t {
	struct selector_t *selector;
	struct selector_list_t *next;
};

struct selector_list_t* css_parse(const char *buffer, int buf_len);
void free_rulesets(struct selector_list_t *rules);

#ifdef __cplusplus
}
#endif

#endif