initial import
[ICEs.git] / 138653 / ice.ii
1 struct SPStyle {
2 float value;
3 float computed;
4 };
5 template < typename _Iterator > class __normal_iterator {
6 _Iterator _M_current;
7 public:explicit __normal_iterator(const _Iterator & __i):_M_current(__i)
8 {
9 }
10 const _Iterator & base() const {
11 return _M_current;
12 }
13 };
14 template < typename _Iterator > inline int operator-(const __normal_iterator <
15 _Iterator > &__lhs,
16 const __normal_iterator <
17 _Iterator > &__rhs)
18 {
19 return __lhs.base() - __rhs.base();
20 }
21 template < typename _Tp > struct _Vector_base {
22 struct _Vector_impl {
23 _Tp *finish;
24 };
25 public: _Vector_impl _M_impl;
26 };
27 template < typename _Tp > class vector:protected _Vector_base < _Tp > {
28 public:unsigned int size() const {
29 return __normal_iterator <
30 const _Tp *>(this->_M_impl.finish) - __normal_iterator <
31 const _Tp *>(this->_M_impl.finish);
32 } const _Tp & operator[] (unsigned int __n)const {
33 }};
34 class Layout {
35 public:class iterator;
36 iterator end() const;
37 unsigned lineIndex(iterator const &) const;
38 struct Chunk {
39 unsigned in_line;
40 };
41 struct Character {
42 Chunk const &chunk(Layout const *l) const {
43 }};
44 vector < Character > _characters;
45 };
46 class Layout::iterator {
47 public:unsigned _char_index;
48 iterator(Layout const *p, unsigned c, int g):_char_index(c) {
49 }
50 };
51 inline Layout::iterator Layout::end() const
52 {
53 return iterator(this, _characters.size(), _characters.size());
54 }
55 inline unsigned Layout::lineIndex(iterator const &it) const
56 {
57 return it._char_index ==
58 _characters.size()? 1 : _characters[0].chunk(this).in_line;
59 }
60
61 void sp_te_adjust_linespacing_screen()
62 {
63 double by;
64 Layout *layout;
65 SPStyle *style;
66 unsigned line_count = layout->lineIndex(layout->end());
67 double average_line_height = by / line_count;
68 style->computed =
69 (style->computed ? by : (average_line_height) /
70 average_line_height);
71 style->value =
72 (style->value ? by : (average_line_height) / average_line_height);
73 }