--- lbbs/src/test_file_loader.c 2025/05/27 07:21:43 1.6 +++ lbbs/src/test_file_loader.c 2025/11/05 06:14:01 1.12 @@ -1,28 +1,20 @@ -/*************************************************************************** - file_loader.c - description - ------------------- - Copyright : (C) 2004-2025 by Leaflet - Email : leaflet@leafok.com - ***************************************************************************/ - -/*************************************************************************** - * * - * 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. * - * * - ***************************************************************************/ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +/* + * test_file_loader + * - tester for shared memory based file loader + * + * Copyright (C) 2004-2025 Leaflet + */ #include "file_loader.h" -#include "trie_dict.h" #include "log.h" +#include "trie_dict.h" +#include #include #include -#include #include -#define TRIE_DICT_SHM_FILE "~trie_dict_shm.dat" +static const char TRIE_DICT_SHM_FILE[] = "~trie_dict_shm.dat"; const char *files[] = { "../data/welcome.txt", @@ -51,8 +43,8 @@ int main(int argc, char *argv[]) return -1; } - log_std_redirect(STDOUT_FILENO); - log_err_redirect(STDERR_FILENO); + log_common_redir(STDOUT_FILENO); + log_error_redir(STDERR_FILENO); if ((fp = fopen(TRIE_DICT_SHM_FILE, "w")) == NULL) {