~peter-pearse/ubuntu/oneiric/x11-utils/prop001

« back to all changes in this revision

Viewing changes to luit/iso2022.h

  • Committer: Bazaar Package Importer
  • Author(s): Julien Cristau
  • Date: 2011-02-09 20:34:01 UTC
  • mfrom: (3.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110209203401-43knowb75duvo9td
Tags: 7.6+1
* Remove David Nusinow and Brice Goglin from Uploaders.  Thanks for your
  work!
* Drop Pre-Depends on x11-common.
* Bump Standards-Version to 3.9.1.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
20
THE SOFTWARE.
21
21
*/
22
 
/* $XFree86: xc/programs/luit/iso2022.h,v 1.4 2002/07/01 02:25:59 tsi Exp $ */
23
 
 
24
 
#define ESC 0x1B
25
 
#define CSI 0x9B
26
 
#define CSI_7 '['
27
 
#define SS2 0x8E
28
 
#define SS2_7 0x4E
29
 
#define SS3 0x8F
30
 
#define SS3_7 0x4F
31
 
#define LS0 0x0F
32
 
#define LS1 0x0E
33
 
#define LS2_7 0x6E
34
 
#define LS3_7 0x6F
 
22
 
 
23
#ifndef LUIT_ISO2022_H
 
24
#define LUIT_ISO2022_H 1
 
25
 
 
26
#include "charset.h"
 
27
 
 
28
#define ESC    0x1B
 
29
#define CSI    0x9B
 
30
#define CSI_7  '['
 
31
#define SS2    0x8E
 
32
#define SS2_7  0x4E
 
33
#define SS3    0x8F
 
34
#define SS3_7  0x4F
 
35
#define LS0    0x0F
 
36
#define LS1    0x0E
 
37
#define LS2_7  0x6E
 
38
#define LS3_7  0x6F
35
39
#define LS1R_7 0x7E
36
40
#define LS2R_7 0x7D
37
41
#define LS3R_7 0x7C
38
42
 
39
43
#define IS_FINAL_ESC(x) (((x) & 0xF0 ) != 0x20)
40
 
#define IS_FINAL_CSI(x) (((x) & 0xF0 ) != 0x20 && (((x) & 0xF0 ) != 0x30)) 
41
 
 
42
 
#define P_NORMAL 0
43
 
#define P_ESC 1
44
 
#define P_CSI 2
45
 
 
46
 
#define S_NORMAL 0
47
 
#define S_SS2 1
48
 
#define S_SS3 2
49
 
 
50
 
#define IF_SS 1
51
 
#define IF_LS 2
 
44
#define IS_FINAL_CSI(x) (((x) & 0xF0 ) != 0x20 && (((x) & 0xF0 ) != 0x30))
 
45
 
 
46
#define P_NORMAL    0
 
47
#define P_ESC       1
 
48
#define P_CSI       2
 
49
 
 
50
#define S_NORMAL    0
 
51
#define S_SS2       1
 
52
#define S_SS3       2
 
53
 
 
54
#define IF_SS       1
 
55
#define IF_LS       2
52
56
#define IF_EIGHTBIT 4
53
 
#define IF_SSGR 8
 
57
#define IF_SSGR     8
54
58
 
55
 
#define OF_SS 1
56
 
#define OF_LS 2
57
 
#define OF_SELECT 4
 
59
#define OF_SS       1
 
60
#define OF_LS       2
 
61
#define OF_SELECT   4
58
62
#define OF_PASSTHRU 8
59
63
 
60
64
typedef struct _Iso2022 {
61
 
    CharsetPtr *glp, *grp;
62
 
    CharsetPtr g[4];
63
 
    CharsetPtr other;
 
65
    const CharsetRec **glp;
 
66
    const CharsetRec **grp;
 
67
    const CharsetRec *g[4];
 
68
    const CharsetRec *other;
64
69
    int parserState;
65
70
    int shiftState;
66
71
    int inputFlags;
67
72
    int outputFlags;
68
73
    unsigned char *buffered;
69
 
    int buffered_len;
70
 
    int buffered_count;
 
74
    size_t buffered_len;
 
75
    size_t buffered_count;
71
76
    int buffered_ku;
72
77
    unsigned char *outbuf;
73
 
    int outbuf_count;
 
78
    size_t outbuf_count;
74
79
} Iso2022Rec, *Iso2022Ptr;
75
80
 
76
81
#define GL(i) (*(i)->glp)
85
90
 
86
91
Iso2022Ptr allocIso2022(void);
87
92
void destroyIso2022(Iso2022Ptr);
88
 
int initIso2022(char *, char *, Iso2022Ptr);
 
93
int initIso2022(const char *, const char *, Iso2022Ptr);
89
94
int mergeIso2022(Iso2022Ptr, Iso2022Ptr);
90
95
void reportIso2022(Iso2022Ptr);
91
96
void terminate(Iso2022Ptr, int);
92
 
void terminateEsc(Iso2022Ptr, int, unsigned char*, int);
93
 
void copyIn(Iso2022Ptr, int, unsigned char*, int);
94
 
void copyOut(Iso2022Ptr, int, unsigned char*, int);
 
97
void terminateEsc(Iso2022Ptr, int, unsigned char *, unsigned);
 
98
void copyIn(Iso2022Ptr, int, unsigned char *, int);
 
99
void copyOut(Iso2022Ptr, int, unsigned char *, unsigned);
 
100
 
 
101
#endif /* LUIT_ISO2022_H */