forget fs.obj

git-svn-id: svn://kolibrios.org@6784 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2016-12-04 19:30:30 +00:00
parent 0580672a6c
commit 9883b8911d
4 changed files with 13 additions and 157 deletions

View File

@ -58,7 +58,6 @@ img_files = {
{"File Managers/ICONS.INI", "common/File Managers/icons.ini"},
{"File Managers/KFM.INI", "common/File Managers/kfm.ini"},
{"LIB/PIXLIB.OBJ", "common/lib/pixlib.obj"},
{"LIB/FS.OBJ", "common/lib/fs.obj"},
{"LIB/ARRAY.OBJ", "common/lib/array.obj"},
{"LIB/LIBRARY.OBJ", "common/lib/library.obj"},
{"LIB/ICONV.OBJ", "common/lib/iconv.obj"},

Binary file not shown.

View File

@ -5,8 +5,8 @@
#include "../lib/math.h"
#endif
#ifndef INCLUDE_FS_H
#include "../lib/obj/fs.h"
#ifndef INCLUDE_IO_H
#include "../lib/io.h"
#endif
#include "../lib/patterns/rgb.h"
@ -180,27 +180,25 @@ byte Cp866ToAnsi(byte s) {
ELSE IF(s>=224)&&(s<=239)s+=16;
ELSE IF(s==241)s=184; //e rus with dots (yo)
ELSE IF(s==240)s=168; //E rus with dots (yo)
ELSE IF(s==242)s='E'; //E urk (ye)
ELSE IF(s==243)s=186; //e urk (ye)
ELSE IF(s==244)s='I'; //I urk (yi)
ELSE IF(s==245)s=191; //i urk (yi)
ELSE IF(s==242)s='E'; //E ukr (ye)
ELSE IF(s==243)s=186; //e ukr (ye)
ELSE IF(s==244)s='I'; //I ukr (yi)
ELSE IF(s==245)s=191; //i ukr (yi)
return s;
}
:byte LABEL::init(dword font_path)
{
lib_init_fs();
IO label_io;
IF(font)free(font);
IF(!fs.read(font_path)) {
debug("Error while loading font: ");
debugln(font_path);
//io.run("/sys/@notify","'Error: Font is not loaded.' -E");
label_io.read(font_path);
IF(!EAX) {
notify("'Error: KFONT is not loaded.' -E");
return false;
}
font_begin = font = EAX;
EBX = font_begin + ECX;
height = DSBYTE[EBX-1];
width = DSBYTE[EBX-2];
font_begin = font = label_io.buffer_data;
height = DSBYTE[calc(font_begin+label_io.FILES_SIZE)-1];
width = DSBYTE[calc(font_begin+label_io.FILES_SIZE)-2];
block = math.ceil(height*width/32);
smooth = true;
return true;

View File

@ -1,141 +0,0 @@
#ifndef INCLUDE_LIBFS_H
#define INCLUDE_LIBFS_H
#print "[include <obj/fs.h>]\n"
#ifndef INCLUDE_KOLIBRI_H
#include "../lib/kolibri.h"
#endif
#ifndef INCLUDE_DLL_H
#include "../lib/dll.h"
#endif
:struct FILE_SYSTEM_FUNCTION
{
dword remove_pointer;
byte remove(dword path);
dword open_pointer;
dword open(dword path);
dword read_pointer;
dword read(dword path);
dword run_pointer;
dword run(dword path,arg);
dword move_pointer;
byte move(dword path1,path2);
dword copy_pointer;
byte copy(dword path1,path2);
dword write_pointer;
byte write(dword path1,path2,path3);
dword get_size_pointer;
qword get_size(dword path);
dword callback_copy_pointer;
byte callback_copy(dword path1,path2,ptr);
} fs;
:byte FILE_SYSTEM_FUNCTION::remove(dword path)
{
dword tmp = path;
lib_init_fs();
remove_pointer stdcall(tmp);
return EAX;
}
:dword FILE_SYSTEM_FUNCTION::read(dword path)
{
dword tmp = path;
lib_init_fs();
read_pointer stdcall(tmp);
return EAX;
}
:byte FILE_SYSTEM_FUNCTION::write(dword path1,path2,path3)
{
dword tmp1 = path1;
dword tmp2 = path2;
dword tmp3 = path3;
lib_init_fs();
write_pointer stdcall(tmp1,tmp2,tmp3);
return EAX;
}
:dword FILE_SYSTEM_FUNCTION::run(dword path,arg)
{
dword tmp1 = path1;
dword tmp2 = arg;
lib_init_fs();
run_pointer stdcall(tmp1,tmp2);
return EAX;
}
:qword FILE_SYSTEM_FUNCTION::get_size(dword path)
{
dword tmp = path;
lib_init_fs();
//get_size_pointer stdcall(tmp);
$push tmp
$call get_size_pointer
$add esi,4
}
:dword FILE_SYSTEM_FUNCTION::open(dword path)
{
dword tmp = path;
lib_init_fs();
open_pointer stdcall(tmp);
return EAX;
}
:byte FILE_SYSTEM_FUNCTION::move(dword path1,path2)
{
dword tmp1 = path1;
dword tmp2 = path2;
lib_init_fs();
move_pointer stdcall(tmp1,tmp2);
return EAX;
}
:byte FILE_SYSTEM_FUNCTION::copy(dword path1,path2)
{
dword tmp1 = path1;
dword tmp2 = path2;
lib_init_fs();
copy_pointer stdcall(tmp1,tmp2);
return EAX;
}
:byte FILE_SYSTEM_FUNCTION::callback_copy(dword path1,path2,ptr)
{
dword tmp1 = path1;
dword tmp2 = path2;
lib_init_fs();
callback_copy_pointer stdcall(tmp1,tmp2,ptr);
return EAX;
}
:byte __CHECK_FS__ = 0;
:void lib_init_fs()
{
IF(__CHECK_FS__)return;
library.load("/sys/LIB/FS.OBJ");
fs.remove_pointer = library.get("fs.remove");
fs.get_size_pointer = library.get("fs.get_size");
fs.move_pointer = library.get("fs.move");
fs.open_pointer = library.get("fs.open");
fs.copy_pointer = library.get("fs.copy");
fs.read_pointer = library.get("fs.read");
fs.run_pointer = library.get("fs.execute");
fs.write_pointer = library.get("fs.write");
fs.callback_copy_pointer = library.get("fs.callback_copy");
__CHECK_FS__ = true;
}
#endif