Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 27 lines (19 sloc) 0.428 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
#ifndef RBX_KCODE_HPP
#define RBX_KCODE_HPP

namespace rubinius {
namespace kcode {

  typedef const uint8_t table;

  enum CodePage {
    eAscii, eEUC, eSJIS, eUTF8
  };

  static inline bool mbchar_p(table* tbl, uint8_t c) {
    return tbl[c] != 0;
  }

  static inline size_t mbclen(table* tbl, uint8_t c) {
    return tbl[c] + 1;
  }

  void init(STATE);
  table* null_table();
  void set(STATE, CodePage page);

}}

#endif
Something went wrong with that request. Please try again.