📄 httag.cc
字号:
r = 1; v = 1; } tagstring += r; c += v; } return c;}int tag_count_selectable_tags_in_group(const TAGSTRING *tagstring, int group){ int c = 0; tagstring = tag_get_group(tagstring, group); while ((tagstring = tag_findnext(tagstring))) { switch (tagstring[1]) { case HT_TAG_EDIT_BYTE: c++; tagstring += HT_TAG_EDIT_BYTE_LEN; break; case HT_TAG_EDIT_WORD_LE: c++; tagstring += HT_TAG_EDIT_WORD_LE_LEN; break; case HT_TAG_EDIT_DWORD_LE: c++; tagstring += HT_TAG_EDIT_DWORD_LE_LEN; break; case HT_TAG_EDIT_QWORD_LE: c++; tagstring += HT_TAG_EDIT_QWORD_LE_LEN; break; case HT_TAG_EDIT_WORD_BE: c++; tagstring += HT_TAG_EDIT_WORD_BE_LEN; break; case HT_TAG_EDIT_DWORD_BE: c++; tagstring += HT_TAG_EDIT_DWORD_BE_LEN; break; case HT_TAG_EDIT_QWORD_BE: c++; tagstring += HT_TAG_EDIT_QWORD_BE_LEN; break; case HT_TAG_EDIT_WORD_VE: c++; tagstring += HT_TAG_EDIT_WORD_VE_LEN; break; case HT_TAG_EDIT_DWORD_VE: c++; tagstring += HT_TAG_EDIT_DWORD_VE_LEN; break; case HT_TAG_EDIT_QWORD_VE: c++; tagstring += HT_TAG_EDIT_QWORD_VE_LEN; break; case HT_TAG_EDIT_TIME_LE: c++; tagstring += HT_TAG_EDIT_TIME_LE_LEN; break; case HT_TAG_EDIT_TIME_BE: c++; tagstring += HT_TAG_EDIT_TIME_BE_LEN; break; case HT_TAG_EDIT_TIME_VE: c++; tagstring += HT_TAG_EDIT_TIME_VE_LEN; break; case HT_TAG_EDIT_CHAR: c++; tagstring += HT_TAG_EDIT_CHAR_LEN; break; case HT_TAG_EDIT_BIT: c++; tagstring += HT_TAG_EDIT_BIT_LEN; break; case HT_TAG_SEL: c++; tagstring += HT_TAG_SEL_LEN(((ht_tag_sel*)tagstring)->strlen); break; case HT_TAG_FLAGS: c++; tagstring += HT_TAG_FLAGS_LEN; break; case HT_TAG_GROUP: return c; case HT_TAG_DESC_BYTE: c++; tagstring += HT_TAG_DESC_BYTE_LEN; break; case HT_TAG_DESC_WORD_LE: c++; tagstring += HT_TAG_DESC_WORD_LE_LEN; break; case HT_TAG_DESC_DWORD_LE: c++; tagstring += HT_TAG_DESC_DWORD_LE_LEN; break; case HT_TAG_DESC_QWORD_LE: c++; tagstring += HT_TAG_DESC_QWORD_LE_LEN; break; case HT_TAG_DESC_WORD_BE: c++; tagstring += HT_TAG_DESC_WORD_BE_LEN; break; case HT_TAG_DESC_DWORD_BE: c++; tagstring += HT_TAG_DESC_DWORD_BE_LEN; break; case HT_TAG_DESC_QWORD_BE: c++; tagstring += HT_TAG_DESC_QWORD_BE_LEN; break; case HT_TAG_DESC_WORD_VE: c++; tagstring += HT_TAG_DESC_WORD_VE_LEN; break; case HT_TAG_DESC_DWORD_VE: c++; tagstring += HT_TAG_DESC_DWORD_VE_LEN; break; case HT_TAG_DESC_QWORD_VE: c++; tagstring += HT_TAG_DESC_QWORD_VE_LEN; break; default: tagstring += tag_get_len(tagstring); break; } } return c;}int tag_count_selectable_tags(const TAGSTRING *tagstring){ int c=0; while ((tagstring=tag_findnext(tagstring))) { switch (tagstring[1]) { case HT_TAG_EDIT_BYTE: c++; tagstring+=HT_TAG_EDIT_BYTE_LEN; break; case HT_TAG_EDIT_WORD_LE: c++; tagstring+=HT_TAG_EDIT_WORD_LE_LEN; break; case HT_TAG_EDIT_DWORD_LE: c++; tagstring+=HT_TAG_EDIT_DWORD_LE_LEN; break; case HT_TAG_EDIT_QWORD_LE: c++; tagstring+=HT_TAG_EDIT_QWORD_LE_LEN; break; case HT_TAG_EDIT_WORD_BE: c++; tagstring+=HT_TAG_EDIT_WORD_BE_LEN; break; case HT_TAG_EDIT_DWORD_BE: c++; tagstring+=HT_TAG_EDIT_DWORD_BE_LEN; break; case HT_TAG_EDIT_QWORD_BE: c++; tagstring+=HT_TAG_EDIT_QWORD_BE_LEN; break; case HT_TAG_EDIT_WORD_VE: c++; tagstring+=HT_TAG_EDIT_WORD_VE_LEN; break; case HT_TAG_EDIT_DWORD_VE: c++; tagstring+=HT_TAG_EDIT_DWORD_VE_LEN; break; case HT_TAG_EDIT_QWORD_VE: c++; tagstring+=HT_TAG_EDIT_QWORD_VE_LEN; break; case HT_TAG_EDIT_TIME_LE: c++; tagstring+=HT_TAG_EDIT_TIME_LE_LEN; break; case HT_TAG_EDIT_TIME_BE: c++; tagstring+=HT_TAG_EDIT_TIME_BE_LEN; break; case HT_TAG_EDIT_TIME_VE: c++; tagstring+=HT_TAG_EDIT_TIME_VE_LEN; break; case HT_TAG_EDIT_CHAR: c++; tagstring+=HT_TAG_EDIT_CHAR_LEN; break; case HT_TAG_EDIT_BIT: c++; tagstring+=HT_TAG_EDIT_BIT_LEN; break; case HT_TAG_SEL: c++; tagstring+=HT_TAG_SEL_LEN(((ht_tag_sel*)tagstring)->strlen); break; case HT_TAG_FLAGS: c++; tagstring+=HT_TAG_FLAGS_LEN; break; case HT_TAG_DESC_BYTE: c++; tagstring+=HT_TAG_DESC_BYTE_LEN; break; case HT_TAG_DESC_WORD_LE: c++; tagstring+=HT_TAG_DESC_WORD_LE_LEN; break; case HT_TAG_DESC_DWORD_LE: c++; tagstring+=HT_TAG_DESC_DWORD_LE_LEN; break; case HT_TAG_DESC_QWORD_LE: c++; tagstring+=HT_TAG_DESC_QWORD_LE_LEN; break; case HT_TAG_DESC_WORD_BE: c++; tagstring+=HT_TAG_DESC_WORD_BE_LEN; break; case HT_TAG_DESC_DWORD_BE: c++; tagstring+=HT_TAG_DESC_DWORD_BE_LEN; break; case HT_TAG_DESC_QWORD_BE: c++; tagstring+=HT_TAG_DESC_QWORD_BE_LEN; break; case HT_TAG_DESC_WORD_VE: c++; tagstring+=HT_TAG_DESC_WORD_VE_LEN; break; case HT_TAG_DESC_DWORD_VE: c++; tagstring+=HT_TAG_DESC_DWORD_VE_LEN; break; case HT_TAG_DESC_QWORD_VE: c++; tagstring+=HT_TAG_DESC_QWORD_VE_LEN; break; default: tagstring+=tag_get_len(tagstring); break; } } return c;}int tag_count_groups(const TAGSTRING *tagstring){ int c = 1; while ((tagstring = tag_findnext(tagstring))) { if (tagstring[1] == HT_TAG_GROUP) { c++; tagstring += HT_TAG_GROUP_LEN; } else { tagstring += tag_get_len(tagstring); } } return c;}TAGSTRING *tag_get_selectable_tag(const TAGSTRING *tagstring, int n, int group){ const TAGSTRING *r = NULL; if (group > 0) tagstring = tag_get_group(tagstring, group); n++; while (n && (tagstring = tag_findnext(tagstring))) { switch (tagstring[1]) { case HT_TAG_EDIT_BYTE: n--; r=tagstring; tagstring+=HT_TAG_EDIT_BYTE_LEN; break; case HT_TAG_EDIT_WORD_LE: n--; r=tagstring; tagstring+=HT_TAG_EDIT_WORD_LE_LEN; break; case HT_TAG_EDIT_DWORD_LE: n--; r=tagstring; tagstring+=HT_TAG_EDIT_DWORD_LE_LEN; break; case HT_TAG_EDIT_QWORD_LE: n--; r=tagstring; tagstring+=HT_TAG_EDIT_QWORD_LE_LEN; break; case HT_TAG_EDIT_WORD_BE: n--; r=tagstring; tagstring+=HT_TAG_EDIT_WORD_BE_LEN; break; case HT_TAG_EDIT_DWORD_BE: n--; r=tagstring; tagstring+=HT_TAG_EDIT_DWORD_BE_LEN; break; case HT_TAG_EDIT_QWORD_BE: n--; r=tagstring; tagstring+=HT_TAG_EDIT_QWORD_BE_LEN; break; case HT_TAG_EDIT_WORD_VE: n--; r=tagstring; tagstring+=HT_TAG_EDIT_WORD_VE_LEN; break; case HT_TAG_EDIT_DWORD_VE: n--; r=tagstring; tagstring+=HT_TAG_EDIT_DWORD_VE_LEN; break; case HT_TAG_EDIT_QWORD_VE: n--; r=tagstring; tagstring+=HT_TAG_EDIT_QWORD_VE_LEN; break; case HT_TAG_EDIT_TIME_LE: n--; r=tagstring; tagstring+=HT_TAG_EDIT_TIME_LE_LEN; break; case HT_TAG_EDIT_TIME_BE: n--; r=tagstring; tagstring+=HT_TAG_EDIT_TIME_BE_LEN; break; case HT_TAG_EDIT_TIME_VE: n--; r=tagstring; tagstring+=HT_TAG_EDIT_TIME_VE_LEN; break; case HT_TAG_EDIT_CHAR: n--; r=tagstring; tagstring+=HT_TAG_EDIT_CHAR_LEN; break; case HT_TAG_EDIT_BIT: n--; r=tagstring; tagstring+=HT_TAG_EDIT_BIT_LEN; break; case HT_TAG_SEL: n--; r=tagstring; tagstring+=HT_TAG_SEL_LEN(((ht_tag_sel*)tagstring)->strlen); break; case HT_TAG_FLAGS: n--; r=tagstring; tagstring+=HT_TAG_FLAGS_LEN; break; case HT_TAG_GROUP: if (group!=-1) return (char*)r; tagstring+=HT_TAG_GROUP_LEN; break; case HT_TAG_DESC_BYTE: n--; r=tagstring; tagstring+=HT_TAG_DESC_BYTE_LEN; break; case HT_TAG_DESC_WORD_LE: n--; r=tagstring; tagstring+=HT_TAG_DESC_WORD_LE_LEN; break; case HT_TAG_DESC_DWORD_LE: n--; r=tagstring; tagstring+=HT_TAG_DESC_DWORD_LE_LEN; break; case HT_TAG_DESC_QWORD_LE: n--; r=tagstring; tagstring+=HT_TAG_DESC_QWORD_LE_LEN; break; case HT_TAG_DESC_WORD_BE: n--; r=tagstring; tagstring+=HT_TAG_DESC_WORD_BE_LEN; break; case HT_TAG_DESC_DWORD_BE: n--; r=tagstring; tagstring+=HT_TAG_DESC_DWORD_BE_LEN; break; case HT_TAG_DESC_QWORD_BE: n--; r=tagstring; tagstring+=HT_TAG_DESC_QWORD_BE_LEN; break; case HT_TAG_DESC_WORD_VE: n--; r=tagstring; tagstring+=HT_TAG_DESC_WORD_VE_LEN; break; case HT_TAG_DESC_DWORD_VE: n--; r=tagstring; tagstring+=HT_TAG_DESC_DWORD_VE_LEN; break; case HT_TAG_DESC_QWORD_VE: n--; r=tagstring; tagstring+=HT_TAG_DESC_QWORD_VE_LEN; break; default: tagstring+=tag_get_len(tagstring); break; } } return (n == 0) ? (char*)r : NULL;}TAGSTRING *tag_get_group(const TAGSTRING *tagstring, int group){ const TAGSTRING *r=tagstring; while ((group) && (tagstring=tag_findnext(tagstring))) { switch (tagstring[1]) { case HT_TAG_GROUP: group--; tagstring+=HT_TAG_GROUP_LEN; r=tagstring; break; default: tagstring+=tag_get_len(tagstring); break; } } return (TAGSTRING *)r;}int tag_get_class(const TAGSTRING *tagstring){ switch (tagstring[1]) { case HT_TAG_EDIT_BYTE: case HT_TAG_EDIT_WORD_LE: case HT_TAG_EDIT_DWORD_LE: case HT_TAG_EDIT_QWORD_LE: case HT_TAG_EDIT_WORD_BE: case HT_TAG_EDIT_DWORD_BE: case HT_TAG_EDIT_QWORD_BE: case HT_TAG_EDIT_WORD_VE: case HT_TAG_EDIT_DWORD_VE: case HT_TAG_EDIT_QWORD_VE: case HT_TAG_EDIT_TIME_LE: case HT_TAG_EDIT_TIME_BE: case HT_TAG_EDIT_TIME_VE: case HT_TAG_EDIT_CHAR: case HT_TAG_EDIT_BIT: return tag_class_edit; case HT_TAG_SEL: case HT_TAG_FLAGS: case HT_TAG_DESC_BYTE: case HT_TAG_DESC_WORD_LE: case HT_TAG_DESC_DWORD_LE: case HT_TAG_DESC_QWORD_LE: case HT_TAG_DESC_WORD_BE: case HT_TAG_DESC_DWORD_BE: case HT_TAG_DESC_QWORD_BE: case HT_TAG_DESC_WORD_VE: case HT_TAG_DESC_DWORD_VE: case HT_TAG_DESC_QWORD_VE: return tag_class_sel; default: return tag_class_no; }}char *tag_striptags(char *dest, const TAGSTRING *src){ if (!dest) return NULL; if (!src) { *dest = 0; return dest; } char *d = dest; while (*src) { if (src[0]=='\e') { switch (src[1]) { case HT_TAG_SEL: { src += sizeof (ht_tag_sel); break; } default: src += tag_get_len(src); } } else { *dest = *src; dest++; src++; } } *dest = 0; return d;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -