| 307 |
{ |
{ |
| 308 |
printf("Count of articles in topic %d is different from expected %d != %d\n", |
printf("Count of articles in topic %d is different from expected %d != %d\n", |
| 309 |
j + 1, article_count, p_section[i]->article_count / group_count); |
j + 1, article_count, p_section[i]->article_count / group_count); |
| 310 |
break; |
// break; |
| 311 |
} |
} |
| 312 |
} |
} |
| 313 |
|
|
| 586 |
{ |
{ |
| 587 |
section_first_aid = p_section[i]->p_article_head->aid; |
section_first_aid = p_section[i]->p_article_head->aid; |
| 588 |
|
|
| 589 |
for (j = 0; j < group_count; j++) |
for (j = 0; j < group_count; j += 2) |
| 590 |
{ |
{ |
| 591 |
p_article = section_list_find_article_with_offset(p_section[i], section_first_aid + j, &page, &offset, &p_next); |
p_article = section_list_find_article_with_offset(p_section[i], section_first_aid + j, &page, &offset, &p_next); |
| 592 |
if (p_article == NULL) |
if (p_article == NULL) |
| 595 |
section_first_aid + j, i); |
section_first_aid + j, i); |
| 596 |
break; |
break; |
| 597 |
} |
} |
| 598 |
|
|
| 599 |
|
if (section_list_set_article_visible(p_section[i], p_article->aid, 0) != BBS_article_limit_per_section / group_count) |
| 600 |
|
{ |
| 601 |
|
printf("section_list_set_article_visible(aid = %d) error\n", p_article->aid); |
| 602 |
|
} |
| 603 |
} |
} |
| 604 |
} |
} |
| 605 |
|
|
| 622 |
printf("move topic (aid = %d) affected article count %d != %d\n", |
printf("move topic (aid = %d) affected article count %d != %d\n", |
| 623 |
section_first_aid + j, affected_count, |
section_first_aid + j, affected_count, |
| 624 |
BBS_article_limit_per_section / group_count); |
BBS_article_limit_per_section / group_count); |
| 625 |
break; |
// break; |
| 626 |
} |
} |
| 627 |
} |
} |
| 628 |
} |
} |
| 636 |
break; |
break; |
| 637 |
} |
} |
| 638 |
|
|
| 639 |
|
if (p_section[i]->visible_topic_count != (i < section_count / 2 ? 0 : group_count / 2)) |
| 640 |
|
{ |
| 641 |
|
printf("Visible topic count error in section %d, %d != %d\n", i, |
| 642 |
|
p_section[i]->visible_topic_count, (i < section_count / 2 ? 0 : group_count / 2)); |
| 643 |
|
break; |
| 644 |
|
} |
| 645 |
|
|
| 646 |
if (p_section[i]->article_count != (i < section_count / 2 ? 0 : BBS_article_limit_per_section)) |
if (p_section[i]->article_count != (i < section_count / 2 ? 0 : BBS_article_limit_per_section)) |
| 647 |
{ |
{ |
| 648 |
printf("Article count error in section %d, %d != %d\n", i, |
printf("Article count error in section %d, %d != %d\n", i, |
| 650 |
break; |
break; |
| 651 |
} |
} |
| 652 |
|
|
| 653 |
if (p_section[i]->page_count != (i < section_count / 2 ? 0 : BBS_article_limit_per_section / BBS_article_limit_per_page)) |
if (p_section[i]->visible_article_count != (i < section_count / 2 ? 0 : BBS_article_limit_per_section / 2)) |
| 654 |
|
{ |
| 655 |
|
printf("Visible article count error in section %d, %d != %d\n", i, |
| 656 |
|
p_section[i]->visible_article_count, (i < section_count / 2 ? 0 : BBS_article_limit_per_section / 2)); |
| 657 |
|
break; |
| 658 |
|
} |
| 659 |
|
|
| 660 |
|
if (p_section[i]->page_count != (i < section_count / 2 ? 0 : BBS_article_limit_per_section / 2 / BBS_article_limit_per_page)) |
| 661 |
{ |
{ |
| 662 |
printf("Page count error in section %d, %d != %d\n", i, |
printf("Page count error in section %d, %d != %d\n", i, |
| 663 |
p_section[i]->page_count, (i < section_count / 2 ? 0 : BBS_article_limit_per_section / BBS_article_limit_per_page)); |
p_section[i]->page_count, (i < section_count / 2 ? 0 : BBS_article_limit_per_section / 2 / BBS_article_limit_per_page)); |
| 664 |
break; |
break; |
| 665 |
} |
} |
| 666 |
} |
} |