Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 4543 → Rev 4544

/programs/cmm/TWB/TWB.c
632,7 → 632,7
DrawBuf.Fill(bg_color);
}
stroka++;
if (blq_text) stolbec = 8; else stolbec = 0;
if (blq_text) stolbec = 6; else stolbec = 0;
if (li_text) stolbec = li_tab * 5;
}
 
/programs/cmm/TWB/history.h
1,59 → 1,59
struct path_string {
char Item[4096];
};
 
#define MAX_HISTORY_NUM 40
path_string history_list[MAX_HISTORY_NUM];
 
struct UrlsHistory {
int links_count;
int current;
dword CurrentUrl();
dword GetUrl();
void AddUrl();
byte GoBack();
byte GoForward();
};
 
UrlsHistory BrowserHistory;
dword UrlsHistory::CurrentUrl() {
return #history_list[current].Item;
}
 
struct path_string {
char Item[4096];
};
 
#define MAX_HISTORY_NUM 40
path_string history_list[MAX_HISTORY_NUM];
int history_num;
int history_current;
 
dword UrlsHistory::CurrentUrl()
{
return #history_list[history_current].Item;
dword UrlsHistory::GetUrl(int id) {
return #history_list[id].Item;
}
 
void UrlsHistory::AddUrl() //òóò íóæåí ââîäèìûé ýëåìåíò - äëÿ óíèâåðñàëüíîñòè
{
void UrlsHistory::AddUrl() {
int i;
if (history_num>0) && (!strcmp(#URL,#history_list[history_current].Item)) return;
if (links_count>0) && (!strcmp(#URL,#history_list[current].Item)) return;
 
if (history_current>=MAX_HISTORY_NUM-1)
if (current>=MAX_HISTORY_NUM-1)
{
history_current/=2;
for (i=0; i<history_current; i++;)
current/=2;
for (i=0; i<current; i++;)
{
strlcpy(#history_list[i].Item, #history_list[MAX_HISTORY_NUM-i].Item, sizeof(history_list[0].Item));
}
}
history_current++;
strlcpy(#history_list[history_current].Item, #URL, sizeof(history_list[0].Item));
history_num=history_current;
current++;
strlcpy(#history_list[current].Item, #URL, sizeof(history_list[0].Item));
links_count=current;
}
 
 
byte UrlsHistory::GoBack()
{
if (history_current<=1) return 0;
history_current--;
strlcpy(#URL, #history_list[history_current].Item, sizeof(URL));
byte UrlsHistory::GoBack() {
if (current<=1) return 0;
current--;
strlcpy(#URL, #history_list[current].Item, sizeof(URL));
return 1;
}
 
 
byte UrlsHistory::GoForward()
{
if (history_current==history_num) return 0;
history_current++;
strlcpy(#URL, #history_list[history_current].Item, sizeof(URL));
byte UrlsHistory::GoForward() {
if (current==links_count) return 0;
current++;
strlcpy(#URL, #history_list[current].Item, sizeof(URL));
return 1;
}
}
 
UrlsHistory BrowserHistory;
/programs/cmm/TWB/img_cache.h
9,7 → 9,7
struct ImageCache {
int pics_count;
void Free();
int GetImage();
int GetImageNumber();
void Images();
};
 
22,7 → 22,7
}
}
 
int ImageCache::GetImage(dword i_path)
int ImageCache::GetImageNumber(dword i_path)
{
int i;
for (i=0; i<pics_count; i++) if (!strcmp(#pics[i].path, i_path)) return i; //image exists
55,7 → 55,7
img_path[strrchr(#img_path, '/')] = '\0';
strcat(#img_path, #options);
}
cur_pic = GetImage(#img_path);
cur_pic = GetImageNumber(#img_path);
}
}
if (!strcmp(#parametr,"alt="))