File:  [Coherent Logic Development] / freem / src / ssvn_zfreem.c
Revision 1.2: download - view: text, annotated - select for diffs
Sun Mar 9 15:20:18 2025 UTC (12 months, 3 weeks ago) by snw
Branches: MAIN
CVS tags: HEAD
Begin formatting overhaul and REUSE compliance

    1: /*
    2:  *                            *
    3:  *                           * *
    4:  *                          *   *
    5:  *                     ***************
    6:  *                      * *       * *
    7:  *                       *  MUMPS  *
    8:  *                      * *       * *
    9:  *                     ***************
   10:  *                          *   *
   11:  *                           * *
   12:  *                            *
   13:  *
   14:  *   ssvn_zfreem.c
   15:  *    ^$ZFREEM ssv
   16:  *
   17:  *  
   18:  *   Author: Serena Willis <snw@coherent-logic.com>
   19:  *    Copyright (C) 1998 MUG Deutschland
   20:  *    Copyright (C) 2020 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 <stdio.h>
   41: #include <string.h>
   42: #include <stdlib.h>
   43: 
   44: #include "mpsdef.h"
   45: #include "mref.h"
   46: 
   47: void ssvn_zfreem (short action, char *key, char *data)
   48: {
   49: 
   50:     freem_ref_t *r = (freem_ref_t *) malloc (sizeof (freem_ref_t));
   51:     NULLPTRCHK(r,"ssvn_zfreem");
   52:     
   53:     mref_init (r, MREF_RT_SSV, "^$ZFREEM");
   54:     internal_to_mref (r, key);
   55: 
   56: #ifdef SSVN_DEBUG
   57:     {
   58:         int i;
   59: 
   60:         set_io (UNIX);
   61:         printf ("%s subscript_count:  %d\n", r->name, r->subscript_count);
   62:         for (i = 0; i < r->subscript_count; i++) {
   63:             printf ("%s subscripts[%d]:  %s\n", r->name, i, r->subscripts[i]);
   64:         }
   65:         set_io (MUMPS);
   66:     }
   67: #endif
   68: 
   69: 
   70:     *data = EOL;
   71:     return;
   72: 
   73: }

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