TVGCode.h
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:4k
- #include "Config.h" // Global Configuration - do not remove!
- #define DICT_EOW 0x80
- #define DICT_USAGEWW 0x01
- #define DICT_WATCHWD 0x02
- #define DICT_NONROOT 0x04
- #define DICT_GRCHECK 0x08
- #define DICT_PLURALS 0x10
- /* for TVG Mode */
- #define TVGMODE_OFF 1
- #define TVGMODE_ONTOL 2
- #define TVGMODE_ONSTR 4
- /* for TVG Closed Captioned Mode */
- #define TVGCC_OFF 1
- #define TVGCC_ONCUSS 2
- #define TVGCC_ON 4
- /* for TVG CC-Shift value: */
- #define TVGSHIFT_CC1 1
- #define TVGSHIFT_CC2 2
- #define TVGSHIFT_CC3 3
- #define TVGSHIFT_CC4 4
- // Other DEFINES not found in original code
- #define TIMER_TVG 250
- #define ERR_THRESHOLD 6
- /* DEFINES FOR PROGRAM STATUS BITS */
- #define DW_0 0x00000001L /* DICK/WOODY WATCH WORD PRG_STATUS_3:0 */
- #define DW_1 0x00000002L /* DICK/WOODY WATCH WORD PRG_STATUS_3:1 */
- #define PLURAL 0x00000004L /* PLURALS OK FLAG - PRG_STATUS_3:2 */
- #define GCHK_FLAG 0x00000008L /* GRAMMAR CHECK FLAG - PRG_STATUS_3:4 */
- #define NR_FLAG 0x00000010L /* "NON-ROOT CUSS WORD FOUND" FLAG - PRG_STATUS_3:5 */
- #define DUMMY_FLAG 0x00000020L /* DUMMY FLAG - PRG_STATUS_3:7 */
- #define TEMP_GC 0x00000040L /* TEMP GRAMMAR CHECK - PRG_STATUS_2:3 */
- #define CUSSING 0x00000080L /* CUSSING DETECTED - PRG_STATUS_2 */
- #define CC_ACTIVE 0x00000100L /* POPON CODE FOUND - PRG_STATUS_2 */
- #define IN_POPON 0x00000200L /* IN POP-ON CC - PRG_STATUS_5:1 */
- #define TVG_STATUS 0x00000400L /* TVG STATUS FLAG - PRG_STATUS_4:4 */
- #define TVG_EXP 0x00000800L /* TVG TIMER EXPIRED FLAG - PRG_STATUS_4:5 */
- #define TVG_CAPS 0x00001000L /* TVG CAPTIONING ON - PRG_STATUS_1:4 */
- #define NO_LETTERS 0x00002000L /* NO LETTERS FLAG */
- #define INDENT_ADJ 0x00004000L /* INDENT ADJUST PENDING FLAG */
- #define WORD_FOUND 0x00008000L /* WORD FOUND IN DICTIONARY */
- /* These bits unique to DVD implementation */
- #define FIRST_LOOP 0x01000000L /* First Time through tvg_process() Loop */
- #define CMD_SUBST 0x02000000L /* Indicate replacement of Command Byte Pair */
- #define TVG_MUTE 0x04000000L /* TVG mute is in effect */
- #define POWER_ON 0x08000000L /* VERY First Time through tvg_process() Loop */
- #define FORCE_NULLS 0x10000000L /* Used for force output of nulls */
- /* only EOW mask still valid in v2 algorithm/dictionary */
- // #define BIT_DW 0x01 /* CUSSWORD TABLE, DICK/WOODY WTCHWRD FLAG */
- // #define BIT_WATCH 0x20 /* CUSSWORD TABLE, WATCH WORD FLAG */
- // #define BIT_TLRNT 0x40 /* CUSSWORD TABLE, TOLERANT FLAG */
- #define BIT_EOW 0x80 /* CUSSWORD TABLE, END OF WORD BIT */
- #define INDEX 0x7F /* Masks off replacement index value */
-
- #define TVG_OFF 0x01 /* TVG OFF BIT - IO_MAP:0 */
- #define TVG_TOLRNT 0x02 /* TVG TOLERANT BIT - IO_MAP:1 */
- #define TVG_MODER 0x04 /* TVG TOLERANT BIT - IO_MAP:2 */
- #define TVG_STRICT 0x08 /* TVG STRICT BIT - IO_MAP:3 */
- #define CC_OFF 0x10 /* CC ON CUSSING ONLY BIT - IO_MAP:4 */
- #define CC_CUSSING 0x20 /* CC ON CUSSING ONLY BIT - IO_MAP:5 */
- #define CC_ON 0x40 /* CC ALWAYS ON BIT - IO_MAP:6 */
- // These individual bit defns for reference, only the MASK is used
- #define TOL_RELIGIOUS 0x01 /* User Toler RELIGIOUS Group Setting */
- #define TOL_SEXUAL 0x02 /* User Toler SEXUAL Group Setting */
- #define TOL_HELLDAMN 0x04 /* User Toler HELL & DAMN Group Setting */
- #define TOL_MILD 0x08 /* User Toler MILD Group Setting */
- #define TOL_MODERATE 0x10 /* User Toler MODERATE Group Setting */
- #define TOL_STRICT 0x20 /* User Toler STRICT Group Setting */
- #define TOL_MASK 0x2f /* Mask for User Toler Group Settings */
- #define USER_WSMASK 0x07 /* Mask for User Settable Word Groups */
- #define CCCMD_MISC 0x14 /* CC 1ST BYTE OF RCL - MISC PAC CODE */
- #define CCCMD_POPON 0x20 /* CC 2ND BYTE OF RCL - "POPON" CODE */
- #define CCCMD_EOC 0x2F /* CC 2ND BYTE OF EOC - "POPOFF" CODE */
- #define CCCMD_EDM 0x2C /* CC 2ND BYTE OF EDM - "ERASE DISP'D MEM" CODE */
- #define CCCMD_ENM 0x2E /* CC 2ND BYTE OF ENM - "ERASE NON-DISP'D MEM" CODE */
- #define CCCMD_ITALIC 0x4E /* CC 2ND BYTE OF ITALICS CODE */
- #define CC_BUFFER_LEN 16 /* LENGTH OF CC BUFFER */
- #define MAX_CCERRORS 4 /* MAX # OF CC ERRORS BEFORE KILL POPON */