| 1 |
/*************************************************************************** |
/* SPDX-License-Identifier: GPL-3.0-or-later */ |
| 2 |
test_section_list.c - description |
/* |
| 3 |
------------------- |
* test_section_list |
| 4 |
Copyright : (C) 2004-2025 by Leaflet |
* - tester for data models and basic operations of section and article |
| 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 "bbs.h" |
#include "bbs.h" |
| 10 |
#include "log.h" |
#include "log.h" |
| 68 |
log_error_redir(STDERR_FILENO); |
log_error_redir(STDERR_FILENO); |
| 69 |
|
|
| 70 |
// - 1 to make blocks allocated is less than required, to trigger error handling |
// - 1 to make blocks allocated is less than required, to trigger error handling |
| 71 |
block_count = BBS_article_limit_per_section * BBS_max_section / ARTICLE_PER_BLOCK; |
block_count = BBS_article_limit_per_section * BBS_max_section / BBS_article_count_per_block; |
| 72 |
|
|
| 73 |
if ((fp = fopen(ARTICLE_BLOCK_SHM_FILE, "w")) == NULL) |
if ((fp = fopen(ARTICLE_BLOCK_SHM_FILE, "w")) == NULL) |
| 74 |
{ |
{ |