\File{util.h},{20:42},{Dec  7 1997}
\L{\LB{\C{}\/* \$Id: util.h,v 1.5 1997\/12\/08 01:42:45 bert Exp \$}}
\L{\LB{ * header for random helper functions}}
\L{\LB{ *\/\CE{}}}
\L{\LB{}}
\L{\LB{\K{\#ifndef} \_UTIL\_H}}
\L{\LB{\K{\#define} \_UTIL\_H}}
\L{\LB{}}
\L{\LB{\K{\#include} \<stdlib.h\>}}
\L{\LB{\K{\#include} \S{}\"complex.h\"\SE{}}}
\L{\LB{}}
\L{\LB{\K{extern} \K{char}* progname;}}
\L{\LB{}}
\L{\LB{\C{}\/* allocate data, do not return unless it succeeds *\/\CE{}}}
\L{\LB{\K{void} *safe\_malloc(size\_t, \K{char}*);}}
\L{\LB{\C{}\/* copy an NxN array (A \-\> B) *\/\CE{}}}
\L{\LB{\K{void} copy\_data (\K{complex} *A, \K{complex} *B, \K{long} n);}}
\L{\LB{}}
\L{\LB{\K{void} dump\_Re(\K{complex}*, \K{long}, \K{char}*);}}
\L{\LB{\K{void} dump\_Im(\K{complex}*, \K{long}, \K{char}*);}}
\L{\LB{\K{void} dump\_absolute(\K{complex}*, \K{long}, \K{char}*);}}
\L{\LB{}}
\L{\LB{\C{}\/* The following macro rounds a number down, unless it is really}}
\L{\LB{ * close.  We need it because memory representations on Intel}}
\L{\LB{ * platforms otherwise do very strange things when rounding.}}
\L{\LB{ *\/\CE{}}}
\L{\LB{\K{\#define} round\_down\_sane(x)   floor((x)+0.000001)}}
\L{\LB{}}
\L{\LB{\K{\#endif}}}
