chiark
/
gitweb
/
~ian
/
moebius2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
initial cut of X client
[moebius2.git]
/
common.h
diff --git
a/common.h
b/common.h
index 77589f98c45dcbba5770130e0d13fd317a14ab60..d6d1e58c8fc768f32550fae2a82d664e208213e5 100644
(file)
--- a/
common.h
+++ b/
common.h
@@
-5,10
+5,17
@@
#ifndef COMMON_H
#define COMMON_H
#ifndef COMMON_H
#define COMMON_H
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#define _GNU_SOURCE
+#endif
+
#include <math.h>
#include <float.h>
#include <limits.h>
#include <math.h>
#include <float.h>
#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <errno.h>
#define D3 3
#define D3 3
@@
-17,6
+24,15
@@
double hypotD2(const double p[D3], const double q[D3]);
double hypotD2plus(const double p[D3], const double q[D3], double add);
double magnD(const double pq[D3]);
double hypotD2plus(const double p[D3], const double q[D3], double add);
double magnD(const double pq[D3]);
+void xprod(double r[D3], const double a[D3], const double b[D3]);
+
+void flushoutput(void);
+void diee(const char *what);
+
+#define FOR_COORD(k) \
+ for ((k)=0; (k)<D3; (k)++)
+
+#define K FOR_COORD(k)
#ifdef FP_FAST_FMA
# define fma_fast fma
#ifdef FP_FAST_FMA
# define fma_fast fma