… | |
… | |
819 | extern class rxvt_composite_vec rxvt_composite; |
819 | extern class rxvt_composite_vec rxvt_composite; |
820 | #endif |
820 | #endif |
821 | |
821 | |
822 | // expand the sequence into a static array |
822 | // expand the sequence into a static array |
823 | // works even without ENABLE_COMBINING |
823 | // works even without ENABLE_COMBINING |
824 | template<typename T> |
824 | template<typename T, int max_size_ = 48> |
825 | struct rxvt_compose_expand_static |
825 | struct rxvt_compose_expand_static |
826 | { |
826 | { |
827 | #if ENABLE_COMBINING |
827 | #if ENABLE_COMBINING |
828 | // we arbitrarily limit the maximum number of compose sequences |
|
|
829 | // so we can store them in a static array on the stack. |
|
|
830 | enum { max_size = 48 }; |
828 | enum { max_size = max_size_ }; |
831 | |
829 | |
832 | T chrs[max_size]; |
830 | T chrs[max_size]; |
833 | |
831 | |
834 | // expand sequence and return start ptr |
832 | // expand sequence and return start ptr |
835 | // guarantees at least one output |
833 | // guarantees at least one output |