2 * Include file for FUSE interface module utf8 conversions for libcaptive
3 * Copyright (C) 2002-2005 Jan Kratochvil <project-captive@jankratochvil.net>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; exactly version 2 of June 1991 is required
9 * This program 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
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #ifndef _CAPTIVE_CLIENT_FUSE_UTF8_H
21 #define _CAPTIVE_CLIENT_FUSE_UTF8_H 1
24 #include <captive/macros.h>
29 char *capfuse_filename_to_utf8_malloc_errorchecking(const char *name);
30 char *capfuse_filename_from_utf8_malloc_errorchecking(const char *name);
32 #define CAPFUSE_FILENAME_TO_UTF8_ALLOCA(name) ({ \
33 const char *_capfuse_filename_to_utf8_alloca_name=(name); \
34 char *_capfuse_filename_to_utf8_alloca_r_malloc; \
35 const char *_capfuse_filename_to_utf8_alloca_r; \
37 _capfuse_filename_to_utf8_alloca_r_malloc=capfuse_filename_to_utf8_malloc_errorchecking( \
38 _capfuse_filename_to_utf8_alloca_name); \
39 if (!_capfuse_filename_to_utf8_alloca_r_malloc) \
40 _capfuse_filename_to_utf8_alloca_r=_capfuse_filename_to_utf8_alloca_name; \
42 _capfuse_filename_to_utf8_alloca_r=captive_strdup_alloca(_capfuse_filename_to_utf8_alloca_r_malloc); \
43 g_free(_capfuse_filename_to_utf8_alloca_r_malloc); \
45 _capfuse_filename_to_utf8_alloca_r; \
51 #endif /* _CAPTIVE_CLIENT_FUSE_UTF8_H */