Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6757 → Rev 6758

/kernel/trunk/core/taskman.inc
828,10 → 828,16
[ebp+APP_HDR.img_base], [ebp+APP_HDR.img_size]
mov esi, [ebp+APP_HDR.path_string]
mov edi, [ebp+APP_HDR.path]
mov ecx, [ebp+APP_HDR.filename_size]
cmp ecx, 1023
jc @f
mov ecx, 1022
@@:
push esi
test edi, edi
jz @f
mov ecx, [ebp+APP_HDR.filename_size]
mov al, '/'
stosb
rep movsb
mov byte [edi], 0
@@:
/kernel/trunk/docs/sysfuncr.txt
3900,12 → 3900,16
* +20 = +0x14: byte: 0
* +21 = +0x15: dword: указатель на строку
Чувствительность к регистру букв зависит от файловой системы.
Можно указать кодировку, поместив в начале строки байт со значениями:
Если путь начинается не с '/', то он считается относительным.
Получить или установить текущую папку можно с помощью сисфункции 30.
'../' в начале пути означает подъём на одну папку относительно текущей.
Можно указать кодировку строки, поместив в её начале байт со значениями:
* 1 = cp866
* 2 = UTF-16LE
* 3 = UTF-8
иначе будет использоваться кодировка cp866.
Формат строки:
иначе будет использоваться кодировка cp866. В абсолютном пути можно
поместить этот байт после '/' или добавить дополнительный '/' перед ним.
Формат абсолютного пути:
/base/number/dir1/dir2/.../dirn/file,
где base/number идентифицирует устройство, на котором ищется файл:
* RD/1 = рамдиск
3924,9 → 3928,6
* '/HD0/1/folder/file.txt',0
* '/hd2/2/pics/tanzania.bmp',0
* 2,'/',0,'sys','/',0,'F',0,'I',0,'L',0,'E',0,0,0
Также функция поддерживает относительные имена. Если путь начинается
не с '/', то он считается относительно текущей папки. Получить или
установить текущую папку можно с помощью сисфункции 30.
 
Доступные подфункции:
* подфункция 0 - чтение файла
4134,7 → 4135,6
* +0: dword: 4 = номер подфункции
* +4: dword: младший dword нового размера файла
* +8: dword: старший dword нового размера файла
(должен быть 0 для FAT)
* +12 = +0xC: dword: 0 (зарезервировано)
* +16 = +0x10: dword: 0 (зарезервировано)
* +20 = +0x14: путь, правила формирования имён указаны в общем описании
4142,10 → 4142,9
* eax = 0 - успешно, иначе код ошибки файловой системы
* ebx разрушается
Замечания:
* Если новый размер файла меньше старого, файл усекается. Если
новый размер больше старого, файл расширяется нулевыми символами.
Если новый размер равен старому, единственным результатом вызова
является установка даты/времени модификации и доступа в текущие.
* Если новый размер файла меньше старого, файл усекается.
Если новый размер больше старого, файл расширяется, и если
разница в размере не больше 16 МБ, новое место очищается нулями.
* Если свободного места на диске недостаточно для расширения файла,
то функция расширит насколько возможно, после чего вернёт
код ошибки 8.
/kernel/trunk/docs/sysfuncs.txt
3670,6 → 3670,7
* ebx = 2 - subfunction number
* ecx = thread identifier
* edx = size of context structure, must be 0x28=40 bytes
* esi -> context structure
Returned value:
* function does not return value
Format of context structure is shown in the description of
3855,12 → 3856,16
* +20 = +0x14: byte: 0
* +21 = +0x15: dword: pointer to string
Case sensitivity depends on filesystem.
If a path not begins with '/', it is considered a relative.
To get or set the current folder, use the function 30.
'../' in the beginning means a lift by one folder relatively current folder.
To set the encoding, put at the start of the string a byte with next values:
* 1 = cp866
* 2 = UTF-16LE
* 3 = UTF-8
otherwise will be used cp866.
Format of filename:
otherwise will be used cp866. In an absolute path
you may put this byte after the '/' or put an additional '/' before it.
Format of an absolute path:
/base/number/dir1/dir2/.../dirn/file,
where base/number identifies device, on which file is located:
* RD/1 = ramdisk
3879,9 → 3884,6
* '/HD0/1/folder/file.txt',0
* '/hd2/2/pics/tanzania.bmp',0
* 2,'/',0,'sys','/',0,'F',0,'I',0,'L',0,'E',0,0,0
Also function supports relative names. If the path begins not
with '/', it is considered relative to a current folder. To get or
set a current folder, use the function 30.
 
Available subfunctions:
* subfunction 0 - read file
4094,11 → 4096,9
* eax = 0 - success, otherwise file system error code
* ebx destroyed
Remarks:
* If the new file size is less than old one, file is truncated.
If the new size is greater than old one, file is expanded with
characters with code 0. If the new size is equal to old one,
the only result of call is set date/time of modification and
access to the current date/time.
* If new file size is less than old one, file will be truncated.
If new size is greater than old one, file will be expanded, and if
size difference is up to 16 MB, new space will be cleared with 0.
* If there is not enough free space on disk for expansion, the
function will expand to maximum possible size and then return
error code 8.
/kernel/trunk/fs/fs_lfn.inc
510,10 → 510,18
cmp byte [esi], '/'
jnz .set_relative
inc esi
cmp byte [esi], 4
jnc @f
mov ebx, esi
inc esi
cmp byte [esi], '/'
jnz .start
inc esi
@@:
cmp byte [ebx], 2
jnz @f
jnz .start
inc esi
@@:
.start:
call process_replace_file_name
mov edi, [esp+12]
mov ecx, [esp+16]