From: Helmut Eller Date: Sun, 8 Jan 2017 20:27:28 +0000 (+0100) Subject: This introduces a RESIZE-FILE-LIMIT X-Git-Url: http://git.subgeniuskitty.com/pforth/.git/commitdiff_plain/0b1e24898c41afa1f07854c295881b23aa2faea6?hp=0b1e24898c41afa1f07854c295881b23aa2faea6 This introduces a RESIZE-FILE-LIMIT The intention is to protect the user from a presumably common mistake: passing the size as single cell number instead of a double cell number. This would create a very big file that is written in many small chunks. I also changed sdResizeFile to use uint64_t instead of Lo/Hi pairs. * csrc/pfcompil.c (pfBuildDictionary): Rename RESIZE-FILE to (RESIZE-FILE). * fth/file.fth (RESIZE-FILE-LIMIT): New variable. (RESIZE-FILE): Use it. * fth/system.fth (D<, D>): Implemented. Needed for compare the limit. * csrc/pf_io.h, csrc/pf_io.c (sdResizeFile): Use uint64_t. * csrc/stdio/pf_fileio_stdio.c (sdResizeFile): Use uint64_t. (IsGreaterThanLongMax): Deleted. * csrc/pf_inner.c (ID_FILE_RESIZE): Convert the Lo/Hi pair to uint64_t. (UdToUint64, UdIsUint64): New helpers. ---