Subversion Repositories Kolibri OS

Rev

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

Rev 4550 Rev 4554
Line 139... Line 139...
139
		strcat(#newurl, #URL);
139
		strcat(#newurl, #URL);
140
		strcpy(#URL, #newurl);
140
		strcpy(#URL, #newurl);
141
}
141
}
Line 142... Line -...
142
 
-
 
143
 
142
 
144
	
143
 
-
 
144
void TWebBrowser::ReadHtml(byte encoding)
-
 
145
{
145
void TWebBrowser::ReadHtml(byte encoding)
146
	if (native_http)
146
{
147
	{
-
 
148
			if (strncmp(#URL,"http:",5)) {
147
	if (!strncmp(#URL,"http:",5)) 
149
				file_size stdcall (#URL);
148
		file_size stdcall (#download_path);
-
 
149
	else
150
				bufsize = EBX;
150
		file_size stdcall (#URL);
-
 
151
	
151
			}
152
	bufsize = EBX;
152
			
-
 
153
			if (!bufsize) return;
153
	if (!bufsize) return;
154
 
154
	
155
			if (strncmp(#URL,"http:",5)) {
-
 
156
				mem_Free(bufpointer);
-
 
157
				bufpointer = mem_Alloc(bufsize);
155
	mem_Free(bufpointer);
158
			}
-
 
159
			
-
 
160
			if (strncmp(#URL,"http:",5)) ReadFile(0, bufsize, bufpointer, #URL);
-
 
161
				
156
	bufpointer = mem_Alloc(bufsize);
162
			cur_encoding = encoding;
-
 
163
			if (encoding==_WIN) wintodos(bufpointer);
-
 
164
			if (encoding==_UTF) utf8rutodos(bufpointer);
157
	if (!strncmp(#URL,"http:",5)) 
165
			if (encoding==_KOI) koitodos(bufpointer);
-
 
166
	}
-
 
167
	else
-
 
168
	{
-
 
169
			if (!strncmp(#URL,"http:",5)) 
-
 
170
				file_size stdcall (#download_path);
-
 
171
			else
-
 
172
				file_size stdcall (#URL);
-
 
173
			
-
 
174
			bufsize = EBX;
-
 
175
			if (!bufsize) return;
-
 
176
			
-
 
177
			mem_Free(bufpointer);
-
 
178
			bufpointer = mem_Alloc(bufsize);
-
 
179
			if (!strncmp(#URL,"http:",5)) 
158
		ReadFile(0, bufsize, bufpointer, #download_path);
180
				ReadFile(0, bufsize, bufpointer, #download_path);
159
	else
181
			else
160
		ReadFile(0, bufsize, bufpointer, #URL);
182
				ReadFile(0, bufsize, bufpointer, #URL);
161
		
183
				
162
	cur_encoding = encoding;
184
			cur_encoding = encoding;
163
	if (encoding==_WIN) wintodos(bufpointer);
185
			if (encoding==_WIN) wintodos(bufpointer);
-
 
186
			if (encoding==_UTF) utf8rutodos(bufpointer);
-
 
187
			if (encoding==_KOI) koitodos(bufpointer);
-
 
188
	}
-
 
189
}
-
 
190
 
-
 
191
/*
-
 
192
void TWebBrowser::ReadHtml(byte encoding)
-
 
193
{
164
	if (encoding==_UTF) utf8rutodos(bufpointer);
194
 
-
 
195
 
Line 165... Line 196...
165
	if (encoding==_KOI) koitodos(bufpointer);
196
}
166
}
197
*/
167
 
198