Rev 4637 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4637 | Rev 4646 | ||
---|---|---|---|
Line 114... | Line 114... | ||
114 | strcpy(#newurl, BrowserHistory.CurrentUrl()); |
114 | strcpy(#newurl, BrowserHistory.CurrentUrl()); |
Line 115... | Line 115... | ||
115 | 115 | ||
116 | if (URL[0] == '/') |
116 | if (URL[0] == '/') |
117 | { |
117 | { |
118 | i = strchr(#newurl+8, '/'); |
118 | i = strchr(#newurl+8, '/'); |
119 | newurl[i+7]=0; |
119 | if (i>0) newurl[i+7]=0; |
120 | strcpy(#URL, #URL+1); |
120 | strcpy(#URL, #URL+1); |
Line 121... | Line 121... | ||
121 | } |
121 | } |
Line 140... | Line 140... | ||
140 | strcpy(#URL, #newurl); |
140 | strcpy(#URL, #newurl); |
141 | } |
141 | } |
Line 142... | Line 142... | ||
142 | 142 | ||
143 | void BufEncode(int set_new_encoding) |
143 | void BufEncode(int set_new_encoding) |
- | 144 | { |
|
144 | { |
145 | int bufpointer_realsize; |
145 | cur_encoding = set_new_encoding; |
146 | cur_encoding = set_new_encoding; |
146 | if (o_bufpointer==0) |
147 | if (o_bufpointer==0) |
- | 148 | { |
|
- | 149 | bufpointer_realsize = strlen(bufpointer); |
|
- | 150 | if (bufpointer_realsize > bufsize) |
|
- | 151 | { |
|
147 | { |
152 | debug("bufsize: "); |
148 | debugi(bufsize); |
153 | debugi(bufsize); |
149 | bufsize = strlen(bufpointer); |
154 | debug("bufpointer_realsize: "); |
- | 155 | debugi(bufpointer_realsize); |
|
- | 156 | bufsize = bufpointer_realsize; |
|
150 | debugi(bufsize); |
157 | } |
151 | o_bufpointer = malloc(bufsize); |
158 | o_bufpointer = malloc(bufsize); |
152 | strcpy(o_bufpointer, bufpointer); |
159 | strcpy(o_bufpointer, bufpointer); |
153 | } |
160 | } |
154 | else |
161 | else |
Line 410... | Line 417... | ||
410 | { |
417 | { |
411 | bg_color=GetColor(#options); |
418 | bg_color=GetColor(#options); |
412 | DrawBuf.Fill(bg_color); |
419 | DrawBuf.Fill(bg_color); |
413 | } |
420 | } |
414 | } while(GetNextParam()); |
421 | } while(GetNextParam()); |
- | 422 | if (opened) |
|
- | 423 | { |
|
- | 424 | if (cur_encoding==_DEFAULT) BufEncode(_UTF); //if no encoding specified it would be UTF |
|
- | 425 | } |
|
415 | return; |
426 | return; |
416 | } |
427 | } |
Line 417... | Line 428... | ||
417 | 428 | ||
418 | if (isTag("a")) |
429 | if (isTag("a")) |
Line 628... | Line 639... | ||
628 | strlwr(#options); |
639 | strlwr(#options); |
629 | if (!strcmp(#options, "utf-8")) || (!strcmp(#options,"utf8")) meta_encoding = _UTF; |
640 | if (!strcmp(#options, "utf-8")) || (!strcmp(#options,"utf8")) meta_encoding = _UTF; |
630 | if (!strcmp(#options, "koi8-r")) || (!strcmp(#options, "koi8-u")) meta_encoding = _KOI; |
641 | if (!strcmp(#options, "koi8-r")) || (!strcmp(#options, "koi8-u")) meta_encoding = _KOI; |
631 | if (!strcmp(#options, "windows-1251")) || (!strcmp(#options, "windows1251")) meta_encoding = _WIN; |
642 | if (!strcmp(#options, "windows-1251")) || (!strcmp(#options, "windows1251")) meta_encoding = _WIN; |
632 | //if (!strcmp(#options, "dos")) || (!strcmp(#options, "cp-866")) meta_encoding = _DOS; |
643 | //if (!strcmp(#options, "dos")) || (!strcmp(#options, "cp-866")) meta_encoding = _DOS; |
633 | if ((cur_encoding==_DEFAULT) && (http_transfer==0)) BufEncode(meta_encoding); |
644 | if (cur_encoding==_DEFAULT) BufEncode(meta_encoding); |
634 | return; |
645 | return; |
635 | } |
646 | } |
636 | } while(GetNextParam()); |
647 | } while(GetNextParam()); |
637 | return; |
648 | return; |
638 | } |
649 | } |