File:  [Coherent Logic Development] / freem / src / cmd_else.c
Revision 1.3: download - view: text, annotated - select for diffs
Sun Mar 9 19:14:24 2025 UTC (4 months, 3 weeks ago) by snw
Branches: MAIN
CVS tags: v0-63-1-rc1, v0-63-0-rc1, v0-63-0, v0-62-3, v0-62-2, v0-62-1, v0-62-0, HEAD
First phase of REUSE compliance and header reformat

    1: /*
    2:  *
    3:  *   $Id: cmd_else.c,v 1.3 2025/03/09 19:14:24 snw Exp $
    4:  *    Implementation of the ELSE command
    5:  *
    6:  *  
    7:  *   Author: Serena Willis <snw@coherent-logic.com>
    8:  *    Copyright (C) 1998 MUG Deutschland
    9:  *    Copyright (C) 2023 Coherent Logic Development LLC
   10:  *
   11:  *
   12:  *   This file is part of FreeM.
   13:  *
   14:  *   FreeM is free software: you can redistribute it and/or modify
   15:  *   it under the terms of the GNU Affero Public License as published by
   16:  *   the Free Software Foundation, either version 3 of the License, or
   17:  *   (at your option) any later version.
   18:  *
   19:  *   FreeM is distributed in the hope that it will be useful,
   20:  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
   21:  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   22:  *   GNU Affero Public License for more details.
   23:  *
   24:  *   You should have received a copy of the GNU Affero Public License
   25:  *   along with FreeM.  If not, see <https://www.gnu.org/licenses/>.
   26:  *
   27:  *   $Log: cmd_else.c,v $
   28:  *   Revision 1.3  2025/03/09 19:14:24  snw
   29:  *   First phase of REUSE compliance and header reformat
   30:  *
   31:  *
   32:  * SPDX-FileCopyrightText:  (C) 2025 Coherent Logic Development LLC
   33:  * SPDX-License-Identifier: AGPL-3.0-or-later
   34:  **/
   35: 
   36: #include "mpsdef.h"
   37: #include "mcommand.h"
   38: 
   39: MRESULT cmd_else(MACTION *ra)
   40: {
   41:     if (*codptr != EOL) {
   42:         
   43:         if (*codptr != SP) {
   44:             return ARGER;
   45:         }
   46:         
   47:         if (test == FALSE) {
   48:             *ra = RA_NEXTCMND;
   49:             return OK;
   50:         }
   51:         
   52:     }
   53: 
   54:     *ra = RA_SKIPLINE;
   55:     return OK;
   56: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>