Lines Matching refs:charset
39 #include "charset.h"
180 * The charset "object" and methods.
183 struct charset {
190 int charset_mbtowc(struct charset *charset, int *pwc, const char *s, size_t n)
192 return (*charset->mbtowc)(charset->map, pwc, s, n);
195 int charset_wctomb(struct charset *charset, char *s, int wc)
197 return (*charset->wctomb)(charset->map, s, wc);
200 int charset_max(struct charset *charset)
202 return charset->max;
286 * Implementation of any 8-bit charset.
406 struct charset charset_utf8 = {
413 struct charset charset_iso1 = {
420 struct charset charset_ascii = {
427 struct charset *charset_find(const char *code)
449 if (!maps[i].charset) {
450 maps[i].charset = (struct charset *)malloc(sizeof(struct charset));
451 if (maps[i].charset) {
454 free(maps[i].charset);
455 maps[i].charset = 0;
458 maps[i].charset->max = 1;
459 maps[i].charset->mbtowc = &mbtowc_8bit;
460 maps[i].charset->wctomb = &wctomb_8bit;
461 maps[i].charset->map = map;
467 return maps[i].charset;
487 struct charset *charset1, *charset2;