forked from KolibriOS/kolibrios
decrease c-- app size
git-svn-id: svn://kolibrios.org@8383 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
afa42a24be
commit
9d28bd0e9d
@ -2,10 +2,9 @@
|
||||
//by den po - jdp@bk.ru
|
||||
|
||||
#define MEMSIZE 4096 * 60
|
||||
#include "../lib/io.h"
|
||||
#include "../lib/fs.h"
|
||||
#include "../lib/strings.h"
|
||||
#include "../lib/obj/console.h"
|
||||
IO io1, io2;
|
||||
|
||||
#define MAX_PATH 260
|
||||
|
||||
@ -92,11 +91,8 @@ console() {
|
||||
char s1;
|
||||
int s2;
|
||||
|
||||
srcfile = io1.read(srcfilename);
|
||||
dstfile = io2.read(dstfilename);
|
||||
|
||||
srcfilesize = io1.FILES_SIZE;
|
||||
dstfilesize = io2.FILES_SIZE;
|
||||
read_file(srcfilename, #srcfile, #srcfilesize);
|
||||
read_file(dstfilename, #dstfile, #dstfilesize);
|
||||
|
||||
if (!srcfile) die("'First file not found' -E");
|
||||
if (!dstfile) die("'Second file not found' -E");
|
||||
|
@ -198,6 +198,16 @@ inline fastcall void GetCurDir( ECX, EDX)
|
||||
$int 0x40
|
||||
}
|
||||
|
||||
void read_file(dword path1, buf, size)
|
||||
{
|
||||
EAX = 68;
|
||||
EBX = 27;
|
||||
ECX = path1;
|
||||
$int 0x40;
|
||||
ESDWORD[size] = EDX;
|
||||
ESDWORD[buf] = EAX;
|
||||
}
|
||||
|
||||
//===================================================//
|
||||
// //
|
||||
// Misc //
|
||||
|
@ -21,7 +21,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef INCLUDE_IO_H
|
||||
#include "../lib/io.h"
|
||||
#include "../lib/fs.h"
|
||||
#endif
|
||||
|
||||
#include "../lib/patterns/rgb.h"
|
||||
@ -69,14 +69,13 @@ int kfont_char_width[255];
|
||||
|
||||
:bool KFONT::init(dword font_path)
|
||||
{
|
||||
IO label_io;
|
||||
dword fsize_notused;
|
||||
if(font)free(font);
|
||||
label_io.read(font_path);
|
||||
read_file(font_path, #font_begin, #fsize_notused);
|
||||
if(!EAX) {
|
||||
label_io.run("/sys/@notify", "'Error: KFONT is not loaded.' -E");
|
||||
RunProgram("/sys/@notify", "'Error: KFONT is not loaded.' -E");
|
||||
return false;
|
||||
}
|
||||
font_begin = label_io.buffer_data;
|
||||
changeSIZE();
|
||||
smooth = true;
|
||||
return true;
|
||||
|
@ -1,7 +1,6 @@
|
||||
#define MEMSIZE 4096*40
|
||||
|
||||
#include "../lib/gui.h"
|
||||
#include "../lib/io.h"
|
||||
#include "../lib/collection.h"
|
||||
#include "../lib/list_box.h"
|
||||
#include "../lib/fs.h"
|
||||
|
@ -5,7 +5,6 @@ SOFTWARE CENTER v2.86
|
||||
#define MEMSIZE 4096 * 15
|
||||
#include "..\lib\strings.h"
|
||||
#include "..\lib\mem.h"
|
||||
#include "..\lib\io.h"
|
||||
#include "..\lib\gui.h"
|
||||
|
||||
#include "..\lib\obj\libio.h"
|
||||
@ -266,7 +265,7 @@ void EventIconClick(dword appid)
|
||||
// }end
|
||||
|
||||
if (file_exists(#run_app_path)) {
|
||||
io.run(#run_app_path, param_pos); //0 or offset
|
||||
RunProgram(#run_app_path, param_pos); //0 or offset
|
||||
if (param_pos) ESBYTE[param_pos - 1] = '|';
|
||||
} else {
|
||||
notify("'Application not found' -E");
|
||||
|
@ -16,7 +16,6 @@
|
||||
// //
|
||||
//===================================================//
|
||||
|
||||
#include "../lib/io.h"
|
||||
#include "../lib/gui.h"
|
||||
#include "../lib/fs.h"
|
||||
#include "../lib/list_box.h"
|
||||
@ -134,7 +133,7 @@ void main()
|
||||
EventKillCurrentProcess();
|
||||
}
|
||||
if (BTN_ID_PROC_INFO == btn) {
|
||||
io.run("/sys/tinfo", itoa(GetProcessSlot(current_process_id)));
|
||||
RunProgram("/sys/tinfo", itoa(GetProcessSlot(current_process_id)));
|
||||
}
|
||||
break;
|
||||
case evReDraw:
|
||||
|
Loading…
Reference in New Issue
Block a user