| 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" |
| 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 |
{ |
{ |
| 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 |
{ |
{ |