parser: Remove the unused attribute alignment from struct declaration_specifiers_t.
[cparser] / string_rep.h
1 /*
2  * This file is part of cparser.
3  * Copyright (C) 2012 Matthias Braun <matze@braunis.de>
4  */
5 #ifndef STRING_REP_H
6 #define STRING_REP_H
7
8 #include <stddef.h>
9
10 enum string_encoding_t {
11         STRING_ENCODING_CHAR,
12         STRING_ENCODING_CHAR16,
13         STRING_ENCODING_CHAR32,
14         STRING_ENCODING_UTF8,
15         STRING_ENCODING_WIDE
16 };
17 typedef enum string_encoding_t string_encoding_t;
18
19 typedef struct string_t {
20         char const       *begin; /**< UTF-8 encoded string, the last character is guaranteed to be \0. */
21         size_t            size;  /**< size of string in bytes (not characters), without terminating \0. */
22         string_encoding_t encoding;
23 } string_t;
24
25 size_t get_string_len(string_t const *str);
26
27 #endif