summaryrefslogtreecommitdiff
path: root/ham/linpsk/patches/patch-ah
blob: 5a23b4cbe019b576ef496afe0f9c9655b9d19aea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$NetBSD: patch-ah,v 1.1 2005/03/16 15:32:12 rillig Exp $

g++-2.95.3 does not know the min() and max() macros/functions.

--- src/rtty2demodulator.cpp.orig	Sun Jul  4 17:50:45 2004
+++ src/rtty2demodulator.cpp	Wed Mar 16 03:34:16 2005
@@ -149,8 +149,8 @@ while ( actSample < NxSamples )
    {
     j=(ThresholdPointer+i)%SampleBufferLength;
     float x=ThresholdBuffer[j];
-    xmax=max(xmax,x);
-    xmin=min(xmin,x);
+    xmax= xmax > x ? xmax : x;
+    xmin= xmin < x ? xmin : x;
    }
    DiscriminatorThreshold=(xmax+xmin)/2.;