X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fshared%2Futils.pas;h=0cedb13e86a64643fb396cfd646d5d589fb30ae9;hp=20706c661dae397f8a0b4914ab00e9caa765a252;hb=414f2873efa0cce84499f64774db7000e6268971;hpb=7f50d798c193f8a57a3c736c81615ef932915e9a diff --git a/src/shared/utils.pas b/src/shared/utils.pas index 20706c6..0cedb13 100644 --- a/src/shared/utils.pas +++ b/src/shared/utils.pas @@ -99,12 +99,13 @@ function utf8Valid (const s: AnsiString): Boolean; function utf8to1251 (s: AnsiString): AnsiString; -// `pathname` will be modified if path is valid -// `lastIsDir` should be `true` if we are searching for directory -// nobody cares about shitdoze, so i'll use the same code path for it +// findFileCI eats case-insensitive path, traverses it and rewrites it to a +// case-sensetive. result value means success. +// if file/dir not founded than pathname is in undefined state! function findFileCI (var pathname: AnsiString; lastIsDir: Boolean=false): Boolean; -// return fixed AnsiString or empty AnsiString +// findDiskWad tries to find wad file and rewrites extension if needed +// result is new filename or empty string function findDiskWad (fname: AnsiString): AnsiString; // slashes must be normalized! function isWadNamesEqu (wna, wnb: AnsiString): Boolean; @@ -1123,9 +1124,9 @@ end; // ////////////////////////////////////////////////////////////////////////// // -// `pathname` will be modified if path is valid -// `lastIsDir` should be `true` if we are searching for directory -// nobody cares about shitdoze, so i'll use the same code path for it +// findFileCI eats case-insensitive path, traverses it and rewrites it to a +// case-sensetive. result value means success. +// if file/dir not founded than pathname is in undefined state! function findFileCI (var pathname: AnsiString; lastIsDir: Boolean=false): Boolean; var sr: TSearchRec;