version 1.1, 2025/01/19 02:04:04
|
version 1.4, 2025/04/09 19:52:02
|
Line 1
|
Line 1
|
/* |
/* |
* * |
* $Id$ |
* * * |
|
* * * |
|
* *************** |
|
* * * * * |
|
* * MUMPS * |
|
* * * * * |
|
* *************** |
|
* * * |
|
* * * |
|
* * |
|
* |
|
* cmd_unmap.c |
|
* Implementation of the UNMAP command |
* Implementation of the UNMAP command |
* |
* |
* |
* |
* Author: Serena Willis <jpw@coherent-logic.com> |
* Author: Serena Willis <snw@coherent-logic.com> |
* Copyright (C) 1998 MUG Deutschland |
* 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. |
* This file is part of FreeM. |
Line 35
|
Line 23
|
* You should have received a copy of the GNU Affero Public License |
* You should have received a copy of the GNU Affero Public License |
* along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
* along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
* |
* |
|
* $Log$ |
|
* 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 <string.h> |
#include <string.h> |
Line 44
|
Line 42
|
|
|
MRESULT cmd_unmap(MACTION *ra) |
MRESULT cmd_unmap(MACTION *ra) |
{ |
{ |
char mapping_type; |
|
char mapping_obj[256]; |
char mapping_obj[256]; |
char tmp_data[256]; |
char tmp_data[256]; |
char tmp_key[256]; |
char tmp_key[256]; |
Line 59 MRESULT cmd_unmap(MACTION *ra)
|
Line 56 MRESULT cmd_unmap(MACTION *ra)
|
|
|
expr (NAME); |
expr (NAME); |
if (merr ()) return merr (); |
if (merr ()) return merr (); |
|
|
if (stcmp (varnam, "GLOBAL\201") == 0 || stcmp (varnam, "global\201") == 0) { |
if (stcmp (varnam, "GLOBAL\201") != 0 && stcmp (varnam, "global\201") != 0 && stcmp (varnam, "ROUTINE\201") != 0 && stcmp (varnam, "routine\201") != 0) { |
mapping_type = 'g'; |
|
} |
|
else if (stcmp (varnam, "ROUTINE\201") == 0 || stcmp (varnam, "routine\201") == 0) { |
|
mapping_type = 'r'; |
|
return ARGLIST; |
|
} |
|
else { |
|
return ARGLIST; |
return ARGLIST; |
} |
} |
|
|