mtext.h File Reference
This graph shows which files directly or indirectly include this file:

## Macros

#define | POS_CHAR_TO_BYTE(mt, pos)
#define | POS_BYTE_TO_CHAR(mt, pos_byte)
#define | MTEXT_DATA(mt) ((mt)->data)
#define | MTEXT_CAT_ASCII(mt, str)

## Functions

int | mtext__char_to_byte (MText *mt, int pos)
int | mtext__byte_to_char (MText *mt, int pos_byte)
void | mtext__enlarge (MText *mt, int nbytes)
int | mtext__takein (MText *mt, int nchars, int nbytes)
int | mtext__cat_data (MText *mt, unsigned char *p, int nbytes, enum MTextFormat format)
MText * | mtext__from_data (const void *data, int nitems, enum MTextFormat format, int need_copy)
void | mtext__adjust_format (MText *mt, enum MTextFormat format)
int | mtext__bol (MText *mt, int pos)
int | mtext__eol (MText *mt, int pos)
void | mtext__wseg_fini ()
int | mtext__word_segment (MText *mt, int pos, int *from, int *to)

## Macro Definition Documentation

## POS_CHAR_TO_BYTE

#define POS_CHAR_TO_BYTE | ( |  | mt,
|  |  | pos
| ) |  |

Value:
(mtext_nchars (mt) == mtext_nbytes (mt) ? (pos) \
: (pos) == (mt)->cache_char_pos ? (mt)->cache_byte_pos \
: mtext__char_to_byte ((mt), (pos)))
mtext_nchars
#define mtext_nchars(mt)
Definition: internal.h:332
mtext_nbytes
#define mtext_nbytes(mt)
Definition: internal.h:333
mtext__char_to_byte
int mtext__char_to_byte(MText *mt, int pos)

## POS_BYTE_TO_CHAR

#define POS_BYTE_TO_CHAR | ( |  | mt,
|  |  | pos_byte
| ) |  |

Value:
(mtext_nchars (mt) == mtext_nbytes (mt) ? (pos_byte) \
: (pos_byte) == (mt)->cache_byte_pos ? (mt)->cache_char_pos \
: mtext__byte_to_char ((mt), (pos_byte)))
mtext__byte_to_char
int mtext__byte_to_char(MText *mt, int pos_byte)

## MTEXT_DATA

#define MTEXT_DATA | ( |  | mt | ) | ((mt)->data)

## MTEXT_CAT_ASCII

#define MTEXT_CAT_ASCII | ( |  | mt,
|  |  | str
| ) |  |

Value:
mtext__cat_data ((mt), (unsigned char *) (str), strlen (str), \
MTEXT_FORMAT_US_ASCII)
MTEXT_FORMAT_US_ASCII
@ MTEXT_FORMAT_US_ASCII
Definition: m17n-core.h:240
mtext__cat_data
int mtext__cat_data(MText *mt, unsigned char *p, int nbytes, enum MTextFormat format)

## Function Documentation

## mtext__char_to_byte()

int mtext__char_to_byte | ( | MText * | mt,
|  | int | pos
| ) |  |

## mtext__byte_to_char()

int mtext__byte_to_char | ( | MText * | mt,
|  | int | pos_byte
| ) |  |

## mtext__enlarge()

void mtext__enlarge | ( | MText * | mt,
|  | int | nbytes
| ) |  |

## mtext__takein()

int mtext__takein | ( | MText * | mt,
|  | int | nchars,
|  | int | nbytes
| ) |  |

## mtext__cat_data()

int mtext__cat_data | ( | MText * | mt,
|  | unsigned char * | p,
|  | int | nbytes,
|  | enum MTextFormat | format
| ) |  |

## mtext__from_data()

MText* mtext__from_data | ( | const void * | data,
|  | int | nitems,
|  | enum MTextFormat | format,
|  | int | need_copy
| ) |  |

## mtext__adjust_format()

void mtext__adjust_format | ( | MText * | mt,
|  | enum MTextFormat | format
| ) |  |

## mtext__bol()

int mtext__bol | ( | MText * | mt,
|  | int | pos
| ) |  |

## mtext__eol()

int mtext__eol | ( | MText * | mt,
|  | int | pos
| ) |  |

## mtext__wseg_fini()

void mtext__wseg_fini | ( |  | ) |

## mtext__word_segment()

int mtext__word_segment | ( | MText * | mt,
|  | int | pos,
|  | int * | from,
|  | int * | to
| ) |  |