Debian Codegraph @

dicts.h

raw symbols SCIP
1 /*
2 Qxw is a program to help construct and publish crosswords.
3
4 Copyright 2011-2020 Mark Owen; Windows port by Peter Flippant
5 http://www.quinapalus.com
6 E-mail: [email protected]
7
8 This file is part of Qxw.
9
10 Qxw is free software: you can redistribute it and/or modify
11 it under the terms of version 2 of the GNU General Public License
12 as published by the Free Software Foundation.
13
14 Qxw is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with Qxw. If not, see <http://www.gnu.org/licenses/> or
21 write to the Free Software Foundation, Inc., 51 Franklin Street,
22 Fifth Floor, Boston, MA 02110-1301, USA.
23 */
24
25
26
27
28 #ifndef __DICTS_H__
29 #define __DICTS_H__
30
31 #define MAXNDICTS 9 // must fit in a word
32 extern char dfnames[MAXNDICTS][SLEN];
33 extern char dsfilters[MAXNDICTS][SLEN];
34 extern char dafilters[MAXNDICTS][SLEN];
35
36 extern int dst_lines[MAXNDICTS];
37 extern int dst_lines_f[MAXNDICTS];
38 extern int dst_lines_fa[MAXNDICTS];
39 extern int dst_u_rejline[MAXNDICTS][MAXUCHAR];
40 extern int dst_u_rejline_count[MAXNDICTS][MAXUCHAR];
41
42 extern char lemdesc[NLEM][LEMDESCLEN];
43 extern char*lemdescADVP[NLEM];
44
45 extern int atotal; // total answers
46 extern int ltotal; // total lights
47 extern int ultotal; // total uniquified lights
48 extern unsigned int dusedmask; // set of dictionaries used
49
50 extern void initalphamap(struct alphaentry*a);
51 extern int initalphamapbycode(char*s);
52 extern void clearalphamap();
53 extern int addalphamapentry(int icc,char*rep,char*equiv,int vow,int con,int seq);
54 extern int isdisallowed(uchar uc);
55 extern int loaddicts(int sil);
56 extern void freedicts(void);
57 extern int loaddefdicts(void);
58 extern int iswordindm(const char*s,int dm);
59
60 extern int ucharslen(uchar*s);
61 extern int utf8touchars(uchar*ucs,const char*s,int l);
62 extern char*uchartoutf8(char*q,uchar c);
63 extern char*ucharstoutf8(char*q,uchar*s);
64 extern int q_mblen(char*p);
65 extern int abmtoicc(ABM b);
66 extern char uchartoICC(int c); // convert UTF-32 to internal character code
67 extern uchar ICCtouchar(char c); // convert internal character code to UTF-32
68
69 extern void printU(uchar c);
70 extern void printUs(const uchar*s);
71 extern void printICC(char c);
72 extern void printICCs(const char*s);
73
74 extern uchar icctouchar[MAXICC+1]; // convert internal character code to UTF-32 of canonical representative
75 extern char icctoutf8[MAXICC+1][16]; // convert internal character code to UTF-8 string of canonical representative, 0-terminated
76 extern char iccequivs[MAXICC][MAXEQUIV*8+1];
77 extern char iccseq[MAXICC+1];
78
79 #define MAXICCGROUP 3
80 extern int niccused;
81 extern char iccused[MAXICC+1];
82 extern int icctousedindex[MAXICC+1];
83 extern int iccusedtogroup[MAXICC+1];
84 extern int icctogroup[MAXICC+1];
85 extern int iccgroupstart[MAXICCGROUP+1];
86
87 extern ABM abm_vow,abm_con,abm_use;
88
89 #endif