Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "jopa.h"
- #define ERROR {printf("%s\n", "TI DEBIL!");return (1337);}
- void bzero_oo(char *str) {
- int i;
- i = 0;
- while (str[i])
- str[i++] = '\0';
- }
- void print(char stack[10][255])
- {
- int i = 0;
- while (stack[i][0])
- printf("%s\n", stack[i++]);
- printf("\n");
- }
- int main(void)
- {
- char *str = "<html><head><title>Hello</title></head><body><p>This appears in the <i>browser</i>.</p></body></html>";
- char stack[255][255];
- int i = 0;
- int j = 0;
- int z = 0;
- while(str[i])
- {
- if (str[i] == '<')
- {
- j = 0;
- while (str[i] && str[i] != '>')
- stack[z][j++] = str[i++];
- stack[z][j++] = str[i++];
- stack[z][j++] = '\0';
- push(stack[z]);
- if (stack[z][1] == '/')
- {
- if (top && stack[z - 1][0] && !strcmp(&stack[z][2], &stack[z - 1][1]))
- {
- pop();
- pop();
- z -= 2;
- }
- else
- ERROR;
- }
- display();
- //print(stack);
- z++;
- }
- else
- i++;
- }
- system("leaks a.exe");
- printf("%s\n", "ARTUR LOH!");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement