% WFDB_wfdbquit
%
% Closes all open database files and resets the following:
%   * the factors used for converting between samples, seconds, and counter
%     values (reset to 1), the base time (reset to 0, i.e., midnight), and
%     the base counter value (reset to 0); see WFDB_mstimstr and WFDB_timstr
%   * the parameters used for converting between adus and physical units (reset
%     to WFDB_DEFGAIN adu/mV, a quantity defined in <wfdb/wfdb.h>);  see
%     WFDB_aduphys
%   * internal variables used to determine output signal specifications; see
%     WFDB_newheader
%
%   If any annotations have been written out-of-order, this function attempts
%   to run 'sortann' (see the WFDB Applications Guide) as a subprocess to
%   restore the annotations to canonical order. If this cannot be done, it
%   prints a warning message indicating that the annotations are not in order,
%   and providing instructions for putting them in order.

