Debian Codegraph @

kar/longchar.h

raw symbols SCIP
1 #cxx . . $ `<file>/kar/longchar.h`/ifndef _longchar_h_
2 #define _longchar_h_cxx . . $ `kar/longchar.h:2:9`!
3 /* longchar.h
4 *
5 * Copyright (C) 1992-2008,2011,2015-2020 Paul Boersma
6 *
7 * This code is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or (at
10 * your option) any later version.
11 *
12 * This code is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 * See the GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this work. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include "../melder/melder.h"cxx . . $ `<file>/melder/melder.h`/
22
23 /********** NON-ASCII CHARACTERS **********/
24
25 /* System-independent representation of some non-ASCII symbols.
26 These symbols are represented by a backslash (\) plus two ASCII symbols.
27 In 1992, we needed this because Praat is multilingual.
28 Nowadays, we have Unicode, which is a system-independent representation as well.
29 Still, backslash sequences are useful if your computer does not have a fast input method for the symbols
30 you want to use, which is likely to happen with phonetic characters.
31
32 - For the characters of the following languages, we supply backslash sequences as well as size and PostScript information:
33 English, Dutch, German, French, Spanish, Portuguese, Italian,
34 Danish, Swedish, Norwegian, Welsh, Luxemburgian, Frisian.
35 - For the characters of the following languages, we supply backslash sequences (PostScript will not work yet):
36 Hungarian, Polish, Czech, Rumanian, Icelandic, Serbocroat, Turkish, Greek, Hebrew.
37 - By supporting Unicode, we also support other alphabets, such as Arabic, Chinese, Cyrillic, and Devanagari;
38 since we have no backslash support for these, you need a specialized input method to enter them into Praat.
39 */
40
41 /* Alphabets. */
42
43 #define Longchar_ROMANcxx . . $ `kar/longchar.h:43:9`! 0
44 #define Longchar_SYMBOLcxx . . $ `kar/longchar.h:44:9`! 1
45 #define Longchar_PHONETICcxx . . $ `kar/longchar.h:45:9`! 2
46 #define Longchar_DINGBATScxx . . $ `kar/longchar.h:46:9`! 3
47 #define Longchar_RIGHT_TO_LEFTcxx . . $ `kar/longchar.h:47:9`! 4
48
49 /********** Conversion of Roman native and generic string encodings. **********/
50
51 char32cxx . . $ char32# * Longchar_nativizecxx . . $ Longchar_nativize(35d477e2649d0789). (const char32cxx . . $ char32# *generic, char32cxx . . $ char32# *native, bool educateQuotes);
52
53 char32cxx . . $ char32# * Longchar_genericizecxx . . $ Longchar_genericize(329c6326171b971e). (const char32cxx . . $ char32# *native, char32cxx . . $ char32# *generic);
54 /*
55 Function:
56 Copies the string 'native' to the string 'generic',
57 interpreting non-ASCII native characters as belonging to the Roman alphabet.
58 Returns 'generic' as a convenience.
59 'generic' can become at most three times as long as 'native'.
60 Usage:
61 translating user input into a generic string.
62 */
63
64 typedef struct structLongchar_Infocxx . . $ structLongchar_Info# {
65 unsigned char firstcxx . . $ structLongchar_Info#first., secondcxx . . $ structLongchar_Info#second.; /* First and second character of two-byte encoding. */
66 /* For ASCII characters, 'second' is a space. */
67 unsigned char alphabetcxx . . $ structLongchar_Info#alphabet.; /* Roman, Symbol, Phonetic, or Dingbats. */
68 unsigned char isDiacriticcxx . . $ structLongchar_Info#isDiacritic.;
69 structcxx . . $ structLongchar_Info#$anonymous_type_0# {
70 const char *namecxx . . $ structLongchar_Info#$anonymous_type_0#name.; /* The PostScript name, starting with a slash. */
71 /* The widths in thousands of the height. */
72 short timescxx . . $ structLongchar_Info#$anonymous_type_0#times., timesBoldcxx . . $ structLongchar_Info#$anonymous_type_0#timesBold., timesItaliccxx . . $ structLongchar_Info#$anonymous_type_0#timesItalic., timesBoldItaliccxx . . $ structLongchar_Info#$anonymous_type_0#timesBoldItalic.; /* Times. */
73 short helveticacxx . . $ structLongchar_Info#$anonymous_type_0#helvetica., helveticaBoldcxx . . $ structLongchar_Info#$anonymous_type_0#helveticaBold.; /* Helvetica. */
74 short palatinocxx . . $ structLongchar_Info#$anonymous_type_0#palatino., palatinoBoldcxx . . $ structLongchar_Info#$anonymous_type_0#palatinoBold., palatinoItaliccxx . . $ structLongchar_Info#$anonymous_type_0#palatinoItalic., palatinoBoldItaliccxx . . $ structLongchar_Info#$anonymous_type_0#palatinoBoldItalic.; /* Palatino. */
75 /* Courier width always 600. */
76 }
77 pscxx . . $ structLongchar_Info#ps.; /* PostScript properties. */
78 unsigned short xwinEncodingcxx . . $ structLongchar_Info#xwinEncoding.; /* The one-byte encoding for X11 (ISO8859-1 for Roman). */
79 unsigned short winEncodingcxx . . $ structLongchar_Info#winEncoding.; /* The one-byte encoding for Windows (ISO8859-1 for Roman; SILDoulosIPA 1993). */
80 unsigned short macEncodingcxx . . $ structLongchar_Info#macEncoding.; /* The one-byte encoding for Macintosh (Mac for Roman; SILDoulosIPA 1993). */
81 unsigned short psEncodingcxx . . $ structLongchar_Info#psEncoding.; /* The one-byte encoding for PostScript (Mac-Praat, TeX-xipa-Praat). */
82 char32cxx . . $ char32# unicodecxx . . $ structLongchar_Info#unicode.; /* The four-byte encoding for Unicode. */
83 }
84 *Longchar_Infocxx . . $ Longchar_Info#;
85
86 Longchar_Infocxx . . $ Longchar_Info# Longchar_getInfocxx . . $ Longchar_getInfo(7966861fb3bf62a0). (char32cxx . . $ char32# kar1, char32cxx . . $ char32# kar2);
87 Longchar_Infocxx . . $ Longchar_Info# Longchar_getInfoFromNativecxx . . $ Longchar_getInfoFromNative(e111517d933f6460). (char32cxx . . $ char32# kar);
88 /* If no info found, these two routines return the info for a space. */
89
90 /*
91 How should we represent the dumb ASCII double quote (")?
92 The dumb quote is converted to a left or right double quote,
93 on Macintosh, PostScript, and Windows
94 (ISO8859-1 has no left and right double quotes).
95 You can enforce the way your double quotes look by
96 using one of these generic symbols:
97 - \"l for a left double quote
98 - \"r for a right double quote
99 - \"" for a straight double quote
100 There is no translation for single quotes, because some languages
101 use the right single quote as an apostrophe in unpredictable positions.
102 You can get a left single quote by typing "`",
103 which looks like a grave accent on Macintosh;
104 you will get a right single quote or apostrophe by typing a "'",
105 which looks like a straight quote on Macintosh.
106 Thus, the string typed as "`hallo'" will give you left and right quotes,
107 even on Macintosh. (Reading this note in Xwindows may feel somewhat funny.)
108 */
109
110 inline bool Longchar_Info_isDiacriticcxx . . $ Longchar_Info_isDiacritic(30d7ddfba88eefc8). (Longchar_Infocxx . . $ Longchar_Info# me) {
111 return me -> isDiacriticcxx . . $ structLongchar_Info#isDiacritic.;
112 }
113
114 void Longchar_initcxx . . $ Longchar_init(49f6e7a06ebc5aa8). ();
115
116 /* End of file longchar.h */
117 #endif