1 /* Portable C version of peakval
2  * Copyright 2004 Phil Karn, KA9Q
3  */
4 #include <stdlib.h>
5 #include "fec.h"
peakval_port(signed short * b,int len)6 int peakval_port(signed short *b,int len){
7   int peak = 0;
8   int a,i;
9 
10   for(i=0;i<len;i++){
11     a = abs(b[i]);
12     if(a > peak)
13       peak = a;
14   }
15   return peak;
16 }
17