Files
nunuhara_xsystem4/include/system4/utfsjis.h
T
Nunuhara Cabbage 5d6f148e1b Reorganize project file structure
- Create separate directories for source and header files.
- Build code shared between xsystem4 and aindump as a static library.
- Create header dirs gfx/ system4/ and vm/
- Make CG.c/h usable without a running VM
2019-12-31 17:50:40 -08:00

43 lines
1.6 KiB
C

/*
* utfsjis.h -- utf-8/sjis related function
*
* Copyright (C) 1997-1998 Masaki Chikama (Wren) <chikama@kasumi.ipl.mech.nagoya-u.ac.jp>
* 1998- <masaki-c@is.aist-nara.ac.jp>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
/* $Id: eucsjis.h,v 1.2 2000/09/20 10:33:16 chikama Exp $ */
#ifndef SYSTEM4_UTFSJIS
#define SYSTEM4_UTFSJIS
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#define SJIS_2BYTE(b) ( ((b) & 0xe0) == 0x80 || ((b) & 0xe0) == 0xe0 )
extern int sjis_index(const char *src, int index);
extern char* sjis2utf(const char *src, size_t len);
extern char* utf2sjis(const char *src, size_t len);
extern bool sjis_has_hankaku(const char *src);
extern bool sjis_has_zenkaku(const char *src);
extern int sjis_count_char(const char *src);
extern void sjis_toupper(char *src);
extern char* sjis_toupper2(const char *src, size_t len);
#endif /* SYSTEM4_UTFSJIS */