Browse Source

Increased file buffer size & remove excess ASCII padding.

master
Alec Murphy 5 years ago
parent
commit
8552ed7a4d
  1. 14
      Uriel.HC
  2. 2
      uriel_proxy

14
Uriel.HC

@ -7,9 +7,9 @@
#include "::/Doc/Comm"
U8 UrielPageBuf[2097152];
U8 UrielFileBuf[2097152];
U8 UrielFileBuf[10485760];
I64 UrielFileBufSize=0;
I64 UrielPageBufSize=0;
CComm *c=CommInit8n1(URIEL_PORT,115200);
U0 Get(U8 *remote_file, U8 *local_file="file") {
@ -25,6 +25,7 @@ U0 Get(U8 *remote_file, U8 *local_file="file") {
progress1=0;
StrCpy(progress1_desc, "Receiving file");
while (!load) {
if (InU8(0x60)==0x01) { UrielFileBufSize=0; break; };
Sleep(0);
while (FifoU8Rem(c->RX_fifo,&b)) {
if (b != 0x00) {
@ -65,6 +66,7 @@ U0 Send(U8 *local_file, U8 *remote_file="") {
progress1=0;
StrCpy(progress1_desc, "Sending file");
for (f_pos=0;f_pos<d_file->size;f_pos++) {
if (InU8(0x60)==0x01) { UrielFileBufSize=0; break; };
Sleep(0);
progress1=f_pos;
OutU8(URIEL_RAW_PORT, s_file[f_pos]);
@ -85,7 +87,7 @@ U0 Browser(U8 *url)
{
WinMax;
U8 *Cmd;
I64 UrielPageBufSize=0;
UrielPageBufSize=0;
I64 UrielPageBufPos=0;
CommPutS(URIEL_PORT, url);
@ -118,12 +120,12 @@ U0 Browser(U8 *url)
}
}
ProgressBarsRst;
while (UrielPageBufPos<UrielPageBufSize) {
DocPrintPartial(UrielPage, "%c", UrielPageBuf[UrielPageBufPos]);
UrielPageBufPos++;
}
ProgressBarsRst;
DocClear;
DocInsDoc(DocPut, UrielPage);
DocTop;
@ -134,4 +136,4 @@ U0 Browser(U8 *url)
}
Free(Cmd);
DocBottom;
}
}

2
uriel_proxy

@ -128,7 +128,7 @@ while 1:
blk_ctr += blk_size
time.sleep(delay_ms)
conn.sendall('\xFF' * 32)
conn.sendall('\xFF')
if url.find('://') != -1:
r_url = urlparse.urlparse(url)
rel_url = r_url[0] + '://' + r_url[1]

Loading…
Cancel
Save