Logo Search packages:      
Sourcecode: yaskkserv version File versions  Download package

void SkkSimpleString::append ( const void *  p  )  [inline]

文字列を追加します。.

Attention:
文字列は \0 で終端されます。

Definition at line 590 of file skk_simple_string.hpp.

References getSize(), and overwrite().

        {
                const int terminator_size = 1;
                int size = buffer_ + buffer_size_ - MARGIN_SIZE - current_ - terminator_size;

                DEBUG_ASSERT((size >= 1) &&
                             (size < buffer_size_ - MARGIN_SIZE * 2));
#ifdef YASKKSERV_DEBUG_PARANOIA
                const int append_terminator_legth = 1;
                int tmp = buffer_ + buffer_size_ - MARGIN_SIZE - (current_ + getSize(p) + append_terminator_legth - 1) - terminator_size;
                DEBUG_ASSERT_RANGE(tmp,
                                   1,
                                   buffer_size_ - MARGIN_SIZE * 2 - 1);
                DEBUG_ASSERT_RANGE(getSize(p),
                                   0,
                                   buffer_size_ - MARGIN_SIZE * 2 - 1);
#endif  // YASKKSERV_DEBUG_PARANOIA

                current_ = overwrite(p,
                                     current_,
                                     size);
                *current_ = '\0';
                update_string();
        }


Generated by  Doxygen 1.6.0   Back to index