Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 9438 → Rev 9439

/programs/cmm/lib/gui/reshare.h
0,0 → 1,45
 
:bool draw_icon_32(dword _x,_y, _bg, _icon_n) {
static dword bg;
static dword shared;
static dword icon32mem;
dword size;
if (!shared) || (bg!=_bg) {
if (shared = memopen("ICONS32", NULL, SHM_READ))
{
size = EDX;
if (!icon32mem) icon32mem = malloc(size);
memmov(icon32mem, shared, size);
EDX = icon32mem + size;
EAX = bg = _bg;
for (ESI = icon32mem; ESI < EDX; ESI += 4) {
if (DSDWORD[ESI]==0x00000000) DSDWORD[ESI] = EAX;
}
}
}
if (icon32mem) {
PutPaletteImage(32*32*4*_icon_n + icon32mem, 32, 32,_x, _y, 32, 0);
return true;
}
return false;
}
 
:bool draw_icon_16(dword _x,_y, _icon_n) {
static dword shared_i16;
if (!shared_i16) shared_i16 = memopen("ICONS18", NULL, SHM_READ);
if (shared_i16) {
PutPaletteImage(18*18*4*_icon_n + shared_i16, 18, 18,_x, _y, 32, 0);
return true;
}
return false;
}
 
:bool draw_icon_16w(dword _x,_y, _icon_n) {
static dword shared_i16w;
if (!shared_i16w) shared_i16w = memopen("ICONS18W", NULL, SHM_READ);
if (shared_i16w) {
PutPaletteImage(18*18*4*_icon_n + shared_i16w, 18, 18,_x, _y, 32, 0);
return true;
}
return false;
}
/programs/cmm/lib/gui.h
27,6 → 27,7
 
#include "../lib/gui/child_window.h"
#include "../lib/gui/text_view_area.h"
#include "../lib/gui/reshare.h"
 
#ifndef INCLUDE_MENU_H
#include "../lib/gui/menu.h"
357,7 → 358,4
}
 
 
 
 
 
#endif
/programs/cmm/lib/obj/http.h
224,6 → 224,8
case '?':
strchr(#newurl+8, '?'); //returns EAX
if (EAX) ESBYTE[EAX] = '\0';
strchr(#newurl+8, '/'); //returns EAX
if (!EAX) chrcat(#newurl, '/');
break;
case '/':
new_URL++;
/programs/cmm/lib/strings.h
905,12 → 905,18
:void miniprintf(dword dst, format, insert_line)
{
dword in_pos = strchr(format, '%');
if (ESBYTE[in_pos+1] == 's') {
strlcpy(dst, format, in_pos - format);
EBX = ESBYTE[EAX+1];
if (EBX == 's') {
strncpy(dst, format, in_pos - format);
strcat(dst, insert_line);
strcat(dst, in_pos+2);
}
if (EBX == 'd') || (EBX == 'i') {
strncpy(dst, format, in_pos - format);
strcat(dst, itoa(insert_line));
strcat(dst, in_pos+2);
}
}
 
inline cdecl int sprintf(dword buf, format,...)
{