Rev 7750 | Rev 7756 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7750 | Rev 7755 | ||
---|---|---|---|
Line -... | Line 1... | ||
- | 1 | enum { TAG=1, VALUE, TEXT, COMMENT, SCRIPT}; |
|
Line 1... | Line -... | ||
1 | dword source_buf_start, source_buf_end; |
- | |
2 | int opened_font=0; |
2 | |
3 | int mode; |
3 | int opened_font_counter=0; |
Line -... | Line 4... | ||
- | 4 | int mode; |
|
- | 5 | ||
4 | 6 | dword source_buf_end; |
|
5 | void SourceBufAdd(dword _mode, src) |
7 | |
6 | { |
8 | void SourceBufAdd(dword _mode, src) |
Line 7... | Line 9... | ||
7 | dword font_found_pointer, src_orig = src; |
9 | { |
Line 8... | Line 10... | ||
8 | 10 | dword font_found_pointer, src_orig = src; |
|
9 | if (_mode) mode = _mode; |
11 | |
Line 10... | Line 12... | ||
10 | 12 | if (_mode) mode = _mode; |
|
11 | strcpy(source_buf_end, src); |
13 | |
12 | source_buf_end += strlen(source_buf_end); |
14 | strcpy(source_buf_end, src); |
13 | 15 | source_buf_end += strlen(source_buf_end); |
|
Line 14... | Line 16... | ||
14 | if (font_found_pointer = strstr(src, "")) { |
16 | |
15 | opened_font--; |
17 | if (font_found_pointer = strstr(src, "")) { |
16 | src = font_found_pointer+2; |
18 | opened_font_counter--; |
17 | } |
19 | src = font_found_pointer+2; |
18 | 20 | } |
|
19 | src = src_orig; |
21 | |
Line 20... | Line 22... | ||
20 | if (font_found_pointer = strstr(src, " |
22 | src = src_orig; |
21 | opened_font++; |
23 | if (font_found_pointer = strstr(src, " |
22 | src = font_found_pointer+2; |
24 | opened_font_counter++; |
23 | } |
25 | src = font_found_pointer+2; |
Line 24... | Line -... | ||
24 | } |
- | |
25 | 26 | } |
|
26 | void CloseAllOpenedFonts(dword _mode) |
27 | } |
27 | { |
28 | |
28 | while (opened_font) SourceBufAdd(_mode, ""); |
29 | void CloseAllOpenedFonts(dword _mode) |
- | 30 | { |
|
Line 29... | Line 31... | ||
29 | } |
31 | while (opened_font_counter) SourceBufAdd(_mode, ""); |
- | 32 | } |
|
30 | 33 | ||
31 | enum { TAG=1, VALUE, TEXT, COMMENT, SCRIPT}; |
34 | dword ShowSource(dword _bufdata, _in_bufsize) |
Line 32... | Line 35... | ||
32 | dword ShowSource() |
35 | { |
33 | { |
36 | dword i, j; |
34 | dword i, j; |
37 | bool activate_script_mode = false; |
Line 35... | Line 38... | ||
35 | bool activate_script_mode = false; |
38 | dword source_buf_start; |
36 | 39 | ||
37 | opened_font=0; |
40 | opened_font_counter=0; |
38 | source_buf_start = source_buf_end = malloc(bufsize*5); |
41 | source_buf_end = malloc(_in_bufsize*5); |
39 | header[strrchr(#header, '-')-2]=0; |
42 | source_buf_start = source_buf_end; |
40 | 43 | header[strrchr(#header, '-')-2]=0; |
|
Line 87... | Line 90... | ||
87 | ESBYTE[source_buf_end] = ESBYTE[i]; |
90 | default: |
88 | source_buf_end++; |
91 | ESBYTE[source_buf_end] = ESBYTE[i]; |
89 | } |
92 | source_buf_end++; |
90 | ESBYTE[source_buf_end] = 0; |
93 | } |
91 | bufsize = source_buf_end - source_buf_start; |
94 | ESBYTE[source_buf_end] = 0; |
92 | free(bufpointer); |
95 | LoadInternalPage(source_buf_start, _in_bufsize); |
93 | bufpointer = source_buf_start; |
- | |
94 | }': |
96 | free(source_buf_start); |
95 | > |