WIP sj4lib
This commit is contained in:
parent
b269c243c8
commit
8fdd90499b
8 changed files with 19247 additions and 26 deletions
18969
include/sj4common/sj_euc2ucs.h
Executable file
18969
include/sj4common/sj_euc2ucs.h
Executable file
File diff suppressed because it is too large
Load diff
23
include/sj4common/sj_ucs2euc.h
Normal file
23
include/sj4common/sj_ucs2euc.h
Normal file
File diff suppressed because one or more lines are too long
35
include/sj4lib/sj4lib.h
Normal file
35
include/sj4lib/sj4lib.h
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#ifndef __SJ4LIB_H__
|
||||
#define __SJ4LIB_H__
|
||||
|
||||
#include <wchar.h>
|
||||
|
||||
/* increase this as needed... */
|
||||
#define SJ4BUFSZ (16 * 1024)
|
||||
|
||||
typedef union sj4kouhobuffer {
|
||||
unsigned char sjis[SJ4BUFSZ];
|
||||
unsigned char eucjp[SJ4BUFSZ];
|
||||
char utf8[SJ4BUFSZ];
|
||||
wchar_t utf16[SJ4BUFSZ / sizeof(wchar_t)];
|
||||
|
||||
unsigned char raw[SJ4BUFSZ];
|
||||
} Sj4KouhoBuffer;
|
||||
|
||||
typedef struct sj4kouho {
|
||||
Sj4KouhoBuffer buffer;
|
||||
} Sj4Kouho;
|
||||
|
||||
typedef struct sj4lib Sj4Lib;
|
||||
|
||||
enum SJ4CHARSET {
|
||||
SJ4EUCJP = 0,
|
||||
SJ4SJIS,
|
||||
SJ4UTF8,
|
||||
SJ4UTF16
|
||||
};
|
||||
|
||||
Sj4Lib* sj4_open(int, const char*);
|
||||
int sj4_getkan(Sj4Lib*, const void*, int len, Sj4Kouho*);
|
||||
void sj4_close(Sj4Lib*);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue