Subversion Repositories Kolibri OS

Rev

Rev 4571 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4571 Rev 4636
Line 28... Line 28...
28
//images
28
//images
29
#include "img\toolbar_icons.c"
29
#include "img\toolbar_icons.c"
30
#include "img\URLgoto.txt";
30
#include "img\URLgoto.txt";
Line 31... Line 31...
31
 
31
 
32
#ifdef LANG_RUS
32
#ifdef LANG_RUS
33
	char version[]=" ’¥ªáâ®¢ë© ¡à ã§¥à 0.99.67";
33
	char version[]=" ’¥ªáâ®¢ë© ¡à ã§¥à 0.99.69";
34
	?define IMAGES_CACHE_CLEARED "Šíè ª à⨭®ª ®ç¨é¥­"
34
	?define IMAGES_CACHE_CLEARED "Šíè ª à⨭®ª ®ç¨é¥­"
35
	?define T_LAST_SLIDE "â® ¯®á«¥¤­¨© á« ©¤"
35
	?define T_LAST_SLIDE "â® ¯®á«¥¤­¨© á« ©¤"
36
	char loading[] = "‡ £à㧪  áâà ­¨æë...
";
36
	char loading[] = "‡ £à㧪  áâà ­¨æë...
";
37
	unsigned char page_not_found[] = FROM "html\page_not_found_ru.htm";
37
	unsigned char page_not_found[] = FROM "html\page_not_found_ru.htm";
38
	char accept_language[]= "Accept-Language: ru\n\0";
38
	char accept_language[]= "Accept-Language: ru\n\0";
39
#else
39
#else
40
	char version[]=" Text-based Browser 0.99.67";
40
	char version[]=" Text-based Browser 0.99.69";
41
	?define IMAGES_CACHE_CLEARED "Images cache cleared"
41
	?define IMAGES_CACHE_CLEARED "Images cache cleared"
42
	?define T_LAST_SLIDE "This slide is the last"
42
	?define T_LAST_SLIDE "This slide is the last"
43
	char loading[] = "Loading...
";
43
	char loading[] = "Loading...
";
44
	unsigned char page_not_found[] = FROM "html\page_not_found_en.htm";
44
	unsigned char page_not_found[] = FROM "html\page_not_found_en.htm";
45
	char accept_language[]= "Accept-Language: en\n\0";	
45
	char accept_language[]= "Accept-Language: en\n\0";	
Line 46... Line -...
46
#endif
-
 
47
 
-
 
48
byte native_http=1;
46
#endif
49
 
47
 
50
proc_info Form;
48
proc_info Form;
Line 51... Line 49...
51
#define WIN_W 640
49
#define WIN_W 640
Line 60... Line 58...
60
int action_buf;
58
int action_buf;
Line 61... Line 59...
61
 
59
 
62
dword http_transfer = 0;
60
dword http_transfer = 0;
Line 63... Line -...
63
dword http_buffer;
-
 
64
 
-
 
65
int	downloader_id;
61
dword http_buffer;
66
 
62
 
-
 
63
#include "..\TWB\TWB.c"
Line 67... Line 64...
67
#include "..\TWB\TWB.c"
64
#include "menu_rmb.h"
68
#include "menu_rmb.h"
65
#include "history.h"
69
 
66
 
Line 101... Line 98...
101
		WaitEventTimeout(2);
98
		WaitEventTimeout(2);
102
		switch(EAX & 0xFF)
99
		switch(EAX & 0xFF)
103
		{
100
		{
104
			CASE evMouse:
101
			CASE evMouse:
105
				if (!CheckActiveProcess(Form.ID)) break;
102
				if (!CheckActiveProcess(Form.ID)) break;
106
 
103
				//Edit URL
107
				edit_box_mouse stdcall (#address_box);
104
				edit_box_mouse stdcall (#address_box);
108
 
-
 
109
				m.get();
105
				m.get();
-
 
106
				//Links hover
110
				if (m.y>WB1.list.y) PageLinks.Hover(m.x, m.y, link_color_inactive, link_color_active, bg_color);
107
				if (m.y>WB1.list.y) PageLinks.Hover(m.x, m.y, link_color_inactive, link_color_active, bg_color);
111
				
108
				//Menu
112
				if (m.y>WB1.list.y) && (m.y
109
				if (m.y>WB1.list.y) && (m.y
113
				{
110
				{
114
					if (m.pkm)
111
					if (m.pkm)
115
					{
112
					{
116
						show_menu = 1;
113
						show_menu = 1;
Line 121... Line 118...
121
						SwitchToAnotherThread();
118
						SwitchToAnotherThread();
122
						CreateThread(#menu_rmb,#stak+4092);
119
						CreateThread(#menu_rmb,#stak+4092);
123
						break; 
120
						break; 
124
					}
121
					}
125
				}
122
				}
126
 
-
 
-
 
123
				//Mouse scroll
127
				if (m.vert)
124
				if (m.vert)
128
				{
125
				{
129
					if (WB1.list.MouseScroll(m.vert)) WB1.Parse(bufpointer, bufsize);
126
					if (WB1.list.MouseScroll(m.vert)) WB1.Parse();
130
				}
127
				}
131
				
-
 
-
 
128
				//Drag scroller
132
				if (!m.lkm) scroll_used=0;
129
				if (!m.lkm) scroll_used=0;
133
				if (m.x>=scroll_wv.start_x) && (m.x<=scroll_wv.start_x+scroll_wv.size_x) 
130
				if (m.x>=scroll_wv.start_x) && (m.x<=scroll_wv.start_x+scroll_wv.size_x) 
134
				&& (m.y>=scroll_wv.start_y+scroll_wv.btn_height) && (-scroll_wv.btn_height+scroll_wv.start_y+scroll_wv.size_y>m.y)
131
				&& (m.y>=scroll_wv.start_y+scroll_wv.btn_height) && (-scroll_wv.btn_height+scroll_wv.start_y+scroll_wv.size_y>m.y)
135
				&& (WB1.list.count>WB1.list.visible) && (m.lkm)
132
				&& (WB1.list.count>WB1.list.visible) && (m.lkm)
136
				{
133
				{
137
					scroll_used=1;
134
					scroll_used=1;
138
				}
135
				}				
139
				
-
 
140
				if (scroll_used)
136
				if (scroll_used)
141
				{
137
				{
142
					half_scroll_size = WB1.list.h - 16 * WB1.list.visible / WB1.list.count - 3 /2;
138
					half_scroll_size = WB1.list.h - 16 * WB1.list.visible / WB1.list.count - 3 /2;
143
					if (half_scroll_size+WB1.list.y>m.y) || (m.y<0) || (m.y>4000) m.y=half_scroll_size+WB1.list.y;
139
					if (half_scroll_size+WB1.list.y>m.y) || (m.y<0) || (m.y>4000) m.y=half_scroll_size+WB1.list.y;
144
					btn=WB1.list.first;
140
					btn=WB1.list.first;
145
					WB1.list.first = m.y -half_scroll_size -WB1.list.y * WB1.list.count / WB1.list.h;
141
					WB1.list.first = m.y -half_scroll_size -WB1.list.y * WB1.list.count / WB1.list.h;
146
					if (WB1.list.visible+WB1.list.first>WB1.list.count) WB1.list.first=WB1.list.count-WB1.list.visible;
142
					if (WB1.list.visible+WB1.list.first>WB1.list.count) WB1.list.first=WB1.list.count-WB1.list.visible;
147
					if (btn<>WB1.list.first) WB1.Parse(bufpointer, bufsize);
143
					if (btn<>WB1.list.first) WB1.Parse();
148
				}
144
				}
149
 
-
 
150
				break;
145
				break;
151
			case evButton:
146
			case evButton:
152
				btn=GetButtonID();
147
				btn=GetButtonID();
153
				if (btn==1)
-
 
154
				{
-
 
155
					KillProcess(downloader_id);
-
 
156
					ExitProcess();
148
				if (btn==1)	ExitProcess();
157
				}
-
 
158
				ELSE
-
 
159
				{
-
 
160
					Scan(btn);
149
				Scan(btn);
161
				}
-
 
162
				break;
150
				break;
163
			case evKey:
151
			case evKey:
164
				key = GetKey();
152
				key = GetKey();
Line 165... Line 153...
165
				
153
				
Line 170... Line 158...
170
				
158
				
171
				_EDIT_MARK:
159
				_EDIT_MARK:
172
				if (key<>0x0d) && (key<>183) && (key<>184) {EAX=key<<8; edit_box_key stdcall(#address_box);}
160
				if (key<>0x0d) && (key<>183) && (key<>184) {EAX=key<<8; edit_box_key stdcall(#address_box);}
173
				break;
161
				break;
174
			case evReDraw:
162
			case evReDraw:
175
				if (action_buf) { Scan(action_buf); action_buf=0;}
163
				if (action_buf) Scan(action_buf);
176
				Draw_Window();
164
				Draw_Window();
Line 177... Line 165...
177
				break;
165
				break;
178
				
166
				
179
			case evNetwork:
167
			case evNetwork:
180
				if (http_transfer > 0) {
168
				if (http_transfer > 0) {
181
					http_process stdcall (http_transfer);
169
					http_process stdcall (http_transfer);
-
 
170
					$push EAX
182
					$push EAX
171
					ESI = http_transfer;
183
					ESI = http_transfer;
172
					if (o_bufpointer) o_bufpointer = free(o_bufpointer);
184
					bufpointer = ESI.http_msg.content_ptr;
173
					bufpointer = ESI.http_msg.content_ptr;
Line 185... Line 174...
185
					bufsize = ESI.http_msg.content_received;
174
					bufsize = ESI.http_msg.content_received;
186
					WB1.Parse(bufpointer, bufsize);
175
					WB1.Parse();
187
					
176
					
188
					$pop EAX	
177
					$pop EAX	
Line 228... Line 217...
228
						{
217
						{
229
							Draw_Window();		// stop button => refresh button
218
							Draw_Window();		// stop button => refresh button
230
						}
219
						}
231
					}
220
					}
232
				}
221
				}
233
			default:
-
 
234
				if (downloader_id<>0)
-
 
235
				{
-
 
236
					if (GetProcessSlot(downloader_id)<>0) break;
-
 
237
					downloader_id=0;
-
 
238
					WB1.list.first = WB1.list.count = 0;
-
 
239
					WB1.ReadHtml(_WIN);
-
 
240
					Draw_Window();
-
 
241
				}
-
 
242
		}
222
		}
243
	}
223
	}
244
}
224
}
Line 245... Line 225...
245
 
225
 
Line 266... Line 246...
266
	}
246
	}
267
	if (Form.height<120) MoveSize(OLD,OLD,OLD,120);
247
	if (Form.height<120) MoveSize(OLD,OLD,OLD,120);
268
	if (Form.width<280) MoveSize(OLD,OLD,280,OLD);
248
	if (Form.width<280) MoveSize(OLD,OLD,280,OLD);
Line 269... Line 249...
269
	
249
	
270
	PutPaletteImage(#toolbar,200,42,0,0,8,#toolbar_pal);
250
	PutPaletteImage(#toolbar,200,42,0,0,8,#toolbar_pal);
Line 271... Line 251...
271
	if (GetProcessSlot(downloader_id)<>0) || (http_transfer > 0) _PutImage(88,10, 24,24, #stop_btn);
251
	if (http_transfer > 0) _PutImage(88,10, 24,24, #stop_btn);
272
	
252
	
273
	DrawBar(200,0,Form.cwidth-200,43,0xE4DFE1);
253
	DrawBar(200,0,Form.cwidth-200,43,0xE4DFE1);
274
	DrawBar(0,42,Form.cwidth,1,0xE2DBDC);
254
	DrawBar(0,42,Form.cwidth,1,0xE2DBDC);
Line 286... Line 266...
286
	DefineButton(scroll_wv.start_x+1, scroll_wv.start_y+1, 16, 16, BTN_UP+BT_HIDE, 0xE4DFE1);
266
	DefineButton(scroll_wv.start_x+1, scroll_wv.start_y+1, 16, 16, BTN_UP+BT_HIDE, 0xE4DFE1);
287
	DefineButton(scroll_wv.start_x+1, scroll_wv.start_y+scroll_wv.size_y-18, 16, 16, BTN_DOWN+BT_HIDE, 0xE4DFE1);
267
	DefineButton(scroll_wv.start_x+1, scroll_wv.start_y+scroll_wv.size_y-18, 16, 16, BTN_DOWN+BT_HIDE, 0xE4DFE1);
288
}
268
}
Line 289... Line 269...
289
 
269
 
290
 
270
 
291
void Scan(int id)
271
void ChangeCharset(byte new_charset)
-
 
272
{
-
 
273
	BufEncode(new_charset);
Line -... Line 274...
-
 
274
	WB1.Parse();	
-
 
275
}
-
 
276
 
-
 
277
void Scan(int id)
-
 
278
{
-
 
279
	action_buf=0;
-
 
280
	if (id >= 400) 
-
 
281
	{
292
{
282
		ProcessLinks(id);
293
	if (id >= 400) ProcessLinks(id);
283
		return;
294
	
284
	}
295
	switch (id)
285
	switch (id)
296
	{
-
 
297
		case 011: //Ctrk+K 
286
	{
Line 298... Line 287...
298
			WB1.ReadHtml(_KOI);
287
		case 011: //Ctrk+K 
299
			WB1.Parse(bufpointer, bufsize);
288
			ChangeCharset(_KOI);
300
			return;
-
 
301
 
289
			return;
Line 302... Line 290...
302
		case 021: //Ctrl+U
290
 
303
			WB1.ReadHtml(_UTF);
291
		case 021: //Ctrl+U
304
			WB1.Parse(bufpointer, bufsize);
-
 
305
			return;
292
			ChangeCharset(_UTF);
Line 306... Line 293...
306
 
293
			return;
307
		case 004: //Ctrl+D
294
 
308
			WB1.ReadHtml(_DOS);
-
 
309
			WB1.Parse(bufpointer, bufsize);
295
		case 004: //Ctrl+D
Line 310... Line 296...
310
			return;
296
			ChangeCharset(_DOS);
311
 
297
			return;
312
		case 005: //Win encoding
298
 
313
			WB1.ReadHtml(_WIN);
299
		case 005: //Win encoding
314
			WB1.Parse(bufpointer, bufsize);
300
			ChangeCharset(_WIN);
Line 315... Line 301...
315
			return;
301
			return;
316
 
302
 
317
		case 009: //free img cache
303
		case 009: //free img cache
Line 332... Line 318...
332
		case FORWARD:
318
		case FORWARD:
333
			if (!BrowserHistory.GoForward()) return;
319
			if (!BrowserHistory.GoForward()) return;
334
			OpenPage();
320
			OpenPage();
335
			return;
321
			return;
336
		case 052:  //F3
322
		case 052:  //F3
-
 
323
			if (strncmp(#URL,"http:",5)==0) 
-
 
324
			{
-
 
325
				WriteFile(bufsize, bufpointer, "/tmp0/1/webview.tmp");
337
			if (strncmp(#URL,"http:",5)<>0) RunProgram("/rd/1/tinypad", #URL);
326
				if (EAX==0) RunProgram("/rd/1/tinypad", "/tmp0/1/webview.tmp");
-
 
327
			}
-
 
328
			else
-
 
329
			{
338
			else RunProgram("/rd/1/tinypad", #download_path);
330
				RunProgram("/rd/1/tinypad", #URL);
-
 
331
			}
339
			return;
332
			return;
340
		case 054: //F5
333
		case 054: //F5
341
			IF(address_box.flags & 0b10) WB1.Parse(bufpointer, bufsize);
334
			IF(address_box.flags & 0b10) WB1.Parse();
342
			return;
335
			return;
Line 343... Line 336...
343
 
336
 
344
		case REFRESH:
337
		case REFRESH:
345
			if (http_transfer<>0)
-
 
346
			{
-
 
347
				EAX = http_transfer;
-
 
348
				EAX = EAX.http_msg.content_ptr;		// get pointer to data
-
 
349
				$push	EAX							// save it on the stack
-
 
350
				http_free stdcall (http_transfer);	// abort connection
-
 
351
				$pop	EAX							
-
 
352
				mem_Free(EAX);						// free data
-
 
353
				http_transfer=0;
-
 
354
				bufsize = 0;
-
 
355
			}
-
 
356
			if (GetProcessSlot(downloader_id)<>0)
-
 
357
			{
-
 
358
				KillProcess(downloader_id);
-
 
359
				pause(20);
-
 
360
				Draw_Window();
-
 
361
				return;
-
 
362
			}
-
 
363
			anchor_line_num=WB1.list.first;
-
 
364
			anchor[0]='|';
338
			if (http_transfer > 0) StopLoading();
365
			OpenPage();
339
			else OpenPage();
366
			return;
340
			return;
367
		case 014:
341
		case 014:
368
		case 020:
342
		case 020:
369
		case NEWTAB:
343
		case NEWTAB:
Line 388... Line 362...
388
		case 183: //PgDown
362
		case 183: //PgDown
389
			if (WB1.list.count < WB1.list.visible) return;
363
			if (WB1.list.count < WB1.list.visible) return;
390
			IF(WB1.list.first == WB1.list.count - WB1.list.visible) return;
364
			IF(WB1.list.first == WB1.list.count - WB1.list.visible) return;
391
			WB1.list.first += WB1.list.visible + 2;
365
			WB1.list.first += WB1.list.visible + 2;
392
			IF(WB1.list.visible + WB1.list.first > WB1.list.count) WB1.list.first = WB1.list.count - WB1.list.visible;
366
			IF(WB1.list.visible + WB1.list.first > WB1.list.count) WB1.list.first = WB1.list.count - WB1.list.visible;
393
			WB1.Parse(bufpointer, bufsize);
367
			WB1.Parse();
394
			return;
368
			return;
Line 395... Line 369...
395
 
369
 
396
		case 184: //PgUp
370
		case 184: //PgUp
397
			if (WB1.list.count < WB1.list.visible) return;
371
			if (WB1.list.count < WB1.list.visible) return;
398
			IF(WB1.list.first == 0) return;
372
			IF(WB1.list.first == 0) return;
399
			WB1.list.first -= WB1.list.visible - 2;
373
			WB1.list.first -= WB1.list.visible - 2;
400
			IF(WB1.list.first < 0) WB1.list.first = 0;
374
			IF(WB1.list.first < 0) WB1.list.first = 0;
401
			WB1.Parse(bufpointer, bufsize);
375
			WB1.Parse();
Line 402... Line 376...
402
			return;
376
			return;
403
 
377
 
404
		case 178:
378
		case 178:
405
		case BTN_UP:
379
		case BTN_UP:
406
			if (WB1.list.first <= 0) return;
380
			if (WB1.list.first <= 0) return;
407
			WB1.list.first--;
381
			WB1.list.first--;
Line 408... Line 382...
408
			WB1.Parse(bufpointer, bufsize);
382
			WB1.Parse();
409
			return;
383
			return;
410
 
384
 
411
		case 177: 
385
		case 177: 
412
		case BTN_DOWN:
386
		case BTN_DOWN:
413
			if (WB1.list.visible + WB1.list.first >= WB1.list.count) return;
387
			if (WB1.list.visible + WB1.list.first >= WB1.list.count) return;
Line 414... Line 388...
414
			WB1.list.first++;
388
			WB1.list.first++;
415
			WB1.Parse(bufpointer, bufsize);
389
			WB1.Parse();
416
			return;
390
			return;
Line 417... Line 391...
417
 
391
 
418
		case 180: //home
392
		case 180: //home
419
			if (WB1.list.KeyHome()) WB1.Parse(bufpointer, bufsize);
393
			if (WB1.list.KeyHome()) WB1.Parse();
420
			return; 
394
			return; 
421
 
395
 
422
		case 181: //end
396
		case 181: //end
Line 475... Line 449...
475
		notify(#URL);
449
		notify(#URL);
476
		strcpy(#editURL, BrowserHistory.CurrentUrl());
450
		strcpy(#editURL, BrowserHistory.CurrentUrl());
477
		strcpy(#URL, BrowserHistory.CurrentUrl());
451
		strcpy(#URL, BrowserHistory.CurrentUrl());
478
		return;
452
		return;
479
	}
453
	}
480
 
-
 
481
	OpenPage();
454
	OpenPage();
482
	return;
455
	return;
483
}
456
}
Line -... Line 457...
-
 
457
 
-
 
458
void StopLoading()
-
 
459
{
-
 
460
	if (http_transfer<>0)
-
 
461
	{
-
 
462
		EAX = http_transfer;
-
 
463
		EAX = EAX.http_msg.content_ptr;		// get pointer to data
-
 
464
		$push	EAX							// save it on the stack
-
 
465
		http_free stdcall (http_transfer);	// abort connection
-
 
466
		$pop	EAX							
-
 
467
		mem_Free(EAX);						// free data
-
 
468
		http_transfer=0;
-
 
469
		bufsize = 0;
-
 
470
	}
-
 
471
	anchor_line_num=WB1.list.first;
-
 
472
	anchor[0]='|';
-
 
473
}
484
 
474
 
485
void OpenPage()
475
void OpenPage()
486
{
476
{
487
	if (GetProcessSlot(downloader_id)<>0) PutPaletteImage(#toolbar,200,42,0,0,8,#toolbar_pal);
477
	if (http_transfer<>0) PutPaletteImage(#toolbar,200,42,0,0,8,#toolbar_pal);
488
	KillProcess(downloader_id);
478
	StopLoading();
489
	strcpy(#editURL, #URL);
479
	strcpy(#editURL, #URL);
490
	BrowserHistory.AddUrl();
480
	BrowserHistory.AddUrl();
491
	strcpy(#header, #version);
481
	strcpy(#header, #version);
492
	pre_text =0;
482
	pre_text =0;
493
	if (!strncmp(#URL,"http:",5))
-
 
494
	{
483
	WB1.list.ClearList();
495
		if (native_http)
484
	if (strncmp(#URL,"http:",5)==0)
496
		{
485
	{
497
			http_get stdcall (#URL, #accept_language);	
486
		http_get stdcall (#URL, #accept_language);
-
 
487
		http_transfer = EAX;
498
			http_transfer = EAX;
488
		cur_encoding = _DEFAULT;
-
 
489
		IF (http_transfer < 0) notify("Error from HTTP lib");
-
 
490
		Draw_Window();
499
			IF (http_transfer < 0) notify("Error from HTTP lib");
491
		return;
500
		}
492
	}
501
		else
493
	else
502
		{
494
	{
-
 
495
		file_size stdcall (#URL);
-
 
496
		bufsize = EBX;
503
			KillProcess(downloader_id);
497
		if (!bufsize) return;
-
 
498
		mem_Free(bufpointer);
504
			DeleteFile(#download_path);
499
		cur_encoding = _DEFAULT;
-
 
500
		if (o_bufpointer) o_bufpointer = free(o_bufpointer);
505
			downloader_id = RunProgram("/sys/network/downloader", #URL);
501
		bufpointer = mem_Alloc(bufsize);
506
			IF (downloader_id<0) notify("Error running Downloader. Internet unavilable.");
502
		ReadFile(0, bufsize, bufpointer, #URL);	
507
		}
-
 
508
		Draw_Window();
-
 
509
		return;
-
 
510
	}
-
 
511
	WB1.list.first = WB1.list.count =0;
-
 
512
	WB1.ReadHtml(_WIN);
503
	}
513
	ShowPage();
504
	ShowPage();
Line 514... Line 505...
514
}
505
}
515
 
506
 
Line 521... Line 512...
521
 
512
 
522
	if (strcmp(#URL, URL_HISTORY)==0) ShowHistory(); else
513
	if (strcmp(#URL, URL_HISTORY)==0) ShowHistory(); else
523
	if (!bufsize)
514
	if (!bufsize)
524
	{
515
	{
525
		PageLinks.Clear();
516
		PageLinks.Clear();
-
 
517
		if (http_transfer<>0)
526
		if (GetProcessSlot(downloader_id)<>0)
518
		{
-
 
519
			WB1.Prepare(#loading, sizeof(loading));
527
			WB1.Parse(#loading, sizeof(loading));
520
		}
528
		else
521
		else
529
			WB1.Parse(#page_not_found, sizeof(page_not_found));
522
			WB1.Prepare(#page_not_found, sizeof(page_not_found));
530
	}
523
	}
531
	else
524
	else
Line 532... Line 525...
532
		WB1.Parse(bufpointer, bufsize);
525
		WB1.Parse();
533
 
526
 
534
	if (!header) strcpy(#header, #version);
527
	if (!header) strcpy(#header, #version);
Line 535... Line -...
535
	if (!strcmp(#version, #header)) DrawTitle(#header);
-
 
536
}
-
 
537
 
-
 
538
ShowHistory()
-
 
Line 539... Line -...
539
{
-
 
540
		int i;
-
 
541
		static int history_pointer;
-
 
542
		
-
 
543
		free(history_pointer);
-
 
544
		history_pointer = malloc(64000);
-
 
545
		strcat(history_pointer, " History

History

");
-
 
546
		strcat(history_pointer, "

Visited pages


");
-
 
547
		for (i=1; i
-
 
548
		{
-
 
549
			strcat(history_pointer, "");
-
 
552
			strcat(history_pointer, BrowserHistory.GetUrl(i));
-
 
553
			strcat(history_pointer, "
");
-
 
554
		}
-
 
555
		strcat(history_pointer, "

Cached images


");
-
 
556
		for (i=1; i
-
 
557
		{
-
 
558
			strcat(history_pointer, "
");
-
 
561
			strcat(history_pointer, #pics[i].path);
-
 
Line 562... Line 528...
562
		}
528
	if (!strcmp(#version, #header)) DrawTitle(#header);