Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void ParseLuaTags(char *html)
- {
- char *ptr = html;
- char *luastart = NULL;
- char *luaend = NULL;
- int lualen = -1;
- while (*ptr != NULL)
- {
- if (luastart == NULL)
- {
- if (*ptr == '<' && *++ptr == 'l' && *++ptr == 'u' &&
- *++ptr == 'a' && *++ptr == '>')
- {
- luastart = ptr;
- }
- } else {
- if (*ptr == '<' && *++ptr == '/' && *++ptr == 'l' &&
- *++ptr == 'u' && ++ptr == 'a' && *++ptr == '>')
- {
- luaend = ptr - 7;
- }
- }
- *ptr++;
- }
- lualen = luaend - luastart;
- char *luastr = (char*)halloc(lualen + 1);
- lstrcpynA(luastr, luastart, lualen);
- printf("Lua: %X %X %d\n%s\n", luastart, luaend, lualen, luastr);
- hfree(luastr);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement