From a5ae6569fb509d6668e1aba5679d5da1dc1aa868 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 13 May 2019 00:18:29 +0200 Subject: [PATCH] mescc: Mes C Library: Remove dead code. * lib/glibc.c: Remove. * lib/abtol.c: Remove. --- lib/abtol.c | 44 -------------------------------------------- lib/glibc.c | 35 ----------------------------------- 2 files changed, 79 deletions(-) delete mode 100644 lib/abtol.c delete mode 100644 lib/glibc.c diff --git a/lib/abtol.c b/lib/abtol.c deleted file mode 100644 index 2fc3d607..00000000 --- a/lib/abtol.c +++ /dev/null @@ -1,44 +0,0 @@ -/* -*-comment-start: "//";comment-end:""-*- - * GNU Mes --- Maxwell Equations of Software - * Copyright © 2016,2017,2018 Jan (janneke) Nieuwenhuizen - * - * 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 . - */ - -#include - -long -abtol (char const **p, int base) -{ - char const *s = *p; - long i = 0; - int sign = 1; - if (!base) base = 10; - if (*s && *s == '-') - { - sign = -1; - s++; - } - while (isnumber (*s, base)) - { - i *= base; - long m = *s > '9' ? 'a' - 10 : '0'; - i += *s - m; - s++; - } - *p = s; - return i * sign; -} diff --git a/lib/glibc.c b/lib/glibc.c deleted file mode 100644 index 1e67bdd9..00000000 --- a/lib/glibc.c +++ /dev/null @@ -1,35 +0,0 @@ -/* -*-comment-start: "//";comment-end:""-*- - * GNU Mes --- Maxwell Equations of Software - * Copyright © 2018 Jan (janneke) Nieuwenhuizen - * - * 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 . - */ - -int -__cleanup () -{ - static int stub = 0; - if (__mes_debug () && !stub) - eputs ("__cleanup stub\n"); - stub = 1; - return 0; -} - -int -__exit (int status) -{ - exit (status); -}