version 1.1.1.1, 2025/01/19 02:04:04
|
version 1.5, 2025/04/10 01:24:39
|
Line 1
|
Line 1
|
/* |
/* |
* * |
* $Id$ |
* * * |
* ^$LOCK ssvn |
* * * |
|
* *************** |
|
* * * * * |
|
* * MUMPS * |
|
* * * * * |
|
* *************** |
|
* * * |
|
* * * |
|
* * |
|
* |
|
* ssvn_lock.c |
|
* ^$LOCK ssv |
|
* |
* |
* |
* |
* Author: Serena Willis <jpw@coherent-logic.com> |
* Author: Serena Willis <snw@coherent-logic.com> |
* Copyright (C) 1998 MUG Deutschland |
* Copyright (C) 1998 MUG Deutschland |
* Copyright (C) 2020 Coherent Logic Development LLC |
* Copyright (C) 2020, 2025 Coherent Logic Development LLC |
* |
* |
* |
* |
* This file is part of FreeM. |
* This file is part of FreeM. |
Line 35
|
Line 23
|
* You should have received a copy of the GNU Affero Public License |
* You should have received a copy of the GNU Affero Public License |
* along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
* along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
* |
* |
|
* $Log$ |
|
* Revision 1.5 2025/04/10 01:24:39 snw |
|
* Remove C++ style comments |
|
* |
|
* Revision 1.4 2025/03/09 19:50:47 snw |
|
* Second phase of REUSE compliance and header reformat |
|
* |
|
* |
|
* SPDX-FileCopyrightText: (C) 2025 Coherent Logic Development LLC |
|
* SPDX-License-Identifier: AGPL-3.0-or-later |
**/ |
**/ |
|
|
#include <stdio.h> |
#include <stdio.h> |
Line 69 void ssvn_lock_add(char *key, pid_t owne
|
Line 67 void ssvn_lock_add(char *key, pid_t owne
|
internal_to_mref (r, key); |
internal_to_mref (r, key); |
mref_to_external (r, t_buf); |
mref_to_external (r, t_buf); |
|
|
//printf ("key = '%s'\r\n", key); |
|
//printf ("r = '%s'\r\n", t_buf); |
|
|
|
for (i = 0; i < strlen (t_buf); i++) { |
for (i = 0; i < strlen (t_buf); i++) { |
|
|
if (t_buf[i] == '\001') { |
if (t_buf[i] == '\001') { |
Line 82 void ssvn_lock_add(char *key, pid_t owne
|
Line 77 void ssvn_lock_add(char *key, pid_t owne
|
} |
} |
|
|
snprintf (k_buf, STRLEN - 1, "^$LOCK\202%s\201", t_buf); |
snprintf (k_buf, STRLEN - 1, "^$LOCK\202%s\201", t_buf); |
snprintf (d_buf, STRLEN - 1, "%ld,%d\201\0", owner_job, count); |
snprintf (d_buf, STRLEN - 1, "%ld,%d\201\0", (long) owner_job, count); |
|
|
symtab_shm (set_sym, k_buf, d_buf); |
symtab_shm (set_sym, k_buf, d_buf); |
|
|
Line 141 void ssvn_lock(short action, char *key,
|
Line 136 void ssvn_lock(short action, char *key,
|
|
|
case set_sym: |
case set_sym: |
case kill_sym: |
case kill_sym: |
//TODO: remove lock |
/* TODO: remove lock */ |
merr_raise (M29); |
merr_raise (M29); |
return; |
return; |
|
|