File: kanji.h

package info (click to toggle)
texlive-bin 2016.20160513.41080.dfsg-2+deb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 155,060 kB
  • sloc: ansic: 702,862; cpp: 222,090; perl: 76,014; sh: 23,402; makefile: 8,078; lex: 4,710; pascal: 3,782; python: 3,614; java: 3,569; yacc: 2,905; exp: 2,031; xml: 800; tcl: 670; ruby: 620; lisp: 397; sed: 351; asm: 140; csh: 48; awk: 30
file content (75 lines) | stat: -rw-r--r-- 1,992 bytes parent folder | download
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
   kanji.h: Handling 2byte char, and so on.
*/
#ifndef KANJI_H
#define KANJI_H
#include "cpascal.h"
#include <ptexenc/ptexenc.h>
#include <ptexenc/unicode.h>
#ifdef eupTeX
#define getintone(w) ((w).cint1)
#define setintone(w,a) ((w).cint1=(a))
#endif

#ifndef KANJI
#define KANJI
#endif

/* (e)upTeX does not allow file names with 0x5c */
#define not_kanji_char_seq(a,b) (1)
#define notkanjicharseq not_kanji_char_seq

#if !defined(WIN32)
extern int sjisterminal;
#endif

/* functions */
#define XXHi(x) BYTE1(x)
#define XHi(x) BYTE2(x)
#define Hi(x) BYTE3(x)
#define Lo(x) BYTE4(x)

extern boolean check_kanji (integer c);
#define checkkanji check_kanji
extern boolean is_char_ascii (integer c);
#define ischarascii is_char_ascii
extern boolean is_char_kanji (integer c);
#define ischarkanji is_char_kanji
extern boolean ismultiprn (integer c);
extern integer calc_pos (integer c);
#define calcpos calc_pos
extern integer kcatcodekey (integer c);
extern integer multilenbuffchar (integer c);

extern void init_default_kanji (const_string file_str, const_string internal_str);
#ifdef UPBIBTEX
/* for upBibTeX */
#define initkanji() init_default_kanji("utf8", "euc")
#else
/* for upTeX, e-upTeX, upDVItype, upPLtoTF, and upTFtoPL */
#define initkanji() init_default_kanji("utf8", "uptex")
#endif
/* for upDVItype */
#define setpriorfileenc() set_prior_file_enc()

/* number of rest of multi-char for kcode_pos */
#define nrestmultichr(x)  ( (x)!=0 ? ((x) / 8) + 2 - ((x) % 8) : -1 )

#ifndef PRESERVE_PUTC
#undef putc
#define putc(c,fp) putc2(c,fp)
#endif /* !PRESERVE_PUTC */

#ifdef UPBIBTEX
#define inputline2(fp,buff,pos,size,ptr) input_line2(fp,buff,pos,size,ptr)
#else
#define inputline2(fp,buff,pos,size) input_line2(fp,buff,pos,size,NULL)
#endif

extern void init_kanji (const_string file_str, const_string internal_str);
extern void dump_kanji (FILE *fp);
extern void undump_kanji (FILE *fp);
#define dumpkanji dump_kanji
#define undumpkanji undump_kanji

#endif /* not KANJI_H */