/[LeafOK_CVS]/lbbs/include/user_stat.h
ViewVC logotype

Annotation of /lbbs/include/user_stat.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Thu Oct 23 04:09:33 2025 UTC (4 months, 3 weeks ago) by sysadm
Branch: MAIN
Content type: text/x-chdr
Add user_stat

1 sysadm 1.1 /***************************************************************************
2     user_stat.h - description
3     -------------------
4     Copyright : (C) 2004-2025 by Leaflet
5     Email : leaflet@leafok.com
6     ***************************************************************************/
7    
8     /***************************************************************************
9     * *
10     * This program is free software; you can redistribute it and/or modify *
11     * it under the terms of the GNU General Public License as published by *
12     * the Free Software Foundation; either version 3 of the License, or *
13     * (at your option) any later version. *
14     * *
15     ***************************************************************************/
16    
17     #ifndef _USER_STAT_H_
18     #define _USER_STAT_H_
19    
20     #include "bbs.h"
21     #include <sys/types.h>
22    
23     struct user_stat_t
24     {
25     int32_t uid;
26     int article_count;
27     };
28     typedef struct user_stat_t USER_STAT;
29    
30     struct user_stat_map_t
31     {
32     USER_STAT stat_list[BBS_max_user_count];
33     int user_count;
34     int32_t last_uid;
35     int last_article_index;
36     };
37     typedef struct user_stat_map_t USER_STAT_MAP;
38    
39     extern int user_stat_map_init(USER_STAT_MAP *p_map);
40     extern int user_stat_map_update(USER_STAT_MAP *p_map);
41    
42     extern int user_stat_article_cnt_inc(USER_STAT_MAP *p_map, int32_t uid, int n);
43     extern int user_stat_get(USER_STAT_MAP *p_map, int32_t uid, const USER_STAT **pp_stat);
44    
45     #endif //_USER_STAT_H_

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1