OSDN Git Service

support the variable(mounting and has many bugs)
[liveml/LiveML.git] / src / calcu.h
1 /**
2  * calcu - original calculation.
3  *
4  * MIT License
5  * Copyright (C) 2010 Nothan
6  * http://github.com/nothan/c-utils/
7  * All rights reserved.
8  *
9  * Permission is hereby granted, free of charge, to any person obtaining a copy
10  * of this software and associated documentation files (the "Software"), to deal
11  * in the Software without restriction, including without limitation the rights
12  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13  * copies of the Software, and to permit persons to whom the Software is
14  * furnished to do so, subject to the following conditions:
15  *
16  * The above copyright notice and this permission notice shall be included in all
17  * copies or substantial portions of the Software.
18  *
19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25  * SOFTWARE.
26  *
27  * Nothan
28  * private@nothan.xrea.jp
29  *
30  * Tsuioku Denrai
31  * http://tsuioku-denrai.xrea.jp/
32  */
33
34 #ifndef __CALCU_H__
35 #define __CALCU_H__
36
37 #include "stack.h"
38 #include "fixed_float.h"
39
40 typedef unsigned short variable_size;
41
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45
46 fixed_float calcu_decode(const char*, fixed_float (*)(variable_size, void*), void*);
47 char* calcu_encode(char*, variable_size (*)(const char*, void*), void*);
48 int calcu_data_size(const char*);
49
50 #ifdef __cplusplus
51 }
52 #endif
53
54 #endif