--- lbbs/include/article_favor.h 2025/11/04 14:58:55 1.4 +++ lbbs/include/article_favor.h 2026/01/03 10:27:14 1.7 @@ -3,7 +3,7 @@ * article_favor * - data model and basic operations of user favorite articles * - * Copyright (C) 2004-2025 Leaflet + * Copyright (C) 2004-2026 Leaflet */ #ifndef _ARTICLE_FAVOR_H_ @@ -12,8 +12,11 @@ #include "section_list.h" #include -#define MAX_FAVOR_AID_BASE_CNT 10000 -#define MAX_FAVOR_AID_INC_CNT 1000 +enum article_favor_constant_t +{ + MAX_FAVOR_AID_BASE_CNT = 10000, + MAX_FAVOR_AID_INC_CNT = 1000, +}; struct article_favor_t { @@ -41,7 +44,7 @@ extern int article_favor_check(int32_t a // Set specific article as favorite extern int article_favor_set(int32_t aid, ARTICLE_FAVOR *p_favor, int state); -extern int query_favor_articles(ARTICLE_FAVOR *p_favor, int page_id, ARTICLE **p_articles, +extern int query_favor_articles(ARTICLE_FAVOR *p_favor, int page_id, const ARTICLE **p_articles, char p_snames[][BBS_section_name_max_len + 1], int *p_article_count, int *p_page_count); #endif //_ARTICLE_FAVOR_H_