]> git.donarmstrong.com Git - lilypond.git/blob - lily/template5.cc
release: 0.0.78
[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 #ifdef AIX
21 const Real INFTY = 1e8; // ARGh. AIX sucks
22 #else
23 const Real INFTY = HUGE_VAL;
24 #endif
25
26 Rational
27 Interval_t<Rational>::infinity()
28 {
29 /*
30   windhoze-suck-suck-suck-suck-suck-thank-you-cygnus
31
32   I get tired of all these incompatibilities. We'll just assume:
33
34   that 2^31 is *Big*
35
36  */
37
38     return Rational(INT_MAX);
39 }
40
41 int
42 Interval_t<int>::infinity()
43 {
44     return INT_MAX;
45 }