// Copyright (c) CNES 2008 // // This software is part of CelestLab, a CNES toolbox for Scilab // // This software is governed by the CeCILL license under French law and // abiding by the rules of distribution of free software. You can use, // modify and/ or redistribute the software under the terms of the CeCILL // license as circulated by CEA, CNRS and INRIA at the following URL // 'http://www.cecill.info'. function quitCelestLabX() mode(-1); lines(0); if ((~isdef("celestLabXLib")) | (~isdef("celestLabX_internalLib"))) then warning("CelestLabX library is not loaded"); return; end tlbx_etc_path = get_absolute_file_path('celestlabx.quit'); tlbx_root_path = strncpy(tlbx_etc_path, length(tlbx_etc_path)-length("\etc\")); // Unload libraries mprintf("\tUnload libraries\n"); tlbx_src_path = fullfile(tlbx_root_path, "src"); ilib_verbose(0); for f = listfiles(tlbx_src_path)' p = fullfile(tlbx_src_path, f); if isdir(p) then unloader = fullfile(p, "unloader.sce"); if isfile(unloader) exec(unloader); end end end // Unload macros mprintf("\tUnload macros\n"); // Unload help if or(getscilabmode() == ["NW"; "STD"]) then mprintf("\tUnload help\n"); del_help_chapter("CelestLabX"); end endfunction quitCelestLabX(); clear celestLabXLib; clear celestLabX_internalLib; clear quitCelestLabX; // remove global variable clearglobal %CLx__PRIV; clear %CLx__PRIV;