File:  [Coherent Logic Development] / freem / src / iniconf.h
Revision 1.5: download - view: text, annotated - select for diffs
Tue Apr 15 16:49:36 2025 UTC (3 months, 2 weeks ago) by snw
Branches: MAIN
CVS tags: HEAD
Make use of logprintf throughout codebase

    1: /*
    2:  *   $Id: iniconf.h,v 1.5 2025/04/15 16:49:36 snw Exp $
    3:  *    Function prototypes, structs, and macros for reading
    4:  *    FreeM configuration files
    5:  *
    6:  *  
    7:  *   Author: Serena Willis <snw@coherent-logic.com>
    8:  *    Copyright (C) 1998 MUG Deutschland
    9:  *    Copyright (C) 2020, 2025 Coherent Logic Development LLC
   10:  *
   11:  *
   12:  *   This file is part of FreeM.
   13:  *
   14:  *   FreeM is free software: you can redistribute it and/or modify
   15:  *   it under the terms of the GNU Affero Public License as published by
   16:  *   the Free Software Foundation, either version 3 of the License, or
   17:  *   (at your option) any later version.
   18:  *
   19:  *   FreeM is distributed in the hope that it will be useful,
   20:  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
   21:  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   22:  *   GNU Affero Public License for more details.
   23:  *
   24:  *   You should have received a copy of the GNU Affero Public License
   25:  *   along with FreeM.  If not, see <https://www.gnu.org/licenses/>.
   26:  *
   27:  *   $Log: iniconf.h,v $
   28:  *   Revision 1.5  2025/04/15 16:49:36  snw
   29:  *   Make use of logprintf throughout codebase
   30:  *
   31:  *   Revision 1.4  2025/04/02 19:59:38  snw
   32:  *   Automatically modify env.conf from fmadm reconfigure
   33:  *
   34:  *   Revision 1.3  2025/03/09 19:14:25  snw
   35:  *   First phase of REUSE compliance and header reformat
   36:  *
   37:  *
   38:  * SPDX-FileCopyrightText:  (C) 2025 Coherent Logic Development LLC
   39:  * SPDX-License-Identifier: AGPL-3.0-or-later
   40:  **/
   41: 
   42: #ifndef _CONFIG_H
   43:  #define _CONFIG_H
   44: 
   45: #define CONF_BUFSIZE 255
   46: 
   47: 
   48: extern int get_conf(char *section, char *key, char *value);
   49: extern int file_exists(char *filename);
   50: extern void write_profile_string(char *file, char *section, char *key, char *value);
   51: extern int modify_profile_string(char *file, char *section, char *key, char *value);
   52: extern int read_profile_string(char *file, char *section, char *key, char *value);
   53: #endif

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>