diff --git a/programs/cmm/TWB/TWB.c b/programs/cmm/TWB/TWB.c index e1ab88544..1ef586938 100644 --- a/programs/cmm/TWB/TWB.c +++ b/programs/cmm/TWB/TWB.c @@ -100,15 +100,6 @@ void BufEncode(int set_new_encoding) cur_encoding = set_new_encoding; if (o_bufpointer==0) { - bufpointer_realsize = strlen(bufpointer); - if (bufpointer_realsize > bufsize) - { - debug("bufsize: "); - debugi(bufsize); - debug("bufpointer_realsize: "); - debugi(bufpointer_realsize); - bufsize = bufpointer_realsize; - } o_bufpointer = malloc(bufsize); strcpy(o_bufpointer, bufpointer); } diff --git a/programs/cmm/TWB/parce_tag.h b/programs/cmm/TWB/parce_tag.h index 8843c896e..6909b06ab 100644 --- a/programs/cmm/TWB/parce_tag.h +++ b/programs/cmm/TWB/parce_tag.h @@ -1,6 +1,6 @@ unsigned int GetNextParam() { - byte kavichki = false; + byte kavichki=0; int i = strlen(#tagparam) - 1; if (!tagparam) return 0; diff --git a/programs/cmm/browser/WebView.c b/programs/cmm/browser/WebView.c index cd16b5ea4..900b72059 100644 --- a/programs/cmm/browser/WebView.c +++ b/programs/cmm/browser/WebView.c @@ -382,9 +382,7 @@ void Scan(int id) } return; case 054: //F5 - IF(address_box.flags & 0b10) WB1.Parse(); - return; - + IF(address_box.flags & 0b10) return; case REFRESH: if (http_transfer > 0) { diff --git a/programs/cmm/lib/strings.h b/programs/cmm/lib/strings.h index 6055c867b..4b14c13b9 100644 --- a/programs/cmm/lib/strings.h +++ b/programs/cmm/lib/strings.h @@ -272,7 +272,7 @@ unsigned int strcpyb(dword search_in, copyin, startstr, endstr) } -/*void strcat(char *to, char *from) //òîæå ðàáîòàåò +/*void strcat(char *to, char *from) //òîæå ðàáîòàåò { while(*to) to++; while(*from) @@ -313,8 +313,8 @@ inline fastcall strupr( ESI) do{ AL=DSBYTE[ESI]; IF(AL>='a')IF(AL<='z')DSBYTE[ESI]=AL&0x5f; - IF (AL>=160) && (AL<=175) DSBYTE[ESI] = AL - 32; //à-ï - IF (AL>=224) && (AL<=239) DSBYTE[ESI] = AL - 80; //à-ï + IF (AL>=160) && (AL<=175) DSBYTE[ESI] = AL - 32; //à-ï + IF (AL>=224) && (AL<=239) DSBYTE[ESI] = AL - 80; //à-ï ESI++; }while(AL!=0); } @@ -335,17 +335,45 @@ inline fastcall strttl( EDX) { AL=DSBYTE[EDX]; IF(AL>='a')&&(AL<='z')DSBYTE[EDX]=AL&0x5f; - IF (AL>=160) && (AL<=175) DSBYTE[EDX] = AL - 32; //à-ï - IF (AL>=224) && (AL<=239) DSBYTE[EDX] = AL - 80; //à-ï + IF (AL>=160) && (AL<=175) DSBYTE[EDX] = AL - 32; //à-ï + IF (AL>=224) && (AL<=239) DSBYTE[EDX] = AL - 80; //à-ï do{ EDX++; AL=DSBYTE[EDX]; IF(AL>='A')&&(AL<='Z'){DSBYTE[EDX]=AL|0x20; CONTINUE;} - IF(AL>='€')&&(AL<='')DSBYTE[EDX]=AL|0x20; // -¯ - IF (AL>=144) && (AL<=159) DSBYTE[EDX] = AL + 80; //à-ï + IF(AL>='€')&&(AL<='Â')DSBYTE[EDX]=AL|0x20; // -¯ + IF (AL>=144) && (AL<=159) DSBYTE[EDX] = AL + 80; //à-ï }while(AL!=0); } +void trim(char *s) +{ + // удалÑем пробелы и табы Ñ Ð½Ð°Ñ‡Ð°Ð»Ð° Ñтроки: + int i=0,j; + while((s[i]==' ')||(s[i]=='\t')||(s[i]=='\r')||(s[i]=='\n')) + { + i++; + } + if(i>0) + { + for(j=0;j