Papageno
An Advanced Pattern Matching Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
ppg_compression.h
1 /* Copyright 2017 noseglasses <shinynoseglasses@gmail.com>
2  *
3  * This program is free software: you can redistribute it and/or modify
4  * it under the terms of the GNU Lesser General Public License as published by
5  * the Free Software Foundation, either version 3 of the License, or
6  * (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef PPG_COMPRESSION_H
18 #define PPG_COMPRESSION_H
19 
20 #include "stddef.h"
21 
22 typedef void * PPG_Compression_Context;
23 
24 PPG_Compression_Context ppg_compression_init(void);
25 
26 void ppg_compression_finalize(PPG_Compression_Context ccontext);
27 
28 void ppg_compression_register_symbol(
29  PPG_Compression_Context ccontext,
30  void *symbol,
31  char *symbol_name);
32 
33 #define PPG_COMPRESSION_STRINGIZE(S) #S
34 
35 #define PPG_COMPRESSION_REGISTER_SYMBOL(CONTEXT, S) \
36  \
37  ppg_compression_register_symbol( \
38  CONTEXT, \
39  &S, \
40  PPG_COMPRESSION_STRINGIZE(S));
41 
42 void ppg_compression_run( PPG_Compression_Context ccontext,
43  char *name_tag);
44 
45 void ppg_compression_setup_context(void *context);
46 
47 #endif