void require_new_page() { int m = alignment(); int size = int( page_provider_.page_size() / m * m ); page_header* new_page; if( unused_pages_ ) { // 1枚はがして持ってくる new_page = unused_pages_; unused_pages_ = new_page->next; } else { // 新たに割り当てる new_page = (page_header*)page_provider_.allocate( size ); #if 0 dprintf_real( "new_page: %s\n", name_.c_str() ); #endif } // 先頭に前のページへのポインタを埋め込む new_page->next = pages_head_; pages_head_ = new_page; unformated_beginning_ = ( ( char* )new_page ) + sizeof( page_header ); unformated_end_ = ( ( char* )new_page ) + size; }
static void bot_rd(char* botnick, char* code, char* msg) { size_t len = atoi(newsplit(&msg)); if (msg[0]) { int idx = atoi(newsplit(&msg)); if (msg[0]) dprintf_real(idx, msg, len, len); } }