--- freem/src/operator.c	2025/01/19 02:04:04	1.1
+++ freem/src/operator.c	2025/03/09 19:50:47	1.5
@@ -1,23 +1,11 @@
 /*
- *                            *
- *                           * *
- *                          *   *
- *                     ***************
- *                      * *       * *
- *                       *  MUMPS  *
- *                      * *       * *
- *                     ***************
- *                          *   *
- *                           * *
- *                            *
- *
- *   operator.c
+ *   $Id: operator.c,v 1.5 2025/03/09 19:50:47 snw Exp $
  *    operators pattern-match, divide, multiply, add, power
  *
  *  
- *   Author: Serena Willis <jpw@coherent-logic.com>
+ *   Author: Serena Willis <snw@coherent-logic.com>
  *    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,14 +23,19 @@
  *   You should have received a copy of the GNU Affero Public License
  *   along with FreeM.  If not, see <https://www.gnu.org/licenses/>.
  *
+ *   $Log: operator.c,v $
+ *   Revision 1.5  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"
 #include <stdlib.h>
 #include <math.h>
 
-void    root ();
-void    mround ();
 int unit (char *str);
 extern void cond_round (char *a, int digits); /* defined in expr.c */
 
@@ -61,10 +54,7 @@ extern void cond_round (char *a, int dig
 #define NUMBASE	10
 
 short int
-pattern (a, b)				/* evaluates a ? b */
-	char   *a;
-	char   *b;
-
+pattern (char *a, char *b)				/* evaluates a ? b */
 {
     short   levels;			/* depth of stack */
     register int patx;			/* match stack pointer */
@@ -486,15 +476,9 @@ pattern (a, b)				/* evaluates a ? b */
     }
     return '0';
 }					/* end of pattern */
-/******************************************************************************/
-void
-pminmax (str, min, max)			/* auxiliary function for grouped pattern match */
-
-/* determines                                   */
-	char   *str;			/* of a pattern 'str'                           */
-	int    *min,
-	       *max;			/* the minimum and maximum possible length      */
 
+/******************************************************************************/
+void pminmax (char *str, int *min, int *max)
 {
     int     mininc,
             maxinc,
@@ -592,11 +576,7 @@ pminmax (str, min, max)			/* auxiliary f
     return;
 }					/* end pminmax() */
 /******************************************************************************/
-void
-add (a, b)				/* string arithmetic a+=b; */
-	char   *a,
-	       *b;
-
+void add (char *a, char *b)				/* string arithmetic a+=b; */
 {
     
     if (b[0] == ZERO)
@@ -853,10 +833,7 @@ add (a, b)				/* string arithmetic a+=b;
     }
 }
 /******************************************************************************/
-void
-mul (a, b)				/* string arithmetic a=a*b */
-	char   *a,
-	       *b;
+void mul (char *a, char *b)				/* string arithmetic a=a*b */
 {
     char    c[2*(STRLEN+1) /*was 512*/];
     short   alen,
@@ -1101,12 +1078,7 @@ mul (a, b)				/* string arithmetic a=a*b
  * for a detailed description of the method for the divisions see             *
  * donald e.knuth 'the art of computer programming' vol.2 p.257               *
  ******************************************************************************/
-void
-mdiv (uu, v, typ)			/* divide string arithmetic */
-	char   *uu,			/* dividend and result */
-	       *v;			/* divisor */
-	short   typ;			/* type: '/' or '\' or '#' */
-
+void mdiv (char *uu, char *v, short typ)			/* divide string arithmetic */
 {
     char    q[STRLEN + 2 /*was 257*/];	/* quotient */
     char    u[2*(STRLEN + 1)/*was 512*/];/* intermediate result */
@@ -1551,10 +1523,7 @@ mdiv (uu, v, typ)			/* divide string ari
     return;
 }					/* end div() */
 /******************************************************************************/
-void
-power (a, b)				/* raise a to the b-th power */
-	char   *a,
-	       *b;
+void power (char *a, char *b)				/* raise a to the b-th power */
 {
     char    c[STRLEN + 2/*was 257*/];
     char    d[4*(STRLEN + 1)/*was 1024*/];/* 257 should be sufficient, but somewhere there */
@@ -1767,10 +1736,7 @@ power (a, b)				/* raise a to the b-th p
     return;
 }					/* end power() */
 /******************************************************************************/
-void
-g_sqrt (a)				/* square root */
-	char   *a;
-
+void g_sqrt (char *a)				/* square root */
 {
     register int i,
             ch;
@@ -1822,11 +1788,7 @@ g_sqrt (a)				/* square root */
     }
 }					/* end g_sqrt() */
 /******************************************************************************/
-void
-root (a, n)				/* n.th root */
-	char   *a;
-	long    n;
-
+void root (char *a, long n)				/* n.th root */
 {
     register int i,
             ch;
@@ -1917,12 +1879,7 @@ root (a, n)				/* n.th root */
     }
 }					/* end root() */
 /******************************************************************************/
-int
-numlit (str)
-/** str is interpreted as a MUMPS number
-					 * and is converted to canonical form
-					 * return value: 1=EUR, 4=DM, 0=other */
-	char   *str;
+int numlit (char *str)
 {
     long   j,
             mi = 0,
@@ -2154,11 +2111,7 @@ int unit (char *str)
     return 0;
 }
 /******************************************************************************/
-long
-intexpr (str)
-	char   *str;
-
-/* 'str' is interpreted as integer and converted to int */
+long intexpr (char *str)
 {
     {
 	register int ch;
@@ -2228,9 +2181,7 @@ intexpr (str)
     }
 }					/* end of intexpr */
 /******************************************************************************/
-short int
-tvexpr (str)				/* str is interpreted as truth valued expression */
-	char   *str;
+short int tvexpr (char *str)				/* str is interpreted as truth valued expression */
 {
     if (str[0] > ZERO && str[0] <= NINE) {
 	str[0] = ONE;
@@ -2270,12 +2221,9 @@ tvexpr (str)				/* str is interpreted as
 	}
     }
 }
+
 /******************************************************************************/
-void
-m_op (a, b, op)
-	char   *a,
-	       *b;
-	short   op;
+void m_op (char *a, char *b, short op)
 {
     int     atyp,
             btyp;			/* DM/EUR currency types */
@@ -2556,10 +2504,7 @@ m_op (a, b, op)
 	/* rounding */
 	/* 'a' is assumed to be a 'canonic' numeric string  */
 	/* it is rounded to 'digits' fractional digits      */
-void
-mround (a, digits)
-	char   *a;
-	int     digits;
+void mround (char *a, int digits)
 {
     int     ch,
             i,