/*#$% ====================================================== コールサインからポインタを得る ------------------------------------------------------ p : コールサインのポインタ ------------------------------------------------------ ポインタ ------------------------------------------------------ ====================================================== */ int CCountry::GetNoP(LPCSTR p) { int n; svf = 1; if( (n = GetNo(p))!=0 ) return(n); svf = 0; if( (n = GetNo(p))!=0 ) return(n); return(0); }
// send accumulated pages if we filled the buffer or the caller forces us void EbookFormattingThread::SendPagesIfNecessary(bool force, bool finished) { if (finished) force = true; if (!force && (pageCount < dimof(pages))) return; EbookFormattingData *msg = new EbookFormattingData(pages, pageCount, finished, GetNo()); //lf("ThreadLayoutEbook::SendPagesIfNecessary() sending %d pages, finished=%d", pageCount, (int)finished); pageCount = 0; memset(pages, 0, sizeof(pages)); cb->HandleLayoutedPages(controller, msg); }
// send accumulated pages if we filled the buffer or the caller forces us void EbookFormattingThread::SendPagesIfNecessary(bool force, bool finished, bool fromBeginning) { if (finished) force = true; if (!force && (pageCount < dimof(pages))) return; EbookFormattingTask *msg = new EbookFormattingTask(pages, pageCount, fromBeginning, finished, controller, GetNo()); //lf("ThreadLayoutEbook::SendPagesIfNecessary() sending %d pages, finished=%d", pageCount, (int)finished); pageCount = 0; memset(pages, 0, sizeof(pages)); uitask::Post(msg); }
// send accumulated pages if we filled the buffer or the caller forces us void EbookFormattingThread::SendPagesIfNecessary(bool force, bool finished, bool fromBeginning) { if (finished) force = true; if (!force && (pageCount < dimof(pages))) return; EbookFormattingTask *msg = new EbookFormattingTask(); msg->finished = finished; msg->fromBeginning = fromBeginning; if (pageCount > 0) memcpy(msg->pages, pages, pageCount * sizeof(HtmlPage*)); //lf("ThreadLayoutEbook::SendPagesIfNecessary() sending %d pages, finished=%d", pageCount, (int)finished); msg->pageCount = pageCount; msg->threadNo = GetNo(); msg->controller = controller; pageCount = 0; memset(pages, 0, sizeof(pages)); uitask::Post(msg); }