--- freem/src/cmd_unmap.c 2025/01/19 02:04:04 1.1.1.1 +++ freem/src/cmd_unmap.c 2025/04/09 19:52:02 1.4 @@ -1,23 +1,11 @@ /* - * * - * * * - * * * - * *************** - * * * * * - * * MUMPS * - * * * * * - * *************** - * * * - * * * - * * - * - * cmd_unmap.c + * $Id: cmd_unmap.c,v 1.4 2025/04/09 19:52:02 snw Exp $ * Implementation of the UNMAP command * * - * Author: Serena Willis + * Author: Serena Willis * Copyright (C) 1998 MUG Deutschland - * Copyright (C) 2023 Coherent Logic Development LLC + * Copyright (C) 2023, 2025 Coherent Logic Development LLC * * * This file is part of FreeM. @@ -35,6 +23,16 @@ * You should have received a copy of the GNU Affero Public License * along with FreeM. If not, see . * + * $Log: cmd_unmap.c,v $ + * Revision 1.4 2025/04/09 19:52:02 snw + * Eliminate as many warnings as possible while building with -Wall + * + * Revision 1.3 2025/03/09 19:14:24 snw + * First phase of REUSE compliance and header reformat + * + * + * SPDX-FileCopyrightText: (C) 2025 Coherent Logic Development LLC + * SPDX-License-Identifier: AGPL-3.0-or-later **/ #include @@ -44,7 +42,6 @@ MRESULT cmd_unmap(MACTION *ra) { - char mapping_type; char mapping_obj[256]; char tmp_data[256]; char tmp_key[256]; @@ -59,15 +56,8 @@ MRESULT cmd_unmap(MACTION *ra) expr (NAME); if (merr ()) return merr (); - - if (stcmp (varnam, "GLOBAL\201") == 0 || stcmp (varnam, "global\201") == 0) { - mapping_type = 'g'; - } - else if (stcmp (varnam, "ROUTINE\201") == 0 || stcmp (varnam, "routine\201") == 0) { - mapping_type = 'r'; - return ARGLIST; - } - else { + + if (stcmp (varnam, "GLOBAL\201") != 0 && stcmp (varnam, "global\201") != 0 && stcmp (varnam, "ROUTINE\201") != 0 && stcmp (varnam, "routine\201") != 0) { return ARGLIST; }