This introduces a RESIZE-FILE-LIMIT
authorHelmut Eller <eller.helmut@gmail.com>
Sun, 8 Jan 2017 20:27:28 +0000 (21:27 +0100)
committerHelmut Eller <eller.helmut@gmail.com>
Sun, 8 Jan 2017 20:50:44 +0000 (21:50 +0100)
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.


No differences found