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

Annotation of /lbbs/include/article_cache.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations)
Sat May 31 02:42:24 2025 UTC (9 months, 2 weeks ago) by sysadm
Branch: MAIN
Changes since 1.3: +1 -0 lines
Content type: text/x-chdr
Use mmap instead of malloc

1 sysadm 1.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 "str_process.h"
22     #include "section_list.h"
23    
24     struct article_cache_t
25     {
26 sysadm 1.4 void *p_mmap;
27 sysadm 1.2 char *p_data;
28 sysadm 1.1 size_t data_len;
29     long line_total;
30     long line_offsets[MAX_SPLIT_FILE_LINES];
31     };
32     typedef struct article_cache_t ARTICLE_CACHE;
33    
34 sysadm 1.3 extern int article_cache_generate(const char *cache_dir, const ARTICLE *p_article, const SECTION_LIST *p_section, const char *content, int overwrite);
35 sysadm 1.1
36     extern int article_cache_load(ARTICLE_CACHE *p_cache, const char *cache_dir, const ARTICLE *p_article);
37     extern int article_cache_unload(ARTICLE_CACHE *p_cache);
38    
39     #endif //_ARTICLE_CACHE_H_

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