1 /*- 2 * Copyright (c) 2011 Michihiro NAKAJIMA 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * 14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR 15 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, 18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * 25 * $FreeBSD$ 26 */ 27 28 #ifndef __LIBARCHIVE_BUILD 29 #error This header is only to be used internally to libarchive. 30 #endif 31 32 #ifndef ARCHIVE_ENTRY_LOCALE_H_INCLUDED 33 #define ARCHIVE_ENTRY_LOCALE_H_INCLUDED 34 35 struct archive_entry; 36 struct archive_string_conv; 37 38 /* 39 * Utility functions to set and get entry attributes by translating 40 * character-set. These are designed for use in format readers and writers. 41 * 42 * The return code and interface of these are quite different from other 43 * functions for archive_entry defined in archive_entry.h. 44 * Common return code are: 45 * Return 0 if the string conversion succeeded. 46 * Return -1 if the string conversion failed. 47 */ 48 49 #define archive_entry_gname_l _archive_entry_gname_l 50 int _archive_entry_gname_l(struct archive_entry *, 51 const char **, size_t *, struct archive_string_conv *); 52 #define archive_entry_hardlink_l _archive_entry_hardlink_l 53 int _archive_entry_hardlink_l(struct archive_entry *, 54 const char **, size_t *, struct archive_string_conv *); 55 #define archive_entry_pathname_l _archive_entry_pathname_l 56 int _archive_entry_pathname_l(struct archive_entry *, 57 const char **, size_t *, struct archive_string_conv *); 58 #define archive_entry_symlink_l _archive_entry_symlink_l 59 int _archive_entry_symlink_l(struct archive_entry *, 60 const char **, size_t *, struct archive_string_conv *); 61 #define archive_entry_uname_l _archive_entry_uname_l 62 int _archive_entry_uname_l(struct archive_entry *, 63 const char **, size_t *, struct archive_string_conv *); 64 #define archive_entry_acl_text_l _archive_entry_acl_text_l 65 int _archive_entry_acl_text_l(struct archive_entry *, int, 66 const char **, size_t *, struct archive_string_conv *); 67 68 69 #define archive_entry_copy_gname_l _archive_entry_copy_gname_l 70 int _archive_entry_copy_gname_l(struct archive_entry *, 71 const char *, size_t, struct archive_string_conv *); 72 #define archive_entry_copy_hardlink_l _archive_entry_copy_hardlink_l 73 int _archive_entry_copy_hardlink_l(struct archive_entry *, 74 const char *, size_t, struct archive_string_conv *); 75 #define archive_entry_copy_link_l _archive_entry_copy_link_l 76 int _archive_entry_copy_link_l(struct archive_entry *, 77 const char *, size_t, struct archive_string_conv *); 78 #define archive_entry_copy_pathname_l _archive_entry_copy_pathname_l 79 int _archive_entry_copy_pathname_l(struct archive_entry *, 80 const char *, size_t, struct archive_string_conv *); 81 #define archive_entry_copy_symlink_l _archive_entry_copy_symlink_l 82 int _archive_entry_copy_symlink_l(struct archive_entry *, 83 const char *, size_t, struct archive_string_conv *); 84 #define archive_entry_copy_uname_l _archive_entry_copy_uname_l 85 int _archive_entry_copy_uname_l(struct archive_entry *, 86 const char *, size_t, struct archive_string_conv *); 87 88 #endif /* ARCHIVE_ENTRY_LOCALE_H_INCLUDED */ 89