OSDN Git Service

parted: change default alignment to "optimal"
[android-x86/external-parted.git] / parted / strlist.h
1 /*
2     parted - a frontend to libparted
3     Copyright (C) 1999-2001, 2007, 2009-2010 Free Software Foundation,
4     Inc.
5
6     This program is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 3 of the License, or
9     (at your option) any later version.
10
11     This program is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef STRLIST_H_INCLUDED
21 #define STRLIST_H_INCLUDED
22
23 #include <wchar.h>
24
25 #ifndef ENABLE_NLS
26 #       define L_(str) str
27 #       ifdef wchar_t
28 #               undef wchar_t
29 #       endif
30 #       define wchar_t char
31 #endif
32
33 typedef struct _StrList StrList;
34 struct _StrList {
35         StrList*        next;
36         const wchar_t*  str;
37 };
38
39 extern char* language;
40 extern char* gettext_charset;
41 extern char* term_charset;
42
43 extern StrList* str_list_create (const char* first, ...);
44 extern StrList* str_list_create_unique (const char* first, ...);
45 extern void str_list_destroy (StrList* list);
46 extern void str_list_destroy_node (StrList* list);
47
48 extern StrList* str_list_duplicate (const StrList* list);
49 extern StrList* str_list_duplicate_node (const StrList* list);
50 extern StrList* str_list_insert (StrList* list, const char* str);
51 extern StrList* str_list_append (StrList* list, const char* str);
52 extern StrList* str_list_append_unique (StrList* list, const char* str);
53 extern StrList* str_list_join (StrList* a, StrList* b);
54 extern char* str_list_convert (const StrList* list);
55 extern char* str_list_convert_node (const StrList* list);
56
57 extern void str_list_print (const StrList* list);
58 extern void str_list_print_wrap (const StrList* list, int line_length,
59                                  int offset, int indent);
60 extern int str_list_match_any (const StrList* list, const char* str);
61 extern int str_list_match_node (const StrList* list, const char* str);
62 extern StrList* str_list_match (const StrList* list, const char* str);
63
64 extern int str_list_length (const StrList* list);
65
66 #endif /* STRLIST_H_INCLUDED */
67