Data Structures | Defines | Typedefs | Enumerations | Functions

transcode_data.h File Reference

#include "ruby/ruby.h"
Include dependency graph for transcode_data.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  rb_transcoder

Defines

#define WORDINDEX_SHIFT_BITS   2
#define WORDINDEX2INFO(widx)   ((widx) << WORDINDEX_SHIFT_BITS)
#define INFO2WORDINDEX(info)   ((info) >> WORDINDEX_SHIFT_BITS)
#define BYTE_LOOKUP_BASE(bl)   ((bl)[0])
#define BYTE_LOOKUP_INFO(bl)   ((bl)[1])
#define PType   (unsigned int)
#define NOMAP   (PType 0x01)
#define ONEbt   (0x02)
#define TWObt   (0x03)
#define THREEbt   (0x05)
#define FOURbt   (0x06)
#define INVALID   (PType 0x07)
#define UNDEF   (PType 0x09)
#define ZERObt   (PType 0x0A)
#define FUNii   (PType 0x0B)
#define FUNsi   (PType 0x0D)
#define FUNio   (PType 0x0E)
#define FUNso   (PType 0x0F)
#define STR1   (PType 0x11)
#define GB4bt   (PType 0x12)
#define FUNsio   (PType 0x13)
#define STR1_LENGTH(byte_addr)   (unsigned int)(*(byte_addr) + 4)
#define STR1_BYTEINDEX(w)   ((w) >> 6)
#define makeSTR1(bi)   (((bi) << 6) | STR1)
#define makeSTR1LEN(len)   ((len)-4)
#define o1(b1)   (PType((((unsigned char)(b1))<<8)|ONEbt))
#define o2(b1, b2)   (PType((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|TWObt))
#define o3(b1, b2, b3)   (PType(((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|(((unsigned int)(unsigned char)(b3))<<24)|THREEbt)&0xffffffffU))
#define o4(b0, b1, b2, b3)   (PType(((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|(((unsigned char)(b3))<<24)|((((unsigned char)(b0))&0x07)<<5)|FOURbt)&0xffffffffU))
#define g4(b0, b1, b2, b3)   (PType(((((unsigned char)(b0))<<8)|(((unsigned char)(b2))<<16)|((((unsigned char)(b1))&0x0f)<<24)|((((unsigned int)(unsigned char)(b3))&0x0f)<<28)|GB4bt)&0xffffffffU))
#define funsio(diff)   (PType((((unsigned int)(diff))<<8)|FUNsio))
#define getBT1(a)   ((unsigned char)((a)>> 8))
#define getBT2(a)   ((unsigned char)((a)>>16))
#define getBT3(a)   ((unsigned char)((a)>>24))
#define getBT0(a)   (((unsigned char)((a)>> 5)&0x07)|0xF0)
#define getGB4bt0(a)   ((unsigned char)((a)>> 8))
#define getGB4bt1(a)   ((unsigned char)((a)>>24)&0x0F|0x30)
#define getGB4bt2(a)   ((unsigned char)((a)>>16))
#define getGB4bt3(a)   ((unsigned char)((a)>>28)&0x0F|0x30)
#define o2FUNii(b1, b2)   (PType((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|FUNii))
#define ONETRAIL
#define TWOTRAIL
#define THREETRAIL

Typedefs

typedef struct rb_transcoder rb_transcoder

Enumerations

enum  rb_transcoder_asciicompat_type_t { asciicompat_converter, asciicompat_decoder, asciicompat_encoder }

Functions

void rb_declare_transcoder (const char *enc1, const char *enc2, const char *lib)
void rb_register_transcoder (const rb_transcoder *)

Define Documentation

#define BYTE_LOOKUP_BASE (   bl  )     ((bl)[0])

Definition at line 20 of file transcode_data.h.

#define BYTE_LOOKUP_INFO (   bl  )     ((bl)[1])

Definition at line 21 of file transcode_data.h.

#define FOURbt   (0x06)

Definition at line 29 of file transcode_data.h.

Referenced by transcode_restartable0().

#define FUNii   (PType 0x0B)

Definition at line 33 of file transcode_data.h.

Referenced by transcode_restartable0().

#define FUNio   (PType 0x0E)

Definition at line 35 of file transcode_data.h.

Referenced by transcode_restartable0().

#define FUNsi   (PType 0x0D)

Definition at line 34 of file transcode_data.h.

Referenced by transcode_restartable0().

#define FUNsio   (PType 0x13)

Definition at line 39 of file transcode_data.h.

Referenced by transcode_restartable0().

#define funsio (   diff  )     (PType((((unsigned int)(diff))<<8)|FUNsio))

Definition at line 51 of file transcode_data.h.

#define FUNso   (PType 0x0F)

Definition at line 36 of file transcode_data.h.

Referenced by transcode_restartable0().

#define g4 (   b0,
  b1,
  b2,
  b3 
)    (PType(((((unsigned char)(b0))<<8)|(((unsigned char)(b2))<<16)|((((unsigned char)(b1))&0x0f)<<24)|((((unsigned int)(unsigned char)(b3))&0x0f)<<28)|GB4bt)&0xffffffffU))

Definition at line 50 of file transcode_data.h.

#define GB4bt   (PType 0x12)

Definition at line 38 of file transcode_data.h.

Referenced by transcode_restartable0().

#define getBT0 (   a  )     (((unsigned char)((a)>> 5)&0x07)|0xF0)

Definition at line 56 of file transcode_data.h.

Referenced by transcode_restartable0().

#define getBT1 (   a  )     ((unsigned char)((a)>> 8))

Definition at line 53 of file transcode_data.h.

Referenced by buf_apply(), and transcode_restartable0().

#define getBT2 (   a  )     ((unsigned char)((a)>>16))

Definition at line 54 of file transcode_data.h.

Referenced by buf_apply(), and transcode_restartable0().

#define getBT3 (   a  )     ((unsigned char)((a)>>24))

Definition at line 55 of file transcode_data.h.

Referenced by buf_apply(), and transcode_restartable0().

#define getGB4bt0 (   a  )     ((unsigned char)((a)>> 8))

Definition at line 58 of file transcode_data.h.

Referenced by transcode_restartable0().

#define getGB4bt1 (   a  )     ((unsigned char)((a)>>24)&0x0F|0x30)

Definition at line 59 of file transcode_data.h.

Referenced by transcode_restartable0().

#define getGB4bt2 (   a  )     ((unsigned char)((a)>>16))

Definition at line 60 of file transcode_data.h.

Referenced by transcode_restartable0().

#define getGB4bt3 (   a  )     ((unsigned char)((a)>>28)&0x0F|0x30)

Definition at line 61 of file transcode_data.h.

Referenced by transcode_restartable0().

#define INFO2WORDINDEX (   info  )     ((info) >> WORDINDEX_SHIFT_BITS)

Definition at line 19 of file transcode_data.h.

#define INVALID   (PType 0x07)

Definition at line 30 of file transcode_data.h.

Referenced by transcode_restartable0().

#define makeSTR1 (   bi  )     (((bi) << 6) | STR1)

Definition at line 43 of file transcode_data.h.

#define makeSTR1LEN (   len  )     ((len)-4)

Definition at line 44 of file transcode_data.h.

#define NOMAP   (PType 0x01)

Definition at line 25 of file transcode_data.h.

Referenced by transcode_restartable0().

#define o1 (   b1  )     (PType((((unsigned char)(b1))<<8)|ONEbt))

Definition at line 46 of file transcode_data.h.

#define o2 (   b1,
  b2 
)    (PType((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|TWObt))

Definition at line 47 of file transcode_data.h.

#define o2FUNii (   b1,
  b2 
)    (PType((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|FUNii))

Definition at line 63 of file transcode_data.h.

#define o3 (   b1,
  b2,
  b3 
)    (PType(((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|(((unsigned int)(unsigned char)(b3))<<24)|THREEbt)&0xffffffffU))

Definition at line 48 of file transcode_data.h.

#define o4 (   b0,
  b1,
  b2,
  b3 
)    (PType(((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|(((unsigned char)(b3))<<24)|((((unsigned char)(b0))&0x07)<<5)|FOURbt)&0xffffffffU))

Definition at line 49 of file transcode_data.h.

#define ONEbt   (0x02)

Definition at line 26 of file transcode_data.h.

Referenced by transcode_restartable0().

#define ONETRAIL

Definition at line 66 of file transcode_data.h.

#define PType   (unsigned int)

Definition at line 23 of file transcode_data.h.

#define STR1   (PType 0x11)

Definition at line 37 of file transcode_data.h.

Referenced by transcode_restartable0().

#define STR1_BYTEINDEX (   w  )     ((w) >> 6)

Definition at line 42 of file transcode_data.h.

Referenced by transcode_restartable0().

#define STR1_LENGTH (   byte_addr  )     (unsigned int)(*(byte_addr) + 4)

Definition at line 41 of file transcode_data.h.

Referenced by transcode_restartable0().

#define THREEbt   (0x05)

Definition at line 28 of file transcode_data.h.

Referenced by buf_apply(), and transcode_restartable0().

#define THREETRAIL

Definition at line 68 of file transcode_data.h.

#define TWObt   (0x03)

Definition at line 27 of file transcode_data.h.

Referenced by buf_apply(), and transcode_restartable0().

#define TWOTRAIL

Definition at line 67 of file transcode_data.h.

#define UNDEF   (PType 0x09)

Definition at line 31 of file transcode_data.h.

Referenced by transcode_restartable0().

#define WORDINDEX2INFO (   widx  )     ((widx) << WORDINDEX_SHIFT_BITS)

Definition at line 18 of file transcode_data.h.

#define WORDINDEX_SHIFT_BITS   2

Definition at line 17 of file transcode_data.h.

#define ZERObt   (PType 0x0A)

Definition at line 32 of file transcode_data.h.

Referenced by transcode_restartable0().


Typedef Documentation

typedef struct rb_transcoder rb_transcoder

Definition at line 77 of file transcode_data.h.


Enumeration Type Documentation

Enumerator:
asciicompat_converter 
asciicompat_decoder 
asciicompat_encoder 

Definition at line 70 of file transcode_data.h.


Function Documentation

void rb_declare_transcoder ( const char *  enc1,
const char *  enc2,
const char *  lib 
)
void rb_register_transcoder ( const rb_transcoder  )