Rev 4725 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4725 | Rev 4726 | ||
---|---|---|---|
Line 125... | Line 125... | ||
125 | word bukva[2]; |
125 | word bukva[2]; |
126 | int j; |
126 | int j; |
127 | byte ignor_param; |
127 | byte ignor_param; |
128 | char temp[768]; |
128 | char temp[768]; |
129 | dword bufpos = bufpointer; |
129 | dword bufpos = bufpointer; |
- | 130 | int line_len; |
|
Line 130... | Line 131... | ||
130 | 131 | ||
131 | b_text = i_text = u_text = s_text = blq_text = t_html = t_body = |
132 | b_text = i_text = u_text = s_text = blq_text = t_html = t_body = |
132 | li_text = link = ignor_text = text_color_index = text_colors[0] = li_tab = |
133 | li_text = link = ignor_text = text_color_index = text_colors[0] = li_tab = |
133 | condition_text_val = condition_text_active = 0; //îáíóëÿåì òåãè |
134 | condition_text_val = condition_text_active = 0; //îáíóëÿåì òåãè |
Line 163... | Line 164... | ||
163 | if (pre_text) |
164 | if (pre_text) |
164 | { |
165 | { |
165 | chrcat(#line, ' '); |
166 | chrcat(#line, ' '); |
166 | bukva = temp = NULL; |
167 | bukva = temp = NULL; |
167 | Perenos(); |
168 | Perenos(); |
- | 169 | break; |
|
168 | } |
170 | } |
169 | case '\9': |
171 | case '\9': |
170 | if (pre_text) //èíà÷å èä¸ì íà 0x0d |
172 | if (pre_text) //èíà÷å èä¸ì íà 0x0d |
171 | { |
173 | { |
172 | tab_len = strlen(#line) % 4; |
174 | tab_len = strlen(#line) % 4; |
Line 222... | Line 224... | ||
222 | { |
224 | { |
223 | bukva = ESBYTE[bufpos]; |
225 | bukva = ESBYTE[bufpos]; |
224 | if (bukva == '\9') || (bukva == '\x0a') || (bukva == '\x0d') bukva = ' '; |
226 | if (bukva == '\9') || (bukva == '\x0a') || (bukva == '\x0d') bukva = ' '; |
225 | if (!ignor_param) && (bukva <>' ') |
227 | if (!ignor_param) && (bukva <>' ') |
226 | { |
228 | { |
227 | if (strlen(#tag) |
229 | if (strlen(#tag) |
228 | } |
230 | } |
229 | else |
231 | else |
230 | { |
232 | { |
231 | ignor_param = true; |
233 | ignor_param = true; |
232 | if (!ignor_text) && (strlen(#tagparam)+1 |
234 | if (!ignor_text) && (strlen(#tagparam)+1 |
Line 238... | Line 240... | ||
238 | if (condition_text_active) && (condition_text_val != condition_href) |
240 | if (condition_text_active) && (condition_text_val != condition_href) |
239 | { |
241 | { |
240 | if (strcmp(#tag, "/condition")!=0) break; |
242 | if (strcmp(#tag, "/condition")!=0) break; |
241 | } |
243 | } |
242 | if (tag[strlen(#tag)-1]=='/') tag[strlen(#tag)-1]=NULL; //for br/ |
244 | if (tag[strlen(#tag)-1]=='/') tag[strlen(#tag)-1]=NULL; //for br/ |
243 | if (tagparam) && (strlen(#tagparam) < 4000) GetNextParam(); |
245 | if (tagparam) GetNextParam(); |
Line 244... | Line 246... | ||
244 | 246 | ||
245 | if (stolbec + strlen(#line) > list.column_max) Perenos(); |
247 | if (stolbec + strlen(#line) > list.column_max) Perenos(); |
246 | DrawPage(); |
248 | DrawPage(); |
247 | line = NULL; |
249 | line = NULL; |
248 | if (tag) SetTextStyle(list.x + 5, stroka * list.line_h + list.y + 5); //îáðàáîòêà òåãîâ |
250 | if (tag) SetTextStyle(list.x + 5, stroka * list.line_h + list.y + 5); //îáðàáîòêà òåãîâ |
249 | tag = parametr = tagparam = ignor_param = NULL; |
251 | tag = parametr = tagparam = ignor_param = NULL; |
250 | break; |
252 | break; |
251 | default: |
253 | default: |
252 | DEFAULT_MARK: |
254 | DEFAULT_MARK: |
- | 255 | if (bukva<=15) bukva=' '; |
|
253 | if (bukva<=15) bukva=' '; |
256 | line_len = strlen(#line); |
254 | if (!pre_text) && (bukva == ' ') |
257 | if (!pre_text) && (bukva == ' ') |
255 | { |
258 | { |
256 | if (line[strlen(#line)-1]==' ') break; //óáðàòü 2 ïðîáåëà ïîäðÿä |
259 | if (line[line_len-1]==' ') break; //no double spaces |
257 | if (!stolbec) && (!line) break; //ñòðîêà íå ìîæåò íà÷èíàòüñÿ ñ ïðîáåëà |
260 | if (!stolbec) && (!line) break; //no paces at the beginning of the line |
258 | } |
261 | } |
259 | if (strlen(#line) |
262 | if (line_len < sizeof(line)) chrcat(#line, bukva); |
260 | if (stolbec + strlen(#line) > list.column_max) Perenos(); |
263 | if (stolbec + line_len > list.column_max) Perenos(); |
261 | } |
264 | } |
262 | } |
265 | } |
263 | DrawPage(); |
266 | DrawPage(); |
264 | NewLine(); |
267 | NewLine(); |