/[LeafOK_CVS]/lbbs/src/user_stat.c
ViewVC logotype

Diff of /lbbs/src/user_stat.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.2 by sysadm, Thu Oct 23 05:54:16 2025 UTC Revision 1.5 by sysadm, Tue Nov 4 14:58:56 2025 UTC
# Line 1  Line 1 
1  /***************************************************************************  /* SPDX-License-Identifier: GPL-3.0-or-later */
2                                                   user_list.c  -  description  /*
3                                                           -------------------   * user_stat
4          Copyright            : (C) 2004-2025 by Leaflet   *   - data model and basic operations of user related statistics
5          Email                : leaflet@leafok.com   *
6   ***************************************************************************/   * Copyright (C) 2004-2025  Leaflet <leaflet@leafok.com>
7     */
 /***************************************************************************  
  *                                                                         *  
  *   This program is free software; you can redistribute it and/or modify  *  
  *   it under the terms of the GNU General Public License as published by  *  
  *   the Free Software Foundation; either version 3 of the License, or     *  
  *   (at your option) any later version.                                   *  
  *                                                                         *  
  ***************************************************************************/  
8    
9  #include "log.h"  #include "log.h"
10  #include "section_list.h"  #include "section_list.h"
# Line 74  int user_stat_map_update(USER_STAT_MAP * Line 66  int user_stat_map_update(USER_STAT_MAP *
66                          log_error("article_block_find_by_index(index=%d) error\n", i);                          log_error("article_block_find_by_index(index=%d) error\n", i);
67                          break;                          break;
68                  }                  }
69                    
70                  if (p_article->visible == 0)                  if (p_article->visible == 0)
71                  {                  {
72                          continue;                          continue;
# Line 121  int user_stat_article_cnt_inc(USER_STAT_ Line 113  int user_stat_article_cnt_inc(USER_STAT_
113                  mid = (left + right) / 2;                  mid = (left + right) / 2;
114                  if (uid < p_map->stat_list[mid].uid)                  if (uid < p_map->stat_list[mid].uid)
115                  {                  {
116                          right = mid;                          right = mid - 1;
117                  }                  }
118                  else if (uid > p_map->stat_list[mid].uid)                  else if (uid > p_map->stat_list[mid].uid)
119                  {                  {
# Line 163  int user_stat_get(USER_STAT_MAP *p_map, Line 155  int user_stat_get(USER_STAT_MAP *p_map,
155                  mid = (left + right) / 2;                  mid = (left + right) / 2;
156                  if (uid < p_map->stat_list[mid].uid)                  if (uid < p_map->stat_list[mid].uid)
157                  {                  {
158                          right = mid;                          right = mid - 1;
159                  }                  }
160                  else if (uid > p_map->stat_list[mid].uid)                  else if (uid > p_map->stat_list[mid].uid)
161                  {                  {


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

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