]> git.donarmstrong.com Git - lilypond.git/blob - lily/template5.cc
release: 0.1.0
[lilypond.git] / lily / template5.cc
1 /*
2   template5.cc -- instantiate Intervals
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8
9 #include <limits.h>
10 #include "proto.hh"
11 #include "string.hh"
12 #include "moment.hh"
13 #include "real.hh"
14
15 #include "interval.tcc"
16
17 Interval__instantiate(Rational);
18 Interval__instantiate(int);
19
20 const Real INFTY_f = (Real)INT_MAX;
21 #if defined AIX || defined _WIN32
22 const Real INFTY = 1e8; // ARGh. AIX sucks -- so does doze
23 #else
24 const Real INFTY = HUGE_VAL;
25 #endif
26
27 Rational
28 Interval_t<Rational>::infinity()
29 {
30 /*
31   windhoze-suck-suck-suck-suck-suck-thank-you-cygnus
32
33   I get tired of all these incompatibilities. We'll just assume:
34
35   that 2^31 is *Big*
36
37  */
38
39     return Rational(INT_MAX);
40 }
41
42 int
43 Interval_t<int>::infinity()
44 {
45     return INT_MAX;
46 }