1 /*
2 * Compound Text word statistics and search report
3 *
4 * common.c : external common value difinition
5 *
6 * Copyright(c) isao yasuda, 1998
7 */
8 static char *rcs_id = "$Id: common.c,v 1.3 2008/05/04 13:11:31 isao Exp $";
9
10 #include <stdio.h>
11 #include "staslova.h"
12
13 char ver[] = "1.3, May. 4 2008, Copyright(c), isao yasuda, 1998-2008 ";
14
15 unsigned char task = (STAT | MTCT); /* Task kind -s -m -a */
16 char casemode = '0'; /* Case control option */
17 char outmode = '2'; /* Output level option */
18 unsigned char lprf[3] = {
19 JIS,
20 CYRIL,
21 (ASCII | LATIN1 | LATIN2 | OTHER)
22 };
23 char langjis[] = "Japanese";
24 char langcyr[] = "Cyrillic";
25 char langlat[] = "Latins ";
26 char *langname[3] = { /* Language names conrol */
27 langjis,
28 langcyr,
29 langlat
30 };
31
32 unsigned char word[MAXTOKEN+3]; /* Word text edit work out1 */
33 unsigned char *text; /* Word text edit work input */
34 unsigned char *wordp; /* Word text edit work out2 */
35 unsigned char *stock = NULL; /* Expression stock pointer */
36 unsigned char esc_save[4] = " "; /* ESC sequence save */
37 unsigned char kanji_esc_save[5] = " "; /* ESC sequence kanji save */
38 unsigned char type = '\0'; /* Expression type */
39 unsigned char lang = BASE; /* language control */
40 unsigned char G0 = ASCII; /* Compound Text G0 control */
41 unsigned char G1 = LATIN1; /* Compound Text G1 control */
42 int escfg0 = 0; /* ESC sequence flag G0 1:wrote */
43 int escfg1 = 0; /* ESC sequence flag G1 0:yet */
44 int wc; /* Signifcant word counter */
45 int erc = NORMAL; /* Error code */
46
47 unsigned char ks0[MAXKS+1]; /* Separator definition table */
48 unsigned char ks1[MAXKS+1];
49 unsigned char ks2[MAXKS+1];
50 unsigned char ks5[MAXKS+1];
51 unsigned char js[MAXJS+1];
52 unsigned char kc0[MAXKC+1];
53 unsigned char kc1[MAXKC+1];
54 unsigned char kc2[MAXKC+1];
55 unsigned char kc5[MAXKC+1];
56 unsigned char jc[MAXJC+1];
57 unsigned char kp0[MAXKP+1];
58 unsigned char kp1[MAXKP+1];
59 unsigned char kp2[MAXKP+1];
60 unsigned char kp5[MAXKP+1];
61 unsigned char jp[MAXJP+1];
62
63 struct cdent *cdtbl[MAXCOND+1]; /* Matching condition table */
64 unsigned char *lp[MAXSELINE+1]; /* User's definition lines */
65 int seno; /* Se command number */
66 int cdno; /* Matching condition number */
67
68 struct wdent *langroot[3] = { /* root pointer for languages */
69 NULL, NULL, NULL
70 };
71 unsigned char **wdpa; /* Word struct pointer array */
72 unsigned char **cap = NULL; /* Wdent array pointer */
73 unsigned char no0[MAXLINE+1]; /* input text buffer no.0 */
74 unsigned char no1[MAXLINE+1]; /* input text buffer no.1 */
75 unsigned char no2[MAXLINE+1]; /* input text buffer no.2 */
76 unsigned char *mtp[3] = { /* text buffer pointer array */
77 NULL, NULL, NULL
78 };
79 int clp = 0; /* current pointer no */
80 int lno = 0; /* input line no */
81 int wdtotal; /* total count of words in tree */
82 int wdcount; /* total count of words */
83 int wdnum; /* number of word in tree */
84 int pwdptc; /* number of word position */
85 int usrwdptc = 8; /* user max number of pwdptc */