1 | /* -*- c-basic-offset: 2 -*- */ |
2 | /* |
3 | Copyright(C) 2010-2016 Brazil |
4 | |
5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Lesser General Public |
7 | License version 2.1 as published by the Free Software Foundation. |
8 | |
9 | This library is distributed in the hope that it will be useful, |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | Lesser General Public License for more details. |
13 | |
14 | You should have received a copy of the GNU Lesser General Public |
15 | License along with this library; if not, write to the Free Software |
16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
17 | */ |
18 | |
19 | #pragma once |
20 | |
21 | #include "grn.h" |
22 | #include "grn_ctx.h" |
23 | |
24 | #ifdef __cplusplus |
25 | extern "C" { |
26 | #endif |
27 | |
28 | GRN_API grn_rc grn_normalize_offset_and_limit(grn_ctx *ctx, int size, int *offset, int *limit); |
29 | |
30 | GRN_API char *grn_path_separator_to_system(char *dest, char *groonga_path); |
31 | |
32 | void grn_p_record(grn_ctx *ctx, grn_obj *table, grn_id id); |
33 | |
34 | /* |
35 | * grn_mkstemp generates a unique filename from path_template, creates a |
36 | * file with permissions 0600 and returns a open file desciptor for the file. |
37 | * The last 6 bytes of path_template must be "XXXXXX" and these are replaced |
38 | * with a string that makes the filename unique. |
39 | */ |
40 | int grn_mkstemp(char *path_template); |
41 | grn_bool grn_path_exist(const char *path); |
42 | |
43 | int grn_tokenize(const char *str, size_t str_len, |
44 | const char **tokbuf, int buf_size, |
45 | const char **rest); |
46 | |
47 | #ifdef __cplusplus |
48 | } |
49 | #endif |
50 | |