int WikiManage::wiki_forward(char *status, char **buf, int *size) { const cache_t *p = m_wiki_history->wh_forward_cache(); if (p == NULL) return 0; if (p->flag == STATUS_CONTENT) { strcpy(status, "1"); return wiki_curr(buf, size); } strcpy(status, "2"); *buf = (char *)p->key.title; return 1; }
int WikiManage::wiki_back(char *status, char **buf, int *size) { const cache_t *p = m_wiki_history->wh_back_cache(); if (p == NULL) return 0; if (p->flag == STATUS_CONTENT) { strcpy(status, "1"); return wiki_curr(buf, size); } else if (p->flag == STATUS_FULL_TEXT) { strcpy(status, "1"); return wiki_full_search(p->key.title, buf, size, m_search_buf.curr_page); } strcpy(status, "2"); *buf = (char *)p->key.title; return 1; }