Subversion Repositories Kolibri OS

Compare Revisions

No changes between revisions

Regard whitespace Rev 6020 → Rev 6021

/programs/cmm/TWB/TWB.c
90,7 → 90,7
{
start_x = stolbec * list.font_w + body_magrin * DrawBuf.zoom + list.x;
start_y = stroka * list.item_h + body_magrin;
stolbec_len = utf8_strlen(#line) * DrawBuf.zoom;
stolbec_len = strlen(#line) * DrawBuf.zoom;
line_length = stolbec_len * list.font_w;
 
if (style.h) stroka++;
212,7 → 212,7
default:
DEFAULT_MARK:
if (bukva<=15) bukva=' ';
line_len = utf8_strlen(#line);
line_len = strlen(#line);
if (!style.pre) && (bukva == ' ')
{
if (line[line_len-1]==' ') break; //no double spaces
238,9 → 238,9
{
int perenos_num;
char new_line_text[4096];
if (utf8_strlen(#line)*DrawBuf.zoom + stolbec < list.column_max) return;
if (strlen(#line)*DrawBuf.zoom + stolbec < list.column_max) return;
perenos_num = strrchr(#line, ' ');
if (!perenos_num) && (utf8_strlen(#line)*DrawBuf.zoom>list.column_max) perenos_num=list.column_max/DrawBuf.zoom;
if (!perenos_num) && (strlen(#line)*DrawBuf.zoom>list.column_max) perenos_num=list.column_max/DrawBuf.zoom;
strcpy(#new_line_text, #line + perenos_num);
line[perenos_num] = 0x00;
DrawStyle();
/programs/cmm/TWB/absolute_url.h
34,11 → 34,11
IF (!strcmpn(in_URL,"./", 2)) in_URL+=2;
if (!http_transfer)
{
strcpy(#newurl, History.current());
strcpy(#newurl, history.current());
}
else
{
strcpy(#newurl, History.items.get(History.active-2));
strcpy(#newurl, history.items.get(history.active-2));
}
 
if (ESBYTE[in_URL] == '/') //remove everything after site domain name
/programs/cmm/browser/WebView.c
218,7 → 218,7
http_free stdcall (http_transfer);
http_transfer=0;
GetAbsoluteURL(#URL);
History.back();
history.back();
strcpy(#editURL, #URL);
DrawEditBox();
OpenPage();
225,7 → 225,7
}
else
{
History.add(#URL);
history.add(#URL);
ESI = http_transfer;
bufpointer = ESI.http_msg.content_ptr;
bufsize = ESI.http_msg.content_received;
295,14 → 295,14
{
case SCAN_CODE_BS:
case BACK_BUTTON:
if (History.back()) {
strcpy(#URL, History.current());
if (history.back()) {
strcpy(#URL, history.current());
OpenPage();
}
return;
case FORWARD_BUTTON:
if (History.forward()) {
strcpy(#URL, History.current());
if (history.forward()) {
strcpy(#URL, history.current());
OpenPage();
}
return;
400,7 → 400,7
StopLoading();
souce_mode = false;
strcpy(#editURL, #URL);
History.add(#URL);
history.add(#URL);
if (!strncmp(#URL,"WebView:",8))
{
SetPageDefaults();
498,7 → 498,7
if (http_transfer > 0)
{
StopLoading();
History.back();
history.back();
}
 
strcpy(#URL, PageLinks.GetURL(PageLinks.active));
506,7 → 506,7
if (URL[0] == '#')
{
strcpy(#anchor, #URL+strrchr(#URL, '#'));
strcpy(#URL, History.current());
strcpy(#URL, history.current());
WB1.list.first=WB1.list.count-WB1.list.visible;
ShowPage();
return;
530,15 → 530,15
CreateThread(#Downloader,#downloader_stak+4092);
}
else RunProgram("@open", #URL);
strcpy(#editURL, History.current());
strcpy(#URL, History.current());
strcpy(#editURL, history.current());
strcpy(#URL, history.current());
return;
}
if (!strncmp(#URL,"mailto:", 7))
{
notify(#URL);
strcpy(#editURL, History.current());
strcpy(#URL, History.current());
strcpy(#editURL, history.current());
strcpy(#URL, history.current());
return;
}
OpenPage();
/programs/cmm/browser/history.h
5,15 → 5,15
int t;
free(history_pointer);
history_pointer = malloc(History.items.data_size+256);
history_pointer = malloc(history.items.data_size+256);
strcat(history_pointer, "<html><head><title>History</title></head><body><h1>History</h1>");
strcat(history_pointer, "<h2>Visited pages</h2><blockquote><br>");
for (i=1; i<History.items.count; i++)
for (i=1; i<history.items.count; i++)
{
strcat(history_pointer, " <a href='");
strcat(history_pointer, History.items.get(i));
strcat(history_pointer, history.items.get(i));
strcat(history_pointer, "'>");
strcat(history_pointer, History.items.get(i));
strcat(history_pointer, history.items.get(i));
strcat(history_pointer, "</a><br>");
}
strcat(history_pointer, "</blockquote><h2>Cached images</h2>");
/programs/cmm/eolite/Eolite.c
170,9 → 170,9
{
if (dif_x > 150)
{
if (History.forward())
if (history.forward())
{
strcpy(#path, History.current());
strcpy(#path, history.current());
files.KeyHome();
Open_Dir(#path,WITH_REDRAW);
}
324,9 → 324,9
GoBack();
break;
case 22: //Forward
if (History.forward())
if (history.forward())
{
strcpy(#path, History.current());
strcpy(#path, history.current());
files.KeyHome();
Open_Dir(#path,WITH_REDRAW);
}
743,7 → 743,7
if (ESBYTE[dir_path+1]!='\0') chrcat(dir_path, '/');
if (errornum)
{
History.add(#path);
history.add(#path);
GoBack();
Write_Error(errornum);
return;
761,7 → 761,7
PathShow_prepare stdcall(#PathShow);
PathShow_draw stdcall(#PathShow);
}
History.add(#path);
history.add(#path);
files.visible = files.h / files.item_h;
if (files.count < files.visible) files.visible = files.count;
if (redraw!=ONLY_SHOW) Sorting();
999,8 → 999,8
char cur_folder[4096];
strcpy(#cur_folder, #path);
cur_folder[strlen(#cur_folder)-1]=0x00; //delete last '/'
if (History.back()) {
strcpy(#path, History.current());
if (history.back()) {
strcpy(#path, history.current());
SelectFileByName(#cur_folder+strrchr(#cur_folder,'/'));
}
}
/programs/cmm/lib/font.h
9,6 → 9,9
#include "../lib/obj/fs.h"
#endif
 
#include "../lib/patterns/rgb.h"
 
 
#define DEFAULT_FONT "/sys/fonts/Tahoma.kf"
 
:struct __SIZE
211,20 → 214,40
:void LABEL::apply_smooth()
{
dword i,line_w,to;
rgb.DwordToRgb(ShadowPixel(background,2)); //get shadowed pixel
line_w = size.width * 3;
to = size.height - 1 * line_w + raw - 3;
for(i=raw; i < to; i+=3)
{
if(i-raw%line_w +3 == line_w) continue;
// pixels position, where b - black, w - write
// bw
// wb
if(b24(i)==0x000000) && (b24(i+3)!=0x000000) && (b24(i+line_w)!=0x000000) && (b24(i+3+line_w)==0x000000)
{
ShadowImage(i+3, 1, 1, 2);
ShadowImage(i+line_w, 1, 1, 2);
ESBYTE[i+3] = rgb.b;
ESBYTE[i+4] = rgb.g;
ESBYTE[i+5] = rgb.r;
ESBYTE[i+line_w ] = rgb.b;
ESBYTE[i+line_w+1] = rgb.g;
ESBYTE[i+line_w+2] = rgb.r;
// // I don't know why but underneath code works slower then beneath
// DSDWORD[i] = DSDWORD[i] & 0xFF000000 | dark_background;
// DSDWORD[i+line_w] = DSDWORD[i+3+line_w] & 0xFF000000 | dark_background;
}
// wb
// bw
else if(b24(i)!=0x000000) && (b24(i+3)==0x000000) && (b24(i+line_w)==0x000000) && (b24(i+3+line_w)!=0x000000)
{
ShadowImage(i, 1, 1, 2);
ShadowImage(i+3+line_w, 1, 1, 2);
ESBYTE[i ] = rgb.b;
ESBYTE[i+1] = rgb.g;
ESBYTE[i+2] = rgb.r;
ESBYTE[i+line_w+3] = rgb.b;
ESBYTE[i+line_w+4] = rgb.g;
ESBYTE[i+line_w+5] = rgb.r;
// // I don't know why but underneath code works slower then beneath
// DSDWORD[i] = DSDWORD[i] & 0xFF000000 | dark_background;
// DSDWORD[i+3+line_w] = DSDWORD[i+3+line_w] & 0xFF000000 | dark_background;
}
}
}
281,9 → 304,11
IF(!text1)return;
IF(size.pt)IF(!changeSIZE())return;
if (size.pt != fontSizePoints) {
size.pt = fontSizePoints;
getsize(text1);
y -= size.offset_y;
}
color = _color;
background = _background;
 
/programs/cmm/lib/io.h
5,7 → 5,7
io.count(path) - êîëè÷åñòâî ôàéëîâ â äèððåêòîðèè path
io.size(path) - ðàçìåð (ôàéëà/ïàïêè) path
io.run(path,param) - çàïóñòèòü ôàéë path ñ ïàðàìåòðîì param
io.write(path,data) - çàïèñàòü ôàéë ñ äàííûìè data â äèððåêòîðèþ path
io.write(size,data,path) - çàïèñàòü ôàéë ñ äàííûìè data â äèððåêòîðèþ path
io.read(path) - ïðî÷èòàòü ôàéë path è âîçâðàòèòü óêàçàòåëü íà äàííûå
io.move(path1,path2) - ïåðåìåñòèòü (ôàéë/ïàïêó) èç path1 â path2
io.copy(path1,path2) - êîïèðîâàòü (ôàéë/ïàïêó) èç path1 â path2
/programs/cmm/lib/kolibri.h
1,4 → 1,5
//CODED by Veliant, Leency, Nable. GNU GPL licence.
//CODED by Veliant, Leency, Nable, Pavelyakov. GNU GPL licence.
 
#ifndef INCLUDE_KOLIBRI_H
#define INCLUDE_KOLIBRI_H
#print "[include <kolibri.h>]\n"
805,15 → 806,14
DOUBLE_CLICK_DELAY = GetMouseDoubleClickDelay();
__generator = GetStartTime();
$push ebx
$mov eax, 68
$mov ebx, 11
$int 0x40
mem_init();
$pop ebx
 
main();
ExitProcess();
}
______STOP______:
#endif
#endif
 
#ifndef INCLUDE_MEM_H
#include "../lib/mem.h"
#endif
/programs/cmm/lib/mem.h
21,6 → 21,7
{
$push ebx
$push ecx
 
$mov eax, 68
$mov ebx, 12
$mov ecx, size
36,6 → 37,7
$push ebx
$push ecx
$push edx
 
$mov eax, 68
$mov ebx, 20
$mov ecx, size
53,6 → 55,7
$push eax
$push ebx
$push ecx
$mov eax, 68
$mov ebx, 13
$mov ecx, mptr
/programs/cmm/lib/patterns/history.h
1,6 → 1,6
#include "..\lib\collection.h"
 
struct _History {
struct _history {
collection items;
int active;
int add();
7,9 → 7,9
int back();
int forward();
dword current();
} History;
} history;
 
int _History::add(dword in)
int _history::add(dword in)
{
if (!strcmp(in, items.get(active-1))) return 0;
items.count = active;
18,7 → 18,7
return 1;
}
int _History::back()
int _history::back()
{
if (active==1) return 0;
active--;
25,7 → 25,7
return 1;
}
 
int _History::forward()
int _history::forward()
{
if (active==items.count) return 0;
active++;
32,7 → 32,7
return 1;
}
 
dword _History::current()
dword _history::current()
{
return items.get(active-1);
}
/programs/cmm/lib/strings.h
506,7 → 506,7
searchin++;
if (DSBYTE[usestr_e]=='\0') return searchin;
}
return 0;
return -1;
}
 
 
/programs/cmm
Property changes:
Added: svn:global-ignores
+test_asm