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

Diff of /lbbs/src/article_view_log.c

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

Revision 1.14 by sysadm, Wed Oct 15 03:10:47 2025 UTC Revision 1.18 by sysadm, Tue Nov 11 00:28:05 2025 UTC
# Line 1  Line 1 
1  /***************************************************************************  /* SPDX-License-Identifier: GPL-3.0-or-later */
2                                           article_view_log.c  -  description  /*
3                                                           -------------------   * article_view_log
4          Copyright            : (C) 2004-2025 by Leaflet   *   - data persistence and query of article view log
5          Email                : leaflet@leafok.com   *
6   ***************************************************************************/   * Copyright (C) 2004-2025  Leaflet <leaflet@leafok.com>
7     */
8  /***************************************************************************  
9   *                                                                         *  #ifdef HAVE_CONFIG_H
10   *   This program is free software; you can redistribute it and/or modify  *  #include "config.h"
11   *   it under the terms of the GNU General Public License as published by  *  #endif
  *   the Free Software Foundation; either version 3 of the License, or     *  
  *   (at your option) any later version.                                   *  
  *                                                                         *  
  ***************************************************************************/  
12    
13  #include "article_view_log.h"  #include "article_view_log.h"
14  #include "common.h"  #include "common.h"
# Line 278  int article_view_log_is_viewed(int32_t a Line 274  int article_view_log_is_viewed(int32_t a
274                          mid = (left + right) / 2;                          mid = (left + right) / 2;
275                          if (aid < (i == 0 ? p_view_log->aid_base[mid] : p_view_log->aid_inc[mid]))                          if (aid < (i == 0 ? p_view_log->aid_base[mid] : p_view_log->aid_inc[mid]))
276                          {                          {
277                                  right = mid;                                  right = mid - 1;
278                          }                          }
279                          else if (aid > (i == 0 ? p_view_log->aid_base[mid] : p_view_log->aid_inc[mid]))                          else if (aid > (i == 0 ? p_view_log->aid_base[mid] : p_view_log->aid_inc[mid]))
280                          {                          {
# Line 327  int article_view_log_set_viewed(int32_t Line 323  int article_view_log_set_viewed(int32_t
323                          mid = (left + right) / 2;                          mid = (left + right) / 2;
324                          if (aid < (i == 0 ? p_view_log->aid_base[mid] : p_view_log->aid_inc[mid]))                          if (aid < (i == 0 ? p_view_log->aid_base[mid] : p_view_log->aid_inc[mid]))
325                          {                          {
326                                  right = mid;                                  right = mid - 1;
327                          }                          }
328                          else if (aid > (i == 0 ? p_view_log->aid_base[mid] : p_view_log->aid_inc[mid]))                          else if (aid > (i == 0 ? p_view_log->aid_base[mid] : p_view_log->aid_inc[mid]))
329                          {                          {


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

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