1: /*
2: * $Id: ssvn_object.c,v 1.5 2025/04/09 19:52:02 snw Exp $
3: * ^$OBJECT SSVN implementation
4: *
5: *
6: * Author: Serena Willis <snw@coherent-logic.com>
7: * Copyright (C) 1998 MUG Deutschland
8: * Copyright (C) 2023, 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_object.c,v $
27: * Revision 1.5 2025/04/09 19:52:02 snw
28: * Eliminate as many warnings as possible while building with -Wall
29: *
30: * Revision 1.4 2025/03/24 04:13:11 snw
31: * Replace action macro dat with fra_dat to avoid symbol conflict on OS/2
32: *
33: * Revision 1.3 2025/03/09 19:50:47 snw
34: * Second phase of REUSE compliance and header reformat
35: *
36: *
37: * SPDX-FileCopyrightText: (C) 2025 Coherent Logic Development LLC
38: * SPDX-License-Identifier: AGPL-3.0-or-later
39: **/
40:
41: #include <stdlib.h>
42: #include <string.h>
43: #include <stdio.h>
44: #include <unistd.h>
45:
46: #include "mref.h"
47: #include "objects.h"
48: #include "mpsdef.h"
49:
50: void ssvn_object(short action, char *key, char *data)
51: {
52: freem_ref_t *r;
53:
54: r = (freem_ref_t *) malloc (sizeof (freem_ref_t));
55: NULLPTRCHK(r,"ssvn_object");
56:
57: mref_init (r, MREF_RT_SSV, "^$OBJECT");
58: internal_to_mref (r, key);
59:
60: switch (action) {
61:
62: case fra_order:
63: case fra_query:
64: case fra_dat:
65: case bigquery:
66: case get_sym:
67: symtab (action, key, data);
68: goto done;
69:
70:
71:
72: default:
73: merr_raise (M29);
74: goto done;
75: }
76:
77: done:
78: free (r);
79: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>