This patch makes style checks and warning as error switches controllable
with a scenario variable: ADL_BUILD_CHECKS (disabled by default).
With this we can enforce style checks on all contributions by enabling
ADL_BUILD_CHECKS in testsuite runs and CI builds.
On the other hand the checks are disabled by default which means it is
easier and more friendly to play with the library and the examples.
Part of #271
Instead of returning False when a configuration is not supported, users
can call a function beforehand to know if it is supported. The
capability is also now a precondition of the setup procedures.
in a package called File_IO. This hides some of the complexity of
dealing with access to handle and answers some of the questions
discussed in the issue #68.
The package also provides the mounting interface, taken from
Filesystem.VFS.
as opposed to handles. And pass handles as out parameters.
File and directory handles will always be used for more than one
operation. Read/Write and Close at least, so it will require to declare
a variable for them.
Handle : Any_File_Handle;
begin
Open ("/my_file". Handle);
Handle.Read (...)
Handle.Close;
vs
-- This is not practical because now I can't close the handle
Open ("/my_file").Read (...);
On the other side, one might want to just check the status code of a
function without declaring a variable to do so.
if Open ("/my_file", Handle) /= OK then
...
vs
Handle : Any_File_Handle;
Status : Status_Code;
begin
Handle := Open ("/my_file", Status);
if Status /= OK then
...