| 787 |
return 0; |
return 0; |
| 788 |
} |
} |
| 789 |
|
|
| 790 |
int query_section_articles(SECTION_LIST *p_section, int page_id, ARTICLE *p_articles[], int *p_article_count, int *p_page_count) |
int query_section_articles(SECTION_LIST *p_section, int page_id, ARTICLE *p_articles[], |
| 791 |
|
int *p_article_count, int *p_page_count, int *p_ontop_start_offset) |
| 792 |
{ |
{ |
| 793 |
ARTICLE *p_article; |
ARTICLE *p_article; |
| 794 |
ARTICLE *p_next_page_first_article; |
ARTICLE *p_next_page_first_article; |
| 795 |
int ret = 0; |
int ret = 0; |
| 796 |
int i; |
int i; |
| 797 |
|
|
| 798 |
if (p_section == NULL || p_articles == NULL || p_article_count == NULL || p_page_count == NULL) |
if (p_section == NULL || p_articles == NULL || p_article_count == NULL || p_page_count == NULL || p_ontop_start_offset == NULL) |
| 799 |
{ |
{ |
| 800 |
log_error("query_section_articles() NULL pointer error\n"); |
log_error("query_section_articles() NULL pointer error\n"); |
| 801 |
return -1; |
return -1; |
| 810 |
|
|
| 811 |
*p_page_count = section_list_page_count_with_ontop(p_section); |
*p_page_count = section_list_page_count_with_ontop(p_section); |
| 812 |
*p_article_count = 0; |
*p_article_count = 0; |
| 813 |
|
*p_ontop_start_offset = BBS_article_limit_per_page; |
| 814 |
|
|
| 815 |
if (p_section->visible_article_count == 0) |
if (p_section->visible_article_count == 0) |
| 816 |
{ |
{ |
| 847 |
} |
} |
| 848 |
} |
} |
| 849 |
|
|
| 850 |
|
*p_ontop_start_offset = *p_article_count; |
| 851 |
|
|
| 852 |
// Append ontop articles |
// Append ontop articles |
| 853 |
if (page_id >= p_section->page_count - 1) |
if (page_id >= p_section->page_count - 1) |
| 854 |
{ |
{ |