2 stuff we're too embarrassed to declare otherwise
\r
4 This file is part of a program that implements a Software-Defined Radio.
\r
6 Copyright (C) 2004 by Frank Brickle, AB2KT and Bob McGwier, N4HY
\r
8 This program is free software; you can redistribute it and/or modify
\r
9 it under the terms of the GNU General Public License as published by
\r
10 the Free Software Foundation; either version 2 of the License, or
\r
11 (at your option) any later version.
\r
13 This program is distributed in the hope that it will be useful,
\r
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
16 GNU General Public License for more details.
\r
18 You should have received a copy of the GNU General Public License
\r
19 along with this program; if not, write to the Free Software
\r
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
\r
22 The authors can be reached by email at
\r
26 rwmcgwier@comcast.net
\r
30 The DTTS Microwave Society
\r
32 Bridgewater, NJ 08807
\r
39 #include <fromsys.h>
\r
41 #define min(a, b) ((a) < (b) ? (a) : (b))
\r
44 #define max(a, b) ((a) > (b) ? (a) : (b))
\r
46 #define abs(a) ((a) >= 0 ? (a) : -(a))
\r
58 sqr(double x) { return x * x; }
\r
64 for (i = 1; i < 32; i++) c += (k >> i) & 01;
\r
72 while (n > 0) n >>= 1, i++;
\r
77 nblock2(int n) { return 1 << npoof2(n); }
\r
79 extern int in_blocks(int count, int block_size);
\r
80 extern FILE *efopen(char *path, char *mode);
\r
81 extern FILE *efreopen(char *path, char *mode, FILE *strm);
\r
82 extern size_t filesize(char *path);
\r
83 extern size_t fdsize(int fd);
\r
85 extern struct timeval now_tv(void);
\r
86 extern struct timeval diff_tv(struct timeval *, struct timeval *);
\r
87 extern struct timeval sum_tv(struct timeval *, struct timeval *);
\r
88 extern char *fmt_tv(struct timeval *);
\r
89 extern char *since(struct timeval *);
\r
90 extern struct timeval now_tv(void);
\r
92 extern int hinterp_vec(REAL *, int, REAL *, int);
\r