dawn@0: function i = sf_cleanup(i) dawn@0: % i=sf_cleanup(i) - cleanup after use (close i.fd if open) dawn@0: dawn@0: % Alain de Cheveigné, CNRS/Ircam, 2002. dawn@0: % Copyright (c) 2002 Centre National de la Recherche Scientifique. dawn@0: % dawn@0: % Permission to use, copy, modify, and distribute this software without dawn@0: % fee is hereby granted FOR RESEARCH PURPOSES only, provided that this dawn@0: % copyright notice appears in all copies and in all supporting dawn@0: % documentation, and that the software is not redistributed for any dawn@0: % fee (except for a nominal shipping charge). dawn@0: % dawn@0: % For any other uses of this software, in original or modified form, dawn@0: % including but not limited to consulting, production or distribution dawn@0: % in whole or in part, specific prior permission must be obtained from CNRS. dawn@0: % Algorithms implemented by this software may be claimed by patents owned dawn@0: % by CNRS, France Telecom, Ircam or others. dawn@0: % dawn@0: % The CNRS makes no representations about the suitability of this dawn@0: % software for any purpose. It is provided "as is" without express dawn@0: % or implied warranty. Beware of the bugs. dawn@0: dawn@0: if ~nargin ; error('sf_info: no input arguement'); end dawn@0: if ~isa(i, 'struct') error('sf_info: expected struct'); end dawn@0: dawn@0: % close file if open dawn@0: if isfield(i, 'fd') & fopen(i.fd) dawn@0: fclose(i.fd); dawn@0: end