version 1.1, 2025/01/19 02:04:04
|
version 1.5, 2025/03/24 04:13:11
|
Line 1
|
Line 1
|
/* |
/* |
* * |
* $Id$ |
* * * |
* ^$LIBRARY ssvn |
* * * |
|
* *************** |
|
* * * * * |
|
* * MUMPS * |
|
* * * * * |
|
* *************** |
|
* * * |
|
* * * |
|
* * |
|
* |
|
* ssvn_library.c |
|
* ^$LIBRARY 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, 2023 Coherent Logic Development LLC |
* Copyright (C) 2020, 2023, 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/03/24 04:13:11 snw |
|
* Replace action macro dat with fra_dat to avoid symbol conflict on OS/2 |
|
* |
|
* Revision 1.4 2025/03/22 18:43:54 snw |
|
* Make STRLEN 255 chars and add BIGSTR macro for larger buffers |
|
* |
|
* 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 <stdio.h> |
#include <stdio.h> |
Line 58 void ssvn_library_add_dir(char *libdir)
|
Line 59 void ssvn_library_add_dir(char *libdir)
|
|
|
DIR *dir; |
DIR *dir; |
struct dirent *ent; |
struct dirent *ent; |
char filename[STRLEN]; |
char filename[PATHLEN]; |
char rtnname[256]; |
char rtnname[256]; |
char *rtnext; |
char *rtnext; |
|
|
Line 70 void ssvn_library_add_dir(char *libdir)
|
Line 71 void ssvn_library_add_dir(char *libdir)
|
dir = opendir (libdir); |
dir = opendir (libdir); |
while ((ent = readdir (dir)) != NULL) { |
while ((ent = readdir (dir)) != NULL) { |
|
|
strncpy (filename, ent->d_name, STRLEN - 1); |
strncpy (filename, ent->d_name, PATHLEN); |
|
|
rtnext = ent->d_name + (strlen (ent->d_name) - 2); |
rtnext = ent->d_name + (strlen (ent->d_name) - 2); |
|
|
Line 99 void ssvn_library_add_dir(char *libdir)
|
Line 100 void ssvn_library_add_dir(char *libdir)
|
|
|
void ssvn_library_update(void) |
void ssvn_library_update(void) |
{ |
{ |
char t_buf[STRLEN]; |
char t_buf[PATHLEN]; |
|
|
stcpy (t_buf, rou0plib); |
stcpy (t_buf, rou0plib); |
stcnv_m2c (t_buf); |
stcnv_m2c (t_buf); |
Line 126 void ssvn_library(short action, char *ke
|
Line 127 void ssvn_library(short action, char *ke
|
case fra_order: |
case fra_order: |
case fra_query: |
case fra_query: |
case bigquery: |
case bigquery: |
case dat: |
case fra_dat: |
|
|
symtab_bltin (action, key, data); |
symtab_bltin (action, key, data); |
goto done; |
goto done; |