X-Git-Url: https://deadsoftware.ru/gitweb?p=cpc.git;a=blobdiff_plain;f=src%2Fposix%2Fgeneric%2FHost%2FMod%2FFiles.cp;h=e9a1e496f58ce8722786070a171718757c3aaa55;hp=7f5b91dd779c396a7ff8da6211525f3f0b6acd1d;hb=b123c8223aaafee51efd0ddbad900015a2628bed;hpb=d10ed94458a936c8a20510a86a80ebc244695b4a diff --git a/src/posix/generic/Host/Mod/Files.cp b/src/posix/generic/Host/Mod/Files.cp index 7f5b91d..e9a1e49 100644 --- a/src/posix/generic/Host/Mod/Files.cp +++ b/src/posix/generic/Host/Mod/Files.cp @@ -1,11 +1,12 @@ MODULE HostFiles; - IMPORT S := SYSTEM, Kernel, HostLang, Files, Log, stdlib := C99stdlib, - unistd := C99unistd, dirent := C99dirent, fcntl := C99fcntl, - sysstat := C99sys_stat, stdio := C99stdio, errno := C99errno, - macro := C99macro, libgen := C99libgen, time := C99time; + IMPORT S := SYSTEM, Kernel, HostLang, Files, Log, stdlib := PosixCstdlib, + unistd := PosixCunistd, dirent := PosixCdirent, fcntl := PosixCfcntl, + sysstat := PosixCsys_stat, stdio := PosixCstdio, errno := PosixCerrno, + macro := PosixCmacro, libgen := PosixClibgen, time := PosixCtime; (* !!! add buffer cache *) + (* !!! HostFiles64 must be base for HostFiles *) CONST closed = 0; new = 1; temp = 2; shared = 3; exclusive = 4; @@ -22,7 +23,7 @@ MODULE HostFiles; File = POINTER TO RECORD (Files.File) state: INTEGER; - len: INTEGER; + len: INTEGER; (* !!! must be sysstat.off_t *) fd: unistd.int; ino: sysstat.ino_t; pathname: FullName @@ -445,7 +446,7 @@ MODULE HostFiles; IF res # -1 THEN NEW(f); HostLang.HostToString(pathname, f.pathname, HostLang.pep383, err); IF err = 0 THEN - f.fd := fd; f.len := s.st_size; f.ino := s.st_ino; + f.fd := fd; f.len := S.VAL((*!!!*)INTEGER, s.st_size); f.ino := s.st_ino; IF isShared THEN f.state := shared ELSE f.state := exclusive END; @@ -638,7 +639,7 @@ MODULE HostFiles; END; t.name := name$; t.type := ""; (* ??? *) - t.length := s.st_size; + t.length := S.VAL((*!!!*)INTEGER, s.st_size); tm := time.localtime(s.st_mtim.tv_sec); IF tm # NIL THEN t.modified.year := tm.tm_year + 1900;