Annotation of freem/src/cmd_then.c, revision 1.1.1.1

1.1       snw         1: /*
                      2:  *                            *
                      3:  *                           * *
                      4:  *                          *   *
                      5:  *                     ***************
                      6:  *                      * *       * *
                      7:  *                       *  MUMPS  *
                      8:  *                      * *       * *
                      9:  *                     ***************
                     10:  *                          *   *
                     11:  *                           * *
                     12:  *                            *
                     13:  *
                     14:  *   cmd_then.c
                     15:  *    Implementation of the THEN command
                     16:  *
                     17:  *  
                     18:  *   Author: Serena Willis <jpw@coherent-logic.com>
                     19:  *    Copyright (C) 1998 MUG Deutschland
                     20:  *    Copyright (C) 2023 Coherent Logic Development LLC
                     21:  *
                     22:  *
                     23:  *   This file is part of FreeM.
                     24:  *
                     25:  *   FreeM is free software: you can redistribute it and/or modify
                     26:  *   it under the terms of the GNU Affero Public License as published by
                     27:  *   the Free Software Foundation, either version 3 of the License, or
                     28:  *   (at your option) any later version.
                     29:  *
                     30:  *   FreeM is distributed in the hope that it will be useful,
                     31:  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
                     32:  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     33:  *   GNU Affero Public License for more details.
                     34:  *
                     35:  *   You should have received a copy of the GNU Affero Public License
                     36:  *   along with FreeM.  If not, see <https://www.gnu.org/licenses/>.
                     37:  *
                     38:  **/
                     39: 
                     40: #include <string.h>
                     41: #include <stdlib.h>
                     42: #include "mpsdef.h"
                     43: #include "mcommand.h"
                     44: 
                     45: MRESULT cmd_then(MACTION *ra, int *then_ctr)
                     46: {
                     47:     if ((rtn_dialect () != D_FREEM) &&
                     48:         (rtn_dialect () != D_MDS)) {
                     49:         return NOSTAND;
                     50:     }
                     51:             
                     52:     (*then_ctr)++;
                     53:     
                     54:     nestlt[nstx] = test;
                     55:     level++;
                     56: 
                     57:     *ra = RA_NEXTCMND;
                     58:     return OK;
                     59: }

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