7 * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
8 * Copyright (C) 2010, 2012, MinGW Project
11 * Declarations of the classes and properties used to implement the
12 * package data sheet compilers, for both CLI and GUI clients.
15 * This is free software. Permission is granted to copy, modify and
16 * redistribute this software, under the provisions of the GNU General
17 * Public License, Version 3, (or, at your option, any later version),
18 * as published by the Free Software Foundation; see the file COPYING
19 * for licensing details.
21 * Note, in particular, that this software is provided "as is", in the
22 * hope that it may prove useful, but WITHOUT WARRANTY OF ANY KIND; not
23 * even an implied WARRANTY OF MERCHANTABILITY, nor of FITNESS FOR ANY
24 * PARTICULAR PURPOSE. Under no circumstances will the author, or the
25 * MinGW Project, accept liability for any damages, however caused,
26 * arising from the use of this software.
31 /* Utility classes and definitions for interpreting and formatting
32 * package descriptions, encoded as UTF-8.
34 typedef unsigned long utf32_t;
36 #define UTF32_MAX (utf32_t)(0x10FFFFUL)
37 #define UTF32_OVERFLOW (utf32_t)(UTF32_MAX + 1UL)
38 #define UTF32_INVALID (utf32_t)(0x0FFFDUL)
42 /* A class for parsing a UTF-8 string, decomposing it into
43 * non-whitespace substrings, separated by whitespace, which
44 * is interpreted as potential word-wrap points.
47 pkgUTF8Parser( const char* );
48 ~pkgUTF8Parser(){ delete next; }
51 class pkgUTF8Parser *next;
52 union { char utf8; wchar_t utf16; utf32_t utf32; } codepoint;
56 const char *ScanBuffer( const char* );
57 wchar_t GetCodePoint( ... );
60 #endif /* PKGDATA_H: $RCSfile$: end of file */