Human68k CUI emulator with sound.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

sjis.h 819B

123456789101112131415161718192021
  1. #ifndef SJIS_H_
  2. #define SJIS_H_
  3. #include <stdio.h>
  4. #include <stdint.h>
  5. #define SJIS_FIRST_CHAR(c) ((c >= 0x80 && c <= 0x84) || (c >= 0x88 && c <= 0x9f) || (c >= 0xe0 && c <= 0xeb) || (c >= 0xf0 && c <= 0xf3))
  6. int sjis_strlen(uint8_t *data, int len);
  7. int sjis_to_utf8(uint8_t *sjis_data, int sjis_len, uint8_t *utf8_data, int utf8_len);
  8. int utf8_to_sjis(uint8_t *utf8_data, int utf8_len, uint8_t *sjis_data, int sjis_len);
  9. uint32_t sjis_char_to_unicode(uint16_t sjis);
  10. uint16_t unicode_char_to_sjis(uint32_t unicode);
  11. int sjis_print_utf8_escaped(uint8_t *sjis_data, int sjis_len);
  12. int sjis_write_utf8(FILE *f, uint8_t *sjis_data, int sjis_len);
  13. int sjis_print_utf8(uint8_t *sjis_data, int sjis_len);
  14. int sjis_print_escaped(uint8_t *sjis_data, int sjis_len);
  15. uint16_t jis_to_sjis(uint16_t val);
  16. #endif /* SJIS_H_ */