mes/lib/stdlib/exit.c
Jan Nieuwenhuizen 38a7077b72
mescc: Mes C Library: Explode libc-mini.c.
* include/libmes.h: Add declarations.
* lib/mes/eputs.c: New file, explode from lib/libc-mini.c.
* lib/mes/oputs.c: Likewise.
* lib/stdlib/exit.c: Likewise.
* lib/stdlib/puts.c: Likewise.
* lib/string/strlen.c: Likewise.
* lib/libc-mini.c: Include explodings.
2018-08-16 11:07:33 +02:00

32 lines
983 B
C

/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2016,2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
* GNU Mes is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or (at
* your option) any later version.
*
* GNU Mes is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libmes.h>
void (*__call_at_exit) (void);
void
exit (int code)
{
if (__call_at_exit)
(*__call_at_exit) ();
_exit (code);
}