--- freem/src/strings.c 2025/03/09 15:20:18 1.2 +++ freem/src/strings.c 2025/04/09 19:52:02 1.4 @@ -1,23 +1,11 @@ /* - * * - * * * - * * * - * *************** - * * * * * - * * MUMPS * - * * * * * - * *************** - * * * - * * * - * * - * - * strings.c + * $Id: strings.c,v 1.4 2025/04/09 19:52:02 snw Exp $ * freem string library * * * Author: Serena Willis * 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. @@ -35,6 +23,16 @@ * You should have received a copy of the GNU Affero Public License * along with FreeM. If not, see . * + * $Log: strings.c,v $ + * Revision 1.4 2025/04/09 19:52:02 snw + * Eliminate as many warnings as possible while building with -Wall + * + * Revision 1.3 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 "mpsdef.h" @@ -62,7 +60,6 @@ long int stnlen (const char *source, siz return length; } - /* copy string from 'source' to 'dest' */ long int stcpy (char *dest, const char *source) { @@ -123,18 +120,6 @@ short int stcat (char *dest, const char return TRUE; } -long int stncat (char *dest, const char *source, size_t siz) -{ - long int srclen; - long int dstlen; - - srclen = stnlen (source, siz); - dstlen = stnlen (dest, siz); - - - return 0; -} - /* compare str1 and str2 */ short int stcmp (char *str1, char *str2) { @@ -230,6 +215,7 @@ void stncnv_c2m(char *cstr, size_t siz) return; } + /* convert at most 'count' characters of *key into human-readable format in *buf */ size_t key_to_name(char *buf, const char *key, size_t count) { @@ -254,7 +240,7 @@ size_t key_to_name(char *buf, const char c = key[i]; next = key[i + 1]; - switch (key[i]) { + switch (c) { case EOL: