Type representing a multibyte character table. More...
#include "config.h"
#include <stdint.h>
#include <string.h>
#include <wchar.h>
#include "mutt/lib.h"
#include "mbtable.h"
#include "set.h"
#include "types.h"
Go to the source code of this file.
Functions | |
bool | mbtable_equal (const struct MbTable *a, const struct MbTable *b) |
Compare two MbTables. | |
struct MbTable * | mbtable_parse (const char *s) |
Parse a multibyte string into a table. | |
static void | mbtable_destroy (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef) |
Destroy an MbTable object - Implements ConfigSetType::destroy() -. | |
static int | mbtable_string_set (const struct ConfigSet *cs, void *var, struct ConfigDef *cdef, const char *value, struct Buffer *err) |
Set an MbTable by string - Implements ConfigSetType::string_set() -. | |
static int | mbtable_string_get (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *result) |
Get a MbTable as a string - Implements ConfigSetType::string_get() -. | |
static struct MbTable * | mbtable_dup (struct MbTable *table) |
Create a copy of an MbTable object. | |
static int | mbtable_native_set (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err) |
Set an MbTable config item by MbTable object - Implements ConfigSetType::native_set() -. | |
static intptr_t | mbtable_native_get (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *err) |
Get an MbTable object from a MbTable config item - Implements ConfigSetType::native_get() -. | |
static int | mbtable_reset (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *err) |
Reset an MbTable to its initial value - Implements ConfigSetType::reset() -. | |
void | mbtable_free (struct MbTable **ptr) |
Free an MbTable object. | |
const char * | mbtable_get_nth_wchar (const struct MbTable *table, int index) |
Extract one char from a multi-byte table. | |
Variables | |
const struct ConfigSetType | CstMbtable |
Config type representing a multi-byte table. | |
Type representing a multibyte character table.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file mbtable.c.
Compare two MbTables.
true | They are identical |
Definition at line 51 of file mbtable.c.
struct MbTable * mbtable_parse | ( | const char * | s | ) |
Parse a multibyte string into a table.
s | String of multibyte characters |
ptr | New MbTable object |
Definition at line 66 of file mbtable.c.
Create a copy of an MbTable object.
table | MbTable to duplicate |
ptr | New MbTable object |
Definition at line 203 of file mbtable.c.
void mbtable_free | ( | struct MbTable ** | ptr | ) |
const char * mbtable_get_nth_wchar | ( | const struct MbTable * | table, |
int | index | ||
) |
Extract one char from a multi-byte table.
table | Multi-byte table |
index | Select this character |
ptr | String pointer to the character |
Extract one multi-byte character from a string table. If the index is invalid, then a space character will be returned. If the character selected is '
' (Ctrl-M), then "" will be returned.
Definition at line 331 of file mbtable.c.
const struct ConfigSetType CstMbtable |
Config type representing a multi-byte table.