parser.c
来自「著名的标准C++的html解析器」· C语言 代码 · 共 34 行
C
34 行
#include <stdlib.h>#include "parser.h"void free_rulesets(struct selector_list_t *rules) { struct selector_list_t *pos = rules; while (pos != NULL) { struct selector_list_t *tmp = pos; struct selector_t *rule = pos->selector; struct property_t *property = rule->property; while (property != NULL) { struct property_t *tmp = property; property = property->next; tmp->count--; if (tmp->count == 0) { free(tmp->name); free(tmp->val); free(tmp); } } while (rule != NULL) { struct selector_t *tmp = rule; rule = rule->next; free(tmp->element_name); free(tmp->id); free(tmp->e_class); free(tmp); } pos = pos->next; free(tmp); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?