/[LeafOK_CVS]/lbbs/include/article_cache.h
ViewVC logotype

Contents of /lbbs/include/article_cache.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations)
Sat Jun 21 06:52:24 2025 UTC (8 months, 3 weeks ago) by sysadm
Branch: MAIN
Changes since 1.7: +1 -0 lines
Content type: text/x-chdr
Refine to reduce Valgrind warnings

1 /***************************************************************************
2 article_cache.h - description
3 -------------------
4 Copyright : (C) 2004-2025 by Leaflet
5 Email : leaflet@leafok.com
6 ***************************************************************************/
7
8 /***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 3 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16
17 #ifndef _ARTICLE_CACHE_H_
18 #define _ARTICLE_CACHE_H_
19
20 #include "common.h"
21 #include "section_list.h"
22 #include "str_process.h"
23
24 struct article_cache_t
25 {
26 void *p_mmap;
27 size_t mmap_len;
28 char *p_data;
29 size_t data_len;
30 long line_total;
31 long line_offsets[MAX_SPLIT_FILE_LINES];
32 };
33 typedef struct article_cache_t ARTICLE_CACHE;
34
35 extern int article_cache_generate(const char *cache_dir, const ARTICLE *p_article, const SECTION_LIST *p_section,
36 const char *content, const char *sub_ip, int overwrite);
37 extern void article_cache_cleanup(void);
38
39 extern int article_cache_load(ARTICLE_CACHE *p_cache, const char *cache_dir, const ARTICLE *p_article);
40 extern int article_cache_unload(ARTICLE_CACHE *p_cache);
41
42 #endif //_ARTICLE_CACHE_H_

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