1: /*
2: * $Id: ssvn_zfreem.c,v 1.3 2025/03/09 19:50:47 snw Exp $
3: * ^$ZFREEM ssvn
4: *
5: *
6: * Author: Serena Willis <snw@coherent-logic.com>
7: * Copyright (C) 1998 MUG Deutschland
8: * Copyright (C) 2020, 2025 Coherent Logic Development LLC
9: *
10: *
11: * This file is part of FreeM.
12: *
13: * FreeM is free software: you can redistribute it and/or modify
14: * it under the terms of the GNU Affero Public License as published by
15: * the Free Software Foundation, either version 3 of the License, or
16: * (at your option) any later version.
17: *
18: * FreeM is distributed in the hope that it will be useful,
19: * but WITHOUT ANY WARRANTY; without even the implied warranty of
20: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21: * GNU Affero Public License for more details.
22: *
23: * You should have received a copy of the GNU Affero Public License
24: * along with FreeM. If not, see <https://www.gnu.org/licenses/>.
25: *
26: * $Log: ssvn_zfreem.c,v $
27: * Revision 1.3 2025/03/09 19:50:47 snw
28: * Second phase of REUSE compliance and header reformat
29: *
30: *
31: * SPDX-FileCopyrightText: (C) 2025 Coherent Logic Development LLC
32: * SPDX-License-Identifier: AGPL-3.0-or-later
33: **/
34:
35: #include <stdio.h>
36: #include <string.h>
37: #include <stdlib.h>
38:
39: #include "mpsdef.h"
40: #include "mref.h"
41:
42: void ssvn_zfreem (short action, char *key, char *data)
43: {
44:
45: freem_ref_t *r = (freem_ref_t *) malloc (sizeof (freem_ref_t));
46: NULLPTRCHK(r,"ssvn_zfreem");
47:
48: mref_init (r, MREF_RT_SSV, "^$ZFREEM");
49: internal_to_mref (r, key);
50:
51: #ifdef SSVN_DEBUG
52: {
53: int i;
54:
55: set_io (UNIX);
56: printf ("%s subscript_count: %d\n", r->name, r->subscript_count);
57: for (i = 0; i < r->subscript_count; i++) {
58: printf ("%s subscripts[%d]: %s\n", r->name, i, r->subscripts[i]);
59: }
60: set_io (MUMPS);
61: }
62: #endif
63:
64:
65: *data = EOL;
66: return;
67:
68: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>