File:  [Coherent Logic Development] / freem / src / fma_globals.h
Revision 1.4: download - view: text, annotated - select for diffs
Sun Mar 30 01:36:58 2025 UTC (4 months ago) by snw
Branches: MAIN
CVS tags: v0-63-1-rc1, v0-63-0-rc1, v0-63-0, HEAD
Make it easier to bring back fma_gedit, fix double-free in global handler, limit $CHAR to 7-bit ASCII

    1: /*
    2:  *   $Id: fma_globals.h,v 1.4 2025/03/30 01:36:58 snw Exp $
    3:  *    fmadm - globals
    4:  *
    5:  *  
    6:  *   Author: Serena Willis <snw@coherent-logic.com>
    7:  *    Copyright (C) 1998 MUG Deutschland
    8:  *    Copyright (C) 2020, 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: fma_globals.h,v $
   27:  *   Revision 1.4  2025/03/30 01:36:58  snw
   28:  *   Make it easier to bring back fma_gedit, fix double-free in global handler, limit $CHAR to 7-bit ASCII
   29:  *
   30:  *   Revision 1.3  2025/03/09 19:14:25  snw
   31:  *   First phase of REUSE compliance and header reformat
   32:  *
   33:  *
   34:  * SPDX-FileCopyrightText:  (C) 2025 Coherent Logic Development LLC
   35:  * SPDX-License-Identifier: AGPL-3.0-or-later
   36:  **/
   37: 
   38: #if !defined(_FMA_GLOBALS_H)
   39: #define _FMA_GLOBALS_H
   40: 
   41: #define FALSE   0
   42: #define TRUE    1
   43: 
   44: #define POINT 28
   45: #define MINUS 26
   46: #define OMEGA 29
   47: #define g_EOL 30
   48: #define ALPHA 31
   49: 
   50: #define ROOT 0L
   51:     /* length of blocks. status bytes defined as offset to blocklength */
   52: #define BLOCKLEN 1024
   53: #define DATALIM (BLOCKLEN-11)
   54: #define LLPTR   (BLOCKLEN-10)
   55: #define NRBLK    LLPTR
   56: #define RLPTR   (BLOCKLEN- 6)
   57: #define FREE     RLPTR
   58: #define BTYP    (BLOCKLEN- 3)
   59: #define OFFS    (BLOCKLEN- 2)
   60: 
   61: /* length of blockpointers in bytes */
   62: #define PLEN     3
   63: 
   64: #define EMPTY    0
   65: #define FBLK     1
   66: #define POINTER  2
   67: #define BOTTOM   6
   68: #define DATA     8
   69: 
   70: #define PROTECT 30
   71: 
   72: #define LF      10
   73: #define CR      13
   74: 
   75: #define NUL      0
   76: #define DEL    127
   77: 
   78: /* maximum level (i.e. tree depth) */
   79: /* trace limit in globals module, i.e. trees wo'nt grow to the sky */
   80: #define MAXLEV 10
   81: /* error limit */
   82: #define ERRLIM 10000
   83: 
   84: 
   85: int fma_globals_list (int optc, char **opts);
   86: int fma_globals_remove (int optc, char **opts);
   87: int fma_globals_examine (int optc, char **opts);
   88: int fma_globals_verify (int optc, char **opts);
   89: int fma_globals_edit (int optc, char **opts);
   90: 
   91: #endif

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