TRAVIS_OS_NAME=linux
<<<<<< ENV
.github/dependabot.yml
.github/workflows/docs.yml
.github/workflows/test.yml
.gitignore
.travis.yml
AUTHORS
COPYING
ChangeLog
ChangeLog.old
ChangeLog.prelib
DEVELOP.md
FAQ
INSTALL
Makefile.am
Makefile.in
NEWS
README
README.md
THANKS
TODO
aclocal.m4
autogen.sh
compile
config.guess
config.h.in
config.rpath
config.sub
configure
configure.ac
data/.gitignore
data/Letters
data/Makefile.am
data/Makefile.in
data/README
data/basetoc.c
data/belarusian/belarusian.h
data/belarusian/cp1251.base
data/belarusian/doit.sh
data/belarusian/paircounts.cp1251
data/belarusian/paircounts.ibm866
data/belarusian/rawcounts.cp1251
data/bulgarian/bulgarian.h
data/bulgarian/cp1251.base
data/bulgarian/doit.sh
data/bulgarian/paircounts.cp1251
data/bulgarian/rawcounts.cp1251
data/chinese/chinese.h
data/chinese/zh_weight_big5.h
data/chinese/zh_weight_big5.txt
data/chinese/zh_weight_gb.txt
data/chinese/zh_weight_gbk.h
data/clean.sh
data/countall.c
data/countpair.c
data/croatian/cp1250.base
data/croatian/croatian.h
data/croatian/doit.sh
data/croatian/rawcounts.cp1250
data/czech/czech.h
data/czech/doit.sh
data/czech/iso88592.base
data/czech/rawcounts.iso88592
data/doit.sh
data/estonian/doit.sh
data/estonian/estonian.h
data/estonian/iso88594.base
data/estonian/rawcounts.iso88594
data/extreme.pl
data/findletters.c
data/hungarian/doit.sh
data/hungarian/hungarian.h
data/hungarian/iso88592.base
data/hungarian/rawcounts.iso88592
data/latvian/cp1257.base
data/latvian/doit.sh
data/latvian/latvian.h
data/latvian/rawcounts.cp1257
data/lithuanian/cp1257.base
data/lithuanian/doit.sh
data/lithuanian/lithuanian.h
data/lithuanian/rawcounts.cp1257
data/makepaircounts.sh
data/map2letters.sh
data/maps/baltic.map
data/maps/cork.map
data/maps/cp1125.map
data/maps/cp1250.map
data/maps/cp1251.map
data/maps/cp1257.map
data/maps/ecma113.map
data/maps/ibm775.map
data/maps/ibm852.map
data/maps/ibm855.map
data/maps/ibm866-bad.map
data/maps/ibm866.map
data/maps/iso885913.map
data/maps/iso885916.map
data/maps/iso88592.map
data/maps/iso88594.map
data/maps/iso88595.map
data/maps/keybcs2.map
data/maps/koi8cs2.map
data/maps/koi8r.map
data/maps/koi8u.map
data/maps/koi8ub.map
data/maps/koi8uni.map
data/maps/macce.map
data/maps/maccyr.map
data/mystrings.c
data/normalize.pl
data/pairtoc.c
data/polish/doit.sh
data/polish/iso88592.base
data/polish/polish.h
data/polish/rawcounts.iso88592
data/russian/doit.sh
data/russian/koi8r.base
data/russian/paircounts.koi8r
data/russian/rawcounts.koi8r
data/russian/russian.h
data/slovak/cp1250.base
data/slovak/doit.sh
data/slovak/rawcounts.cp1250
data/slovak/slovak.h
data/slovene/doit.sh
data/slovene/iso88592.base
data/slovene/rawcounts.iso88592
data/slovene/slovene.h
data/totals.pl
data/ukrainian/cp1251.base
data/ukrainian/doit.sh
data/ukrainian/paircounts.cp1251
data/ukrainian/rawcounts.cp1251
data/ukrainian/ukrainian.h
data/xlt.c
depcomp
devel-docs/.gitignore
devel-docs/Makefile.am
devel-docs/Makefile.in
devel-docs/html/ch01.html
devel-docs/html/home.png
devel-docs/html/index.html
devel-docs/html/index.sgml
devel-docs/html/left-insensitive.png
devel-docs/html/left.png
devel-docs/html/libenca-Analyser.html
devel-docs/html/libenca-Auxiliary-Functions.html
devel-docs/html/libenca-Charsets-and-Surfaces.html
devel-docs/html/libenca-Typedefs-and-Constants.html
devel-docs/html/libenca.devhelp2
devel-docs/html/right-insensitive.png
devel-docs/html/right.png
devel-docs/html/style.css
devel-docs/html/up-insensitive.png
devel-docs/html/up.png
devel-docs/libenca-decl-list.txt
devel-docs/libenca-decl.txt
devel-docs/libenca-docs.sgml
devel-docs/libenca-overrides.txt
devel-docs/libenca-sections.txt
devel-docs/libenca-undeclared.txt
devel-docs/libenca-undocumented.txt
devel-docs/libenca-unused.txt
devel-docs/libenca.args
devel-docs/libenca.hierarchy
devel-docs/libenca.intefraces
devel-docs/libenca.prerequisites
devel-docs/libenca.signals
devel-docs/tmpl/analyser.sgml
devel-docs/tmpl/auxiliary.sgml
devel-docs/tmpl/encodings.sgml
devel-docs/tmpl/enums.sgml
devel-docs/tmpl/internal.sgml
devel-docs/tmpl/libenca-unused.sgml
devel-docs/xml/analyser.xml
devel-docs/xml/api-index-1.3..xml
devel-docs/xml/api-index-deprecated.xml
devel-docs/xml/api-index-full.xml
devel-docs/xml/auxiliary.xml
devel-docs/xml/encodings.xml
devel-docs/xml/enums.xml
devel-docs/xml/internal.xml
devel-docs/xml/libenca-doc.bottom
devel-docs/xml/libenca-doc.top
devel-docs/xml/object_index.sgml
devel-docs/xml/tree_index.sgml
enca.pc.in
enca.spec.in
iconvcap.c
install-sh
lib/.gitignore
lib/Makefile.am
lib/Makefile.in
lib/common.c
lib/ctype.c
lib/enca.c
lib/enca.h
lib/encnames.c
lib/filters.c
lib/guess.c
lib/internal.h
lib/lang.c
lib/lang_be.c
lib/lang_bg.c
lib/lang_cs.c
lib/lang_et.c
lib/lang_hr.c
lib/lang_hu.c
lib/lang_lt.c
lib/lang_lv.c
lib/lang_pl.c
lib/lang_ru.c
lib/lang_sk.c
lib/lang_sl.c
lib/lang_uk.c
lib/lang_zh.c
lib/multibyte.c
lib/pair.c
lib/unicodemap.c
lib/utf8_double.c
ltmain.sh
m4/crash-me
m4/gcov.m4
m4/gtk-doc.m4
m4/libiconv.m4
m4/libm.m4
m4/librecode.m4
m4/libtool.m4
m4/localias.m4
m4/long-text.l2
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/lt~obsolete.m4
m4/m4_ax_prog_cc_for_build.m4
m4/recode-bugs.m4
m4/tools.m4
m4/typevar.m4
man/enca.1
missing
mkinstalldirs
script/.gitignore
script/Makefile.am
script/Makefile.in
script/b-cstocs.in
script/b-map.in
script/b-piconv.in
script/b-recode
script/b-umap.in
src/.gitignore
src/HELP.in
src/Makefile.am
src/Makefile.in
src/common.h
src/convert.c
src/convert_extern.c
src/convert_iconv.c
src/convert_recode.c
src/enca.c
src/filebuf.c
src/getopt.h
src/getopt_long.c
src/locale_detect.c
src/options.c
src/text2c.sh
test-driver
test/.gitignore
test/Makefile.am
test/Makefile.in
test/be-s.cp1251
test/be-s.ibm855
test/be-s.ibm866
test/be-s.iso88595
test/be-s.koi8uni
test/be-s.maccyr
test/be-s.utf8
test/be-utf8.ibm855
test/be-utf8.iso88595
test/bg-s.cp1251
test/bg-s.cp1251.qp
test/bg-s.ecma113
test/bg-s.ibm855
test/bg-s.iso88595
test/bg-s.maccyr
test/bg-s.utf8
test/bg-utf8.bin
test/bg-utf8.cp1251
test/bg-utf8.ecma113
test/bg-utf8.ibm855
test/bg-utf8.iso88595
test/bg-utf8.maccyr
test/binary
test/cs-s.ambi
test/cs-s.cork
test/cs-s.cp1250
test/cs-s.ibm852
test/cs-s.ibm852.qp
test/cs-s.iso88592
test/cs-s.keybcs2
test/cs-s.koi8cs2
test/cs-s.macce
test/cs-s.tex
test/cs-s.utf8
test/cs-utf8.bin
test/cs-utf8.cork
test/cs-utf8.ibm852
test/cs-utf8.iso88592
test/dummy-converter.sh
test/et-s.baltic
test/et-s.cp1257
test/et-s.ibm775
test/et-s.iso885913
test/et-s.iso88594
test/et-s.iso88594.qp
test/et-s.macce
test/et-s.utf8
test/et-utf8.bin
test/et-utf8.ibm775
test/et-utf8.iso885913
test/et-utf8.iso88594
test/failing-converter.sh
test/failing-converter2.sh
test/finish.sh
test/hr-s.cork
test/hr-s.cp1250
test/hr-s.ibm852
test/hr-s.iso88592
test/hr-s.iso88592.qp
test/hr-s.macce
test/hr-s.utf8
test/hr-utf8.cp1250
test/hr-utf8.ibm852
test/hu-s.cork
test/hu-s.cp1250
test/hu-s.ibm852
test/hu-s.iso88592
test/hu-s.macce
test/hu-s.macce.qp
test/hu-s.utf8
test/hu-utf8.cork
test/hu-utf8.cp1250
test/hu-utf8.ibm852
test/hu-utf8.macce
test/lt-s.baltic
test/lt-s.cp1257
test/lt-s.ibm775
test/lt-s.iso885913
test/lt-s.iso88594
test/lt-s.macce
test/lt-s.utf8
test/lt-utf8.ibm775
test/lt-utf8.iso88594
test/lt-utf8.macce
test/lv-s.baltic
test/lv-s.cp1257
test/lv-s.ibm775
test/lv-s.iso885913
test/lv-s.iso885913.qp
test/lv-s.iso88594
test/lv-s.macce
test/lv-s.utf8
test/lv-utf8.ibm775
test/lv-utf8.iso88594
test/lv-utf8.macce
test/none-s.ucs2
test/none-s.ucs2be.bom
test/none-s.ucs2be.bom.crlf
test/none-s.ucs2be.bom.noeol
test/none-s.ucs2le
test/none-s.ucs2le.bom
test/none-s.ucs2le.qp
test/none-s.ucs4
test/none-s.ucs4le
test/none-s.utf7
test/none-s.utf8
test/none-s.utf8.bom
test/none-utf8.messy
test/pl-s.baltic
test/pl-s.baltic.qp
test/pl-s.cork
test/pl-s.cp1250
test/pl-s.ibm852
test/pl-s.iso885913
test/pl-s.iso885916
test/pl-s.iso88592
test/pl-s.utf8
test/pl-utf8.baltic
test/pl-utf8.ibm852
test/pl-utf8.iso885916
test/ru-s.cp1251
test/ru-s.cp866
test/ru-s.iso88595
test/ru-s.koi8r
test/ru-s.maccyr
test/ru-s.maccyr.qp
test/ru-s.utf8
test/ru-utf8.cp866
test/ru-utf8.koi8r
test/ru-utf8.maccyr
test/setup.sh
test/simtable.c
test/sk-s.cork
test/sk-s.cp1250
test/sk-s.cp1250.qp
test/sk-s.ibm852
test/sk-s.iso88592
test/sk-s.keybcs2
test/sk-s.koi8cs2
test/sk-s.macce
test/sk-s.utf8
test/sk-utf8.cp1250
test/sk-utf8.keybcs2
test/sl-s.cork
test/sl-s.cp1250
test/sl-s.ibm852
test/sl-s.ibm852.qp
test/sl-s.iso88592
test/sl-s.macce
test/sl-s.utf8
test/sl-utf8.cork
test/sl-utf8.ibm852
test/sl-utf8.iso88592
test/sl-utf8.macce
test/test-ENCAOPT.sh
test/test-aliases.sh
test/test-convert-64.sh
test/test-convert-filter.sh
test/test-convlist.sh
test/test-default-cs.sh
test/test-empty.sh
test/test-errors.sh
test/test-external.expected
test/test-external.sh
test/test-guess-short.expected
test/test-guess-short.sh
test/test-guess-stdin.sh
test/test-guess-unknown.expected
test/test-guess-unknown.sh
test/test-guess-utf8.expected
test/test-guess-utf8.sh
test/test-iconv.sh
test/test-lists.sh
test/test-locale.sh
test/test-long-texts.sh
test/test-pP.expected
test/test-pP.sh
test/test-recode.sh
test/test-simtable.sh
test/test-tex.sh
test/uk-s.cp1125
test/uk-s.cp1251
test/uk-s.ibm855
test/uk-s.iso88595
test/uk-s.koi8u
test/uk-s.maccyr
test/uk-s.utf8
test/uk-utf8.bin
test/uk-utf8.cp1251
test/zh-s.big5
test/zh-s.gbk
test/zh-s.hz
test/zh-s.utf8
tools/.gitignore
tools/ACCEPTED_CHARS.t
tools/BASE64.ti
tools/BOXVERT_CP1125.t
tools/BOXVERT_IBM852.t
tools/BOXVERT_KEYBCS2.t
tools/BOXVERT_KOI8R.t
tools/BOXVERT_KOI8RU.t
tools/BOXVERT_KOI8U.t
tools/BOXVERT_KOI8UNI.t
tools/HEXDIGITS.ti
tools/Makefile.am
tools/Makefile.in
tools/TEX_ACCALPHA.t
tools/TEX_ACCPUNCT.t
tools/TEX_SKIP.t
tools/encodings.dat
tools/expand_table.pl
tools/iconvenc.null
tools/make_hash.c
topline.sh
<<<<<< network
# path=/home/travis/build/nijel/enca/lang_lv.c.gcov
-: 0:Source:lang_lv.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_lv.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_lv.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
-: 62:/*EOF*/
-: 63:/*EOF*/
-: 64:/*EOF*/
function hook called 24 returned 100% blocks executed 100%
24: 65:/*EOF*/
-: 66:/*EOF*/
24: 67:/*EOF*/
-: 68:/*EOF*/
-: 69:/*EOF*/
24: 70:/*EOF*/
24: 71:/*EOF*/
24: 72:/*EOF*/
-: 73:/*EOF*/
-: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
-: 80:/*EOF*/
-: 81:/*EOF*/
-: 82:/*EOF*/
-: 83:/*EOF*/
-: 84:/*EOF*/
-: 85:/*EOF*/
-: 86:/*EOF*/
-: 87:/*EOF*/
-: 88:/*EOF*/
-: 89:/*EOF*/
-: 90:/*EOF*/
-: 91:/*EOF*/
-: 92:/*EOF*/
-: 93:/*EOF*/
-: 94:/*EOF*/
-: 95:/*EOF*/
-: 96:/*EOF*/
-: 97:/*EOF*/
-: 98:/*EOF*/
-: 99:/*EOF*/
-: 100:/*EOF*/
-: 101:/*EOF*/
24: 102:/*EOF*/
call 0 returned 100%
-: 103:/*EOF*/
-: 104:/*EOF*/
-: 105:/*EOF*/
-: 106:/*EOF*/
-: 107:/*EOF*/
-: 108:/*EOF*/
-: 109:/*EOF*/
-: 110:/*EOF*/
-: 111:/*EOF*/
-: 112:/*EOF*/
-: 113:/*EOF*/
-: 114:/*EOF*/
-: 115:/*EOF*/
-: 116:/*EOF*/
-: 117:/*EOF*/
-: 118:/*EOF*/
-: 119:/*EOF*/
-: 120:/*EOF*/
-: 121:/*EOF*/
24: 122:/*EOF*/
call 0 returned 100%
<<<<<< EOF
# path=/home/travis/build/nijel/enca/^#data#chinese#zh_weight_gbk.h.gcov
-: 0:Source:../data/chinese/zh_weight_gbk.h
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_zh.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_zh.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
-: 62:/*EOF*/
-: 63:/*EOF*/
-: 64:/*EOF*/
-: 65:/*EOF*/
-: 66:/*EOF*/
-: 67:/*EOF*/
-: 68:/*EOF*/
-: 69:/*EOF*/
-: 70:/*EOF*/
-: 71:/*EOF*/
-: 72:/*EOF*/
-: 73:/*EOF*/
-: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
-: 80:/*EOF*/
-: 81:/*EOF*/
-: 82:/*EOF*/
-: 83:/*EOF*/
-: 84:/*EOF*/
684: 85:/*EOF*/
-: 86:/*EOF*/
-: 87:/*EOF*/
function in_gbk called 684 returned 100% blocks executed 100%
684: 88:/*EOF*/
-: 89:/*EOF*/
-: 90:/*EOF*/
-: 91:/*EOF*/
-: 92:/*EOF*/
-: 93:/*EOF*/
-: 94:/*EOF*/
-: 95:/*EOF*/
-: 96:/*EOF*/
-: 97:/*EOF*/
-: 98:/*EOF*/
-: 99:/*EOF*/
-: 100:/*EOF*/
-: 101:/*EOF*/
-: 102:/*EOF*/
-: 103:/*EOF*/
-: 104:/*EOF*/
-: 105:/*EOF*/
-: 106:/*EOF*/
-: 107:/*EOF*/
-: 108:/*EOF*/
-: 109:/*EOF*/
-: 110:/*EOF*/
-: 111:/*EOF*/
-: 112:/*EOF*/
-: 113:/*EOF*/
-: 114:/*EOF*/
-: 115:/*EOF*/
-: 116:/*EOF*/
-: 117:/*EOF*/
-: 118:/*EOF*/
-: 119:/*EOF*/
-: 120:/*EOF*/
-: 121:/*EOF*/
-: 122:/*EOF*/
-: 123:/*EOF*/
-: 124:/*EOF*/
-: 125:/*EOF*/
-: 126:/*EOF*/
-: 127:/*EOF*/
-: 128:/*EOF*/
-: 129:/*EOF*/
-: 130:/*EOF*/
-: 131:/*EOF*/
-: 132:/*EOF*/
-: 133:/*EOF*/
-: 134:/*EOF*/
-: 135:/*EOF*/
-: 136:/*EOF*/
-: 137:/*EOF*/
-: 138:/*EOF*/
-: 139:/*EOF*/
-: 140:/*EOF*/
-: 141:/*EOF*/
-: 142:/*EOF*/
-: 143:/*EOF*/
-: 144:/*EOF*/
-: 145:/*EOF*/
-: 146:/*EOF*/
-: 147:/*EOF*/
-: 148:/*EOF*/
-: 149:/*EOF*/
-: 150:/*EOF*/
-: 151:/*EOF*/
-: 152:/*EOF*/
-: 153:/*EOF*/
-: 154:/*EOF*/
-: 155:/*EOF*/
-: 156:/*EOF*/
-: 157:/*EOF*/
-: 158:/*EOF*/
-: 159:/*EOF*/
-: 160:/*EOF*/
-: 161:/*EOF*/
-: 162:/*EOF*/
-: 163:/*EOF*/
-: 164:/*EOF*/
-: 165:/*EOF*/
-: 166:/*EOF*/
-: 167:/*EOF*/
-: 168:/*EOF*/
-: 169:/*EOF*/
-: 170:/*EOF*/
-: 171:/*EOF*/
-: 172:/*EOF*/
-: 173:/*EOF*/
-: 174:/*EOF*/
-: 175:/*EOF*/
-: 176:/*EOF*/
-: 177:/*EOF*/
-: 178:/*EOF*/
-: 179:/*EOF*/
-: 180:/*EOF*/
-: 181:/*EOF*/
-: 182:/*EOF*/
-: 183:/*EOF*/
-: 184:/*EOF*/
-: 185:/*EOF*/
-: 186:/*EOF*/
-: 187:/*EOF*/
-: 188:/*EOF*/
-: 189:/*EOF*/
-: 190:/*EOF*/
-: 191:/*EOF*/
-: 192:/*EOF*/
-: 193:/*EOF*/
-: 194:/*EOF*/
-: 195:/*EOF*/
-: 196:/*EOF*/
-: 197:/*EOF*/
-: 198:/*EOF*/
-: 199:/*EOF*/
-: 200:/*EOF*/
-: 201:/*EOF*/
-: 202:/*EOF*/
-: 203:/*EOF*/
-: 204:/*EOF*/
-: 205:/*EOF*/
-: 206:/*EOF*/
-: 207:/*EOF*/
-: 208:/*EOF*/
-: 209:/*EOF*/
-: 210:/*EOF*/
-: 211:/*EOF*/
-: 212:/*EOF*/
-: 213:/*EOF*/
-: 214:/*EOF*/
-: 215:/*EOF*/
-: 216:/*EOF*/
-: 217:/*EOF*/
-: 218:/*EOF*/
-: 219:/*EOF*/
-: 220:/*EOF*/
-: 221:/*EOF*/
-: 222:/*EOF*/
-: 223:/*EOF*/
-: 224:/*EOF*/
-: 225:/*EOF*/
-: 226:/*EOF*/
-: 227:/*EOF*/
-: 228:/*EOF*/
-: 229:/*EOF*/
-: 230:/*EOF*/
-: 231:/*EOF*/
-: 232:/*EOF*/
-: 233:/*EOF*/
-: 234:/*EOF*/
-: 235:/*EOF*/
-: 236:/*EOF*/
-: 237:/*EOF*/
-: 238:/*EOF*/
-: 239:/*EOF*/
-: 240:/*EOF*/
-: 241:/*EOF*/
-: 242:/*EOF*/
-: 243:/*EOF*/
-: 244:/*EOF*/
-: 245:/*EOF*/
-: 246:/*EOF*/
-: 247:/*EOF*/
-: 248:/*EOF*/
-: 249:/*EOF*/
-: 250:/*EOF*/
-: 251:/*EOF*/
-: 252:/*EOF*/
-: 253:/*EOF*/
-: 254:/*EOF*/
-: 255:/*EOF*/
-: 256:/*EOF*/
-: 257:/*EOF*/
-: 258:/*EOF*/
-: 259:/*EOF*/
-: 260:/*EOF*/
-: 261:/*EOF*/
-: 262:/*EOF*/
-: 263:/*EOF*/
-: 264:/*EOF*/
-: 265:/*EOF*/
-: 266:/*EOF*/
-: 267:/*EOF*/
-: 268:/*EOF*/
-: 269:/*EOF*/
-: 270:/*EOF*/
-: 271:/*EOF*/
-: 272:/*EOF*/
-: 273:/*EOF*/
-: 274:/*EOF*/
-: 275:/*EOF*/
-: 276:/*EOF*/
-: 277:/*EOF*/
-: 278:/*EOF*/
-: 279:/*EOF*/
-: 280:/*EOF*/
-: 281:/*EOF*/
-: 282:/*EOF*/
-: 283:/*EOF*/
-: 284:/*EOF*/
-: 285:/*EOF*/
-: 286:/*EOF*/
-: 287:/*EOF*/
-: 288:/*EOF*/
-: 289:/*EOF*/
-: 290:/*EOF*/
-: 291:/*EOF*/
-: 292:/*EOF*/
-: 293:/*EOF*/
-: 294:/*EOF*/
-: 295:/*EOF*/
-: 296:/*EOF*/
-: 297:/*EOF*/
-: 298:/*EOF*/
-: 299:/*EOF*/
-: 300:/*EOF*/
-: 301:/*EOF*/
-: 302:/*EOF*/
-: 303:/*EOF*/
-: 304:/*EOF*/
-: 305:/*EOF*/
-: 306:/*EOF*/
-: 307:/*EOF*/
-: 308:/*EOF*/
-: 309:/*EOF*/
-: 310:/*EOF*/
-: 311:/*EOF*/
-: 312:/*EOF*/
-: 313:/*EOF*/
-: 314:/*EOF*/
-: 315:/*EOF*/
-: 316:/*EOF*/
-: 317:/*EOF*/
-: 318:/*EOF*/
-: 319:/*EOF*/
-: 320:/*EOF*/
-: 321:/*EOF*/
-: 322:/*EOF*/
-: 323:/*EOF*/
-: 324:/*EOF*/
-: 325:/*EOF*/
-: 326:/*EOF*/
-: 327:/*EOF*/
-: 328:/*EOF*/
-: 329:/*EOF*/
-: 330:/*EOF*/
-: 331:/*EOF*/
-: 332:/*EOF*/
-: 333:/*EOF*/
-: 334:/*EOF*/
-: 335:/*EOF*/
-: 336:/*EOF*/
-: 337:/*EOF*/
-: 338:/*EOF*/
-: 339:/*EOF*/
-: 340:/*EOF*/
-: 341:/*EOF*/
-: 342:/*EOF*/
-: 343:/*EOF*/
-: 344:/*EOF*/
-: 345:/*EOF*/
-: 346:/*EOF*/
-: 347:/*EOF*/
-: 348:/*EOF*/
-: 349:/*EOF*/
-: 350:/*EOF*/
-: 351:/*EOF*/
-: 352:/*EOF*/
-: 353:/*EOF*/
-: 354:/*EOF*/
-: 355:/*EOF*/
-: 356:/*EOF*/
-: 357:/*EOF*/
-: 358:/*EOF*/
-: 359:/*EOF*/
-: 360:/*EOF*/
-: 361:/*EOF*/
-: 362:/*EOF*/
-: 363:/*EOF*/
-: 364:/*EOF*/
-: 365:/*EOF*/
-: 366:/*EOF*/
-: 367:/*EOF*/
-: 368:/*EOF*/
-: 369:/*EOF*/
-: 370:/*EOF*/
-: 371:/*EOF*/
-: 372:/*EOF*/
-: 373:/*EOF*/
-: 374:/*EOF*/
-: 375:/*EOF*/
-: 376:/*EOF*/
-: 377:/*EOF*/
-: 378:/*EOF*/
-: 379:/*EOF*/
-: 380:/*EOF*/
-: 381:/*EOF*/
-: 382:/*EOF*/
-: 383:/*EOF*/
-: 384:/*EOF*/
-: 385:/*EOF*/
-: 386:/*EOF*/
-: 387:/*EOF*/
-: 388:/*EOF*/
-: 389:/*EOF*/
-: 390:/*EOF*/
-: 391:/*EOF*/
-: 392:/*EOF*/
-: 393:/*EOF*/
-: 394:/*EOF*/
-: 395:/*EOF*/
-: 396:/*EOF*/
-: 397:/*EOF*/
-: 398:/*EOF*/
-: 399:/*EOF*/
-: 400:/*EOF*/
-: 401:/*EOF*/
-: 402:/*EOF*/
-: 403:/*EOF*/
-: 404:/*EOF*/
-: 405:/*EOF*/
-: 406:/*EOF*/
-: 407:/*EOF*/
-: 408:/*EOF*/
-: 409:/*EOF*/
-: 410:/*EOF*/
-: 411:/*EOF*/
-: 412:/*EOF*/
-: 413:/*EOF*/
-: 414:/*EOF*/
-: 415:/*EOF*/
-: 416:/*EOF*/
-: 417:/*EOF*/
-: 418:/*EOF*/
-: 419:/*EOF*/
-: 420:/*EOF*/
-: 421:/*EOF*/
-: 422:/*EOF*/
-: 423:/*EOF*/
-: 424:/*EOF*/
-: 425:/*EOF*/
-: 426:/*EOF*/
-: 427:/*EOF*/
-: 428:/*EOF*/
-: 429:/*EOF*/
-: 430:/*EOF*/
-: 431:/*EOF*/
-: 432:/*EOF*/
-: 433:/*EOF*/
-: 434:/*EOF*/
-: 435:/*EOF*/
-: 436:/*EOF*/
-: 437:/*EOF*/
-: 438:/*EOF*/
-: 439:/*EOF*/
-: 440:/*EOF*/
-: 441:/*EOF*/
-: 442:/*EOF*/
-: 443:/*EOF*/
-: 444:/*EOF*/
-: 445:/*EOF*/
-: 446:/*EOF*/
-: 447:/*EOF*/
-: 448:/*EOF*/
-: 449:/*EOF*/
-: 450:/*EOF*/
-: 451:/*EOF*/
-: 452:/*EOF*/
-: 453:/*EOF*/
-: 454:/*EOF*/
-: 455:/*EOF*/
-: 456:/*EOF*/
-: 457:/*EOF*/
-: 458:/*EOF*/
-: 459:/*EOF*/
-: 460:/*EOF*/
-: 461:/*EOF*/
-: 462:/*EOF*/
-: 463:/*EOF*/
-: 464:/*EOF*/
-: 465:/*EOF*/
-: 466:/*EOF*/
-: 467:/*EOF*/
-: 468:/*EOF*/
-: 469:/*EOF*/
-: 470:/*EOF*/
-: 471:/*EOF*/
-: 472:/*EOF*/
-: 473:/*EOF*/
-: 474:/*EOF*/
-: 475:/*EOF*/
-: 476:/*EOF*/
-: 477:/*EOF*/
-: 478:/*EOF*/
-: 479:/*EOF*/
-: 480:/*EOF*/
-: 481:/*EOF*/
-: 482:/*EOF*/
-: 483:/*EOF*/
-: 484:/*EOF*/
-: 485:/*EOF*/
-: 486:/*EOF*/
-: 487:/*EOF*/
-: 488:/*EOF*/
-: 489:/*EOF*/
-: 490:/*EOF*/
-: 491:/*EOF*/
-: 492:/*EOF*/
-: 493:/*EOF*/
-: 494:/*EOF*/
-: 495:/*EOF*/
-: 496:/*EOF*/
-: 497:/*EOF*/
-: 498:/*EOF*/
-: 499:/*EOF*/
-: 500:/*EOF*/
-: 501:/*EOF*/
-: 502:/*EOF*/
-: 503:/*EOF*/
-: 504:/*EOF*/
-: 505:/*EOF*/
-: 506:/*EOF*/
-: 507:/*EOF*/
-: 508:/*EOF*/
-: 509:/*EOF*/
-: 510:/*EOF*/
-: 511:/*EOF*/
-: 512:/*EOF*/
-: 513:/*EOF*/
-: 514:/*EOF*/
-: 515:/*EOF*/
-: 516:/*EOF*/
-: 517:/*EOF*/
-: 518:/*EOF*/
-: 519:/*EOF*/
-: 520:/*EOF*/
-: 521:/*EOF*/
-: 522:/*EOF*/
-: 523:/*EOF*/
-: 524:/*EOF*/
-: 525:/*EOF*/
-: 526:/*EOF*/
-: 527:/*EOF*/
-: 528:/*EOF*/
-: 529:/*EOF*/
-: 530:/*EOF*/
-: 531:/*EOF*/
-: 532:/*EOF*/
-: 533:/*EOF*/
-: 534:/*EOF*/
-: 535:/*EOF*/
-: 536:/*EOF*/
-: 537:/*EOF*/
-: 538:/*EOF*/
-: 539:/*EOF*/
-: 540:/*EOF*/
-: 541:/*EOF*/
-: 542:/*EOF*/
-: 543:/*EOF*/
-: 544:/*EOF*/
-: 545:/*EOF*/
-: 546:/*EOF*/
-: 547:/*EOF*/
-: 548:/*EOF*/
-: 549:/*EOF*/
-: 550:/*EOF*/
-: 551:/*EOF*/
-: 552:/*EOF*/
-: 553:/*EOF*/
-: 554:/*EOF*/
-: 555:/*EOF*/
-: 556:/*EOF*/
-: 557:/*EOF*/
-: 558:/*EOF*/
-: 559:/*EOF*/
-: 560:/*EOF*/
-: 561:/*EOF*/
-: 562:/*EOF*/
-: 563:/*EOF*/
-: 564:/*EOF*/
-: 565:/*EOF*/
-: 566:/*EOF*/
-: 567:/*EOF*/
-: 568:/*EOF*/
-: 569:/*EOF*/
-: 570:/*EOF*/
-: 571:/*EOF*/
-: 572:/*EOF*/
-: 573:/*EOF*/
-: 574:/*EOF*/
-: 575:/*EOF*/
-: 576:/*EOF*/
-: 577:/*EOF*/
-: 578:/*EOF*/
-: 579:/*EOF*/
-: 580:/*EOF*/
-: 581:/*EOF*/
-: 582:/*EOF*/
-: 583:/*EOF*/
-: 584:/*EOF*/
-: 585:/*EOF*/
-: 586:/*EOF*/
-: 587:/*EOF*/
-: 588:/*EOF*/
-: 589:/*EOF*/
-: 590:/*EOF*/
-: 591:/*EOF*/
-: 592:/*EOF*/
-: 593:/*EOF*/
-: 594:/*EOF*/
-: 595:/*EOF*/
-: 596:/*EOF*/
-: 597:/*EOF*/
-: 598:/*EOF*/
-: 599:/*EOF*/
-: 600:/*EOF*/
-: 601:/*EOF*/
-: 602:/*EOF*/
-: 603:/*EOF*/
-: 604:/*EOF*/
-: 605:/*EOF*/
-: 606:/*EOF*/
-: 607:/*EOF*/
-: 608:/*EOF*/
-: 609:/*EOF*/
-: 610:/*EOF*/
-: 611:/*EOF*/
-: 612:/*EOF*/
-: 613:/*EOF*/
-: 614:/*EOF*/
-: 615:/*EOF*/
-: 616:/*EOF*/
-: 617:/*EOF*/
-: 618:/*EOF*/
-: 619:/*EOF*/
-: 620:/*EOF*/
-: 621:/*EOF*/
-: 622:/*EOF*/
-: 623:/*EOF*/
-: 624:/*EOF*/
-: 625:/*EOF*/
-: 626:/*EOF*/
-: 627:/*EOF*/
-: 628:/*EOF*/
-: 629:/*EOF*/
-: 630:/*EOF*/
-: 631:/*EOF*/
-: 632:/*EOF*/
-: 633:/*EOF*/
-: 634:/*EOF*/
-: 635:/*EOF*/
-: 636:/*EOF*/
-: 637:/*EOF*/
-: 638:/*EOF*/
-: 639:/*EOF*/
-: 640:/*EOF*/
-: 641:/*EOF*/
-: 642:/*EOF*/
-: 643:/*EOF*/
-: 644:/*EOF*/
-: 645:/*EOF*/
-: 646:/*EOF*/
-: 647:/*EOF*/
-: 648:/*EOF*/
-: 649:/*EOF*/
-: 650:/*EOF*/
-: 651:/*EOF*/
-: 652:/*EOF*/
-: 653:/*EOF*/
-: 654:/*EOF*/
-: 655:/*EOF*/
-: 656:/*EOF*/
-: 657:/*EOF*/
-: 658:/*EOF*/
-: 659:/*EOF*/
-: 660:/*EOF*/
-: 661:/*EOF*/
-: 662:/*EOF*/
-: 663:/*EOF*/
-: 664:/*EOF*/
-: 665:/*EOF*/
-: 666:/*EOF*/
-: 667:/*EOF*/
-: 668:/*EOF*/
-: 669:/*EOF*/
-: 670:/*EOF*/
-: 671:/*EOF*/
-: 672:/*EOF*/
-: 673:/*EOF*/
-: 674:/*EOF*/
-: 675:/*EOF*/
-: 676:/*EOF*/
-: 677:/*EOF*/
-: 678:/*EOF*/
-: 679:/*EOF*/
-: 680:/*EOF*/
-: 681:/*EOF*/
-: 682:/*EOF*/
-: 683:/*EOF*/
-: 684:/*EOF*/
-: 685:/*EOF*/
-: 686:/*EOF*/
-: 687:/*EOF*/
-: 688:/*EOF*/
-: 689:/*EOF*/
-: 690:/*EOF*/
-: 691:/*EOF*/
-: 692:/*EOF*/
-: 693:/*EOF*/
-: 694:/*EOF*/
-: 695:/*EOF*/
-: 696:/*EOF*/
-: 697:/*EOF*/
-: 698:/*EOF*/
-: 699:/*EOF*/
-: 700:/*EOF*/
-: 701:/*EOF*/
-: 702:/*EOF*/
-: 703:/*EOF*/
-: 704:/*EOF*/
-: 705:/*EOF*/
-: 706:/*EOF*/
-: 707:/*EOF*/
-: 708:/*EOF*/
684: 709:/*EOF*/
-: 710:/*EOF*/
684: 711:/*EOF*/
branch 0 taken 50% (fallthrough)
branch 1 taken 50%
-: 712:/*EOF*/
345: 713:/*EOF*/
-: 714:/*EOF*/
345: 715:/*EOF*/
branch 0 taken 87% (fallthrough)
branch 1 taken 13%
-: 716:/*EOF*/
300: 717:/*EOF*/
-: 718:/*EOF*/
300: 719:/*EOF*/
branch 0 taken 59% (fallthrough)
branch 1 taken 41%
branch 2 taken 98% (fallthrough)
branch 3 taken 2%
174: 720:/*EOF*/
-: 721:/*EOF*/
-: 722:/*EOF*/
-: 723:/*EOF*/
-: 724:/*EOF*/
-: 725:/*EOF*/
-: 726:/*EOF*/
-: 727:/*EOF*/
-: 728:/*EOF*/
-: 729:/*EOF*/
-: 730:/*EOF*/
-: 731:/*EOF*/
-: 732:/*EOF*/
-: 733:/*EOF*/
-: 734:/*EOF*/
function is_gbk called 684 returned 100% blocks executed 80%
684: 735:/*EOF*/
-: 736:/*EOF*/
684: 737:/*EOF*/
684: 738:/*EOF*/
-: 739:/*EOF*/
1368: 740:/*EOF*/
684: 741:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
branch 2 taken 100% (fallthrough)
branch 3 taken 0%
branch 4 taken 0% (fallthrough)
branch 5 taken 100%
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lang_pl.c.gcov
-: 0:Source:lang_pl.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_pl.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_pl.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
-: 62:/*EOF*/
-: 63:/*EOF*/
-: 64:/*EOF*/
-: 65:/*EOF*/
-: 66:/*EOF*/
function hook called 27 returned 100% blocks executed 100%
27: 67:/*EOF*/
-: 68:/*EOF*/
54: 69:/*EOF*/
45: 70:/*EOF*/
branch 0 taken 67% (fallthrough)
branch 1 taken 33%
branch 2 taken 50% (fallthrough)
branch 3 taken 50%
-: 71:/*EOF*/
-: 72:/*EOF*/
-: 73:/*EOF*/
-: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
-: 80:/*EOF*/
-: 81:/*EOF*/
-: 82:/*EOF*/
function eol_hook called 0 returned 0% blocks executed 0%
#####: 83:/*EOF*/
-: 84:/*EOF*/
#####: 85:/*EOF*/
-: 86:/*EOF*/
-: 87:/*EOF*/
-: 88:/*EOF*/
-: 89:/*EOF*/
-: 90:/*EOF*/
-: 91:/*EOF*/
-: 92:/*EOF*/
-: 93:/*EOF*/
-: 94:/*EOF*/
-: 95:/*EOF*/
-: 96:/*EOF*/
-: 97:/*EOF*/
-: 98:/*EOF*/
-: 99:/*EOF*/
-: 100:/*EOF*/
-: 101:/*EOF*/
-: 102:/*EOF*/
-: 103:/*EOF*/
-: 104:/*EOF*/
#####: 105:/*EOF*/
call 0 never executed
-: 106:/*EOF*/
-: 107:/*EOF*/
-: 108:/*EOF*/
-: 109:/*EOF*/
-: 110:/*EOF*/
-: 111:/*EOF*/
-: 112:/*EOF*/
-: 113:/*EOF*/
-: 114:/*EOF*/
-: 115:/*EOF*/
-: 116:/*EOF*/
-: 117:/*EOF*/
-: 118:/*EOF*/
-: 119:/*EOF*/
-: 120:/*EOF*/
-: 121:/*EOF*/
-: 122:/*EOF*/
-: 123:/*EOF*/
-: 124:/*EOF*/
-: 125:/*EOF*/
-: 126:/*EOF*/
-: 127:/*EOF*/
-: 128:/*EOF*/
-: 129:/*EOF*/
-: 130:/*EOF*/
27: 131:/*EOF*/
call 0 returned 100%
-: 132:/*EOF*/
-: 133:/*EOF*/
-: 134:/*EOF*/
-: 135:/*EOF*/
-: 136:/*EOF*/
-: 137:/*EOF*/
-: 138:/*EOF*/
-: 139:/*EOF*/
-: 140:/*EOF*/
-: 141:/*EOF*/
-: 142:/*EOF*/
-: 143:/*EOF*/
-: 144:/*EOF*/
-: 145:/*EOF*/
-: 146:/*EOF*/
-: 147:/*EOF*/
-: 148:/*EOF*/
-: 149:/*EOF*/
-: 150:/*EOF*/
-: 151:/*EOF*/
-: 152:/*EOF*/
-: 153:/*EOF*/
-: 154:/*EOF*/
-: 155:/*EOF*/
-: 156:/*EOF*/
18: 157:/*EOF*/
call 0 returned 100%
<<<<<< EOF
# path=/home/travis/build/nijel/enca/#usr#include#x86_64-linux-gnu#bits#stdio.h.gcov
-: 0:Source:/usr/include/x86_64-linux-gnu/bits/stdio.h
-: 0:Graph:/home/travis/build/nijel/enca/src/enca-options.gcno
-: 0:Data:/home/travis/build/nijel/enca/src/enca-options.gcda
-: 0:Runs:275
-: 0:Programs:1
-: 1:/* Optimizing macros and inline functions for stdio functions.
-: 2: Copyright (C) 1998-2016 Free Software Foundation, Inc.
-: 3: This file is part of the GNU C Library.
-: 4:
-: 5: The GNU C Library is free software; you can redistribute it and/or
-: 6: modify it under the terms of the GNU Lesser General Public
-: 7: License as published by the Free Software Foundation; either
-: 8: version 2.1 of the License, or (at your option) any later version.
-: 9:
-: 10: The GNU C Library is distributed in the hope that it will be useful,
-: 11: but WITHOUT ANY WARRANTY; without even the implied warranty of
-: 12: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-: 13: Lesser General Public License for more details.
-: 14:
-: 15: You should have received a copy of the GNU Lesser General Public
-: 16: License along with the GNU C Library; if not, see
-: 17: . */
-: 18:
-: 19:#ifndef _STDIO_H
-: 20:# error "Never include directly; use instead."
-: 21:#endif
-: 22:
-: 23:#ifndef __extern_inline
-: 24:# define __STDIO_INLINE inline
-: 25:#else
-: 26:# define __STDIO_INLINE __extern_inline
-: 27:#endif
-: 28:
-: 29:
-: 30:#ifdef __USE_EXTERN_INLINES
-: 31:/* For -D_FORTIFY_SOURCE{,=2} bits/stdio2.h will define a different
-: 32: inline. */
-: 33:# if !(__USE_FORTIFY_LEVEL > 0 && defined __fortify_function)
-: 34:/* Write formatted output to stdout from argument list ARG. */
-: 35:__STDIO_INLINE int
-: 36:vprintf (const char *__restrict __fmt, _G_va_list __arg)
-: 37:{
-: 38: return vfprintf (stdout, __fmt, __arg);
-: 39:}
-: 40:# endif
-: 41:
-: 42:/* Read a character from stdin. */
-: 43:__STDIO_INLINE int
-: 44:getchar (void)
-: 45:{
-: 46: return _IO_getc (stdin);
-: 47:}
-: 48:
-: 49:
-: 50:# ifdef __USE_MISC
-: 51:/* Faster version when locking is not necessary. */
-: 52:__STDIO_INLINE int
-: 53:fgetc_unlocked (FILE *__fp)
-: 54:{
-: 55: return _IO_getc_unlocked (__fp);
-: 56:}
-: 57:# endif /* misc */
-: 58:
-: 59:
-: 60:# ifdef __USE_POSIX
-: 61:/* This is defined in POSIX.1:1996. */
-: 62:__STDIO_INLINE int
-: 63:getc_unlocked (FILE *__fp)
-: 64:{
-: 65: return _IO_getc_unlocked (__fp);
-: 66:}
-: 67:
-: 68:/* This is defined in POSIX.1:1996. */
-: 69:__STDIO_INLINE int
-: 70:getchar_unlocked (void)
-: 71:{
-: 72: return _IO_getc_unlocked (stdin);
-: 73:}
-: 74:# endif /* POSIX */
-: 75:
-: 76:
-: 77:/* Write a character to stdout. */
-: 78:__STDIO_INLINE int
-: 79:putchar (int __c)
-: 80:{
47: 81: return _IO_putc (__c, stdout);
call 0 returned 100%
call 1 never executed
call 2 returned 100%
-: 82:}
-: 83:
-: 84:
-: 85:# ifdef __USE_MISC
-: 86:/* Faster version when locking is not necessary. */
-: 87:__STDIO_INLINE int
-: 88:fputc_unlocked (int __c, FILE *__stream)
-: 89:{
-: 90: return _IO_putc_unlocked (__c, __stream);
-: 91:}
-: 92:# endif /* misc */
-: 93:
-: 94:
-: 95:# ifdef __USE_POSIX
-: 96:/* This is defined in POSIX.1:1996. */
-: 97:__STDIO_INLINE int
-: 98:putc_unlocked (int __c, FILE *__stream)
-: 99:{
-: 100: return _IO_putc_unlocked (__c, __stream);
-: 101:}
-: 102:
-: 103:/* This is defined in POSIX.1:1996. */
-: 104:__STDIO_INLINE int
-: 105:putchar_unlocked (int __c)
-: 106:{
-: 107: return _IO_putc_unlocked (__c, stdout);
-: 108:}
-: 109:# endif /* POSIX */
-: 110:
-: 111:
-: 112:# ifdef __USE_GNU
-: 113:/* Like `getdelim', but reads up to a newline. */
-: 114:__STDIO_INLINE _IO_ssize_t
-: 115:getline (char **__lineptr, size_t *__n, FILE *__stream)
-: 116:{
-: 117: return __getdelim (__lineptr, __n, '\n', __stream);
-: 118:}
-: 119:# endif /* GNU */
-: 120:
-: 121:
-: 122:# ifdef __USE_MISC
-: 123:/* Faster versions when locking is not required. */
-: 124:__STDIO_INLINE int
-: 125:__NTH (feof_unlocked (FILE *__stream))
-: 126:{
-: 127: return _IO_feof_unlocked (__stream);
-: 128:}
-: 129:
-: 130:/* Faster versions when locking is not required. */
-: 131:__STDIO_INLINE int
-: 132:__NTH (ferror_unlocked (FILE *__stream))
-: 133:{
-: 134: return _IO_ferror_unlocked (__stream);
-: 135:}
-: 136:# endif /* misc */
-: 137:
-: 138:#endif /* Use extern inlines. */
-: 139:
-: 140:
-: 141:#if defined __USE_MISC && defined __GNUC__ && defined __OPTIMIZE__ \
-: 142: && !defined __cplusplus
-: 143:/* Perform some simple optimizations. */
-: 144:# define fread_unlocked(ptr, size, n, stream) \
-: 145: (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) \
-: 146: && (size_t) (size) * (size_t) (n) <= 8 \
-: 147: && (size_t) (size) != 0) \
-: 148: ? ({ char *__ptr = (char *) (ptr); \
-: 149: FILE *__stream = (stream); \
-: 150: size_t __cnt; \
-: 151: for (__cnt = (size_t) (size) * (size_t) (n); \
-: 152: __cnt > 0; --__cnt) \
-: 153: { \
-: 154: int __c = _IO_getc_unlocked (__stream); \
-: 155: if (__c == EOF) \
-: 156: break; \
-: 157: *__ptr++ = __c; \
-: 158: } \
-: 159: ((size_t) (size) * (size_t) (n) - __cnt) \
-: 160: / (size_t) (size); }) \
-: 161: : (((__builtin_constant_p (size) && (size_t) (size) == 0) \
-: 162: || (__builtin_constant_p (n) && (size_t) (n) == 0)) \
-: 163: /* Evaluate all parameters once. */ \
-: 164: ? ((void) (ptr), (void) (stream), (void) (size), \
-: 165: (void) (n), (size_t) 0) \
-: 166: : fread_unlocked (ptr, size, n, stream))))
-: 167:
-: 168:# define fwrite_unlocked(ptr, size, n, stream) \
-: 169: (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) \
-: 170: && (size_t) (size) * (size_t) (n) <= 8 \
-: 171: && (size_t) (size) != 0) \
-: 172: ? ({ const char *__ptr = (const char *) (ptr); \
-: 173: FILE *__stream = (stream); \
-: 174: size_t __cnt; \
-: 175: for (__cnt = (size_t) (size) * (size_t) (n); \
-: 176: __cnt > 0; --__cnt) \
-: 177: if (_IO_putc_unlocked (*__ptr++, __stream) == EOF) \
-: 178: break; \
-: 179: ((size_t) (size) * (size_t) (n) - __cnt) \
-: 180: / (size_t) (size); }) \
-: 181: : (((__builtin_constant_p (size) && (size_t) (size) == 0) \
-: 182: || (__builtin_constant_p (n) && (size_t) (n) == 0)) \
-: 183: /* Evaluate all parameters once. */ \
-: 184: ? ((void) (ptr), (void) (stream), (void) (size), \
-: 185: (void) (n), (size_t) 0) \
-: 186: : fwrite_unlocked (ptr, size, n, stream))))
-: 187:#endif
-: 188:
-: 189:/* Define helper macro. */
-: 190:#undef __STDIO_INLINE
<<<<<< EOF
# path=/home/travis/build/nijel/enca/simtable.c.gcov
-: 0:Source:simtable.c
-: 0:Graph:/home/travis/build/nijel/enca/test/simtable.gcno
-: 0:Data:/home/travis/build/nijel/enca/test/simtable.gcda
-: 0:Runs:1
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
function prl called 13 returned 100% blocks executed 83%
13: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
13: 19:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
-: 20:/*EOF*/
#####: 21:/*EOF*/
branch 0 never executed
branch 1 never executed
branch 2 never executed
branch 3 never executed
#####: 22:/*EOF*/
#####: 23:/*EOF*/
branch 0 never executed
branch 1 never executed
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
26: 27:/*EOF*/
13: 28:/*EOF*/
91: 29:/*EOF*/
call 0 returned 100%
branch 1 taken 86% (fallthrough)
branch 2 taken 14%
480: 30:/*EOF*/
branch 0 taken 86%
branch 1 taken 14% (fallthrough)
480: 31:/*EOF*/
-: 32:/*EOF*/
480: 33:/*EOF*/
branch 0 taken 16% (fallthrough)
branch 1 taken 84%
-: 34:/*EOF*/
402: 35:/*EOF*/
branch 0 taken 10% (fallthrough)
branch 1 taken 90%
-: 36:/*EOF*/
362: 37:/*EOF*/
branch 0 taken 6% (fallthrough)
branch 1 taken 94%
-: 38:/*EOF*/
342: 39:/*EOF*/
branch 0 taken 12% (fallthrough)
branch 1 taken 88%
-: 40:/*EOF*/
302: 41:/*EOF*/
branch 0 taken 61% (fallthrough)
branch 1 taken 39%
-: 42:/*EOF*/
480: 43:/*EOF*/
480: 44:/*EOF*/
-: 45:/*EOF*/
156: 46:/*EOF*/
-: 47:/*EOF*/
13: 48:/*EOF*/
13: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
function main called 1 returned 100% blocks executed 100%
1: 53:/*EOF*/
-: 54:/*EOF*/
1: 55:/*EOF*/
1: 56:/*EOF*/
-: 57:/*EOF*/
1: 58:/*EOF*/
call 0 returned 100%
1: 59:/*EOF*/
call 0 returned 100%
1: 60:/*EOF*/
call 0 returned 100%
1: 61:/*EOF*/
call 0 returned 100%
1: 62:/*EOF*/
call 0 returned 100%
1: 63:/*EOF*/
call 0 returned 100%
1: 64:/*EOF*/
call 0 returned 100%
1: 65:/*EOF*/
call 0 returned 100%
1: 66:/*EOF*/
call 0 returned 100%
1: 67:/*EOF*/
call 0 returned 100%
1: 68:/*EOF*/
call 0 returned 100%
1: 69:/*EOF*/
call 0 returned 100%
1: 70:/*EOF*/
call 0 returned 100%
<<<<<< EOF
# path=/home/travis/build/nijel/enca/convert_recode.c.gcov
-: 0:Source:convert_recode.c
-: 0:Graph:/home/travis/build/nijel/enca/src/enca-convert_recode.gcno
-: 0:Data:/home/travis/build/nijel/enca/src/enca-convert_recode.gcda
-: 0:Runs:275
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
function convert_recode called 11 returned 100% blocks executed 61%
11: 61:/*EOF*/
-: 62:/*EOF*/
-: 63:/*EOF*/
-: 64:/*EOF*/
-: 65:/*EOF*/
11: 66:/*EOF*/
-: 67:/*EOF*/
-: 68:/*EOF*/
-: 69:/*EOF*/
-: 70:/*EOF*/
11: 71:/*EOF*/
branch 0 taken 73% (fallthrough)
branch 1 taken 27%
8: 72:/*EOF*/
call 0 returned 100%
branch 1 taken 0% (fallthrough)
branch 2 taken 100%
#####: 73:/*EOF*/
call 0 never executed
-: 74:/*EOF*/
#####: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
-: 80:/*EOF*/
-: 81:/*EOF*/
-: 82:/*EOF*/
-: 83:/*EOF*/
11: 84:/*EOF*/
11: 85:/*EOF*/
11: 86:/*EOF*/
call 0 returned 100%
-: 87:/*EOF*/
-: 88:/*EOF*/
-: 89:/*EOF*/
11: 90:/*EOF*/
call 0 returned 100%
11: 91:/*EOF*/
branch 0 taken 91% (fallthrough)
branch 1 taken 9%
-: 92:/*EOF*/
-: 93:/*EOF*/
-: 94:/*EOF*/
-: 95:/*EOF*/
10: 96:/*EOF*/
branch 0 taken 80% (fallthrough)
branch 1 taken 20%
-: 97:/*EOF*/
-: 98:/*EOF*/
-: 99:/*EOF*/
8: 100:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
-: 101:/*EOF*/
8: 102:/*EOF*/
-: 103:/*EOF*/
8: 104:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
8: 105:/*EOF*/
call 0 returned 100%
branch 1 taken 0% (fallthrough)
branch 2 taken 100%
#####: 106:/*EOF*/
call 0 never executed
#####: 107:/*EOF*/
-: 108:/*EOF*/
-: 109:/*EOF*/
-: 110:/*EOF*/
8: 111:/*EOF*/
call 0 returned 100%
8: 112:/*EOF*/
8: 113:/*EOF*/
8: 114:/*EOF*/
8: 115:/*EOF*/
8: 116:/*EOF*/
8: 117:/*EOF*/
-: 118:/*EOF*/
-: 119:/*EOF*/
8: 120:/*EOF*/
call 0 returned 100%
-: 121:/*EOF*/
-: 122:/*EOF*/
-: 123:/*EOF*/
8: 124:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 125:/*EOF*/
call 0 never executed
-: 126:/*EOF*/
8: 127:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
8: 128:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
8: 129:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
8: 130:/*EOF*/
call 0 returned 100%
branch 1 taken 0% (fallthrough)
branch 2 taken 100%
#####: 131:/*EOF*/
#####: 132:/*EOF*/
call 0 never executed
#####: 133:/*EOF*/
-: 134:/*EOF*/
-: 135:/*EOF*/
-: 136:/*EOF*/
8: 137:/*EOF*/
call 0 returned 100%
8: 138:/*EOF*/
call 0 returned 100%
-: 139:/*EOF*/
-: 140:/*EOF*/
-: 141:/*EOF*/
-: 142:/*EOF*/
2: 143:/*EOF*/
-: 144:/*EOF*/
-: 145:/*EOF*/
-: 146:/*EOF*/
2: 147:/*EOF*/
call 0 returned 100%
2: 148:/*EOF*/
2: 149:/*EOF*/
2: 150:/*EOF*/
2: 151:/*EOF*/
2: 152:/*EOF*/
2: 153:/*EOF*/
2: 154:/*EOF*/
2: 155:/*EOF*/
2: 156:/*EOF*/
-: 157:/*EOF*/
2: 158:/*EOF*/
call 0 returned 100%
2: 159:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 160:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 161:/*EOF*/
call 0 never executed
-: 162:/*EOF*/
-: 163:/*EOF*/
-: 164:/*EOF*/
#####: 165:/*EOF*/
call 0 never executed
#####: 166:/*EOF*/
-: 167:/*EOF*/
-: 168:/*EOF*/
#####: 169:/*EOF*/
-: 170:/*EOF*/
2: 171:/*EOF*/
call 0 returned 100%
-: 172:/*EOF*/
-: 173:/*EOF*/
-: 174:/*EOF*/
2: 175:/*EOF*/
call 0 returned 100%
2: 176:/*EOF*/
2: 177:/*EOF*/
2: 178:/*EOF*/
2: 179:/*EOF*/
2: 180:/*EOF*/
2: 181:/*EOF*/
-: 182:/*EOF*/
2: 183:/*EOF*/
call 0 returned 100%
2: 184:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 185:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 186:/*EOF*/
call 0 never executed
-: 187:/*EOF*/
-: 188:/*EOF*/
-: 189:/*EOF*/
#####: 190:/*EOF*/
call 0 never executed
#####: 191:/*EOF*/
-: 192:/*EOF*/
-: 193:/*EOF*/
#####: 194:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 195:/*EOF*/
-: 196:/*EOF*/
-: 197:/*EOF*/
2: 198:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 199:/*EOF*/
call 0 never executed
call 1 never executed
-: 200:/*EOF*/
2: 201:/*EOF*/
call 0 returned 100%
-: 202:/*EOF*/
-: 203:/*EOF*/
-: 204:/*EOF*/
10: 205:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
-: 206:/*EOF*/
-: 207:/*EOF*/
-: 208:/*EOF*/
-: 209:/*EOF*/
-: 210:/*EOF*/
-: 211:/*EOF*/
-: 212:/*EOF*/
function get_recode_request called 11 returned 100% blocks executed 62%
11: 213:/*EOF*/
-: 214:/*EOF*/
-: 215:/*EOF*/
-: 216:/*EOF*/
-: 217:/*EOF*/
-: 218:/*EOF*/
-: 219:/*EOF*/
-: 220:/*EOF*/
22: 221:/*EOF*/
branch 0 taken 27%
branch 1 taken 73% (fallthrough)
3: 222:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
-: 223:/*EOF*/
-: 224:/*EOF*/
#####: 225:/*EOF*/
branch 0 never executed
branch 1 never executed
branch 2 never executed
branch 3 never executed
-: 226:/*EOF*/
-: 227:/*EOF*/
#####: 228:/*EOF*/
#####: 229:/*EOF*/
#####: 230:/*EOF*/
-: 231:/*EOF*/
#####: 232:/*EOF*/
#####: 233:/*EOF*/
#####: 234:/*EOF*/
-: 235:/*EOF*/
#####: 236:/*EOF*/
#####: 237:/*EOF*/
#####: 238:/*EOF*/
-: 239:/*EOF*/
-: 240:/*EOF*/
-: 241:/*EOF*/
11: 242:/*EOF*/
branch 0 taken 27% (fallthrough)
branch 1 taken 73%
3: 243:/*EOF*/
3: 244:/*EOF*/
-: 245:/*EOF*/
-: 246:/*EOF*/
8: 247:/*EOF*/
call 0 returned 100%
branch 1 taken 0% (fallthrough)
branch 2 taken 100%
#####: 248:/*EOF*/
call 0 never executed
-: 249:/*EOF*/
#####: 250:/*EOF*/
-: 251:/*EOF*/
-: 252:/*EOF*/
8: 253:/*EOF*/
-: 254:/*EOF*/
8: 255:/*EOF*/
call 0 returned 100%
branch 1 taken 13% (fallthrough)
branch 2 taken 88%
1: 256:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 257:/*EOF*/
-: 258:/*EOF*/
-: 259:/*EOF*/
1: 260:/*EOF*/
call 0 returned 100%
1: 261:/*EOF*/
-: 262:/*EOF*/
-: 263:/*EOF*/
7: 264:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 265:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 266:/*EOF*/
call 0 never executed
#####: 267:/*EOF*/
-: 268:/*EOF*/
-: 269:/*EOF*/
7: 270:/*EOF*/
call 0 returned 100%
7: 271:/*EOF*/
-: 272:/*EOF*/
7: 273:/*EOF*/
7: 274:/*EOF*/
call 0 returned 100%
7: 275:/*EOF*/
7: 276:/*EOF*/
-: 277:/*EOF*/
7: 278:/*EOF*/
-: 279:/*EOF*/
-: 280:/*EOF*/
-: 281:/*EOF*/
function print_recode_warning called 0 returned 0% blocks executed 0%
#####: 282:/*EOF*/
-: 283:/*EOF*/
-: 284:/*EOF*/
-: 285:/*EOF*/
-: 286:/*EOF*/
#####: 287:/*EOF*/
branch 0 never executed
branch 1 never executed
branch 2 never executed
branch 3 never executed
-: 288:/*EOF*/
-: 289:/*EOF*/
-: 290:/*EOF*/
-: 291:/*EOF*/
-: 292:/*EOF*/
-: 293:/*EOF*/
-: 294:/*EOF*/
-: 295:/*EOF*/
-: 296:/*EOF*/
-: 297:/*EOF*/
-: 298:/*EOF*/
-: 299:/*EOF*/
-: 300:/*EOF*/
-: 301:/*EOF*/
-: 302:/*EOF*/
-: 303:/*EOF*/
-: 304:/*EOF*/
-: 305:/*EOF*/
-: 306:/*EOF*/
-: 307:/*EOF*/
-: 308:/*EOF*/
-: 309:/*EOF*/
-: 310:/*EOF*/
-: 311:/*EOF*/
#####: 312:/*EOF*/
<<<<<< EOF
# path=/home/travis/build/nijel/enca/#usr#include#x86_64-linux-gnu#bits#stdio2.h.gcov
-: 0:Source:/usr/include/x86_64-linux-gnu/bits/stdio2.h
-: 0:Graph:/home/travis/build/nijel/enca/test/simtable.gcno
-: 0:Data:/home/travis/build/nijel/enca/test/simtable.gcda
-: 0:Runs:1
-: 0:Programs:1
-: 1:/* Checking macros for stdio functions.
-: 2: Copyright (C) 2004-2016 Free Software Foundation, Inc.
-: 3: This file is part of the GNU C Library.
-: 4:
-: 5: The GNU C Library is free software; you can redistribute it and/or
-: 6: modify it under the terms of the GNU Lesser General Public
-: 7: License as published by the Free Software Foundation; either
-: 8: version 2.1 of the License, or (at your option) any later version.
-: 9:
-: 10: The GNU C Library is distributed in the hope that it will be useful,
-: 11: but WITHOUT ANY WARRANTY; without even the implied warranty of
-: 12: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-: 13: Lesser General Public License for more details.
-: 14:
-: 15: You should have received a copy of the GNU Lesser General Public
-: 16: License along with the GNU C Library; if not, see
-: 17: . */
-: 18:
-: 19:#ifndef _STDIO_H
-: 20:# error "Never include directly; use instead."
-: 21:#endif
-: 22:
-: 23:extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen,
-: 24: const char *__restrict __format, ...) __THROW;
-: 25:extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen,
-: 26: const char *__restrict __format,
-: 27: _G_va_list __ap) __THROW;
-: 28:
-: 29:#ifdef __va_arg_pack
-: 30:__fortify_function int
-: 31:__NTH (sprintf (char *__restrict __s, const char *__restrict __fmt, ...))
-: 32:{
-: 33: return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
-: 34: __bos (__s), __fmt, __va_arg_pack ());
-: 35:}
-: 36:#elif !defined __cplusplus
-: 37:# define sprintf(str, ...) \
-: 38: __builtin___sprintf_chk (str, __USE_FORTIFY_LEVEL - 1, __bos (str), \
-: 39: __VA_ARGS__)
-: 40:#endif
-: 41:
-: 42:__fortify_function int
-: 43:__NTH (vsprintf (char *__restrict __s, const char *__restrict __fmt,
-: 44: _G_va_list __ap))
-: 45:{
-: 46: return __builtin___vsprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
-: 47: __bos (__s), __fmt, __ap);
-: 48:}
-: 49:
-: 50:#if defined __USE_ISOC99 || defined __USE_UNIX98
-: 51:
-: 52:extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag,
-: 53: size_t __slen, const char *__restrict __format,
-: 54: ...) __THROW;
-: 55:extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag,
-: 56: size_t __slen, const char *__restrict __format,
-: 57: _G_va_list __ap) __THROW;
-: 58:
-: 59:# ifdef __va_arg_pack
-: 60:__fortify_function int
-: 61:__NTH (snprintf (char *__restrict __s, size_t __n,
-: 62: const char *__restrict __fmt, ...))
-: 63:{
-: 64: return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
-: 65: __bos (__s), __fmt, __va_arg_pack ());
-: 66:}
-: 67:# elif !defined __cplusplus
-: 68:# define snprintf(str, len, ...) \
-: 69: __builtin___snprintf_chk (str, len, __USE_FORTIFY_LEVEL - 1, __bos (str), \
-: 70: __VA_ARGS__)
-: 71:# endif
-: 72:
-: 73:__fortify_function int
-: 74:__NTH (vsnprintf (char *__restrict __s, size_t __n,
-: 75: const char *__restrict __fmt, _G_va_list __ap))
-: 76:{
-: 77: return __builtin___vsnprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
-: 78: __bos (__s), __fmt, __ap);
-: 79:}
-: 80:
-: 81:#endif
-: 82:
-: 83:#if __USE_FORTIFY_LEVEL > 1
-: 84:
-: 85:extern int __fprintf_chk (FILE *__restrict __stream, int __flag,
-: 86: const char *__restrict __format, ...);
-: 87:extern int __printf_chk (int __flag, const char *__restrict __format, ...);
-: 88:extern int __vfprintf_chk (FILE *__restrict __stream, int __flag,
-: 89: const char *__restrict __format, _G_va_list __ap);
-: 90:extern int __vprintf_chk (int __flag, const char *__restrict __format,
-: 91: _G_va_list __ap);
-: 92:
-: 93:# ifdef __va_arg_pack
-: 94:__fortify_function int
-: 95:fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...)
-: 96:{
-: 97: return __fprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt,
-: 98: __va_arg_pack ());
-: 99:}
-: 100:
-: 101:__fortify_function int
-: 102:printf (const char *__restrict __fmt, ...)
-: 103:{
947: 104: return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
call 0 returned 100%
call 1 returned 100%
call 2 returned 100%
call 3 returned 100%
call 4 returned 100%
call 5 returned 100%
call 6 returned 100%
call 7 returned 100%
call 8 returned 100%
call 9 returned 100%
-: 105:}
-: 106:# elif !defined __cplusplus
-: 107:# define printf(...) \
-: 108: __printf_chk (__USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
-: 109:# define fprintf(stream, ...) \
-: 110: __fprintf_chk (stream, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
-: 111:# endif
-: 112:
-: 113:__fortify_function int
-: 114:vprintf (const char *__restrict __fmt, _G_va_list __ap)
-: 115:{
-: 116:#ifdef __USE_EXTERN_INLINES
-: 117: return __vfprintf_chk (stdout, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
-: 118:#else
-: 119: return __vprintf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __ap);
-: 120:#endif
-: 121:}
-: 122:
-: 123:__fortify_function int
-: 124:vfprintf (FILE *__restrict __stream,
-: 125: const char *__restrict __fmt, _G_va_list __ap)
-: 126:{
-: 127: return __vfprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
-: 128:}
-: 129:
-: 130:# ifdef __USE_XOPEN2K8
-: 131:extern int __dprintf_chk (int __fd, int __flag, const char *__restrict __fmt,
-: 132: ...) __attribute__ ((__format__ (__printf__, 3, 4)));
-: 133:extern int __vdprintf_chk (int __fd, int __flag,
-: 134: const char *__restrict __fmt, _G_va_list __arg)
-: 135: __attribute__ ((__format__ (__printf__, 3, 0)));
-: 136:
-: 137:# ifdef __va_arg_pack
-: 138:__fortify_function int
-: 139:dprintf (int __fd, const char *__restrict __fmt, ...)
-: 140:{
-: 141: return __dprintf_chk (__fd, __USE_FORTIFY_LEVEL - 1, __fmt,
-: 142: __va_arg_pack ());
-: 143:}
-: 144:# elif !defined __cplusplus
-: 145:# define dprintf(fd, ...) \
-: 146: __dprintf_chk (fd, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
-: 147:# endif
-: 148:
-: 149:__fortify_function int
-: 150:vdprintf (int __fd, const char *__restrict __fmt, _G_va_list __ap)
-: 151:{
-: 152: return __vdprintf_chk (__fd, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
-: 153:}
-: 154:# endif
-: 155:
-: 156:# ifdef __USE_GNU
-: 157:
-: 158:extern int __asprintf_chk (char **__restrict __ptr, int __flag,
-: 159: const char *__restrict __fmt, ...)
-: 160: __THROW __attribute__ ((__format__ (__printf__, 3, 4))) __wur;
-: 161:extern int __vasprintf_chk (char **__restrict __ptr, int __flag,
-: 162: const char *__restrict __fmt, _G_va_list __arg)
-: 163: __THROW __attribute__ ((__format__ (__printf__, 3, 0))) __wur;
-: 164:extern int __obstack_printf_chk (struct obstack *__restrict __obstack,
-: 165: int __flag, const char *__restrict __format,
-: 166: ...)
-: 167: __THROW __attribute__ ((__format__ (__printf__, 3, 4)));
-: 168:extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack,
-: 169: int __flag,
-: 170: const char *__restrict __format,
-: 171: _G_va_list __args)
-: 172: __THROW __attribute__ ((__format__ (__printf__, 3, 0)));
-: 173:
-: 174:# ifdef __va_arg_pack
-: 175:__fortify_function int
-: 176:__NTH (asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...))
-: 177:{
-: 178: return __asprintf_chk (__ptr, __USE_FORTIFY_LEVEL - 1, __fmt,
-: 179: __va_arg_pack ());
-: 180:}
-: 181:
-: 182:__fortify_function int
-: 183:__NTH (__asprintf (char **__restrict __ptr, const char *__restrict __fmt,
-: 184: ...))
-: 185:{
-: 186: return __asprintf_chk (__ptr, __USE_FORTIFY_LEVEL - 1, __fmt,
-: 187: __va_arg_pack ());
-: 188:}
-: 189:
-: 190:__fortify_function int
-: 191:__NTH (obstack_printf (struct obstack *__restrict __obstack,
-: 192: const char *__restrict __fmt, ...))
-: 193:{
-: 194: return __obstack_printf_chk (__obstack, __USE_FORTIFY_LEVEL - 1, __fmt,
-: 195: __va_arg_pack ());
-: 196:}
-: 197:# elif !defined __cplusplus
-: 198:# define asprintf(ptr, ...) \
-: 199: __asprintf_chk (ptr, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
-: 200:# define __asprintf(ptr, ...) \
-: 201: __asprintf_chk (ptr, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
-: 202:# define obstack_printf(obstack, ...) \
-: 203: __obstack_printf_chk (obstack, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
-: 204:# endif
-: 205:
-: 206:__fortify_function int
-: 207:__NTH (vasprintf (char **__restrict __ptr, const char *__restrict __fmt,
-: 208: _G_va_list __ap))
-: 209:{
-: 210: return __vasprintf_chk (__ptr, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
-: 211:}
-: 212:
-: 213:__fortify_function int
-: 214:__NTH (obstack_vprintf (struct obstack *__restrict __obstack,
-: 215: const char *__restrict __fmt, _G_va_list __ap))
-: 216:{
-: 217: return __obstack_vprintf_chk (__obstack, __USE_FORTIFY_LEVEL - 1, __fmt,
-: 218: __ap);
-: 219:}
-: 220:
-: 221:# endif
-: 222:
-: 223:#endif
-: 224:
-: 225:#if !defined __USE_ISOC11 \
-: 226: || (defined __cplusplus && __cplusplus <= 201103L && !defined __USE_GNU)
-: 227:extern char *__gets_chk (char *__str, size_t) __wur;
-: 228:extern char *__REDIRECT (__gets_warn, (char *__str), gets)
-: 229: __wur __warnattr ("please use fgets or getline instead, gets can't "
-: 230: "specify buffer size");
-: 231:
-: 232:__fortify_function __wur char *
-: 233:gets (char *__str)
-: 234:{
-: 235: if (__bos (__str) != (size_t) -1)
-: 236: return __gets_chk (__str, __bos (__str));
-: 237: return __gets_warn (__str);
-: 238:}
-: 239:#endif
-: 240:
-: 241:extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n,
-: 242: FILE *__restrict __stream) __wur;
-: 243:extern char *__REDIRECT (__fgets_alias,
-: 244: (char *__restrict __s, int __n,
-: 245: FILE *__restrict __stream), fgets) __wur;
-: 246:extern char *__REDIRECT (__fgets_chk_warn,
-: 247: (char *__restrict __s, size_t __size, int __n,
-: 248: FILE *__restrict __stream), __fgets_chk)
-: 249: __wur __warnattr ("fgets called with bigger size than length "
-: 250: "of destination buffer");
-: 251:
-: 252:__fortify_function __wur char *
-: 253:fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
-: 254:{
-: 255: if (__bos (__s) != (size_t) -1)
-: 256: {
-: 257: if (!__builtin_constant_p (__n) || __n <= 0)
-: 258: return __fgets_chk (__s, __bos (__s), __n, __stream);
-: 259:
-: 260: if ((size_t) __n > __bos (__s))
-: 261: return __fgets_chk_warn (__s, __bos (__s), __n, __stream);
-: 262: }
-: 263: return __fgets_alias (__s, __n, __stream);
-: 264:}
-: 265:
-: 266:extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen,
-: 267: size_t __size, size_t __n,
-: 268: FILE *__restrict __stream) __wur;
-: 269:extern size_t __REDIRECT (__fread_alias,
-: 270: (void *__restrict __ptr, size_t __size,
-: 271: size_t __n, FILE *__restrict __stream),
-: 272: fread) __wur;
-: 273:extern size_t __REDIRECT (__fread_chk_warn,
-: 274: (void *__restrict __ptr, size_t __ptrlen,
-: 275: size_t __size, size_t __n,
-: 276: FILE *__restrict __stream),
-: 277: __fread_chk)
-: 278: __wur __warnattr ("fread called with bigger size * nmemb than length "
-: 279: "of destination buffer");
-: 280:
-: 281:__fortify_function __wur size_t
-: 282:fread (void *__restrict __ptr, size_t __size, size_t __n,
-: 283: FILE *__restrict __stream)
-: 284:{
-: 285: if (__bos0 (__ptr) != (size_t) -1)
-: 286: {
-: 287: if (!__builtin_constant_p (__size)
-: 288: || !__builtin_constant_p (__n)
-: 289: || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
-: 290: return __fread_chk (__ptr, __bos0 (__ptr), __size, __n, __stream);
-: 291:
-: 292: if (__size * __n > __bos0 (__ptr))
-: 293: return __fread_chk_warn (__ptr, __bos0 (__ptr), __size, __n, __stream);
-: 294: }
-: 295: return __fread_alias (__ptr, __size, __n, __stream);
-: 296:}
-: 297:
-: 298:#ifdef __USE_GNU
-: 299:extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size,
-: 300: int __n, FILE *__restrict __stream) __wur;
-: 301:extern char *__REDIRECT (__fgets_unlocked_alias,
-: 302: (char *__restrict __s, int __n,
-: 303: FILE *__restrict __stream), fgets_unlocked) __wur;
-: 304:extern char *__REDIRECT (__fgets_unlocked_chk_warn,
-: 305: (char *__restrict __s, size_t __size, int __n,
-: 306: FILE *__restrict __stream), __fgets_unlocked_chk)
-: 307: __wur __warnattr ("fgets_unlocked called with bigger size than length "
-: 308: "of destination buffer");
-: 309:
-: 310:__fortify_function __wur char *
-: 311:fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream)
-: 312:{
-: 313: if (__bos (__s) != (size_t) -1)
-: 314: {
-: 315: if (!__builtin_constant_p (__n) || __n <= 0)
-: 316: return __fgets_unlocked_chk (__s, __bos (__s), __n, __stream);
-: 317:
-: 318: if ((size_t) __n > __bos (__s))
-: 319: return __fgets_unlocked_chk_warn (__s, __bos (__s), __n, __stream);
-: 320: }
-: 321: return __fgets_unlocked_alias (__s, __n, __stream);
-: 322:}
-: 323:#endif
-: 324:
-: 325:#ifdef __USE_MISC
-: 326:# undef fread_unlocked
-: 327:extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen,
-: 328: size_t __size, size_t __n,
-: 329: FILE *__restrict __stream) __wur;
-: 330:extern size_t __REDIRECT (__fread_unlocked_alias,
-: 331: (void *__restrict __ptr, size_t __size,
-: 332: size_t __n, FILE *__restrict __stream),
-: 333: fread_unlocked) __wur;
-: 334:extern size_t __REDIRECT (__fread_unlocked_chk_warn,
-: 335: (void *__restrict __ptr, size_t __ptrlen,
-: 336: size_t __size, size_t __n,
-: 337: FILE *__restrict __stream),
-: 338: __fread_unlocked_chk)
-: 339: __wur __warnattr ("fread_unlocked called with bigger size * nmemb than "
-: 340: "length of destination buffer");
-: 341:
-: 342:__fortify_function __wur size_t
-: 343:fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n,
-: 344: FILE *__restrict __stream)
-: 345:{
-: 346: if (__bos0 (__ptr) != (size_t) -1)
-: 347: {
-: 348: if (!__builtin_constant_p (__size)
-: 349: || !__builtin_constant_p (__n)
-: 350: || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
-: 351: return __fread_unlocked_chk (__ptr, __bos0 (__ptr), __size, __n,
-: 352: __stream);
-: 353:
-: 354: if (__size * __n > __bos0 (__ptr))
-: 355: return __fread_unlocked_chk_warn (__ptr, __bos0 (__ptr), __size, __n,
-: 356: __stream);
-: 357: }
-: 358:
-: 359:# ifdef __USE_EXTERN_INLINES
-: 360: if (__builtin_constant_p (__size)
-: 361: && __builtin_constant_p (__n)
-: 362: && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2))
-: 363: && __size * __n <= 8)
-: 364: {
-: 365: size_t __cnt = __size * __n;
-: 366: char *__cptr = (char *) __ptr;
-: 367: if (__cnt == 0)
-: 368: return 0;
-: 369:
-: 370: for (; __cnt > 0; --__cnt)
-: 371: {
-: 372: int __c = _IO_getc_unlocked (__stream);
-: 373: if (__c == EOF)
-: 374: break;
-: 375: *__cptr++ = __c;
-: 376: }
-: 377: return (__cptr - (char *) __ptr) / __size;
-: 378: }
-: 379:# endif
-: 380: return __fread_unlocked_alias (__ptr, __size, __n, __stream);
-: 381:}
-: 382:#endif
<<<<<< EOF
# path=/home/travis/build/nijel/enca/#usr#include#x86_64-linux-gnu#bits#string3.h.gcov
-: 0:Source:/usr/include/x86_64-linux-gnu/bits/string3.h
-: 0:Graph:/home/travis/build/nijel/enca/src/enca-convert_iconv.gcno
-: 0:Data:/home/travis/build/nijel/enca/src/enca-convert_iconv.gcda
-: 0:Runs:275
-: 0:Programs:1
-: 1:/* Copyright (C) 2004-2016 Free Software Foundation, Inc.
-: 2: This file is part of the GNU C Library.
-: 3:
-: 4: The GNU C Library is free software; you can redistribute it and/or
-: 5: modify it under the terms of the GNU Lesser General Public
-: 6: License as published by the Free Software Foundation; either
-: 7: version 2.1 of the License, or (at your option) any later version.
-: 8:
-: 9: The GNU C Library is distributed in the hope that it will be useful,
-: 10: but WITHOUT ANY WARRANTY; without even the implied warranty of
-: 11: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-: 12: Lesser General Public License for more details.
-: 13:
-: 14: You should have received a copy of the GNU Lesser General Public
-: 15: License along with the GNU C Library; if not, see
-: 16: . */
-: 17:
-: 18:#ifndef _STRING_H
-: 19:# error "Never use directly; include instead."
-: 20:#endif
-: 21:
-: 22:#if !__GNUC_PREREQ (5,0)
-: 23:__warndecl (__warn_memset_zero_len,
-: 24: "memset used with constant zero length parameter; this could be due to transposed parameters");
-: 25:#endif
-: 26:
-: 27:#ifndef __cplusplus
-: 28:/* XXX This is temporarily. We should not redefine any of the symbols
-: 29: and instead integrate the error checking into the original
-: 30: definitions. */
-: 31:# undef memcpy
-: 32:# undef memmove
-: 33:# undef memset
-: 34:# undef strcat
-: 35:# undef strcpy
-: 36:# undef strncat
-: 37:# undef strncpy
-: 38:# ifdef __USE_GNU
-: 39:# undef mempcpy
-: 40:# undef stpcpy
-: 41:# endif
-: 42:# ifdef __USE_MISC
-: 43:# undef bcopy
-: 44:# undef bzero
-: 45:# endif
-: 46:#endif
-: 47:
-: 48:
-: 49:__fortify_function void *
-: 50:__NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
-: 51: size_t __len))
-: 52:{
-: 53: return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
-: 54:}
-: 55:
-: 56:__fortify_function void *
-: 57:__NTH (memmove (void *__dest, const void *__src, size_t __len))
-: 58:{
#####: 59: return __builtin___memmove_chk (__dest, __src, __len, __bos0 (__dest));
-: 60:}
-: 61:
-: 62:#ifdef __USE_GNU
-: 63:__fortify_function void *
-: 64:__NTH (mempcpy (void *__restrict __dest, const void *__restrict __src,
-: 65: size_t __len))
-: 66:{
-: 67: return __builtin___mempcpy_chk (__dest, __src, __len, __bos0 (__dest));
-: 68:}
-: 69:#endif
-: 70:
-: 71:
-: 72:/* The first two tests here help to catch a somewhat common problem
-: 73: where the second and third parameter are transposed. This is
-: 74: especially problematic if the intended fill value is zero. In this
-: 75: case no work is done at all. We detect these problems by referring
-: 76: non-existing functions. */
-: 77:__fortify_function void *
-: 78:__NTH (memset (void *__dest, int __ch, size_t __len))
-: 79:{
-: 80: /* GCC-5.0 and newer implements these checks in the compiler, so we don't
-: 81: need them here. */
-: 82:#if !__GNUC_PREREQ (5,0)
-: 83: if (__builtin_constant_p (__len) && __len == 0
-: 84: && (!__builtin_constant_p (__ch) || __ch != 0))
-: 85: {
-: 86: __warn_memset_zero_len ();
-: 87: return __dest;
-: 88: }
-: 89:#endif
-: 90: return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
-: 91:}
-: 92:
-: 93:#ifdef __USE_MISC
-: 94:__fortify_function void
-: 95:__NTH (bcopy (const void *__src, void *__dest, size_t __len))
-: 96:{
-: 97: (void) __builtin___memmove_chk (__dest, __src, __len, __bos0 (__dest));
-: 98:}
-: 99:
-: 100:__fortify_function void
-: 101:__NTH (bzero (void *__dest, size_t __len))
-: 102:{
-: 103: (void) __builtin___memset_chk (__dest, '\0', __len, __bos0 (__dest));
-: 104:}
-: 105:#endif
-: 106:
-: 107:__fortify_function char *
-: 108:__NTH (strcpy (char *__restrict __dest, const char *__restrict __src))
-: 109:{
-: 110: return __builtin___strcpy_chk (__dest, __src, __bos (__dest));
-: 111:}
-: 112:
-: 113:#ifdef __USE_GNU
-: 114:__fortify_function char *
-: 115:__NTH (stpcpy (char *__restrict __dest, const char *__restrict __src))
-: 116:{
-: 117: return __builtin___stpcpy_chk (__dest, __src, __bos (__dest));
-: 118:}
-: 119:#endif
-: 120:
-: 121:
-: 122:__fortify_function char *
-: 123:__NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
-: 124: size_t __len))
-: 125:{
-: 126: return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
-: 127:}
-: 128:
-: 129:// XXX We have no corresponding builtin yet.
-: 130:extern char *__stpncpy_chk (char *__dest, const char *__src, size_t __n,
-: 131: size_t __destlen) __THROW;
-: 132:extern char *__REDIRECT_NTH (__stpncpy_alias, (char *__dest, const char *__src,
-: 133: size_t __n), stpncpy);
-: 134:
-: 135:__fortify_function char *
-: 136:__NTH (stpncpy (char *__dest, const char *__src, size_t __n))
-: 137:{
-: 138: if (__bos (__dest) != (size_t) -1
-: 139: && (!__builtin_constant_p (__n) || __n > __bos (__dest)))
-: 140: return __stpncpy_chk (__dest, __src, __n, __bos (__dest));
-: 141: return __stpncpy_alias (__dest, __src, __n);
-: 142:}
-: 143:
-: 144:
-: 145:__fortify_function char *
-: 146:__NTH (strcat (char *__restrict __dest, const char *__restrict __src))
-: 147:{
-: 148: return __builtin___strcat_chk (__dest, __src, __bos (__dest));
-: 149:}
-: 150:
-: 151:
-: 152:__fortify_function char *
-: 153:__NTH (strncat (char *__restrict __dest, const char *__restrict __src,
-: 154: size_t __len))
-: 155:{
-: 156: return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest));
-: 157:}
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lang_lt.c.gcov
-: 0:Source:lang_lt.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_lt.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_lt.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
-: 62:/*EOF*/
-: 63:/*EOF*/
-: 64:/*EOF*/
-: 65:/*EOF*/
function hook called 21 returned 100% blocks executed 100%
21: 66:/*EOF*/
-: 67:/*EOF*/
21: 68:/*EOF*/
-: 69:/*EOF*/
-: 70:/*EOF*/
33: 71:/*EOF*/
branch 0 taken 57% (fallthrough)
branch 1 taken 43%
branch 2 taken 50% (fallthrough)
branch 3 taken 50%
21: 72:/*EOF*/
21: 73:/*EOF*/
-: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
-: 80:/*EOF*/
-: 81:/*EOF*/
-: 82:/*EOF*/
-: 83:/*EOF*/
-: 84:/*EOF*/
-: 85:/*EOF*/
-: 86:/*EOF*/
-: 87:/*EOF*/
-: 88:/*EOF*/
-: 89:/*EOF*/
-: 90:/*EOF*/
-: 91:/*EOF*/
-: 92:/*EOF*/
21: 93:/*EOF*/
call 0 returned 100%
-: 94:/*EOF*/
-: 95:/*EOF*/
-: 96:/*EOF*/
-: 97:/*EOF*/
-: 98:/*EOF*/
-: 99:/*EOF*/
-: 100:/*EOF*/
-: 101:/*EOF*/
-: 102:/*EOF*/
-: 103:/*EOF*/
-: 104:/*EOF*/
-: 105:/*EOF*/
-: 106:/*EOF*/
-: 107:/*EOF*/
-: 108:/*EOF*/
-: 109:/*EOF*/
-: 110:/*EOF*/
-: 111:/*EOF*/
-: 112:/*EOF*/
-: 113:/*EOF*/
-: 114:/*EOF*/
-: 115:/*EOF*/
-: 116:/*EOF*/
-: 117:/*EOF*/
-: 118:/*EOF*/
-: 119:/*EOF*/
-: 120:/*EOF*/
-: 121:/*EOF*/
-: 122:/*EOF*/
21: 123:/*EOF*/
call 0 returned 100%
-: 124:/*EOF*/
-: 125:/*EOF*/
-: 126:/*EOF*/
-: 127:/*EOF*/
-: 128:/*EOF*/
-: 129:/*EOF*/
-: 130:/*EOF*/
-: 131:/*EOF*/
-: 132:/*EOF*/
-: 133:/*EOF*/
-: 134:/*EOF*/
-: 135:/*EOF*/
-: 136:/*EOF*/
-: 137:/*EOF*/
-: 138:/*EOF*/
-: 139:/*EOF*/
-: 140:/*EOF*/
-: 141:/*EOF*/
-: 142:/*EOF*/
-: 143:/*EOF*/
-: 144:/*EOF*/
-: 145:/*EOF*/
-: 146:/*EOF*/
-: 147:/*EOF*/
-: 148:/*EOF*/
12: 149:/*EOF*/
call 0 returned 100%
<<<<<< EOF
# path=/home/travis/build/nijel/enca/multibyte.c.gcov
-: 0:Source:multibyte.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/multibyte.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/multibyte.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
-: 62:/*EOF*/
-: 63:/*EOF*/
-: 64:/*EOF*/
-: 65:/*EOF*/
-: 66:/*EOF*/
-: 67:/*EOF*/
-: 68:/*EOF*/
-: 69:/*EOF*/
-: 70:/*EOF*/
-: 71:/*EOF*/
-: 72:/*EOF*/
-: 73:/*EOF*/
-: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
-: 80:/*EOF*/
-: 81:/*EOF*/
-: 82:/*EOF*/
-: 83:/*EOF*/
-: 84:/*EOF*/
-: 85:/*EOF*/
-: 86:/*EOF*/
-: 87:/*EOF*/
-: 88:/*EOF*/
function is_valid_utf8 called 439 returned 100% blocks executed 94%
439: 89:/*EOF*/
-: 90:/*EOF*/
-: 91:/*EOF*/
439: 92:/*EOF*/
439: 93:/*EOF*/
439: 94:/*EOF*/
-: 95:/*EOF*/
-: 96:/*EOF*/
-: 97:/*EOF*/
-: 98:/*EOF*/
439: 99:/*EOF*/
439: 100:/*EOF*/
-: 101:/*EOF*/
-: 102:/*EOF*/
-: 103:/*EOF*/
-: 104:/*EOF*/
439: 105:/*EOF*/
branch 0 taken 96% (fallthrough)
branch 1 taken 4%
branch 2 taken 97% (fallthrough)
branch 3 taken 3%
-: 106:/*EOF*/
-: 107:/*EOF*/
-: 108:/*EOF*/
410: 109:/*EOF*/
branch 0 taken 52% (fallthrough)
branch 1 taken 48%
215: 110:/*EOF*/
call 0 returned 100%
215: 111:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 112:/*EOF*/
-: 113:/*EOF*/
-: 114:/*EOF*/
410: 115:/*EOF*/
410: 116:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
410: 117:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
branch 2 taken 100% (fallthrough)
branch 3 taken 0%
branch 4 taken 100% (fallthrough)
branch 5 taken 0%
3: 118:/*EOF*/
3: 119:/*EOF*/
3: 120:/*EOF*/
-: 121:/*EOF*/
-: 122:/*EOF*/
-: 123:/*EOF*/
13881: 124:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
13780: 125:/*EOF*/
13780: 126:/*EOF*/
branch 0 taken 75% (fallthrough)
branch 1 taken 25%
10319: 127:/*EOF*/
branch 0 taken 71% (fallthrough)
branch 1 taken 29%
7347: 128:/*EOF*/
2972: 129:/*EOF*/
branch 0 taken 70% (fallthrough)
branch 1 taken 30%
2081: 130:/*EOF*/
2081: 131:/*EOF*/
2081: 132:/*EOF*/
-: 133:/*EOF*/
891: 134:/*EOF*/
branch 0 taken 82% (fallthrough)
branch 1 taken 18%
732: 135:/*EOF*/
732: 136:/*EOF*/
732: 137:/*EOF*/
-: 138:/*EOF*/
-: 139:/*EOF*/
-: 140:/*EOF*/
159: 141:/*EOF*/
branch 0 taken 11% (fallthrough)
branch 1 taken 89%
18: 142:/*EOF*/
18: 143:/*EOF*/
18: 144:/*EOF*/
-: 145:/*EOF*/
141: 146:/*EOF*/
branch 0 taken 2% (fallthrough)
branch 1 taken 98%
3: 147:/*EOF*/
3: 148:/*EOF*/
3: 149:/*EOF*/
-: 150:/*EOF*/
138: 151:/*EOF*/
branch 0 taken 7% (fallthrough)
branch 1 taken 93%
9: 152:/*EOF*/
9: 153:/*EOF*/
9: 154:/*EOF*/
-: 155:/*EOF*/
-: 156:/*EOF*/
-: 157:/*EOF*/
-: 158:/*EOF*/
-: 159:/*EOF*/
-: 160:/*EOF*/
3461: 161:/*EOF*/
branch 0 taken 95% (fallthrough)
branch 1 taken 5%
-: 162:/*EOF*/
-: 163:/*EOF*/
3281: 164:/*EOF*/
-: 165:/*EOF*/
-: 166:/*EOF*/
-: 167:/*EOF*/
-: 168:/*EOF*/
101: 169:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
branch 2 never executed
branch 3 never executed
-: 170:/*EOF*/
-: 171:/*EOF*/
101: 172:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 173:/*EOF*/
-: 174:/*EOF*/
101: 175:/*EOF*/
101: 176:/*EOF*/
call 0 returned 100%
101: 177:/*EOF*/
-: 178:/*EOF*/
-: 179:/*EOF*/
-: 180:/*EOF*/
-: 181:/*EOF*/
-: 182:/*EOF*/
-: 183:/*EOF*/
-: 184:/*EOF*/
-: 185:/*EOF*/
-: 186:/*EOF*/
-: 187:/*EOF*/
-: 188:/*EOF*/
-: 189:/*EOF*/
-: 190:/*EOF*/
function looks_like_TeX called 40 returned 100% blocks executed 86%
40: 191:/*EOF*/
-: 192:/*EOF*/
-: 193:/*EOF*/
-: 194:/*EOF*/
-: 195:/*EOF*/
-: 196:/*EOF*/
-: 197:/*EOF*/
-: 198:/*EOF*/
-: 199:/*EOF*/
-: 200:/*EOF*/
-: 201:/*EOF*/
-: 202:/*EOF*/
-: 203:/*EOF*/
-: 204:/*EOF*/
-: 205:/*EOF*/
-: 206:/*EOF*/
-: 207:/*EOF*/
-: 208:/*EOF*/
-: 209:/*EOF*/
-: 210:/*EOF*/
-: 211:/*EOF*/
-: 212:/*EOF*/
-: 213:/*EOF*/
-: 214:/*EOF*/
-: 215:/*EOF*/
-: 216:/*EOF*/
-: 217:/*EOF*/
-: 218:/*EOF*/
-: 219:/*EOF*/
-: 220:/*EOF*/
-: 221:/*EOF*/
-: 222:/*EOF*/
-: 223:/*EOF*/
-: 224:/*EOF*/
-: 225:/*EOF*/
-: 226:/*EOF*/
-: 227:/*EOF*/
-: 228:/*EOF*/
-: 229:/*EOF*/
-: 230:/*EOF*/
-: 231:/*EOF*/
-: 232:/*EOF*/
-: 233:/*EOF*/
-: 234:/*EOF*/
-: 235:/*EOF*/
-: 236:/*EOF*/
-: 237:/*EOF*/
-: 238:/*EOF*/
-: 239:/*EOF*/
40: 240:/*EOF*/
40: 241:/*EOF*/
40: 242:/*EOF*/
-: 243:/*EOF*/
40: 244:/*EOF*/
-: 245:/*EOF*/
-: 246:/*EOF*/
-: 247:/*EOF*/
-: 248:/*EOF*/
40: 249:/*EOF*/
branch 0 taken 10% (fallthrough)
branch 1 taken 90%
-: 250:/*EOF*/
-: 251:/*EOF*/
-: 252:/*EOF*/
4: 253:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
4: 254:/*EOF*/
call 0 returned 100%
4: 255:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 256:/*EOF*/
-: 257:/*EOF*/
-: 258:/*EOF*/
4: 259:/*EOF*/
76: 260:/*EOF*/
branch 0 taken 94% (fallthrough)
branch 1 taken 6%
branch 2 taken 100%
branch 3 taken 0% (fallthrough)
68: 261:/*EOF*/
branch 0 taken 59% (fallthrough)
branch 1 taken 41%
40: 262:/*EOF*/
40: 263:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 264:/*EOF*/
40: 265:/*EOF*/
branch 0 taken 70% (fallthrough)
branch 1 taken 30%
12: 266:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 267:/*EOF*/
branch 0 never executed
branch 1 never executed
branch 2 never executed
branch 3 never executed
40: 268:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
40: 269:/*EOF*/
branch 0 taken 30%
branch 1 taken 70% (fallthrough)
branch 2 taken 0%
branch 3 taken 100% (fallthrough)
-: 270:/*EOF*/
28: 271:/*EOF*/
branch 0 taken 57% (fallthrough)
branch 1 taken 43%
-: 272:/*EOF*/
40: 273:/*EOF*/
-: 274:/*EOF*/
28: 275:/*EOF*/
-: 276:/*EOF*/
-: 277:/*EOF*/
4: 278:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 279:/*EOF*/
-: 280:/*EOF*/
4: 281:/*EOF*/
4: 282:/*EOF*/
call 0 returned 100%
4: 283:/*EOF*/
-: 284:/*EOF*/
-: 285:/*EOF*/
-: 286:/*EOF*/
-: 287:/*EOF*/
-: 288:/*EOF*/
-: 289:/*EOF*/
-: 290:/*EOF*/
-: 291:/*EOF*/
-: 292:/*EOF*/
-: 293:/*EOF*/
-: 294:/*EOF*/
-: 295:/*EOF*/
-: 296:/*EOF*/
function is_valid_utf7 called 43 returned 100% blocks executed 92%
43: 297:/*EOF*/
-: 298:/*EOF*/
-: 299:/*EOF*/
-: 300:/*EOF*/
-: 301:/*EOF*/
-: 302:/*EOF*/
-: 303:/*EOF*/
-: 304:/*EOF*/
-: 305:/*EOF*/
-: 306:/*EOF*/
-: 307:/*EOF*/
-: 308:/*EOF*/
-: 309:/*EOF*/
-: 310:/*EOF*/
-: 311:/*EOF*/
-: 312:/*EOF*/
-: 313:/*EOF*/
-: 314:/*EOF*/
-: 315:/*EOF*/
-: 316:/*EOF*/
-: 317:/*EOF*/
-: 318:/*EOF*/
-: 319:/*EOF*/
-: 320:/*EOF*/
-: 321:/*EOF*/
-: 322:/*EOF*/
-: 323:/*EOF*/
-: 324:/*EOF*/
-: 325:/*EOF*/
-: 326:/*EOF*/
43: 327:/*EOF*/
43: 328:/*EOF*/
43: 329:/*EOF*/
-: 330:/*EOF*/
43: 331:/*EOF*/
-: 332:/*EOF*/
-: 333:/*EOF*/
-: 334:/*EOF*/
-: 335:/*EOF*/
43: 336:/*EOF*/
branch 0 taken 14% (fallthrough)
branch 1 taken 86%
-: 337:/*EOF*/
-: 338:/*EOF*/
-: 339:/*EOF*/
6: 340:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
6: 341:/*EOF*/
call 0 returned 100%
6: 342:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 343:/*EOF*/
-: 344:/*EOF*/
6: 345:/*EOF*/
45: 346:/*EOF*/
branch 0 taken 92% (fallthrough)
branch 1 taken 8%
branch 2 taken 100%
branch 3 taken 0% (fallthrough)
36: 347:/*EOF*/
36: 348:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 349:/*EOF*/
-: 350:/*EOF*/
-: 351:/*EOF*/
315: 352:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
branch 2 taken 90%
branch 3 taken 10% (fallthrough)
-: 353:/*EOF*/
36: 354:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 355:/*EOF*/
-: 356:/*EOF*/
-: 357:/*EOF*/
-: 358:/*EOF*/
36: 359:/*EOF*/
branch 0 taken 92% (fallthrough)
branch 1 taken 8%
33: 360:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 361:/*EOF*/
-: 362:/*EOF*/
33: 363:/*EOF*/
33: 364:/*EOF*/
-: 365:/*EOF*/
33: 366:/*EOF*/
-: 367:/*EOF*/
-: 368:/*EOF*/
-: 369:/*EOF*/
3: 370:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
branch 2 never executed
branch 3 never executed
-: 371:/*EOF*/
-: 372:/*EOF*/
3: 373:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 374:/*EOF*/
-: 375:/*EOF*/
3: 376:/*EOF*/
3: 377:/*EOF*/
call 0 returned 100%
3: 378:/*EOF*/
-: 379:/*EOF*/
-: 380:/*EOF*/
-: 381:/*EOF*/
-: 382:/*EOF*/
-: 383:/*EOF*/
-: 384:/*EOF*/
-: 385:/*EOF*/
-: 386:/*EOF*/
-: 387:/*EOF*/
-: 388:/*EOF*/
-: 389:/*EOF*/
-: 390:/*EOF*/
-: 391:/*EOF*/
function looks_like_ucs2 called 26 returned 100% blocks executed 88%
26: 392:/*EOF*/
-: 393:/*EOF*/
-: 394:/*EOF*/
-: 395:/*EOF*/
26: 396:/*EOF*/
26: 397:/*EOF*/
26: 398:/*EOF*/
-: 399:/*EOF*/
-: 400:/*EOF*/
-: 401:/*EOF*/
-: 402:/*EOF*/
26: 403:/*EOF*/
26: 404:/*EOF*/
-: 405:/*EOF*/
26: 406:/*EOF*/
26: 407:/*EOF*/
26: 408:/*EOF*/
26: 409:/*EOF*/
-: 410:/*EOF*/
-: 411:/*EOF*/
-: 412:/*EOF*/
-: 413:/*EOF*/
-: 414:/*EOF*/
26: 415:/*EOF*/
branch 0 taken 92% (fallthrough)
branch 1 taken 8%
-: 416:/*EOF*/
-: 417:/*EOF*/
24: 418:/*EOF*/
-: 419:/*EOF*/
-: 420:/*EOF*/
-: 421:/*EOF*/
48: 422:/*EOF*/
24: 423:/*EOF*/
24: 424:/*EOF*/
branch 0 taken 88% (fallthrough)
branch 1 taken 13%
-: 425:/*EOF*/
-: 426:/*EOF*/
-: 427:/*EOF*/
21: 428:/*EOF*/
branch 0 taken 43% (fallthrough)
branch 1 taken 57%
9: 429:/*EOF*/
call 0 returned 100%
9: 430:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 431:/*EOF*/
-: 432:/*EOF*/
-: 433:/*EOF*/
21: 434:/*EOF*/
branch 0 taken 29% (fallthrough)
branch 1 taken 71%
branch 2 taken 100% (fallthrough)
branch 3 taken 0%
6: 435:/*EOF*/
-: 436:/*EOF*/
-: 437:/*EOF*/
1119: 438:/*EOF*/
branch 0 taken 98%
branch 1 taken 2% (fallthrough)
1119: 439:/*EOF*/
1119: 440:/*EOF*/
-: 441:/*EOF*/
1119: 442:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
9: 443:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
9: 444:/*EOF*/
-: 445:/*EOF*/
#####: 446:/*EOF*/
9: 447:/*EOF*/
-: 448:/*EOF*/
1110: 449:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
3: 450:/*EOF*/
3: 451:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
3: 452:/*EOF*/
-: 453:/*EOF*/
#####: 454:/*EOF*/
3: 455:/*EOF*/
-: 456:/*EOF*/
-: 457:/*EOF*/
-: 458:/*EOF*/
-: 459:/*EOF*/
1107: 460:/*EOF*/
branch 0 taken 74% (fallthrough)
branch 1 taken 26%
816: 461:/*EOF*/
branch 0 taken 7% (fallthrough)
branch 1 taken 93%
-: 462:/*EOF*/
816: 463:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
3: 464:/*EOF*/
816: 465:/*EOF*/
branch 0 taken 11% (fallthrough)
branch 1 taken 89%
90: 466:/*EOF*/
90: 467:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
90: 468:/*EOF*/
branch 0 taken 3% (fallthrough)
branch 1 taken 97%
3: 469:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
87: 470:/*EOF*/
-: 471:/*EOF*/
-: 472:/*EOF*/
-: 473:/*EOF*/
291: 474:/*EOF*/
branch 0 taken 99% (fallthrough)
branch 1 taken 1%
288: 475:/*EOF*/
-: 476:/*EOF*/
-: 477:/*EOF*/
-: 478:/*EOF*/
-: 479:/*EOF*/
21: 480:/*EOF*/
21: 481:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
21: 482:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 483:/*EOF*/
-: 484:/*EOF*/
21: 485:/*EOF*/
-: 486:/*EOF*/
-: 487:/*EOF*/
21: 488:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 489:/*EOF*/
-: 490:/*EOF*/
21: 491:/*EOF*/
branch 0 taken 57% (fallthrough)
branch 1 taken 43%
-: 492:/*EOF*/
-: 493:/*EOF*/
21: 494:/*EOF*/
branch 0 taken 86% (fallthrough)
branch 1 taken 14%
18: 495:/*EOF*/
-: 496:/*EOF*/
3: 497:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 498:/*EOF*/
-: 499:/*EOF*/
3: 500:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
-: 501:/*EOF*/
-: 502:/*EOF*/
-: 503:/*EOF*/
-: 504:/*EOF*/
-: 505:/*EOF*/
-: 506:/*EOF*/
-: 507:/*EOF*/
-: 508:/*EOF*/
-: 509:/*EOF*/
-: 510:/*EOF*/
-: 511:/*EOF*/
-: 512:/*EOF*/
-: 513:/*EOF*/
-: 514:/*EOF*/
-: 515:/*EOF*/
-: 516:/*EOF*/
-: 517:/*EOF*/
-: 518:/*EOF*/
-: 519:/*EOF*/
function looks_like_ucs4 called 32 returned 100% blocks executed 83%
32: 520:/*EOF*/
-: 521:/*EOF*/
-: 522:/*EOF*/
-: 523:/*EOF*/
-: 524:/*EOF*/
-: 525:/*EOF*/
-: 526:/*EOF*/
-: 527:/*EOF*/
-: 528:/*EOF*/
32: 529:/*EOF*/
32: 530:/*EOF*/
32: 531:/*EOF*/
-: 532:/*EOF*/
32: 533:/*EOF*/
-: 534:/*EOF*/
-: 535:/*EOF*/
-: 536:/*EOF*/
-: 537:/*EOF*/
-: 538:/*EOF*/
-: 539:/*EOF*/
32: 540:/*EOF*/
branch 0 taken 66% (fallthrough)
branch 1 taken 34%
-: 541:/*EOF*/
-: 542:/*EOF*/
-: 543:/*EOF*/
-: 544:/*EOF*/
42: 545:/*EOF*/
21: 546:/*EOF*/
21: 547:/*EOF*/
branch 0 taken 86% (fallthrough)
branch 1 taken 14%
-: 548:/*EOF*/
-: 549:/*EOF*/
-: 550:/*EOF*/
18: 551:/*EOF*/
branch 0 taken 44% (fallthrough)
branch 1 taken 56%
8: 552:/*EOF*/
call 0 returned 100%
8: 553:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 554:/*EOF*/
-: 555:/*EOF*/
-: 556:/*EOF*/
-: 557:/*EOF*/
-: 558:/*EOF*/
18: 559:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 560:/*EOF*/
call 0 never executed
-: 561:/*EOF*/
-: 562:/*EOF*/
18: 563:/*EOF*/
90: 564:/*EOF*/
branch 0 taken 80%
branch 1 taken 20% (fallthrough)
72: 565:/*EOF*/
call 0 returned 100%
-: 566:/*EOF*/
72: 567:/*EOF*/
72: 568:/*EOF*/
branch 0 taken 4% (fallthrough)
branch 1 taken 96%
3: 569:/*EOF*/
72: 570:/*EOF*/
call 0 returned 100%
-: 571:/*EOF*/
-: 572:/*EOF*/
18: 573:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 574:/*EOF*/
branch 0 never executed
branch 1 never executed
-: 575:/*EOF*/
-: 576:/*EOF*/
18: 577:/*EOF*/
90: 578:/*EOF*/
branch 0 taken 80%
branch 1 taken 20% (fallthrough)
72: 579:/*EOF*/
-: 580:/*EOF*/
-: 581:/*EOF*/
18: 582:/*EOF*/
18: 583:/*EOF*/
branch 0 taken 33% (fallthrough)
branch 1 taken 67%
6: 584:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 585:/*EOF*/
-: 586:/*EOF*/
6: 587:/*EOF*/
-: 588:/*EOF*/
9: 589:/*EOF*/
branch 0 taken 33%
branch 1 taken 67% (fallthrough)
3: 590:/*EOF*/
6: 591:/*EOF*/
-: 592:/*EOF*/
6: 593:/*EOF*/
-: 594:/*EOF*/
-: 595:/*EOF*/
-: 596:/*EOF*/
-: 597:/*EOF*/
-: 598:/*EOF*/
-: 599:/*EOF*/
-: 600:/*EOF*/
-: 601:/*EOF*/
-: 602:/*EOF*/
-: 603:/*EOF*/
-: 604:/*EOF*/
-: 605:/*EOF*/
-: 606:/*EOF*/
-: 607:/*EOF*/
-: 608:/*EOF*/
-: 609:/*EOF*/
-: 610:/*EOF*/
-: 611:/*EOF*/
-: 612:/*EOF*/
function what_if_it_was_ucs4 called 72 returned 100% blocks executed 70%
72: 613:/*EOF*/
-: 614:/*EOF*/
-: 615:/*EOF*/
-: 616:/*EOF*/
-: 617:/*EOF*/
-: 618:/*EOF*/
-: 619:/*EOF*/
-: 620:/*EOF*/
72: 621:/*EOF*/
72: 622:/*EOF*/
72: 623:/*EOF*/
72: 624:/*EOF*/
-: 625:/*EOF*/
-: 626:/*EOF*/
-: 627:/*EOF*/
72: 628:/*EOF*/
72: 629:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
72: 630:/*EOF*/
branch 0 taken 50% (fallthrough)
branch 1 taken 50%
branch 2 taken 33% (fallthrough)
branch 3 taken 67%
12: 631:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
branch 2 never executed
branch 3 never executed
#####: 632:/*EOF*/
#####: 633:/*EOF*/
#####: 634:/*EOF*/
-: 635:/*EOF*/
-: 636:/*EOF*/
-: 637:/*EOF*/
4320: 638:/*EOF*/
branch 0 taken 98%
branch 1 taken 2% (fallthrough)
-: 639:/*EOF*/
4248: 640:/*EOF*/
branch 0 taken 57% (fallthrough)
branch 1 taken 43%
branch 2 taken 57% (fallthrough)
branch 3 taken 43%
1392: 641:/*EOF*/
branch 0 taken 36% (fallthrough)
branch 1 taken 64%
504: 642:/*EOF*/
branch 0 taken 7% (fallthrough)
branch 1 taken 93%
-: 643:/*EOF*/
888: 644:/*EOF*/
branch 0 taken 22% (fallthrough)
branch 1 taken 78%
192: 645:/*EOF*/
-: 646:/*EOF*/
-: 647:/*EOF*/
-: 648:/*EOF*/
-: 649:/*EOF*/
-: 650:/*EOF*/
-: 651:/*EOF*/
72: 652:/*EOF*/
branch 0 taken 8% (fallthrough)
branch 1 taken 92%
696: 653:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
696: 654:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
branch 2 taken 0% (fallthrough)
branch 3 taken 100%
#####: 655:/*EOF*/
branch 0 never executed
branch 1 never executed
branch 2 never executed
branch 3 never executed
#####: 656:/*EOF*/
696: 657:/*EOF*/
branch 0 taken 8% (fallthrough)
branch 1 taken 92%
branch 2 taken 100% (fallthrough)
branch 3 taken 0%
54: 658:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
branch 2 taken 100% (fallthrough)
branch 3 taken 0%
54: 659:/*EOF*/
54: 660:/*EOF*/
branch 0 taken 11% (fallthrough)
branch 1 taken 89%
6: 661:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
branch 2 never executed
branch 3 never executed
#####: 662:/*EOF*/
branch 0 never executed
branch 1 never executed
branch 2 never executed
branch 3 never executed
6: 663:/*EOF*/
-: 664:/*EOF*/
-: 665:/*EOF*/
-: 666:/*EOF*/
6: 667:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
6: 668:/*EOF*/
-: 669:/*EOF*/
#####: 670:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 671:/*EOF*/
-: 672:/*EOF*/
#####: 673:/*EOF*/
branch 0 never executed
branch 1 never executed
-: 674:/*EOF*/
-: 675:/*EOF*/
-: 676:/*EOF*/
72: 677:/*EOF*/
-: 678:/*EOF*/
-: 679:/*EOF*/
-: 680:/*EOF*/
-: 681:/*EOF*/
-: 682:/*EOF*/
-: 683:/*EOF*/
-: 684:/*EOF*/
-: 685:/*EOF*/
-: 686:/*EOF*/
-: 687:/*EOF*/
-: 688:/*EOF*/
-: 689:/*EOF*/
-: 690:/*EOF*/
-: 691:/*EOF*/
-: 692:/*EOF*/
function shuffle_byte_order called 72 returned 100% blocks executed 100%
72: 693:/*EOF*/
-: 694:/*EOF*/
-: 695:/*EOF*/
-: 696:/*EOF*/
-: 697:/*EOF*/
-: 698:/*EOF*/
-: 699:/*EOF*/
72: 700:/*EOF*/
branch 0 taken 50% (fallthrough)
branch 1 taken 50%
2124: 701:/*EOF*/
branch 0 taken 98%
branch 1 taken 2% (fallthrough)
2124: 702:/*EOF*/
2124: 703:/*EOF*/
2124: 704:/*EOF*/
-: 705:/*EOF*/
2124: 706:/*EOF*/
2124: 707:/*EOF*/
2124: 708:/*EOF*/
-: 709:/*EOF*/
-: 710:/*EOF*/
-: 711:/*EOF*/
72: 712:/*EOF*/
branch 0 taken 50% (fallthrough)
branch 1 taken 50%
4248: 713:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
4248: 714:/*EOF*/
4248: 715:/*EOF*/
4248: 716:/*EOF*/
-: 717:/*EOF*/
-: 718:/*EOF*/
72: 719:/*EOF*/
-: 720:/*EOF*/
-: 721:/*EOF*/
-: 722:/*EOF*/
-: 723:/*EOF*/
-: 724:/*EOF*/
-: 725:/*EOF*/
-: 726:/*EOF*/
-: 727:/*EOF*/
-: 728:/*EOF*/
-: 729:/*EOF*/
-: 730:/*EOF*/
-: 731:/*EOF*/
-: 732:/*EOF*/
-: 733:/*EOF*/
-: 734:/*EOF*/
function looks_like_utf8 called 343 returned 100% blocks executed 84%
343: 735:/*EOF*/
-: 736:/*EOF*/
-: 737:/*EOF*/
343: 738:/*EOF*/
343: 739:/*EOF*/
343: 740:/*EOF*/
-: 741:/*EOF*/
-: 742:/*EOF*/
-: 743:/*EOF*/
-: 744:/*EOF*/
343: 745:/*EOF*/
343: 746:/*EOF*/
343: 747:/*EOF*/
-: 748:/*EOF*/
-: 749:/*EOF*/
-: 750:/*EOF*/
-: 751:/*EOF*/
343: 752:/*EOF*/
branch 0 taken 55% (fallthrough)
branch 1 taken 45%
190: 753:/*EOF*/
call 0 returned 100%
190: 754:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 755:/*EOF*/
-: 756:/*EOF*/
-: 757:/*EOF*/
343: 758:/*EOF*/
343: 759:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
343: 760:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
branch 2 never executed
branch 3 never executed
branch 4 never executed
branch 5 never executed
#####: 761:/*EOF*/
#####: 762:/*EOF*/
#####: 763:/*EOF*/
-: 764:/*EOF*/
-: 765:/*EOF*/
-: 766:/*EOF*/
1729572: 767:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
1729229: 768:/*EOF*/
1729229: 769:/*EOF*/
branch 0 taken 85% (fallthrough)
branch 1 taken 15%
1474025: 770:/*EOF*/
branch 0 taken 76% (fallthrough)
branch 1 taken 24%
1119520: 771:/*EOF*/
354505: 772:/*EOF*/
branch 0 taken 45% (fallthrough)
branch 1 taken 55%
158596: 773:/*EOF*/
158596: 774:/*EOF*/
158596: 775:/*EOF*/
-: 776:/*EOF*/
195909: 777:/*EOF*/
branch 0 taken 32% (fallthrough)
branch 1 taken 68%
63109: 778:/*EOF*/
63109: 779:/*EOF*/
63109: 780:/*EOF*/
-: 781:/*EOF*/
-: 782:/*EOF*/
-: 783:/*EOF*/
132800: 784:/*EOF*/
branch 0 taken 14% (fallthrough)
branch 1 taken 86%
18454: 785:/*EOF*/
18454: 786:/*EOF*/
18454: 787:/*EOF*/
-: 788:/*EOF*/
114346: 789:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
174: 790:/*EOF*/
174: 791:/*EOF*/
174: 792:/*EOF*/
-: 793:/*EOF*/
114172: 794:/*EOF*/
branch 0 taken 2% (fallthrough)
branch 1 taken 98%
2102: 795:/*EOF*/
2102: 796:/*EOF*/
2102: 797:/*EOF*/
-: 798:/*EOF*/
-: 799:/*EOF*/
112070: 800:/*EOF*/
112070: 801:/*EOF*/
-: 802:/*EOF*/
-: 803:/*EOF*/
-: 804:/*EOF*/
255204: 805:/*EOF*/
branch 0 taken 94% (fallthrough)
branch 1 taken 6%
239591: 806:/*EOF*/
239591: 807:/*EOF*/
239591: 808:/*EOF*/
-: 809:/*EOF*/
-: 810:/*EOF*/
15613: 811:/*EOF*/
-: 812:/*EOF*/
-: 813:/*EOF*/
-: 814:/*EOF*/
-: 815:/*EOF*/
343: 816:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
branch 2 never executed
branch 3 never executed
#####: 817:/*EOF*/
-: 818:/*EOF*/
-: 819:/*EOF*/
343: 820:/*EOF*/
branch 0 taken 2% (fallthrough)
branch 1 taken 98%
-: 821:/*EOF*/
-: 822:/*EOF*/
6: 823:/*EOF*/
6: 824:/*EOF*/
call 0 returned 100%
6: 825:/*EOF*/
branch 0 taken 33% (fallthrough)
branch 1 taken 67%
2: 826:/*EOF*/
-: 827:/*EOF*/
-: 828:/*EOF*/
-: 829:/*EOF*/
-: 830:/*EOF*/
-: 831:/*EOF*/
-: 832:/*EOF*/
-: 833:/*EOF*/
-: 834:/*EOF*/
-: 835:/*EOF*/
-: 836:/*EOF*/
-: 837:/*EOF*/
-: 838:/*EOF*/
-: 839:/*EOF*/
-: 840:/*EOF*/
function looks_like_hz called 36 returned 100% blocks executed 69%
36: 841:/*EOF*/
-: 842:/*EOF*/
36: 843:/*EOF*/
36: 844:/*EOF*/
-: 845:/*EOF*/
36: 846:/*EOF*/
36: 847:/*EOF*/
36: 848:/*EOF*/
-: 849:/*EOF*/
-: 850:/*EOF*/
-: 851:/*EOF*/
-: 852:/*EOF*/
-: 853:/*EOF*/
36: 854:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
36: 855:/*EOF*/
call 0 returned 100%
36: 856:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 857:/*EOF*/
-: 858:/*EOF*/
219: 859:/*EOF*/
branch 0 taken 85%
branch 1 taken 15%
186: 860:/*EOF*/
branch 0 taken 98% (fallthrough)
branch 1 taken 2%
-: 861:/*EOF*/
-: 862:/*EOF*/
-: 863:/*EOF*/
-: 864:/*EOF*/
-: 865:/*EOF*/
-: 866:/*EOF*/
3: 867:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
3: 868:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
3: 869:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 870:/*EOF*/
-: 871:/*EOF*/
-: 872:/*EOF*/
-: 873:/*EOF*/
3: 874:/*EOF*/
branch 0 taken 100%
branch 1 taken 0%
3: 875:/*EOF*/
3: 876:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 877:/*EOF*/
3: 878:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
3: 879:/*EOF*/
3: 880:/*EOF*/
3: 881:/*EOF*/
#####: 882:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 883:/*EOF*/
#####: 884:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 885:/*EOF*/
-: 886:/*EOF*/
#####: 887:/*EOF*/
-: 888:/*EOF*/
-: 889:/*EOF*/
-: 890:/*EOF*/
699: 891:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
696: 892:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
branch 2 taken 100% (fallthrough)
branch 3 taken 0%
9: 893:/*EOF*/
branch 0 taken 0%
branch 1 taken 33%
branch 2 taken 67%
branch 3 taken 0%
branch 4 taken 0%
-: 894:/*EOF*/
#####: 895:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 896:/*EOF*/
#####: 897:/*EOF*/
-: 898:/*EOF*/
#####: 899:/*EOF*/
-: 900:/*EOF*/
-: 901:/*EOF*/
-: 902:/*EOF*/
3: 903:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
3: 904:/*EOF*/
3: 905:/*EOF*/
-: 906:/*EOF*/
-: 907:/*EOF*/
-: 908:/*EOF*/
3: 909:/*EOF*/
-: 910:/*EOF*/
6: 911:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
6: 912:/*EOF*/
6: 913:/*EOF*/
-: 914:/*EOF*/
-: 915:/*EOF*/
-: 916:/*EOF*/
6: 917:/*EOF*/
-: 918:/*EOF*/
#####: 919:/*EOF*/
branch 0 never executed
branch 1 never executed
-: 920:/*EOF*/
-: 921:/*EOF*/
#####: 922:/*EOF*/
#####: 923:/*EOF*/
-: 924:/*EOF*/
#####: 925:/*EOF*/
branch 0 never executed
branch 1 never executed
-: 926:/*EOF*/
-: 927:/*EOF*/
#####: 928:/*EOF*/
-: 929:/*EOF*/
-: 930:/*EOF*/
-: 931:/*EOF*/
687: 932:/*EOF*/
branch 0 taken 99% (fallthrough)
branch 1 taken 1%
684: 933:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 934:/*EOF*/
-: 935:/*EOF*/
684: 936:/*EOF*/
-: 937:/*EOF*/
687: 938:/*EOF*/
-: 939:/*EOF*/
-: 940:/*EOF*/
-: 941:/*EOF*/
3: 942:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 943:/*EOF*/
-: 944:/*EOF*/
-: 945:/*EOF*/
3: 946:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
branch 2 never executed
branch 3 never executed
-: 947:/*EOF*/
-: 948:/*EOF*/
3: 949:/*EOF*/
3: 950:/*EOF*/
call 0 returned 100%
-: 951:/*EOF*/
3: 952:/*EOF*/
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lang.c.gcov
-: 0:Source:lang.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
-: 62:/*EOF*/
-: 63:/*EOF*/
-: 64:/*EOF*/
-: 65:/*EOF*/
-: 66:/*EOF*/
-: 67:/*EOF*/
-: 68:/*EOF*/
-: 69:/*EOF*/
-: 70:/*EOF*/
-: 71:/*EOF*/
-: 72:/*EOF*/
-: 73:/*EOF*/
-: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
-: 80:/*EOF*/
-: 81:/*EOF*/
-: 82:/*EOF*/
-: 83:/*EOF*/
-: 84:/*EOF*/
-: 85:/*EOF*/
function enca_language_init called 247 returned 100% blocks executed 88%
247: 86:/*EOF*/
-: 87:/*EOF*/
-: 88:/*EOF*/
-: 89:/*EOF*/
-: 90:/*EOF*/
247: 91:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 92:/*EOF*/
247: 93:/*EOF*/
247: 94:/*EOF*/
247: 95:/*EOF*/
247: 96:/*EOF*/
247: 97:/*EOF*/
-: 98:/*EOF*/
247: 99:/*EOF*/
call 0 returned 100%
247: 100:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 101:/*EOF*/
-: 102:/*EOF*/
247: 103:/*EOF*/
247: 104:/*EOF*/
branch 0 taken 90% (fallthrough)
branch 1 taken 10%
-: 105:/*EOF*/
-: 106:/*EOF*/
222: 107:/*EOF*/
222: 108:/*EOF*/
call 0 returned 100%
-: 109:/*EOF*/
222: 110:/*EOF*/
-: 111:/*EOF*/
-: 112:/*EOF*/
-: 113:/*EOF*/
-: 114:/*EOF*/
-: 115:/*EOF*/
-: 116:/*EOF*/
-: 117:/*EOF*/
-: 118:/*EOF*/
-: 119:/*EOF*/
function enca_language_destroy called 246 returned 100% blocks executed 71%
246: 120:/*EOF*/
-: 121:/*EOF*/
246: 122:/*EOF*/
branch 0 taken 90% (fallthrough)
branch 1 taken 10%
246: 123:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
246: 124:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
246: 125:/*EOF*/
246: 126:/*EOF*/
246: 127:/*EOF*/
-: 128:/*EOF*/
-: 129:/*EOF*/
-: 130:/*EOF*/
-: 131:/*EOF*/
-: 132:/*EOF*/
-: 133:/*EOF*/
-: 134:/*EOF*/
-: 135:/*EOF*/
-: 136:/*EOF*/
-: 137:/*EOF*/
-: 138:/*EOF*/
-: 139:/*EOF*/
-: 140:/*EOF*/
-: 141:/*EOF*/
-: 142:/*EOF*/
-: 143:/*EOF*/
function enca_get_languages called 1 returned 100% blocks executed 100%
1: 144:/*EOF*/
-: 145:/*EOF*/
-: 146:/*EOF*/
-: 147:/*EOF*/
-: 148:/*EOF*/
1: 149:/*EOF*/
16: 150:/*EOF*/
call 0 returned 100%
branch 1 taken 94%
branch 2 taken 6% (fallthrough)
15: 151:/*EOF*/
-: 152:/*EOF*/
1: 153:/*EOF*/
1: 154:/*EOF*/
-: 155:/*EOF*/
-: 156:/*EOF*/
-: 157:/*EOF*/
-: 158:/*EOF*/
-: 159:/*EOF*/
-: 160:/*EOF*/
-: 161:/*EOF*/
-: 162:/*EOF*/
-: 163:/*EOF*/
-: 164:/*EOF*/
-: 165:/*EOF*/
-: 166:/*EOF*/
-: 167:/*EOF*/
function enca_analyser_language called 0 returned 0% blocks executed 0%
#####: 168:/*EOF*/
-: 169:/*EOF*/
#####: 170:/*EOF*/
branch 0 never executed
branch 1 never executed
call 2 never executed
#####: 171:/*EOF*/
-: 172:/*EOF*/
-: 173:/*EOF*/
-: 174:/*EOF*/
-: 175:/*EOF*/
-: 176:/*EOF*/
-: 177:/*EOF*/
-: 178:/*EOF*/
-: 179:/*EOF*/
-: 180:/*EOF*/
-: 181:/*EOF*/
-: 182:/*EOF*/
-: 183:/*EOF*/
-: 184:/*EOF*/
-: 185:/*EOF*/
function enca_language_english_name called 30 returned 100% blocks executed 100%
30: 186:/*EOF*/
-: 187:/*EOF*/
-: 188:/*EOF*/
-: 189:/*EOF*/
30: 190:/*EOF*/
call 0 returned 100%
30: 191:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 192:/*EOF*/
-: 193:/*EOF*/
30: 194:/*EOF*/
-: 195:/*EOF*/
-: 196:/*EOF*/
-: 197:/*EOF*/
-: 198:/*EOF*/
-: 199:/*EOF*/
-: 200:/*EOF*/
-: 201:/*EOF*/
-: 202:/*EOF*/
-: 203:/*EOF*/
-: 204:/*EOF*/
-: 205:/*EOF*/
-: 206:/*EOF*/
-: 207:/*EOF*/
-: 208:/*EOF*/
-: 209:/*EOF*/
-: 210:/*EOF*/
function enca_get_language_charsets called 55 returned 100% blocks executed 71%
55: 211:/*EOF*/
-: 212:/*EOF*/
-: 213:/*EOF*/
-: 214:/*EOF*/
-: 215:/*EOF*/
55: 216:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 217:/*EOF*/
55: 218:/*EOF*/
call 0 returned 100%
55: 219:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 220:/*EOF*/
#####: 221:/*EOF*/
-: 222:/*EOF*/
-: 223:/*EOF*/
55: 224:/*EOF*/
55: 225:/*EOF*/
call 0 returned 100%
-: 226:/*EOF*/
-: 227:/*EOF*/
-: 228:/*EOF*/
-: 229:/*EOF*/
-: 230:/*EOF*/
-: 231:/*EOF*/
-: 232:/*EOF*/
-: 233:/*EOF*/
-: 234:/*EOF*/
-: 235:/*EOF*/
-: 236:/*EOF*/
-: 237:/*EOF*/
-: 238:/*EOF*/
-: 239:/*EOF*/
function language_charsets_ids called 277 returned 100% blocks executed 82%
277: 240:/*EOF*/
-: 241:/*EOF*/
-: 242:/*EOF*/
-: 243:/*EOF*/
-: 244:/*EOF*/
277: 245:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 246:/*EOF*/
277: 247:/*EOF*/
branch 0 taken 99% (fallthrough)
branch 1 taken 1%
-: 248:/*EOF*/
-: 249:/*EOF*/
276: 250:/*EOF*/
1958: 251:/*EOF*/
call 0 returned 100%
branch 1 taken 86%
branch 2 taken 14% (fallthrough)
1682: 252:/*EOF*/
call 0 returned 100%
1682: 253:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 254:/*EOF*/
-: 255:/*EOF*/
-: 256:/*EOF*/
-: 257:/*EOF*/
-: 258:/*EOF*/
-: 259:/*EOF*/
-: 260:/*EOF*/
-: 261:/*EOF*/
-: 262:/*EOF*/
-: 263:/*EOF*/
-: 264:/*EOF*/
-: 265:/*EOF*/
-: 266:/*EOF*/
-: 267:/*EOF*/
function find_language called 332 returned 100% blocks executed 100%
332: 268:/*EOF*/
-: 269:/*EOF*/
332: 270:/*EOF*/
-: 271:/*EOF*/
-: 272:/*EOF*/
332: 273:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 274:/*EOF*/
-: 275:/*EOF*/
2134: 276:/*EOF*/
branch 0 taken 100%
branch 1 taken 0% (fallthrough)
2466: 277:/*EOF*/
branch 0 taken 87% (fallthrough)
branch 1 taken 13%
-: 278:/*EOF*/
-: 279:/*EOF*/
-: 280:/*EOF*/
-: 281:/*EOF*/
-: 282:/*EOF*/
-: 283:/*EOF*/
-: 284:/*EOF*/
-: 285:/*EOF*/
-: 286:/*EOF*/
-: 287:/*EOF*/
-: 288:/*EOF*/
-: 289:/*EOF*/
-: 290:/*EOF*/
-: 291:/*EOF*/
-: 292:/*EOF*/
-: 293:/*EOF*/
-: 294:/*EOF*/
-: 295:/*EOF*/
-: 296:/*EOF*/
-: 297:/*EOF*/
-: 298:/*EOF*/
-: 299:/*EOF*/
-: 300:/*EOF*/
-: 301:/*EOF*/
-: 302:/*EOF*/
-: 303:/*EOF*/
-: 304:/*EOF*/
-: 305:/*EOF*/
-: 306:/*EOF*/
function enca_get_charset_similarity_matrix called 13 returned 100% blocks executed 96%
13: 307:/*EOF*/
-: 308:/*EOF*/
13: 309:/*EOF*/
13: 310:/*EOF*/
13: 311:/*EOF*/
-: 312:/*EOF*/
-: 313:/*EOF*/
-: 314:/*EOF*/
-: 315:/*EOF*/
13: 316:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 317:/*EOF*/
13: 318:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 319:/*EOF*/
-: 320:/*EOF*/
-: 321:/*EOF*/
13: 322:/*EOF*/
91: 323:/*EOF*/
call 0 returned 100%
branch 1 taken 86% (fallthrough)
branch 2 taken 14%
279: 324:/*EOF*/
branch 0 taken 78%
branch 1 taken 22% (fallthrough)
279: 325:/*EOF*/
71703: 326:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
71424: 327:/*EOF*/
-: 328:/*EOF*/
-: 329:/*EOF*/
-: 330:/*EOF*/
-: 331:/*EOF*/
91: 332:/*EOF*/
branch 0 taken 86%
branch 1 taken 14% (fallthrough)
279: 333:/*EOF*/
branch 0 taken 72%
branch 1 taken 28%
201: 334:/*EOF*/
-: 335:/*EOF*/
-: 336:/*EOF*/
-: 337:/*EOF*/
78: 338:/*EOF*/
branch 0 taken 86%
branch 1 taken 14% (fallthrough)
78: 339:/*EOF*/
-: 340:/*EOF*/
558: 341:/*EOF*/
branch 0 taken 86%
branch 1 taken 14% (fallthrough)
480: 342:/*EOF*/
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lang_uk.c.gcov
-: 0:Source:lang_uk.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_uk.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_uk.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
-: 62:/*EOF*/
-: 63:/*EOF*/
-: 64:/*EOF*/
-: 65:/*EOF*/
-: 66:/*EOF*/
-: 67:/*EOF*/
function hook called 0 returned 0% blocks executed 0%
#####: 68:/*EOF*/
-: 69:/*EOF*/
#####: 70:/*EOF*/
#####: 71:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 72:/*EOF*/
branch 0 never executed
branch 1 never executed
branch 2 never executed
branch 3 never executed
-: 73:/*EOF*/
-: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
-: 80:/*EOF*/
-: 81:/*EOF*/
-: 82:/*EOF*/
-: 83:/*EOF*/
-: 84:/*EOF*/
function eol_hook called 0 returned 0% blocks executed 0%
#####: 85:/*EOF*/
-: 86:/*EOF*/
#####: 87:/*EOF*/
-: 88:/*EOF*/
-: 89:/*EOF*/
-: 90:/*EOF*/
-: 91:/*EOF*/
-: 92:/*EOF*/
-: 93:/*EOF*/
-: 94:/*EOF*/
-: 95:/*EOF*/
-: 96:/*EOF*/
-: 97:/*EOF*/
-: 98:/*EOF*/
-: 99:/*EOF*/
-: 100:/*EOF*/
-: 101:/*EOF*/
-: 102:/*EOF*/
-: 103:/*EOF*/
-: 104:/*EOF*/
-: 105:/*EOF*/
-: 106:/*EOF*/
#####: 107:/*EOF*/
call 0 never executed
-: 108:/*EOF*/
-: 109:/*EOF*/
-: 110:/*EOF*/
-: 111:/*EOF*/
-: 112:/*EOF*/
-: 113:/*EOF*/
-: 114:/*EOF*/
-: 115:/*EOF*/
-: 116:/*EOF*/
-: 117:/*EOF*/
-: 118:/*EOF*/
-: 119:/*EOF*/
-: 120:/*EOF*/
-: 121:/*EOF*/
-: 122:/*EOF*/
-: 123:/*EOF*/
-: 124:/*EOF*/
-: 125:/*EOF*/
-: 126:/*EOF*/
-: 127:/*EOF*/
-: 128:/*EOF*/
-: 129:/*EOF*/
-: 130:/*EOF*/
-: 131:/*EOF*/
-: 132:/*EOF*/
#####: 133:/*EOF*/
call 0 never executed
-: 134:/*EOF*/
-: 135:/*EOF*/
-: 136:/*EOF*/
-: 137:/*EOF*/
-: 138:/*EOF*/
-: 139:/*EOF*/
-: 140:/*EOF*/
-: 141:/*EOF*/
-: 142:/*EOF*/
-: 143:/*EOF*/
-: 144:/*EOF*/
-: 145:/*EOF*/
-: 146:/*EOF*/
-: 147:/*EOF*/
-: 148:/*EOF*/
-: 149:/*EOF*/
-: 150:/*EOF*/
-: 151:/*EOF*/
-: 152:/*EOF*/
-: 153:/*EOF*/
-: 154:/*EOF*/
-: 155:/*EOF*/
-: 156:/*EOF*/
-: 157:/*EOF*/
-: 158:/*EOF*/
#####: 159:/*EOF*/
call 0 never executed
-: 160:/*EOF*/
-: 161:/*EOF*/
-: 162:/*EOF*/
-: 163:/*EOF*/
-: 164:/*EOF*/
-: 165:/*EOF*/
-: 166:/*EOF*/
-: 167:/*EOF*/
-: 168:/*EOF*/
-: 169:/*EOF*/
-: 170:/*EOF*/
-: 171:/*EOF*/
-: 172:/*EOF*/
-: 173:/*EOF*/
-: 174:/*EOF*/
-: 175:/*EOF*/
-: 176:/*EOF*/
-: 177:/*EOF*/
-: 178:/*EOF*/
-: 179:/*EOF*/
-: 180:/*EOF*/
-: 181:/*EOF*/
-: 182:/*EOF*/
-: 183:/*EOF*/
-: 184:/*EOF*/
#####: 185:/*EOF*/
call 0 never executed
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lang_cs.c.gcov
-: 0:Source:lang_cs.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_cs.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_cs.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
-: 62:/*EOF*/
-: 63:/*EOF*/
-: 64:/*EOF*/
-: 65:/*EOF*/
-: 66:/*EOF*/
function hook called 59 returned 100% blocks executed 100%
59: 67:/*EOF*/
-: 68:/*EOF*/
118: 69:/*EOF*/
83: 70:/*EOF*/
branch 0 taken 41% (fallthrough)
branch 1 taken 59%
branch 2 taken 50% (fallthrough)
branch 3 taken 50%
-: 71:/*EOF*/
-: 72:/*EOF*/
-: 73:/*EOF*/
-: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
-: 80:/*EOF*/
-: 81:/*EOF*/
-: 82:/*EOF*/
function eol_hook called 3 returned 100% blocks executed 100%
3: 83:/*EOF*/
-: 84:/*EOF*/
3: 85:/*EOF*/
-: 86:/*EOF*/
-: 87:/*EOF*/
-: 88:/*EOF*/
-: 89:/*EOF*/
-: 90:/*EOF*/
-: 91:/*EOF*/
-: 92:/*EOF*/
-: 93:/*EOF*/
-: 94:/*EOF*/
-: 95:/*EOF*/
-: 96:/*EOF*/
-: 97:/*EOF*/
-: 98:/*EOF*/
-: 99:/*EOF*/
-: 100:/*EOF*/
-: 101:/*EOF*/
-: 102:/*EOF*/
-: 103:/*EOF*/
-: 104:/*EOF*/
3: 105:/*EOF*/
call 0 returned 100%
-: 106:/*EOF*/
-: 107:/*EOF*/
-: 108:/*EOF*/
-: 109:/*EOF*/
-: 110:/*EOF*/
-: 111:/*EOF*/
-: 112:/*EOF*/
-: 113:/*EOF*/
-: 114:/*EOF*/
-: 115:/*EOF*/
-: 116:/*EOF*/
-: 117:/*EOF*/
-: 118:/*EOF*/
-: 119:/*EOF*/
-: 120:/*EOF*/
-: 121:/*EOF*/
-: 122:/*EOF*/
-: 123:/*EOF*/
-: 124:/*EOF*/
-: 125:/*EOF*/
-: 126:/*EOF*/
-: 127:/*EOF*/
-: 128:/*EOF*/
-: 129:/*EOF*/
-: 130:/*EOF*/
59: 131:/*EOF*/
call 0 returned 100%
-: 132:/*EOF*/
-: 133:/*EOF*/
-: 134:/*EOF*/
-: 135:/*EOF*/
-: 136:/*EOF*/
-: 137:/*EOF*/
-: 138:/*EOF*/
-: 139:/*EOF*/
-: 140:/*EOF*/
-: 141:/*EOF*/
-: 142:/*EOF*/
-: 143:/*EOF*/
-: 144:/*EOF*/
-: 145:/*EOF*/
-: 146:/*EOF*/
-: 147:/*EOF*/
-: 148:/*EOF*/
-: 149:/*EOF*/
-: 150:/*EOF*/
-: 151:/*EOF*/
-: 152:/*EOF*/
-: 153:/*EOF*/
-: 154:/*EOF*/
-: 155:/*EOF*/
-: 156:/*EOF*/
24: 157:/*EOF*/
call 0 returned 100%
<<<<<< EOF
# path=/home/travis/build/nijel/enca/options.c.gcov
-: 0:Source:options.c
-: 0:Graph:/home/travis/build/nijel/enca/src/enca-options.gcno
-: 0:Data:/home/travis/build/nijel/enca/src/enca-options.gcda
-: 0:Runs:275
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
-: 62:/*EOF*/
-: 63:/*EOF*/
-: 64:/*EOF*/
-: 65:/*EOF*/
-: 66:/*EOF*/
-: 67:/*EOF*/
-: 68:/*EOF*/
-: 69:/*EOF*/
-: 70:/*EOF*/
-: 71:/*EOF*/
-: 72:/*EOF*/
-: 73:/*EOF*/
-: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
-: 80:/*EOF*/
-: 81:/*EOF*/
-: 82:/*EOF*/
-: 83:/*EOF*/
-: 84:/*EOF*/
-: 85:/*EOF*/
-: 86:/*EOF*/
-: 87:/*EOF*/
-: 88:/*EOF*/
-: 89:/*EOF*/
-: 90:/*EOF*/
-: 91:/*EOF*/
-: 92:/*EOF*/
-: 93:/*EOF*/
-: 94:/*EOF*/
-: 95:/*EOF*/
-: 96:/*EOF*/
-: 97:/*EOF*/
-: 98:/*EOF*/
-: 99:/*EOF*/
-: 100:/*EOF*/
-: 101:/*EOF*/
-: 102:/*EOF*/
-: 103:/*EOF*/
-: 104:/*EOF*/
-: 105:/*EOF*/
-: 106:/*EOF*/
-: 107:/*EOF*/
-: 108:/*EOF*/
-: 109:/*EOF*/
-: 110:/*EOF*/
-: 111:/*EOF*/
-: 112:/*EOF*/
-: 113:/*EOF*/
-: 114:/*EOF*/
-: 115:/*EOF*/
-: 116:/*EOF*/
-: 117:/*EOF*/
-: 118:/*EOF*/
-: 119:/*EOF*/
-: 120:/*EOF*/
-: 121:/*EOF*/
-: 122:/*EOF*/
-: 123:/*EOF*/
-: 124:/*EOF*/
-: 125:/*EOF*/
-: 126:/*EOF*/
-: 127:/*EOF*/
-: 128:/*EOF*/
-: 129:/*EOF*/
-: 130:/*EOF*/
-: 131:/*EOF*/
-: 132:/*EOF*/
-: 133:/*EOF*/
-: 134:/*EOF*/
-: 135:/*EOF*/
-: 136:/*EOF*/
-: 137:/*EOF*/
-: 138:/*EOF*/
-: 139:/*EOF*/
-: 140:/*EOF*/
-: 141:/*EOF*/
-: 142:/*EOF*/
-: 143:/*EOF*/
-: 144:/*EOF*/
-: 145:/*EOF*/
-: 146:/*EOF*/
-: 147:/*EOF*/
-: 148:/*EOF*/
-: 149:/*EOF*/
-: 150:/*EOF*/
-: 151:/*EOF*/
-: 152:/*EOF*/
-: 153:/*EOF*/
-: 154:/*EOF*/
-: 155:/*EOF*/
-: 156:/*EOF*/
-: 157:/*EOF*/
-: 158:/*EOF*/
-: 159:/*EOF*/
-: 160:/*EOF*/
-: 161:/*EOF*/
-: 162:/*EOF*/
-: 163:/*EOF*/
-: 164:/*EOF*/
-: 165:/*EOF*/
-: 166:/*EOF*/
-: 167:/*EOF*/
-: 168:/*EOF*/
function process_opt called 275 returned 90% blocks executed 100%
275: 169:/*EOF*/
-: 170:/*EOF*/
-: 171:/*EOF*/
-: 172:/*EOF*/
-: 173:/*EOF*/
-: 174:/*EOF*/
-: 175:/*EOF*/
275: 176:/*EOF*/
-: 177:/*EOF*/
275: 178:/*EOF*/
275: 179:/*EOF*/
call 0 returned 100%
-: 180:/*EOF*/
-: 181:/*EOF*/
275: 182:/*EOF*/
call 0 returned 100%
-: 183:/*EOF*/
-: 184:/*EOF*/
-: 185:/*EOF*/
275: 186:/*EOF*/
call 0 returned 100%
-: 187:/*EOF*/
-: 188:/*EOF*/
275: 189:/*EOF*/
call 0 returned 90%
-: 190:/*EOF*/
-: 191:/*EOF*/
-: 192:/*EOF*/
247: 193:/*EOF*/
branch 0 taken 31% (fallthrough)
branch 1 taken 69%
76: 194:/*EOF*/
branch 0 taken 64% (fallthrough)
branch 1 taken 36%
branch 2 taken 96% (fallthrough)
branch 3 taken 4%
74: 195:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 196:/*EOF*/
-: 197:/*EOF*/
-: 198:/*EOF*/
-: 199:/*EOF*/
-: 200:/*EOF*/
247: 201:/*EOF*/
-: 202:/*EOF*/
-: 203:/*EOF*/
-: 204:/*EOF*/
-: 205:/*EOF*/
-: 206:/*EOF*/
-: 207:/*EOF*/
function interpret_opt called 275 returned 90% blocks executed 73%
275: 208:/*EOF*/
-: 209:/*EOF*/
-: 210:/*EOF*/
-: 211:/*EOF*/
-: 212:/*EOF*/
-: 213:/*EOF*/
-: 214:/*EOF*/
-: 215:/*EOF*/
-: 216:/*EOF*/
-: 217:/*EOF*/
-: 218:/*EOF*/
-: 219:/*EOF*/
-: 220:/*EOF*/
-: 221:/*EOF*/
-: 222:/*EOF*/
-: 223:/*EOF*/
-: 224:/*EOF*/
-: 225:/*EOF*/
-: 226:/*EOF*/
-: 227:/*EOF*/
-: 228:/*EOF*/
-: 229:/*EOF*/
-: 230:/*EOF*/
-: 231:/*EOF*/
-: 232:/*EOF*/
-: 233:/*EOF*/
-: 234:/*EOF*/
-: 235:/*EOF*/
-: 236:/*EOF*/
-: 237:/*EOF*/
-: 238:/*EOF*/
-: 239:/*EOF*/
-: 240:/*EOF*/
-: 241:/*EOF*/
-: 242:/*EOF*/
275: 243:/*EOF*/
-: 244:/*EOF*/
-: 245:/*EOF*/
275: 246:/*EOF*/
1242: 247:/*EOF*/
call 0 returned 100%
branch 1 taken 74%
branch 2 taken 26% (fallthrough)
-: 248:/*EOF*/
716: 249:/*EOF*/
branch 0 taken 0%
branch 1 taken 0%
branch 2 taken 1%
branch 3 taken 1%
branch 4 taken 1%
branch 5 taken 2%
branch 6 taken 24%
branch 7 taken 1%
branch 8 taken 24%
branch 9 taken 0%
branch 10 taken 2%
branch 11 taken 0%
branch 12 taken 7%
branch 13 taken 35%
branch 14 taken 3%
branch 15 taken 1%
branch 16 taken 0%
-: 250:/*EOF*/
#####: 251:/*EOF*/
branch 0 never executed
branch 1 never executed
-: 252:/*EOF*/
-: 253:/*EOF*/
#####: 254:/*EOF*/
-: 255:/*EOF*/
-: 256:/*EOF*/
#####: 257:/*EOF*/
call 0 never executed
-: 258:/*EOF*/
-: 259:/*EOF*/
-: 260:/*EOF*/
#####: 261:/*EOF*/
-: 262:/*EOF*/
-: 263:/*EOF*/
#####: 264:/*EOF*/
call 0 never executed
-: 265:/*EOF*/
-: 266:/*EOF*/
-: 267:/*EOF*/
1: 268:/*EOF*/
call 0 returned 0%
-: 269:/*EOF*/
-: 270:/*EOF*/
-: 271:/*EOF*/
5: 272:/*EOF*/
call 0 returned 100%
5: 273:/*EOF*/
call 0 returned 0%
-: 274:/*EOF*/
-: 275:/*EOF*/
-: 276:/*EOF*/
1: 277:/*EOF*/
call 0 returned 0%
-: 278:/*EOF*/
-: 279:/*EOF*/
-: 280:/*EOF*/
17: 281:/*EOF*/
call 0 returned 100%
17: 282:/*EOF*/
call 0 returned 0%
-: 283:/*EOF*/
-: 284:/*EOF*/
-: 285:/*EOF*/
-: 286:/*EOF*/
-: 287:/*EOF*/
-: 288:/*EOF*/
-: 289:/*EOF*/
-: 290:/*EOF*/
-: 291:/*EOF*/
175: 292:/*EOF*/
call 0 returned 100%
175: 293:/*EOF*/
175: 294:/*EOF*/
-: 295:/*EOF*/
-: 296:/*EOF*/
2: 297:/*EOF*/
2: 298:/*EOF*/
call 0 returned 100%
2: 299:/*EOF*/
-: 300:/*EOF*/
-: 301:/*EOF*/
-: 302:/*EOF*/
171: 303:/*EOF*/
call 0 returned 100%
-: 304:/*EOF*/
-: 305:/*EOF*/
-: 306:/*EOF*/
#####: 307:/*EOF*/
#####: 308:/*EOF*/
-: 309:/*EOF*/
-: 310:/*EOF*/
13: 311:/*EOF*/
13: 312:/*EOF*/
-: 313:/*EOF*/
-: 314:/*EOF*/
#####: 315:/*EOF*/
#####: 316:/*EOF*/
-: 317:/*EOF*/
-: 318:/*EOF*/
51: 319:/*EOF*/
51: 320:/*EOF*/
51: 321:/*EOF*/
call 0 returned 100%
51: 322:/*EOF*/
-: 323:/*EOF*/
-: 324:/*EOF*/
250: 325:/*EOF*/
250: 326:/*EOF*/
-: 327:/*EOF*/
-: 328:/*EOF*/
23: 329:/*EOF*/
call 0 returned 100%
23: 330:/*EOF*/
-: 331:/*EOF*/
-: 332:/*EOF*/
-: 333:/*EOF*/
7: 334:/*EOF*/
call 0 returned 100%
-: 335:/*EOF*/
-: 336:/*EOF*/
-: 337:/*EOF*/
-: 338:/*EOF*/
-: 339:/*EOF*/
-: 340:/*EOF*/
7: 341:/*EOF*/
-: 342:/*EOF*/
-: 343:/*EOF*/
#####: 344:/*EOF*/
call 0 never executed
-: 345:/*EOF*/
-: 346:/*EOF*/
-: 347:/*EOF*/
-: 348:/*EOF*/
-: 349:/*EOF*/
251: 350:/*EOF*/
call 0 returned 100%
251: 351:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
4: 352:/*EOF*/
-: 353:/*EOF*/
-: 354:/*EOF*/
-: 355:/*EOF*/
-: 356:/*EOF*/
-: 357:/*EOF*/
2: 358:/*EOF*/
call 0 returned 0%
-: 359:/*EOF*/
-: 360:/*EOF*/
-: 361:/*EOF*/
-: 362:/*EOF*/
249: 363:/*EOF*/
branch 0 taken 91% (fallthrough)
branch 1 taken 9%
226: 364:/*EOF*/
226: 365:/*EOF*/
branch 0 taken 22% (fallthrough)
branch 1 taken 78%
50: 366:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 367:/*EOF*/
-: 368:/*EOF*/
-: 369:/*EOF*/
-: 370:/*EOF*/
249: 371:/*EOF*/
branch 0 taken 5%
branch 1 taken 0%
branch 2 taken 95%
-: 372:/*EOF*/
-: 373:/*EOF*/
-: 374:/*EOF*/
-: 375:/*EOF*/
-: 376:/*EOF*/
-: 377:/*EOF*/
-: 378:/*EOF*/
-: 379:/*EOF*/
-: 380:/*EOF*/
13: 381:/*EOF*/
call 0 returned 100%
13: 382:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
13: 383:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 384:/*EOF*/
-: 385:/*EOF*/
-: 386:/*EOF*/
-: 387:/*EOF*/
-: 388:/*EOF*/
#####: 389:/*EOF*/
call 0 never executed
#####: 390:/*EOF*/
branch 0 never executed
branch 1 never executed
call 2 never executed
-: 391:/*EOF*/
-: 392:/*EOF*/
13: 393:/*EOF*/
call 0 returned 100%
-: 394:/*EOF*/
13: 395:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 396:/*EOF*/
-: 397:/*EOF*/
-: 398:/*EOF*/
-: 399:/*EOF*/
-: 400:/*EOF*/
-: 401:/*EOF*/
-: 402:/*EOF*/
#####: 403:/*EOF*/
call 0 never executed
-: 404:/*EOF*/
13: 405:/*EOF*/
13: 406:/*EOF*/
-: 407:/*EOF*/
-: 408:/*EOF*/
#####: 409:/*EOF*/
call 0 never executed
-: 410:/*EOF*/
-: 411:/*EOF*/
-: 412:/*EOF*/
-: 413:/*EOF*/
249: 414:/*EOF*/
branch 0 taken 92% (fallthrough)
branch 1 taken 8%
229: 415:/*EOF*/
call 0 returned 100%
-: 416:/*EOF*/
-: 417:/*EOF*/
249: 418:/*EOF*/
call 0 returned 100%
-: 419:/*EOF*/
249: 420:/*EOF*/
branch 0 taken 61% (fallthrough)
branch 1 taken 39%
call 2 returned 100%
branch 3 taken 0% (fallthrough)
branch 4 taken 100%
branch 5 never executed
branch 6 never executed
#####: 421:/*EOF*/
call 0 never executed
-: 422:/*EOF*/
-: 423:/*EOF*/
249: 424:/*EOF*/
branch 0 taken 25% (fallthrough)
branch 1 taken 75%
63: 425:/*EOF*/
call 0 returned 100%
branch 1 taken 10% (fallthrough)
branch 2 taken 90%
6: 426:/*EOF*/
call 0 returned 100%
branch 1 taken 33% (fallthrough)
branch 2 taken 67%
2: 427:/*EOF*/
call 0 returned 0%
-: 428:/*EOF*/
-: 429:/*EOF*/
247: 430:/*EOF*/
-: 431:/*EOF*/
-: 432:/*EOF*/
-: 433:/*EOF*/
-: 434:/*EOF*/
-: 435:/*EOF*/
-: 436:/*EOF*/
function prepend_env called 275 returned 100% blocks executed 75%
275: 437:/*EOF*/
-: 438:/*EOF*/
-: 439:/*EOF*/
-: 440:/*EOF*/
-: 441:/*EOF*/
-: 442:/*EOF*/
-: 443:/*EOF*/
-: 444:/*EOF*/
-: 445:/*EOF*/
-: 446:/*EOF*/
-: 447:/*EOF*/
275: 448:/*EOF*/
275: 449:/*EOF*/
-: 450:/*EOF*/
275: 451:/*EOF*/
call 0 returned 100%
275: 452:/*EOF*/
branch 0 taken 6% (fallthrough)
branch 1 taken 94%
-: 453:/*EOF*/
-: 454:/*EOF*/
-: 455:/*EOF*/
16: 456:/*EOF*/
call 0 returned 100%
branch 1 taken 6% (fallthrough)
branch 2 taken 94%
1: 457:/*EOF*/
branch 0 taken 0%
branch 1 taken 0%
branch 2 taken 0%
branch 3 taken 0%
branch 4 taken 100%
-: 458:/*EOF*/
#####: 459:/*EOF*/
call 0 never executed
#####: 460:/*EOF*/
-: 461:/*EOF*/
#####: 462:/*EOF*/
call 0 never executed
-: 463:/*EOF*/
-: 464:/*EOF*/
-: 465:/*EOF*/
-: 466:/*EOF*/
-: 467:/*EOF*/
-: 468:/*EOF*/
-: 469:/*EOF*/
#####: 470:/*EOF*/
#####: 471:/*EOF*/
-: 472:/*EOF*/
-: 473:/*EOF*/
#####: 474:/*EOF*/
#####: 475:/*EOF*/
-: 476:/*EOF*/
-: 477:/*EOF*/
#####: 478:/*EOF*/
#####: 479:/*EOF*/
-: 480:/*EOF*/
2: 481:/*EOF*/
-: 482:/*EOF*/
1: 483:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 484:/*EOF*/
-: 485:/*EOF*/
1: 486:/*EOF*/
-: 487:/*EOF*/
1: 488:/*EOF*/
call 0 returned 100%
-: 489:/*EOF*/
1: 490:/*EOF*/
-: 491:/*EOF*/
-: 492:/*EOF*/
-: 493:/*EOF*/
-: 494:/*EOF*/
15: 495:/*EOF*/
15: 496:/*EOF*/
call 0 returned 100%
15: 497:/*EOF*/
-: 498:/*EOF*/
75: 499:/*EOF*/
branch 0 taken 80%
branch 1 taken 20% (fallthrough)
60: 500:/*EOF*/
call 0 returned 100%
-: 501:/*EOF*/
117: 502:/*EOF*/
branch 0 taken 89%
branch 1 taken 11% (fallthrough)
117: 503:/*EOF*/
-: 504:/*EOF*/
-: 505:/*EOF*/
15: 506:/*EOF*/
call 0 returned 100%
-: 507:/*EOF*/
15: 508:/*EOF*/
-: 509:/*EOF*/
-: 510:/*EOF*/
-: 511:/*EOF*/
-: 512:/*EOF*/
-: 513:/*EOF*/
-: 514:/*EOF*/
-: 515:/*EOF*/
-: 516:/*EOF*/
-: 517:/*EOF*/
-: 518:/*EOF*/
-: 519:/*EOF*/
-: 520:/*EOF*/
-: 521:/*EOF*/
-: 522:/*EOF*/
-: 523:/*EOF*/
-: 524:/*EOF*/
-: 525:/*EOF*/
-: 526:/*EOF*/
-: 527:/*EOF*/
-: 528:/*EOF*/
-: 529:/*EOF*/
-: 530:/*EOF*/
-: 531:/*EOF*/
-: 532:/*EOF*/
-: 533:/*EOF*/
-: 534:/*EOF*/
-: 535:/*EOF*/
-: 536:/*EOF*/
-: 537:/*EOF*/
-: 538:/*EOF*/
-: 539:/*EOF*/
-: 540:/*EOF*/
-: 541:/*EOF*/
-: 542:/*EOF*/
-: 543:/*EOF*/
-: 544:/*EOF*/
-: 545:/*EOF*/
-: 546:/*EOF*/
-: 547:/*EOF*/
-: 548:/*EOF*/
-: 549:/*EOF*/
-: 550:/*EOF*/
-: 551:/*EOF*/
-: 552:/*EOF*/
-: 553:/*EOF*/
-: 554:/*EOF*/
-: 555:/*EOF*/
-: 556:/*EOF*/
-: 557:/*EOF*/
-: 558:/*EOF*/
-: 559:/*EOF*/
-: 560:/*EOF*/
-: 561:/*EOF*/
-: 562:/*EOF*/
-: 563:/*EOF*/
-: 564:/*EOF*/
-: 565:/*EOF*/
-: 566:/*EOF*/
-: 567:/*EOF*/
function optchar_to_otype called 175 returned 100% blocks executed 44%
175: 568:/*EOF*/
-: 569:/*EOF*/
175: 570:/*EOF*/
branch 0 taken 92%
branch 1 taken 8%
branch 2 taken 0%
branch 3 taken 0%
branch 4 taken 0%
branch 5 taken 0%
branch 6 taken 0%
branch 7 taken 0%
-: 571:/*EOF*/
161: 572:/*EOF*/
14: 573:/*EOF*/
#####: 574:/*EOF*/
#####: 575:/*EOF*/
#####: 576:/*EOF*/
#####: 577:/*EOF*/
-: 578:/*EOF*/
-: 579:/*EOF*/
#####: 580:/*EOF*/
call 0 never executed
-: 581:/*EOF*/
-: 582:/*EOF*/
-: 583:/*EOF*/
-: 584:/*EOF*/
-: 585:/*EOF*/
-: 586:/*EOF*/
-: 587:/*EOF*/
function set_otype_from_name called 3 returned 100% blocks executed 100%
3: 588:/*EOF*/
-: 589:/*EOF*/
-: 590:/*EOF*/
-: 591:/*EOF*/
-: 592:/*EOF*/
-: 593:/*EOF*/
-: 594:/*EOF*/
-: 595:/*EOF*/
-: 596:/*EOF*/
-: 597:/*EOF*/
-: 598:/*EOF*/
-: 599:/*EOF*/
-: 600:/*EOF*/
-: 601:/*EOF*/
-: 602:/*EOF*/
-: 603:/*EOF*/
-: 604:/*EOF*/
-: 605:/*EOF*/
-: 606:/*EOF*/
-: 607:/*EOF*/
-: 608:/*EOF*/
-: 609:/*EOF*/
-: 610:/*EOF*/
-: 611:/*EOF*/
-: 612:/*EOF*/
-: 613:/*EOF*/
-: 614:/*EOF*/
-: 615:/*EOF*/
-: 616:/*EOF*/
3: 617:/*EOF*/
call 0 returned 100%
-: 618:/*EOF*/
-: 619:/*EOF*/
3: 620:/*EOF*/
branch 0 taken 33% (fallthrough)
branch 1 taken 67%
1: 621:/*EOF*/
3: 622:/*EOF*/
-: 623:/*EOF*/
-: 624:/*EOF*/
-: 625:/*EOF*/
function parse_arg_x called 64 returned 100% blocks executed 67%
64: 626:/*EOF*/
-: 627:/*EOF*/
-: 628:/*EOF*/
-: 629:/*EOF*/
-: 630:/*EOF*/
-: 631:/*EOF*/
-: 632:/*EOF*/
64: 633:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 634:/*EOF*/
-: 635:/*EOF*/
-: 636:/*EOF*/
64: 637:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
64: 638:/*EOF*/
call 0 returned 100%
-: 639:/*EOF*/
-: 640:/*EOF*/
-: 641:/*EOF*/
-: 642:/*EOF*/
-: 643:/*EOF*/
-: 644:/*EOF*/
64: 645:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
64: 646:/*EOF*/
call 0 returned 100%
-: 647:/*EOF*/
#####: 648:/*EOF*/
#####: 649:/*EOF*/
-: 650:/*EOF*/
-: 651:/*EOF*/
64: 652:/*EOF*/
-: 653:/*EOF*/
-: 654:/*EOF*/
-: 655:/*EOF*/
-: 656:/*EOF*/
-: 657:/*EOF*/
-: 658:/*EOF*/
function add_parsed_converters called 252 returned 100% blocks executed 93%
252: 659:/*EOF*/
-: 660:/*EOF*/
-: 661:/*EOF*/
-: 662:/*EOF*/
-: 663:/*EOF*/
-: 664:/*EOF*/
-: 665:/*EOF*/
-: 666:/*EOF*/
-: 667:/*EOF*/
252: 668:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
249: 669:/*EOF*/
-: 670:/*EOF*/
252: 671:/*EOF*/
-: 672:/*EOF*/
252: 673:/*EOF*/
call 0 returned 100%
733: 674:/*EOF*/
branch 0 taken 48%
branch 1 taken 52% (fallthrough)
229: 675:/*EOF*/
229: 676:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
-: 677:/*EOF*/
-: 678:/*EOF*/
252: 679:/*EOF*/
call 0 returned 100%
branch 1 taken 99% (fallthrough)
branch 2 taken 1%
252: 680:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 681:/*EOF*/
-: 682:/*EOF*/
-: 683:/*EOF*/
-: 684:/*EOF*/
-: 685:/*EOF*/
-: 686:/*EOF*/
-: 687:/*EOF*/
function make_filelist called 249 returned 100% blocks executed 100%
249: 688:/*EOF*/
-: 689:/*EOF*/
-: 690:/*EOF*/
249: 691:/*EOF*/
-: 692:/*EOF*/
-: 693:/*EOF*/
249: 694:/*EOF*/
branch 0 taken 41% (fallthrough)
branch 1 taken 59%
101: 695:/*EOF*/
branch 0 taken 53% (fallthrough)
branch 1 taken 47%
branch 2 taken 6% (fallthrough)
branch 3 taken 94%
branch 4 taken 94% (fallthrough)
branch 5 taken 6%
-: 696:/*EOF*/
-: 697:/*EOF*/
98: 698:/*EOF*/
98: 699:/*EOF*/
call 0 returned 100%
call 1 returned 100%
branch 2 taken 77%
branch 3 taken 23% (fallthrough)
98: 700:/*EOF*/
-: 701:/*EOF*/
98: 702:/*EOF*/
-: 703:/*EOF*/
-: 704:/*EOF*/
-: 705:/*EOF*/
-: 706:/*EOF*/
-: 707:/*EOF*/
245: 708:/*EOF*/
247: 709:/*EOF*/
-: 710:/*EOF*/
-: 711:/*EOF*/
-: 712:/*EOF*/
-: 713:/*EOF*/
-: 714:/*EOF*/
-: 715:/*EOF*/
function print_some_list called 20 returned 100% blocks executed 100%
20: 716:/*EOF*/
-: 717:/*EOF*/
-: 718:/*EOF*/
-: 719:/*EOF*/
-: 720:/*EOF*/
-: 721:/*EOF*/
-: 722:/*EOF*/
-: 723:/*EOF*/
-: 724:/*EOF*/
-: 725:/*EOF*/
-: 726:/*EOF*/
-: 727:/*EOF*/
-: 728:/*EOF*/
-: 729:/*EOF*/
-: 730:/*EOF*/
-: 731:/*EOF*/
-: 732:/*EOF*/
-: 733:/*EOF*/
-: 734:/*EOF*/
-: 735:/*EOF*/
-: 736:/*EOF*/
-: 737:/*EOF*/
-: 738:/*EOF*/
-: 739:/*EOF*/
20: 740:/*EOF*/
-: 741:/*EOF*/
-: 742:/*EOF*/
-: 743:/*EOF*/
20: 744:/*EOF*/
call 0 returned 100%
-: 745:/*EOF*/
-: 746:/*EOF*/
-: 747:/*EOF*/
-: 748:/*EOF*/
-: 749:/*EOF*/
-: 750:/*EOF*/
20: 751:/*EOF*/
branch 0 taken 85% (fallthrough)
branch 1 taken 15%
-: 752:/*EOF*/
-: 753:/*EOF*/
17: 754:/*EOF*/
17: 755:/*EOF*/
call 0 returned 100%
-: 756:/*EOF*/
-: 757:/*EOF*/
-: 758:/*EOF*/
-: 759:/*EOF*/
-: 760:/*EOF*/
-: 761:/*EOF*/
-: 762:/*EOF*/
-: 763:/*EOF*/
-: 764:/*EOF*/
-: 765:/*EOF*/
-: 766:/*EOF*/
-: 767:/*EOF*/
-: 768:/*EOF*/
-: 769:/*EOF*/
-: 770:/*EOF*/
-: 771:/*EOF*/
-: 772:/*EOF*/
-: 773:/*EOF*/
-: 774:/*EOF*/
-: 775:/*EOF*/
-: 776:/*EOF*/
function print_version called 5 returned 100% blocks executed 100%
5: 777:/*EOF*/
-: 778:/*EOF*/
10: 779:/*EOF*/
5: 780:/*EOF*/
-: 781:/*EOF*/
-: 782:/*EOF*/
-: 783:/*EOF*/
-: 784:/*EOF*/
-: 785:/*EOF*/
-: 786:/*EOF*/
function print_builtin_charsets called 1 returned 100% blocks executed 100%
1: 787:/*EOF*/
-: 788:/*EOF*/
1: 789:/*EOF*/
call 0 returned 100%
1: 790:/*EOF*/
-: 791:/*EOF*/
-: 792:/*EOF*/
-: 793:/*EOF*/
-: 794:/*EOF*/
-: 795:/*EOF*/
-: 796:/*EOF*/
function print_all_charsets called 2 returned 100% blocks executed 100%
2: 797:/*EOF*/
-: 798:/*EOF*/
2: 799:/*EOF*/
call 0 returned 100%
2: 800:/*EOF*/
-: 801:/*EOF*/
-: 802:/*EOF*/
-: 803:/*EOF*/
-: 804:/*EOF*/
-: 805:/*EOF*/
-: 806:/*EOF*/
-: 807:/*EOF*/
-: 808:/*EOF*/
-: 809:/*EOF*/
function print_charsets called 3 returned 100% blocks executed 44%
3: 810:/*EOF*/
-: 811:/*EOF*/
-: 812:/*EOF*/
-: 813:/*EOF*/
3: 814:/*EOF*/
99: 815:/*EOF*/
call 0 returned 100%
branch 1 taken 97%
branch 2 taken 3% (fallthrough)
96: 816:/*EOF*/
branch 0 taken 33% (fallthrough)
branch 1 taken 67%
call 2 returned 100%
branch 3 taken 28% (fallthrough)
branch 4 taken 72%
9: 817:/*EOF*/
-: 818:/*EOF*/
87: 819:/*EOF*/
branch 0 taken 37%
branch 1 taken 0%
branch 2 taken 63%
branch 3 taken 0%
branch 4 taken 0%
branch 5 taken 0%
branch 6 taken 0%
branch 7 taken 0%
-: 820:/*EOF*/
32: 821:/*EOF*/
call 0 returned 100%
32: 822:/*EOF*/
-: 823:/*EOF*/
-: 824:/*EOF*/
-: 825:/*EOF*/
#####: 826:/*EOF*/
call 0 never executed
call 1 never executed
#####: 827:/*EOF*/
-: 828:/*EOF*/
-: 829:/*EOF*/
-: 830:/*EOF*/
55: 831:/*EOF*/
call 0 returned 100%
call 1 returned 100%
55: 832:/*EOF*/
-: 833:/*EOF*/
-: 834:/*EOF*/
#####: 835:/*EOF*/
call 0 never executed
call 1 never executed
#####: 836:/*EOF*/
-: 837:/*EOF*/
-: 838:/*EOF*/
#####: 839:/*EOF*/
call 0 never executed
branch 1 never executed
branch 2 never executed
#####: 840:/*EOF*/
call 0 never executed
call 1 never executed
-: 841:/*EOF*/
-: 842:/*EOF*/
-: 843:/*EOF*/
#####: 844:/*EOF*/
call 0 never executed
branch 1 never executed
branch 2 never executed
#####: 845:/*EOF*/
call 0 never executed
call 1 never executed
-: 846:/*EOF*/
-: 847:/*EOF*/
-: 848:/*EOF*/
#####: 849:/*EOF*/
call 0 never executed
branch 1 never executed
branch 2 never executed
#####: 850:/*EOF*/
call 0 never executed
call 1 never executed
-: 851:/*EOF*/
-: 852:/*EOF*/
-: 853:/*EOF*/
#####: 854:/*EOF*/
call 0 never executed
-: 855:/*EOF*/
-: 856:/*EOF*/
-: 857:/*EOF*/
3: 858:/*EOF*/
-: 859:/*EOF*/
-: 860:/*EOF*/
-: 861:/*EOF*/
-: 862:/*EOF*/
-: 863:/*EOF*/
function print_aliases called 32 returned 100% blocks executed 100%
32: 864:/*EOF*/
-: 865:/*EOF*/
-: 866:/*EOF*/
32: 867:/*EOF*/
-: 868:/*EOF*/
242: 869:/*EOF*/
call 0 returned 100%
branch 1 taken 87%
branch 2 taken 13% (fallthrough)
420: 870:/*EOF*/
-: 871:/*EOF*/
32: 872:/*EOF*/
32: 873:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
32: 874:/*EOF*/
-: 875:/*EOF*/
-: 876:/*EOF*/
-: 877:/*EOF*/
-: 878:/*EOF*/
-: 879:/*EOF*/
-: 880:/*EOF*/
function print_surfaces called 1 returned 100% blocks executed 86%
1: 881:/*EOF*/
-: 882:/*EOF*/
-: 883:/*EOF*/
-: 884:/*EOF*/
-: 885:/*EOF*/
-: 886:/*EOF*/
-: 887:/*EOF*/
1: 888:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
-: 889:/*EOF*/
-: 890:/*EOF*/
#####: 891:/*EOF*/
-: 892:/*EOF*/
33: 893:/*EOF*/
branch 0 taken 97%
branch 1 taken 3% (fallthrough)
32: 894:/*EOF*/
call 0 returned 100%
32: 895:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
branch 2 taken 31% (fallthrough)
branch 3 taken 69%
10: 896:/*EOF*/
call 0 returned 100%
10: 897:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
-: 898:/*EOF*/
10: 899:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 900:/*EOF*/
-: 901:/*EOF*/
1: 902:/*EOF*/
-: 903:/*EOF*/
-: 904:/*EOF*/
-: 905:/*EOF*/
function print_lists called 3 returned 100% blocks executed 100%
3: 906:/*EOF*/
-: 907:/*EOF*/
3: 908:/*EOF*/
call 0 returned 100%
3: 909:/*EOF*/
-: 910:/*EOF*/
-: 911:/*EOF*/
-: 912:/*EOF*/
-: 913:/*EOF*/
-: 914:/*EOF*/
-: 915:/*EOF*/
-: 916:/*EOF*/
-: 917:/*EOF*/
function print_languages called 1 returned 100% blocks executed 96%
1: 918:/*EOF*/
-: 919:/*EOF*/
-: 920:/*EOF*/
-: 921:/*EOF*/
-: 922:/*EOF*/
-: 923:/*EOF*/
-: 924:/*EOF*/
1: 925:/*EOF*/
call 0 returned 100%
-: 926:/*EOF*/
2: 927:/*EOF*/
1: 928:/*EOF*/
-: 929:/*EOF*/
1: 930:/*EOF*/
1: 931:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
15: 932:/*EOF*/
branch 0 taken 94%
branch 1 taken 6% (fallthrough)
15: 933:/*EOF*/
call 0 returned 100%
15: 934:/*EOF*/
branch 0 taken 7% (fallthrough)
branch 1 taken 93%
1: 935:/*EOF*/
-: 936:/*EOF*/
-: 937:/*EOF*/
-: 938:/*EOF*/
-: 939:/*EOF*/
16: 940:/*EOF*/
branch 0 taken 94%
branch 1 taken 6% (fallthrough)
15: 941:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
15: 942:/*EOF*/
call 0 returned 100%
-: 943:/*EOF*/
#####: 944:/*EOF*/
15: 945:/*EOF*/
96: 946:/*EOF*/
call 0 returned 100%
branch 1 taken 84%
branch 2 taken 16% (fallthrough)
162: 947:/*EOF*/
call 0 returned 100%
-: 948:/*EOF*/
15: 949:/*EOF*/
15: 950:/*EOF*/
branch 0 taken 93% (fallthrough)
branch 1 taken 7%
-: 951:/*EOF*/
1: 952:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
1: 953:/*EOF*/
-: 954:/*EOF*/
-: 955:/*EOF*/
-: 956:/*EOF*/
-: 957:/*EOF*/
-: 958:/*EOF*/
-: 959:/*EOF*/
function print_names called 1 returned 100% blocks executed 100%
1: 960:/*EOF*/
-: 961:/*EOF*/
1: 962:/*EOF*/
call 0 returned 100%
1: 963:/*EOF*/
-: 964:/*EOF*/
-: 965:/*EOF*/
-: 966:/*EOF*/
-: 967:/*EOF*/
-: 968:/*EOF*/
function print_text_and_exit called 2 returned 0% blocks executed 86%
2: 969:/*EOF*/
-: 970:/*EOF*/
2: 971:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
call 2 never executed
-: 972:/*EOF*/
390: 973:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
390: 974:/*EOF*/
call 0 returned 100%
-: 975:/*EOF*/
2: 976:/*EOF*/
-: 977:/*EOF*/
-: 978:/*EOF*/
-: 979:/*EOF*/
-: 980:/*EOF*/
-: 981:/*EOF*/
-: 982:/*EOF*/
-: 983:/*EOF*/
-: 984:/*EOF*/
function set_program_behaviour called 275 returned 100% blocks executed 33%
275: 985:/*EOF*/
-: 986:/*EOF*/
-: 987:/*EOF*/
-: 988:/*EOF*/
-: 989:/*EOF*/
-: 990:/*EOF*/
-: 991:/*EOF*/
275: 992:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 993:/*EOF*/
call 0 never executed
branch 1 never executed
branch 2 never executed
#####: 994:/*EOF*/
#####: 995:/*EOF*/
-: 996:/*EOF*/
-: 997:/*EOF*/
275: 998:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 999:/*EOF*/
call 0 never executed
branch 1 never executed
branch 2 never executed
#####: 1000:/*EOF*/
#####: 1001:/*EOF*/
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lang_sk.c.gcov
-: 0:Source:lang_sk.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_sk.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_sk.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
-: 62:/*EOF*/
-: 63:/*EOF*/
-: 64:/*EOF*/
-: 65:/*EOF*/
-: 66:/*EOF*/
function hook called 27 returned 100% blocks executed 100%
27: 67:/*EOF*/
-: 68:/*EOF*/
54: 69:/*EOF*/
45: 70:/*EOF*/
branch 0 taken 67% (fallthrough)
branch 1 taken 33%
branch 2 taken 50% (fallthrough)
branch 3 taken 50%
-: 71:/*EOF*/
-: 72:/*EOF*/
-: 73:/*EOF*/
-: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
-: 80:/*EOF*/
-: 81:/*EOF*/
-: 82:/*EOF*/
function eol_hook called 0 returned 0% blocks executed 0%
#####: 83:/*EOF*/
-: 84:/*EOF*/
#####: 85:/*EOF*/
-: 86:/*EOF*/
-: 87:/*EOF*/
-: 88:/*EOF*/
-: 89:/*EOF*/
-: 90:/*EOF*/
-: 91:/*EOF*/
-: 92:/*EOF*/
-: 93:/*EOF*/
-: 94:/*EOF*/
-: 95:/*EOF*/
-: 96:/*EOF*/
-: 97:/*EOF*/
-: 98:/*EOF*/
-: 99:/*EOF*/
-: 100:/*EOF*/
-: 101:/*EOF*/
-: 102:/*EOF*/
-: 103:/*EOF*/
-: 104:/*EOF*/
#####: 105:/*EOF*/
call 0 never executed
-: 106:/*EOF*/
-: 107:/*EOF*/
-: 108:/*EOF*/
-: 109:/*EOF*/
-: 110:/*EOF*/
-: 111:/*EOF*/
-: 112:/*EOF*/
-: 113:/*EOF*/
-: 114:/*EOF*/
-: 115:/*EOF*/
-: 116:/*EOF*/
-: 117:/*EOF*/
-: 118:/*EOF*/
-: 119:/*EOF*/
-: 120:/*EOF*/
-: 121:/*EOF*/
-: 122:/*EOF*/
-: 123:/*EOF*/
-: 124:/*EOF*/
-: 125:/*EOF*/
-: 126:/*EOF*/
-: 127:/*EOF*/
-: 128:/*EOF*/
-: 129:/*EOF*/
-: 130:/*EOF*/
27: 131:/*EOF*/
call 0 returned 100%
-: 132:/*EOF*/
-: 133:/*EOF*/
-: 134:/*EOF*/
-: 135:/*EOF*/
-: 136:/*EOF*/
-: 137:/*EOF*/
-: 138:/*EOF*/
-: 139:/*EOF*/
-: 140:/*EOF*/
-: 141:/*EOF*/
-: 142:/*EOF*/
-: 143:/*EOF*/
-: 144:/*EOF*/
-: 145:/*EOF*/
-: 146:/*EOF*/
-: 147:/*EOF*/
-: 148:/*EOF*/
-: 149:/*EOF*/
-: 150:/*EOF*/
-: 151:/*EOF*/
-: 152:/*EOF*/
-: 153:/*EOF*/
-: 154:/*EOF*/
-: 155:/*EOF*/
-: 156:/*EOF*/
18: 157:/*EOF*/
call 0 returned 100%
<<<<<< EOF
# path=/home/travis/build/nijel/enca/utf8_double.c.gcov
-: 0:Source:utf8_double.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/utf8_double.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/utf8_double.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
function enca_double_utf8_init called 247 returned 100% blocks executed 100%
247: 46:/*EOF*/
-: 47:/*EOF*/
247: 48:/*EOF*/
247: 49:/*EOF*/
247: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
function enca_double_utf8_destroy called 246 returned 100% blocks executed 100%
246: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
-: 62:/*EOF*/
246: 63:/*EOF*/
branch 0 taken 5% (fallthrough)
branch 1 taken 95%
-: 64:/*EOF*/
-: 65:/*EOF*/
13: 66:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 67:/*EOF*/
91: 68:/*EOF*/
branch 0 taken 86%
branch 1 taken 14% (fallthrough)
78: 69:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
78: 70:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 71:/*EOF*/
13: 72:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 73:/*EOF*/
-: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
-: 80:/*EOF*/
-: 81:/*EOF*/
-: 82:/*EOF*/
-: 83:/*EOF*/
-: 84:/*EOF*/
-: 85:/*EOF*/
-: 86:/*EOF*/
-: 87:/*EOF*/
-: 88:/*EOF*/
-: 89:/*EOF*/
-: 90:/*EOF*/
-: 91:/*EOF*/
-: 92:/*EOF*/
-: 93:/*EOF*/
-: 94:/*EOF*/
-: 95:/*EOF*/
-: 96:/*EOF*/
-: 97:/*EOF*/
-: 98:/*EOF*/
-: 99:/*EOF*/
function enca_double_utf8_check called 49 returned 100% blocks executed 88%
49: 100:/*EOF*/
-: 101:/*EOF*/
-: 102:/*EOF*/
-: 103:/*EOF*/
49: 104:/*EOF*/
49: 105:/*EOF*/
-: 106:/*EOF*/
-: 107:/*EOF*/
49: 108:/*EOF*/
branch 0 taken 86% (fallthrough)
branch 1 taken 14%
branch 2 taken 100% (fallthrough)
branch 3 taken 0%
-: 109:/*EOF*/
-: 110:/*EOF*/
-: 111:/*EOF*/
42: 112:/*EOF*/
branch 0 taken 31% (fallthrough)
branch 1 taken 69%
13: 113:/*EOF*/
call 0 returned 100%
-: 114:/*EOF*/
42: 115:/*EOF*/
-: 116:/*EOF*/
-: 117:/*EOF*/
5348: 118:/*EOF*/
call 0 returned 100%
branch 1 taken 99%
branch 2 taken 1% (fallthrough)
5306: 119:/*EOF*/
-: 120:/*EOF*/
5306: 121:/*EOF*/
branch 0 taken 70% (fallthrough)
branch 1 taken 30%
3688: 122:/*EOF*/
branch 0 taken 64% (fallthrough)
branch 1 taken 36%
2346: 123:/*EOF*/
1342: 124:/*EOF*/
branch 0 taken 79% (fallthrough)
branch 1 taken 21%
1066: 125:/*EOF*/
1066: 126:/*EOF*/
1066: 127:/*EOF*/
-: 128:/*EOF*/
276: 129:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
276: 130:/*EOF*/
276: 131:/*EOF*/
276: 132:/*EOF*/
-: 133:/*EOF*/
-: 134:/*EOF*/
-: 135:/*EOF*/
#####: 136:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 137:/*EOF*/
#####: 138:/*EOF*/
#####: 139:/*EOF*/
-: 140:/*EOF*/
#####: 141:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 142:/*EOF*/
#####: 143:/*EOF*/
#####: 144:/*EOF*/
-: 145:/*EOF*/
#####: 146:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 147:/*EOF*/
#####: 148:/*EOF*/
#####: 149:/*EOF*/
-: 150:/*EOF*/
-: 151:/*EOF*/
-: 152:/*EOF*/
-: 153:/*EOF*/
-: 154:/*EOF*/
-: 155:/*EOF*/
1618: 156:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 157:/*EOF*/
-: 158:/*EOF*/
-: 159:/*EOF*/
-: 160:/*EOF*/
1618: 161:/*EOF*/
1618: 162:/*EOF*/
1618: 163:/*EOF*/
-: 164:/*EOF*/
-: 165:/*EOF*/
-: 166:/*EOF*/
3236: 167:/*EOF*/
branch 0 taken 83% (fallthrough)
branch 1 taken 17%
1618: 168:/*EOF*/
1342: 169:/*EOF*/
branch 0 taken 58% (fallthrough)
branch 1 taken 42%
784: 170:/*EOF*/
branch 0 taken 21% (fallthrough)
branch 1 taken 79%
164: 171:/*EOF*/
-: 172:/*EOF*/
620: 173:/*EOF*/
-: 174:/*EOF*/
-: 175:/*EOF*/
-: 176:/*EOF*/
-: 177:/*EOF*/
-: 178:/*EOF*/
-: 179:/*EOF*/
247: 180:/*EOF*/
branch 0 taken 85%
branch 1 taken 15% (fallthrough)
247: 181:/*EOF*/
-: 182:/*EOF*/
-: 183:/*EOF*/
247: 184:/*EOF*/
247: 185:/*EOF*/
5814: 186:/*EOF*/
branch 0 taken 96%
branch 1 taken 4% (fallthrough)
5567: 187:/*EOF*/
-: 188:/*EOF*/
-: 189:/*EOF*/
-: 190:/*EOF*/
-: 191:/*EOF*/
-: 192:/*EOF*/
-: 193:/*EOF*/
-: 194:/*EOF*/
205: 195:/*EOF*/
branch 0 taken 83%
branch 1 taken 17% (fallthrough)
205: 196:/*EOF*/
branch 0 taken 16% (fallthrough)
branch 1 taken 84%
33: 197:/*EOF*/
205: 198:/*EOF*/
branch 0 taken 10% (fallthrough)
branch 1 taken 90%
21: 199:/*EOF*/
-: 200:/*EOF*/
-: 201:/*EOF*/
42: 202:/*EOF*/
branch 0 taken 93% (fallthrough)
branch 1 taken 7%
39: 203:/*EOF*/
branch 0 taken 97% (fallthrough)
branch 1 taken 3%
38: 204:/*EOF*/
38: 205:/*EOF*/
38: 206:/*EOF*/
-: 207:/*EOF*/
261: 208:/*EOF*/
branch 0 taken 85%
branch 1 taken 15% (fallthrough)
223: 209:/*EOF*/
branch 0 taken 25% (fallthrough)
branch 1 taken 75%
55: 210:/*EOF*/
55: 211:/*EOF*/
-: 212:/*EOF*/
-: 213:/*EOF*/
38: 214:/*EOF*/
-: 215:/*EOF*/
-: 216:/*EOF*/
-: 217:/*EOF*/
-: 218:/*EOF*/
-: 219:/*EOF*/
-: 220:/*EOF*/
-: 221:/*EOF*/
-: 222:/*EOF*/
-: 223:/*EOF*/
-: 224:/*EOF*/
-: 225:/*EOF*/
-: 226:/*EOF*/
-: 227:/*EOF*/
-: 228:/*EOF*/
-: 229:/*EOF*/
-: 230:/*EOF*/
-: 231:/*EOF*/
-: 232:/*EOF*/
-: 233:/*EOF*/
-: 234:/*EOF*/
-: 235:/*EOF*/
-: 236:/*EOF*/
-: 237:/*EOF*/
-: 238:/*EOF*/
-: 239:/*EOF*/
-: 240:/*EOF*/
function enca_double_utf8_get_candidates called 38 returned 100% blocks executed 94%
38: 241:/*EOF*/
-: 242:/*EOF*/
38: 243:/*EOF*/
-: 244:/*EOF*/
-: 245:/*EOF*/
-: 246:/*EOF*/
38: 247:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
38: 248:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 249:/*EOF*/
-: 250:/*EOF*/
223: 251:/*EOF*/
branch 0 taken 85%
branch 1 taken 15% (fallthrough)
223: 252:/*EOF*/
branch 0 taken 25% (fallthrough)
branch 1 taken 75%
55: 253:/*EOF*/
-: 254:/*EOF*/
-: 255:/*EOF*/
38: 256:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 257:/*EOF*/
-: 258:/*EOF*/
38: 259:/*EOF*/
38: 260:/*EOF*/
261: 261:/*EOF*/
call 0 returned 100%
branch 1 taken 85%
branch 2 taken 15% (fallthrough)
223: 262:/*EOF*/
branch 0 taken 25% (fallthrough)
branch 1 taken 75%
55: 263:/*EOF*/
55: 264:/*EOF*/
-: 265:/*EOF*/
-: 266:/*EOF*/
-: 267:/*EOF*/
-: 268:/*EOF*/
-: 269:/*EOF*/
-: 270:/*EOF*/
-: 271:/*EOF*/
-: 272:/*EOF*/
-: 273:/*EOF*/
-: 274:/*EOF*/
-: 275:/*EOF*/
-: 276:/*EOF*/
-: 277:/*EOF*/
-: 278:/*EOF*/
-: 279:/*EOF*/
-: 280:/*EOF*/
function compute_double_utf8_weights called 13 returned 100% blocks executed 80%
13: 281:/*EOF*/
-: 282:/*EOF*/
-: 283:/*EOF*/
-: 284:/*EOF*/
-: 285:/*EOF*/
-: 286:/*EOF*/
13: 287:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
13: 288:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
13: 289:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
13: 290:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
13: 291:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
#####: 292:/*EOF*/
-: 293:/*EOF*/
13: 294:/*EOF*/
call 0 returned 100%
13: 295:/*EOF*/
call 0 returned 100%
13: 296:/*EOF*/
-: 297:/*EOF*/
851981: 298:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
851968: 299:/*EOF*/
-: 300:/*EOF*/
-: 301:/*EOF*/
-: 302:/*EOF*/
-: 303:/*EOF*/
78: 304:/*EOF*/
branch 0 taken 86%
branch 1 taken 14% (fallthrough)
78: 305:/*EOF*/
78: 306:/*EOF*/
-: 307:/*EOF*/
78: 308:/*EOF*/
call 0 returned 100%
branch 1 taken 0% (fallthrough)
branch 2 taken 100%
call 3 never executed
78: 309:/*EOF*/
-: 310:/*EOF*/
-: 311:/*EOF*/
-: 312:/*EOF*/
20046: 313:/*EOF*/
call 0 returned 100%
branch 1 taken 99%
branch 2 taken 1% (fallthrough)
19968: 314:/*EOF*/
19968: 315:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 316:/*EOF*/
19968: 317:/*EOF*/
branch 0 taken 92% (fallthrough)
branch 1 taken 8%
18343: 318:/*EOF*/
-: 319:/*EOF*/
-: 320:/*EOF*/
1625: 321:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 322:/*EOF*/
-: 323:/*EOF*/
1625: 324:/*EOF*/
branch 0 taken 99% (fallthrough)
branch 1 taken 1%
1603: 325:/*EOF*/
1625: 326:/*EOF*/
-: 327:/*EOF*/
-: 328:/*EOF*/
-: 329:/*EOF*/
1625: 330:/*EOF*/
branch 0 taken 99% (fallthrough)
branch 1 taken 1%
1622: 331:/*EOF*/
-: 332:/*EOF*/
3: 333:/*EOF*/
-: 334:/*EOF*/
1625: 335:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 336:/*EOF*/
-: 337:/*EOF*/
1625: 338:/*EOF*/
branch 0 taken 11% (fallthrough)
branch 1 taken 89%
175: 339:/*EOF*/
1625: 340:/*EOF*/
1625: 341:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
1: 342:/*EOF*/
-: 343:/*EOF*/
-: 344:/*EOF*/
-: 345:/*EOF*/
-: 346:/*EOF*/
78: 347:/*EOF*/
call 0 returned 100%
-: 348:/*EOF*/
-: 349:/*EOF*/
-: 350:/*EOF*/
-: 351:/*EOF*/
-: 352:/*EOF*/
-: 353:/*EOF*/
-: 354:/*EOF*/
-: 355:/*EOF*/
-: 356:/*EOF*/
-: 357:/*EOF*/
-: 358:/*EOF*/
-: 359:/*EOF*/
function create_ucs2_weight_table called 78 returned 100% blocks executed 83%
78: 360:/*EOF*/
-: 361:/*EOF*/
-: 362:/*EOF*/
-: 363:/*EOF*/
-: 364:/*EOF*/
-: 365:/*EOF*/
-: 366:/*EOF*/
78: 367:/*EOF*/
78: 368:/*EOF*/
call 0 returned 100%
78: 369:/*EOF*/
call 0 returned 100%
-: 370:/*EOF*/
78: 371:/*EOF*/
5111886: 372:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
5111808: 373:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
1778: 374:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 375:/*EOF*/
1778: 376:/*EOF*/
1778: 377:/*EOF*/
1778: 378:/*EOF*/
1778: 379:/*EOF*/
-: 380:/*EOF*/
-: 381:/*EOF*/
-: 382:/*EOF*/
78: 383:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
78: 384:/*EOF*/
-: 385:/*EOF*/
-: 386:/*EOF*/
-: 387:/*EOF*/
-: 388:/*EOF*/
-: 389:/*EOF*/
-: 390:/*EOF*/
-: 391:/*EOF*/
-: 392:/*EOF*/
-: 393:/*EOF*/
-: 394:/*EOF*/
-: 395:/*EOF*/
-: 396:/*EOF*/
-: 397:/*EOF*/
-: 398:/*EOF*/
-: 399:/*EOF*/
-: 400:/*EOF*/
-: 401:/*EOF*/
-: 402:/*EOF*/
function mark_scratch_buffer called 42 returned 100% blocks executed 100%
42: 403:/*EOF*/
-: 404:/*EOF*/
-: 405:/*EOF*/
-: 406:/*EOF*/
289: 407:/*EOF*/
branch 0 taken 85%
branch 1 taken 15% (fallthrough)
247: 408:/*EOF*/
-: 409:/*EOF*/
5814: 410:/*EOF*/
branch 0 taken 96%
branch 1 taken 4% (fallthrough)
5567: 411:/*EOF*/
-: 412:/*EOF*/
42: 413:/*EOF*/
<<<<<< EOF
# path=/home/travis/build/nijel/enca/convert_iconv.c.gcov
-: 0:Source:convert_iconv.c
-: 0:Graph:/home/travis/build/nijel/enca/src/enca-convert_iconv.gcno
-: 0:Data:/home/travis/build/nijel/enca/src/enca-convert_iconv.gcda
-: 0:Runs:275
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
function convert_iconv called 6 returned 100% blocks executed 98%
6: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
6: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
6: 53:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
6: 54:/*EOF*/
call 0 returned 100%
6: 55:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
6: 62:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
6: 63:/*EOF*/
branch 0 taken 83% (fallthrough)
branch 1 taken 17%
5: 64:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
-: 65:/*EOF*/
6: 66:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
6: 67:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
6: 68:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 69:/*EOF*/
-: 70:/*EOF*/
-: 71:/*EOF*/
6: 72:/*EOF*/
call 0 returned 100%
branch 1 taken 83% (fallthrough)
branch 2 taken 17%
-: 73:/*EOF*/
-: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
5: 79:/*EOF*/
5: 80:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
5: 81:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
5: 82:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
5: 83:/*EOF*/
branch 0 taken 60% (fallthrough)
branch 1 taken 40%
call 2 returned 100%
branch 3 taken 100% (fallthrough)
branch 4 taken 0%
5: 84:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
5: 85:/*EOF*/
branch 0 taken 60% (fallthrough)
branch 1 taken 40%
call 2 returned 100%
branch 3 taken 100% (fallthrough)
branch 4 taken 0%
5: 86:/*EOF*/
branch 0 taken 40% (fallthrough)
branch 1 taken 60%
call 2 returned 100%
branch 3 taken 100% (fallthrough)
branch 4 taken 0%
2: 87:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
-: 88:/*EOF*/
-: 89:/*EOF*/
5: 90:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
5: 91:/*EOF*/
call 0 returned 100%
5: 92:/*EOF*/
-: 93:/*EOF*/
5: 94:/*EOF*/
call 0 returned 100%
-: 95:/*EOF*/
-: 96:/*EOF*/
5: 97:/*EOF*/
call 0 returned 100%
5: 98:/*EOF*/
call 0 returned 100%
5: 99:/*EOF*/
-: 100:/*EOF*/
-: 101:/*EOF*/
-: 102:/*EOF*/
-: 103:/*EOF*/
-: 104:/*EOF*/
function iconv_one_step called 5 returned 100% blocks executed 72%
5: 105:/*EOF*/
-: 106:/*EOF*/
-: 107:/*EOF*/
-: 108:/*EOF*/
-: 109:/*EOF*/
-: 110:/*EOF*/
-: 111:/*EOF*/
-: 112:/*EOF*/
-: 113:/*EOF*/
-: 114:/*EOF*/
-: 115:/*EOF*/
5: 116:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
-: 117:/*EOF*/
-: 118:/*EOF*/
5: 119:/*EOF*/
5: 120:/*EOF*/
5: 121:/*EOF*/
-: 122:/*EOF*/
-: 123:/*EOF*/
-: 124:/*EOF*/
5: 125:/*EOF*/
5: 126:/*EOF*/
5: 127:/*EOF*/
call 0 returned 100%
-: 128:/*EOF*/
-: 129:/*EOF*/
5: 130:/*EOF*/
5: 131:/*EOF*/
branch 0 taken 20% (fallthrough)
branch 1 taken 80%
call 2 returned 100%
branch 3 taken 0% (fallthrough)
branch 4 taken 100%
-: 132:/*EOF*/
-: 133:/*EOF*/
#####: 134:/*EOF*/
call 0 never executed
branch 1 never executed
branch 2 never executed
-: 135:/*EOF*/
-: 136:/*EOF*/
-: 137:/*EOF*/
-: 138:/*EOF*/
5: 139:/*EOF*/
branch 0 taken 20% (fallthrough)
branch 1 taken 80%
-: 140:/*EOF*/
-: 141:/*EOF*/
1: 142:/*EOF*/
call 0 returned 100%
branch 1 taken 0% (fallthrough)
branch 2 taken 100%
branch 3 never executed
branch 4 never executed
#####: 143:/*EOF*/
#####: 144:/*EOF*/
-: 145:/*EOF*/
-: 146:/*EOF*/
-: 147:/*EOF*/
3: 148:/*EOF*/
call 0 returned 100%
call 1 returned 100%
-: 149:/*EOF*/
1: 150:/*EOF*/
-: 151:/*EOF*/
1: 152:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
branch 2 taken 100% (fallthrough)
branch 3 taken 0%
-: 153:/*EOF*/
-: 154:/*EOF*/
-: 155:/*EOF*/
-: 156:/*EOF*/
2: 157:/*EOF*/
1: 158:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
1: 159:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
1: 160:/*EOF*/
call 0 returned 100%
branch 1 taken 0% (fallthrough)
branch 2 taken 100%
#####: 161:/*EOF*/
call 0 never executed
#####: 162:/*EOF*/
-: 163:/*EOF*/
1: 164:/*EOF*/
1: 165:/*EOF*/
1: 166:/*EOF*/
1: 167:/*EOF*/
call 0 returned 100%
1: 168:/*EOF*/
-: 169:/*EOF*/
1: 170:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 171:/*EOF*/
call 0 never executed
#####: 172:/*EOF*/
-: 173:/*EOF*/
2: 174:/*EOF*/
call 0 returned 100%
-: 175:/*EOF*/
-: 176:/*EOF*/
#####: 177:/*EOF*/
call 0 never executed
#####: 178:/*EOF*/
-: 179:/*EOF*/
-: 180:/*EOF*/
1: 181:/*EOF*/
-: 182:/*EOF*/
-: 183:/*EOF*/
4: 184:/*EOF*/
-: 185:/*EOF*/
-: 186:/*EOF*/
4: 187:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
-: 188:/*EOF*/
-: 189:/*EOF*/
4: 190:/*EOF*/
branch 0 taken 0%
branch 1 taken 100% (fallthrough)
-: 191:/*EOF*/
-: 192:/*EOF*/
4: 193:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 194:/*EOF*/
call 0 never executed
call 1 never executed
-: 195:/*EOF*/
-: 196:/*EOF*/
-: 197:/*EOF*/
#####: 198:/*EOF*/
#####: 199:/*EOF*/
-: 200:/*EOF*/
-: 201:/*EOF*/
-: 202:/*EOF*/
-: 203:/*EOF*/
-: 204:/*EOF*/
-: 205:/*EOF*/
-: 206:/*EOF*/
-: 207:/*EOF*/
-: 208:/*EOF*/
function do_iconv_open.isra.0 called 6 returned 100% blocks executed 69%
6: 209:/*EOF*/
-: 210:/*EOF*/
-: 211:/*EOF*/
-: 212:/*EOF*/
-: 213:/*EOF*/
-: 214:/*EOF*/
6: 215:/*EOF*/
branch 0 taken 17% (fallthrough)
branch 1 taken 83%
1: 216:/*EOF*/
-: 217:/*EOF*/
5: 218:/*EOF*/
call 0 returned 100%
6: 219:/*EOF*/
call 0 returned 100%
6: 220:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
6: 221:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 222:/*EOF*/
-: 223:/*EOF*/
6: 224:/*EOF*/
call 0 returned 100%
6: 225:/*EOF*/
branch 0 taken 17% (fallthrough)
branch 1 taken 83%
-: 226:/*EOF*/
-: 227:/*EOF*/
-: 228:/*EOF*/
1: 229:/*EOF*/
call 0 returned 100%
branch 1 taken 0% (fallthrough)
branch 2 taken 100%
-: 230:/*EOF*/
-: 231:/*EOF*/
-: 232:/*EOF*/
-: 233:/*EOF*/
#####: 234:/*EOF*/
call 0 never executed
-: 235:/*EOF*/
-: 236:/*EOF*/
#####: 237:/*EOF*/
call 0 never executed
-: 238:/*EOF*/
-: 239:/*EOF*/
-: 240:/*EOF*/
-: 241:/*EOF*/
-: 242:/*EOF*/
-: 243:/*EOF*/
-: 244:/*EOF*/
function do_iconv_close called 5 returned 100% blocks executed 43%
5: 245:/*EOF*/
-: 246:/*EOF*/
5: 247:/*EOF*/
call 0 returned 100%
branch 1 taken 0% (fallthrough)
branch 2 taken 100%
#####: 248:/*EOF*/
call 0 never executed
-: 249:/*EOF*/
#####: 250:/*EOF*/
call 0 never executed
#####: 251:/*EOF*/
call 0 never executed
-: 252:/*EOF*/
5: 253:/*EOF*/
-: 254:/*EOF*/
-: 255:/*EOF*/
-: 256:/*EOF*/
-: 257:/*EOF*/
-: 258:/*EOF*/
-: 259:/*EOF*/
-: 260:/*EOF*/
-: 261:/*EOF*/
-: 262:/*EOF*/
-: 263:/*EOF*/
-: 264:/*EOF*/
12: 265:/*EOF*/
call 0 returned 100%
call 1 returned 100%
-: 266:/*EOF*/
12: 267:/*EOF*/
<<<<<< EOF
# path=/home/travis/build/nijel/enca/pair.c.gcov
-: 0:Source:pair.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/pair.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/pair.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
function enca_pair_init called 247 returned 100% blocks executed 100%
247: 43:/*EOF*/
-: 44:/*EOF*/
247: 45:/*EOF*/
247: 46:/*EOF*/
247: 47:/*EOF*/
247: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
function enca_pair_destroy called 246 returned 100% blocks executed 100%
246: 57:/*EOF*/
-: 58:/*EOF*/
246: 59:/*EOF*/
branch 0 taken 18% (fallthrough)
branch 1 taken 82%
246: 60:/*EOF*/
branch 0 taken 18% (fallthrough)
branch 1 taken 82%
246: 61:/*EOF*/
branch 0 taken 18% (fallthrough)
branch 1 taken 82%
246: 62:/*EOF*/
-: 63:/*EOF*/
-: 64:/*EOF*/
-: 65:/*EOF*/
-: 66:/*EOF*/
-: 67:/*EOF*/
-: 68:/*EOF*/
-: 69:/*EOF*/
-: 70:/*EOF*/
-: 71:/*EOF*/
-: 72:/*EOF*/
-: 73:/*EOF*/
-: 74:/*EOF*/
function enca_pair_analyse called 335 returned 100% blocks executed 100%
335: 75:/*EOF*/
-: 76:/*EOF*/
335: 77:/*EOF*/
335: 78:/*EOF*/
335: 79:/*EOF*/
-: 80:/*EOF*/
-: 81:/*EOF*/
-: 82:/*EOF*/
335: 83:/*EOF*/
branch 0 taken 25% (fallthrough)
branch 1 taken 75%
-: 84:/*EOF*/
-: 85:/*EOF*/
84: 86:/*EOF*/
branch 0 taken 52% (fallthrough)
branch 1 taken 48%
44: 87:/*EOF*/
call 0 returned 100%
-: 88:/*EOF*/
-: 89:/*EOF*/
-: 90:/*EOF*/
84: 91:/*EOF*/
branch 0 taken 52% (fallthrough)
branch 1 taken 48%
44: 92:/*EOF*/
call 0 returned 100%
44: 93:/*EOF*/
call 0 returned 100%
-: 94:/*EOF*/
168: 95:/*EOF*/
168: 96:/*EOF*/
84: 97:/*EOF*/
-: 98:/*EOF*/
84: 99:/*EOF*/
483: 100:/*EOF*/
call 0 returned 100%
branch 1 taken 83%
branch 2 taken 17% (fallthrough)
399: 101:/*EOF*/
branch 0 taken 26% (fallthrough)
branch 1 taken 74%
104: 102:/*EOF*/
-: 103:/*EOF*/
-: 104:/*EOF*/
-: 105:/*EOF*/
84: 106:/*EOF*/
84: 107:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
84: 108:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
84: 109:/*EOF*/
84: 110:/*EOF*/
-: 111:/*EOF*/
-: 112:/*EOF*/
-: 113:/*EOF*/
-: 114:/*EOF*/
-: 115:/*EOF*/
-: 116:/*EOF*/
-: 117:/*EOF*/
-: 118:/*EOF*/
-: 119:/*EOF*/
-: 120:/*EOF*/
-: 121:/*EOF*/
-: 122:/*EOF*/
-: 123:/*EOF*/
-: 124:/*EOF*/
-: 125:/*EOF*/
-: 126:/*EOF*/
-: 127:/*EOF*/
84: 128:/*EOF*/
84: 129:/*EOF*/
-: 130:/*EOF*/
-: 131:/*EOF*/
84: 132:/*EOF*/
84: 133:/*EOF*/
528335: 134:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
528251: 135:/*EOF*/
branch 0 taken 84% (fallthrough)
branch 1 taken 16%
446125: 136:/*EOF*/
528251: 137:/*EOF*/
-: 138:/*EOF*/
84: 139:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
branch 2 taken 5% (fallthrough)
branch 3 taken 95%
4: 140:/*EOF*/
-: 141:/*EOF*/
-: 142:/*EOF*/
-: 143:/*EOF*/
-: 144:/*EOF*/
-: 145:/*EOF*/
-: 146:/*EOF*/
-: 147:/*EOF*/
-: 148:/*EOF*/
-: 149:/*EOF*/
-: 150:/*EOF*/
-: 151:/*EOF*/
-: 152:/*EOF*/
-: 153:/*EOF*/
-: 154:/*EOF*/
function count_good_pairs called 84 returned 100% blocks executed 82%
84: 155:/*EOF*/
-: 156:/*EOF*/
84: 157:/*EOF*/
84: 158:/*EOF*/
84: 159:/*EOF*/
84: 160:/*EOF*/
84: 161:/*EOF*/
84: 162:/*EOF*/
-: 163:/*EOF*/
-: 164:/*EOF*/
84: 165:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
84: 166:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
84: 167:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
84: 168:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 169:/*EOF*/
168: 170:/*EOF*/
84: 171:/*EOF*/
528335: 172:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
528251: 173:/*EOF*/
528251: 174:/*EOF*/
-: 175:/*EOF*/
84: 176:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
84: 177:/*EOF*/
-: 178:/*EOF*/
168: 179:/*EOF*/
567: 180:/*EOF*/
branch 0 taken 85%
branch 1 taken 15% (fallthrough)
483: 181:/*EOF*/
483: 182:/*EOF*/
-: 183:/*EOF*/
6258: 184:/*EOF*/
branch 0 taken 92%
branch 1 taken 8% (fallthrough)
22092: 185:/*EOF*/
branch 0 taken 76%
branch 1 taken 24% (fallthrough)
16800: 186:/*EOF*/
-: 187:/*EOF*/
483: 188:/*EOF*/
-: 189:/*EOF*/
84: 190:/*EOF*/
-: 191:/*EOF*/
-: 192:/*EOF*/
-: 193:/*EOF*/
-: 194:/*EOF*/
-: 195:/*EOF*/
-: 196:/*EOF*/
-: 197:/*EOF*/
-: 198:/*EOF*/
-: 199:/*EOF*/
-: 200:/*EOF*/
-: 201:/*EOF*/
-: 202:/*EOF*/
-: 203:/*EOF*/
-: 204:/*EOF*/
-: 205:/*EOF*/
-: 206:/*EOF*/
-: 207:/*EOF*/
function compute_pair2bits called 44 returned 100% blocks executed 87%
44: 208:/*EOF*/
-: 209:/*EOF*/
44: 210:/*EOF*/
-: 211:/*EOF*/
-: 212:/*EOF*/
44: 213:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
44: 214:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 215:/*EOF*/
44: 216:/*EOF*/
call 0 returned 100%
88: 217:/*EOF*/
297: 218:/*EOF*/
branch 0 taken 85%
branch 1 taken 15% (fallthrough)
253: 219:/*EOF*/
253: 220:/*EOF*/
253: 221:/*EOF*/
-: 222:/*EOF*/
65021: 223:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
64768: 224:/*EOF*/
-: 225:/*EOF*/
64768: 226:/*EOF*/
branch 0 taken 84% (fallthrough)
branch 1 taken 16%
54714: 227:/*EOF*/
54714: 228:/*EOF*/
-: 229:/*EOF*/
-: 230:/*EOF*/
-: 231:/*EOF*/
2204983: 232:/*EOF*/
2204983: 233:/*EOF*/
branch 0 taken 98%
branch 1 taken 2% (fallthrough)
-: 234:/*EOF*/
-: 235:/*EOF*/
-: 236:/*EOF*/
44: 237:/*EOF*/
<<<<<< EOF
# path=/home/travis/build/nijel/enca/^#data#chinese#zh_weight_big5.h.gcov
-: 0:Source:../data/chinese/zh_weight_big5.h
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_zh.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_zh.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
-: 62:/*EOF*/
-: 63:/*EOF*/
-: 64:/*EOF*/
-: 65:/*EOF*/
-: 66:/*EOF*/
-: 67:/*EOF*/
-: 68:/*EOF*/
-: 69:/*EOF*/
-: 70:/*EOF*/
-: 71:/*EOF*/
-: 72:/*EOF*/
-: 73:/*EOF*/
-: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
684: 80:/*EOF*/
-: 81:/*EOF*/
-: 82:/*EOF*/
function in_big5 called 684 returned 100% blocks executed 100%
684: 83:/*EOF*/
-: 84:/*EOF*/
-: 85:/*EOF*/
-: 86:/*EOF*/
-: 87:/*EOF*/
-: 88:/*EOF*/
-: 89:/*EOF*/
-: 90:/*EOF*/
-: 91:/*EOF*/
-: 92:/*EOF*/
-: 93:/*EOF*/
-: 94:/*EOF*/
-: 95:/*EOF*/
-: 96:/*EOF*/
-: 97:/*EOF*/
-: 98:/*EOF*/
-: 99:/*EOF*/
-: 100:/*EOF*/
-: 101:/*EOF*/
-: 102:/*EOF*/
-: 103:/*EOF*/
-: 104:/*EOF*/
-: 105:/*EOF*/
-: 106:/*EOF*/
-: 107:/*EOF*/
-: 108:/*EOF*/
-: 109:/*EOF*/
-: 110:/*EOF*/
-: 111:/*EOF*/
-: 112:/*EOF*/
-: 113:/*EOF*/
-: 114:/*EOF*/
-: 115:/*EOF*/
-: 116:/*EOF*/
-: 117:/*EOF*/
-: 118:/*EOF*/
-: 119:/*EOF*/
-: 120:/*EOF*/
-: 121:/*EOF*/
-: 122:/*EOF*/
-: 123:/*EOF*/
-: 124:/*EOF*/
-: 125:/*EOF*/
-: 126:/*EOF*/
-: 127:/*EOF*/
-: 128:/*EOF*/
-: 129:/*EOF*/
-: 130:/*EOF*/
-: 131:/*EOF*/
-: 132:/*EOF*/
-: 133:/*EOF*/
-: 134:/*EOF*/
-: 135:/*EOF*/
-: 136:/*EOF*/
-: 137:/*EOF*/
-: 138:/*EOF*/
-: 139:/*EOF*/
-: 140:/*EOF*/
-: 141:/*EOF*/
-: 142:/*EOF*/
-: 143:/*EOF*/
-: 144:/*EOF*/
-: 145:/*EOF*/
-: 146:/*EOF*/
-: 147:/*EOF*/
-: 148:/*EOF*/
-: 149:/*EOF*/
-: 150:/*EOF*/
-: 151:/*EOF*/
-: 152:/*EOF*/
-: 153:/*EOF*/
-: 154:/*EOF*/
-: 155:/*EOF*/
-: 156:/*EOF*/
-: 157:/*EOF*/
-: 158:/*EOF*/
-: 159:/*EOF*/
-: 160:/*EOF*/
-: 161:/*EOF*/
-: 162:/*EOF*/
-: 163:/*EOF*/
-: 164:/*EOF*/
-: 165:/*EOF*/
-: 166:/*EOF*/
-: 167:/*EOF*/
-: 168:/*EOF*/
-: 169:/*EOF*/
-: 170:/*EOF*/
-: 171:/*EOF*/
-: 172:/*EOF*/
-: 173:/*EOF*/
-: 174:/*EOF*/
-: 175:/*EOF*/
-: 176:/*EOF*/
-: 177:/*EOF*/
-: 178:/*EOF*/
-: 179:/*EOF*/
-: 180:/*EOF*/
-: 181:/*EOF*/
-: 182:/*EOF*/
-: 183:/*EOF*/
-: 184:/*EOF*/
-: 185:/*EOF*/
-: 186:/*EOF*/
-: 187:/*EOF*/
-: 188:/*EOF*/
-: 189:/*EOF*/
-: 190:/*EOF*/
-: 191:/*EOF*/
-: 192:/*EOF*/
-: 193:/*EOF*/
-: 194:/*EOF*/
-: 195:/*EOF*/
-: 196:/*EOF*/
-: 197:/*EOF*/
-: 198:/*EOF*/
-: 199:/*EOF*/
-: 200:/*EOF*/
-: 201:/*EOF*/
-: 202:/*EOF*/
-: 203:/*EOF*/
-: 204:/*EOF*/
-: 205:/*EOF*/
-: 206:/*EOF*/
-: 207:/*EOF*/
-: 208:/*EOF*/
-: 209:/*EOF*/
-: 210:/*EOF*/
-: 211:/*EOF*/
-: 212:/*EOF*/
-: 213:/*EOF*/
-: 214:/*EOF*/
-: 215:/*EOF*/
-: 216:/*EOF*/
-: 217:/*EOF*/
-: 218:/*EOF*/
-: 219:/*EOF*/
-: 220:/*EOF*/
-: 221:/*EOF*/
-: 222:/*EOF*/
-: 223:/*EOF*/
-: 224:/*EOF*/
-: 225:/*EOF*/
-: 226:/*EOF*/
-: 227:/*EOF*/
-: 228:/*EOF*/
-: 229:/*EOF*/
-: 230:/*EOF*/
-: 231:/*EOF*/
-: 232:/*EOF*/
-: 233:/*EOF*/
-: 234:/*EOF*/
-: 235:/*EOF*/
-: 236:/*EOF*/
-: 237:/*EOF*/
-: 238:/*EOF*/
-: 239:/*EOF*/
-: 240:/*EOF*/
-: 241:/*EOF*/
-: 242:/*EOF*/
-: 243:/*EOF*/
-: 244:/*EOF*/
-: 245:/*EOF*/
-: 246:/*EOF*/
-: 247:/*EOF*/
-: 248:/*EOF*/
-: 249:/*EOF*/
-: 250:/*EOF*/
-: 251:/*EOF*/
-: 252:/*EOF*/
-: 253:/*EOF*/
-: 254:/*EOF*/
-: 255:/*EOF*/
-: 256:/*EOF*/
-: 257:/*EOF*/
-: 258:/*EOF*/
-: 259:/*EOF*/
-: 260:/*EOF*/
-: 261:/*EOF*/
-: 262:/*EOF*/
-: 263:/*EOF*/
-: 264:/*EOF*/
-: 265:/*EOF*/
-: 266:/*EOF*/
-: 267:/*EOF*/
-: 268:/*EOF*/
-: 269:/*EOF*/
-: 270:/*EOF*/
-: 271:/*EOF*/
-: 272:/*EOF*/
-: 273:/*EOF*/
-: 274:/*EOF*/
-: 275:/*EOF*/
-: 276:/*EOF*/
-: 277:/*EOF*/
-: 278:/*EOF*/
-: 279:/*EOF*/
-: 280:/*EOF*/
-: 281:/*EOF*/
-: 282:/*EOF*/
-: 283:/*EOF*/
-: 284:/*EOF*/
-: 285:/*EOF*/
-: 286:/*EOF*/
-: 287:/*EOF*/
-: 288:/*EOF*/
-: 289:/*EOF*/
-: 290:/*EOF*/
-: 291:/*EOF*/
-: 292:/*EOF*/
-: 293:/*EOF*/
-: 294:/*EOF*/
-: 295:/*EOF*/
-: 296:/*EOF*/
-: 297:/*EOF*/
-: 298:/*EOF*/
-: 299:/*EOF*/
-: 300:/*EOF*/
-: 301:/*EOF*/
-: 302:/*EOF*/
-: 303:/*EOF*/
-: 304:/*EOF*/
-: 305:/*EOF*/
-: 306:/*EOF*/
-: 307:/*EOF*/
-: 308:/*EOF*/
-: 309:/*EOF*/
-: 310:/*EOF*/
-: 311:/*EOF*/
-: 312:/*EOF*/
-: 313:/*EOF*/
-: 314:/*EOF*/
-: 315:/*EOF*/
-: 316:/*EOF*/
-: 317:/*EOF*/
-: 318:/*EOF*/
-: 319:/*EOF*/
-: 320:/*EOF*/
-: 321:/*EOF*/
-: 322:/*EOF*/
-: 323:/*EOF*/
-: 324:/*EOF*/
-: 325:/*EOF*/
-: 326:/*EOF*/
-: 327:/*EOF*/
-: 328:/*EOF*/
-: 329:/*EOF*/
-: 330:/*EOF*/
-: 331:/*EOF*/
-: 332:/*EOF*/
-: 333:/*EOF*/
-: 334:/*EOF*/
-: 335:/*EOF*/
-: 336:/*EOF*/
-: 337:/*EOF*/
-: 338:/*EOF*/
-: 339:/*EOF*/
-: 340:/*EOF*/
-: 341:/*EOF*/
-: 342:/*EOF*/
-: 343:/*EOF*/
-: 344:/*EOF*/
-: 345:/*EOF*/
-: 346:/*EOF*/
-: 347:/*EOF*/
-: 348:/*EOF*/
-: 349:/*EOF*/
-: 350:/*EOF*/
-: 351:/*EOF*/
-: 352:/*EOF*/
-: 353:/*EOF*/
-: 354:/*EOF*/
-: 355:/*EOF*/
-: 356:/*EOF*/
-: 357:/*EOF*/
-: 358:/*EOF*/
-: 359:/*EOF*/
-: 360:/*EOF*/
-: 361:/*EOF*/
-: 362:/*EOF*/
-: 363:/*EOF*/
-: 364:/*EOF*/
-: 365:/*EOF*/
-: 366:/*EOF*/
-: 367:/*EOF*/
-: 368:/*EOF*/
-: 369:/*EOF*/
-: 370:/*EOF*/
-: 371:/*EOF*/
-: 372:/*EOF*/
-: 373:/*EOF*/
-: 374:/*EOF*/
-: 375:/*EOF*/
-: 376:/*EOF*/
-: 377:/*EOF*/
-: 378:/*EOF*/
-: 379:/*EOF*/
-: 380:/*EOF*/
-: 381:/*EOF*/
-: 382:/*EOF*/
-: 383:/*EOF*/
-: 384:/*EOF*/
-: 385:/*EOF*/
-: 386:/*EOF*/
-: 387:/*EOF*/
-: 388:/*EOF*/
-: 389:/*EOF*/
-: 390:/*EOF*/
-: 391:/*EOF*/
-: 392:/*EOF*/
-: 393:/*EOF*/
-: 394:/*EOF*/
-: 395:/*EOF*/
-: 396:/*EOF*/
-: 397:/*EOF*/
-: 398:/*EOF*/
-: 399:/*EOF*/
-: 400:/*EOF*/
-: 401:/*EOF*/
-: 402:/*EOF*/
-: 403:/*EOF*/
-: 404:/*EOF*/
-: 405:/*EOF*/
-: 406:/*EOF*/
-: 407:/*EOF*/
-: 408:/*EOF*/
-: 409:/*EOF*/
-: 410:/*EOF*/
-: 411:/*EOF*/
-: 412:/*EOF*/
-: 413:/*EOF*/
-: 414:/*EOF*/
-: 415:/*EOF*/
-: 416:/*EOF*/
-: 417:/*EOF*/
-: 418:/*EOF*/
-: 419:/*EOF*/
-: 420:/*EOF*/
-: 421:/*EOF*/
-: 422:/*EOF*/
-: 423:/*EOF*/
-: 424:/*EOF*/
-: 425:/*EOF*/
-: 426:/*EOF*/
-: 427:/*EOF*/
-: 428:/*EOF*/
-: 429:/*EOF*/
-: 430:/*EOF*/
-: 431:/*EOF*/
-: 432:/*EOF*/
-: 433:/*EOF*/
-: 434:/*EOF*/
-: 435:/*EOF*/
-: 436:/*EOF*/
-: 437:/*EOF*/
-: 438:/*EOF*/
-: 439:/*EOF*/
-: 440:/*EOF*/
-: 441:/*EOF*/
-: 442:/*EOF*/
-: 443:/*EOF*/
-: 444:/*EOF*/
-: 445:/*EOF*/
-: 446:/*EOF*/
-: 447:/*EOF*/
-: 448:/*EOF*/
-: 449:/*EOF*/
-: 450:/*EOF*/
-: 451:/*EOF*/
-: 452:/*EOF*/
-: 453:/*EOF*/
-: 454:/*EOF*/
-: 455:/*EOF*/
-: 456:/*EOF*/
-: 457:/*EOF*/
-: 458:/*EOF*/
-: 459:/*EOF*/
-: 460:/*EOF*/
-: 461:/*EOF*/
-: 462:/*EOF*/
-: 463:/*EOF*/
-: 464:/*EOF*/
-: 465:/*EOF*/
-: 466:/*EOF*/
-: 467:/*EOF*/
-: 468:/*EOF*/
-: 469:/*EOF*/
-: 470:/*EOF*/
-: 471:/*EOF*/
-: 472:/*EOF*/
-: 473:/*EOF*/
-: 474:/*EOF*/
-: 475:/*EOF*/
-: 476:/*EOF*/
-: 477:/*EOF*/
-: 478:/*EOF*/
-: 479:/*EOF*/
-: 480:/*EOF*/
-: 481:/*EOF*/
-: 482:/*EOF*/
-: 483:/*EOF*/
-: 484:/*EOF*/
-: 485:/*EOF*/
-: 486:/*EOF*/
-: 487:/*EOF*/
-: 488:/*EOF*/
-: 489:/*EOF*/
-: 490:/*EOF*/
-: 491:/*EOF*/
-: 492:/*EOF*/
-: 493:/*EOF*/
-: 494:/*EOF*/
-: 495:/*EOF*/
-: 496:/*EOF*/
-: 497:/*EOF*/
-: 498:/*EOF*/
-: 499:/*EOF*/
-: 500:/*EOF*/
-: 501:/*EOF*/
-: 502:/*EOF*/
-: 503:/*EOF*/
-: 504:/*EOF*/
-: 505:/*EOF*/
-: 506:/*EOF*/
-: 507:/*EOF*/
-: 508:/*EOF*/
-: 509:/*EOF*/
-: 510:/*EOF*/
-: 511:/*EOF*/
-: 512:/*EOF*/
-: 513:/*EOF*/
-: 514:/*EOF*/
-: 515:/*EOF*/
-: 516:/*EOF*/
-: 517:/*EOF*/
-: 518:/*EOF*/
-: 519:/*EOF*/
-: 520:/*EOF*/
-: 521:/*EOF*/
-: 522:/*EOF*/
-: 523:/*EOF*/
-: 524:/*EOF*/
-: 525:/*EOF*/
-: 526:/*EOF*/
-: 527:/*EOF*/
-: 528:/*EOF*/
-: 529:/*EOF*/
-: 530:/*EOF*/
-: 531:/*EOF*/
-: 532:/*EOF*/
-: 533:/*EOF*/
-: 534:/*EOF*/
-: 535:/*EOF*/
-: 536:/*EOF*/
-: 537:/*EOF*/
-: 538:/*EOF*/
-: 539:/*EOF*/
-: 540:/*EOF*/
-: 541:/*EOF*/
-: 542:/*EOF*/
-: 543:/*EOF*/
-: 544:/*EOF*/
-: 545:/*EOF*/
-: 546:/*EOF*/
-: 547:/*EOF*/
-: 548:/*EOF*/
-: 549:/*EOF*/
-: 550:/*EOF*/
-: 551:/*EOF*/
-: 552:/*EOF*/
-: 553:/*EOF*/
-: 554:/*EOF*/
-: 555:/*EOF*/
-: 556:/*EOF*/
-: 557:/*EOF*/
-: 558:/*EOF*/
-: 559:/*EOF*/
-: 560:/*EOF*/
-: 561:/*EOF*/
-: 562:/*EOF*/
-: 563:/*EOF*/
-: 564:/*EOF*/
-: 565:/*EOF*/
-: 566:/*EOF*/
-: 567:/*EOF*/
-: 568:/*EOF*/
-: 569:/*EOF*/
-: 570:/*EOF*/
-: 571:/*EOF*/
-: 572:/*EOF*/
-: 573:/*EOF*/
-: 574:/*EOF*/
-: 575:/*EOF*/
-: 576:/*EOF*/
-: 577:/*EOF*/
-: 578:/*EOF*/
-: 579:/*EOF*/
-: 580:/*EOF*/
-: 581:/*EOF*/
-: 582:/*EOF*/
-: 583:/*EOF*/
-: 584:/*EOF*/
-: 585:/*EOF*/
-: 586:/*EOF*/
-: 587:/*EOF*/
-: 588:/*EOF*/
-: 589:/*EOF*/
-: 590:/*EOF*/
-: 591:/*EOF*/
-: 592:/*EOF*/
-: 593:/*EOF*/
-: 594:/*EOF*/
-: 595:/*EOF*/
-: 596:/*EOF*/
-: 597:/*EOF*/
-: 598:/*EOF*/
-: 599:/*EOF*/
-: 600:/*EOF*/
-: 601:/*EOF*/
-: 602:/*EOF*/
-: 603:/*EOF*/
-: 604:/*EOF*/
-: 605:/*EOF*/
-: 606:/*EOF*/
-: 607:/*EOF*/
-: 608:/*EOF*/
-: 609:/*EOF*/
-: 610:/*EOF*/
-: 611:/*EOF*/
-: 612:/*EOF*/
-: 613:/*EOF*/
-: 614:/*EOF*/
-: 615:/*EOF*/
-: 616:/*EOF*/
-: 617:/*EOF*/
-: 618:/*EOF*/
-: 619:/*EOF*/
-: 620:/*EOF*/
-: 621:/*EOF*/
-: 622:/*EOF*/
-: 623:/*EOF*/
-: 624:/*EOF*/
-: 625:/*EOF*/
-: 626:/*EOF*/
-: 627:/*EOF*/
-: 628:/*EOF*/
-: 629:/*EOF*/
-: 630:/*EOF*/
-: 631:/*EOF*/
-: 632:/*EOF*/
-: 633:/*EOF*/
-: 634:/*EOF*/
-: 635:/*EOF*/
-: 636:/*EOF*/
-: 637:/*EOF*/
-: 638:/*EOF*/
-: 639:/*EOF*/
-: 640:/*EOF*/
-: 641:/*EOF*/
-: 642:/*EOF*/
-: 643:/*EOF*/
-: 644:/*EOF*/
-: 645:/*EOF*/
-: 646:/*EOF*/
-: 647:/*EOF*/
-: 648:/*EOF*/
-: 649:/*EOF*/
-: 650:/*EOF*/
-: 651:/*EOF*/
-: 652:/*EOF*/
-: 653:/*EOF*/
-: 654:/*EOF*/
-: 655:/*EOF*/
-: 656:/*EOF*/
-: 657:/*EOF*/
-: 658:/*EOF*/
-: 659:/*EOF*/
-: 660:/*EOF*/
-: 661:/*EOF*/
-: 662:/*EOF*/
-: 663:/*EOF*/
-: 664:/*EOF*/
-: 665:/*EOF*/
-: 666:/*EOF*/
-: 667:/*EOF*/
-: 668:/*EOF*/
-: 669:/*EOF*/
-: 670:/*EOF*/
-: 671:/*EOF*/
-: 672:/*EOF*/
-: 673:/*EOF*/
-: 674:/*EOF*/
-: 675:/*EOF*/
-: 676:/*EOF*/
-: 677:/*EOF*/
-: 678:/*EOF*/
-: 679:/*EOF*/
-: 680:/*EOF*/
-: 681:/*EOF*/
-: 682:/*EOF*/
-: 683:/*EOF*/
-: 684:/*EOF*/
-: 685:/*EOF*/
-: 686:/*EOF*/
-: 687:/*EOF*/
-: 688:/*EOF*/
-: 689:/*EOF*/
-: 690:/*EOF*/
-: 691:/*EOF*/
-: 692:/*EOF*/
-: 693:/*EOF*/
-: 694:/*EOF*/
-: 695:/*EOF*/
-: 696:/*EOF*/
-: 697:/*EOF*/
-: 698:/*EOF*/
-: 699:/*EOF*/
-: 700:/*EOF*/
684: 701:/*EOF*/
-: 702:/*EOF*/
684: 703:/*EOF*/
branch 0 taken 99% (fallthrough)
branch 1 taken 1%
678: 704:/*EOF*/
-: 705:/*EOF*/
678: 706:/*EOF*/
branch 0 taken 78% (fallthrough)
branch 1 taken 22%
531: 707:/*EOF*/
-: 708:/*EOF*/
531: 709:/*EOF*/
branch 0 taken 35% (fallthrough)
branch 1 taken 65%
branch 2 taken 95% (fallthrough)
branch 3 taken 5%
177: 710:/*EOF*/
-: 711:/*EOF*/
-: 712:/*EOF*/
-: 713:/*EOF*/
-: 714:/*EOF*/
-: 715:/*EOF*/
-: 716:/*EOF*/
-: 717:/*EOF*/
-: 718:/*EOF*/
-: 719:/*EOF*/
-: 720:/*EOF*/
-: 721:/*EOF*/
-: 722:/*EOF*/
function is_big5 called 684 returned 100% blocks executed 75%
684: 723:/*EOF*/
-: 724:/*EOF*/
684: 725:/*EOF*/
684: 726:/*EOF*/
-: 727:/*EOF*/
1368: 728:/*EOF*/
1368: 729:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
branch 2 taken 0% (fallthrough)
branch 3 taken 100%
684: 730:/*EOF*/
<<<<<< EOF
# path=/home/travis/build/nijel/enca/locale_detect.c.gcov
-: 0:Source:locale_detect.c
-: 0:Graph:/home/travis/build/nijel/enca/src/enca-locale_detect.gcno
-: 0:Data:/home/travis/build/nijel/enca/src/enca-locale_detect.gcda
-: 0:Runs:275
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
function detect_lang called 251 returned 100% blocks executed 89%
251: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
251: 60:/*EOF*/
call 0 returned 100%
-: 61:/*EOF*/
-: 62:/*EOF*/
251: 63:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
1: 64:/*EOF*/
call 0 returned 100%
-: 65:/*EOF*/
1: 66:/*EOF*/
call 0 returned 100%
-: 67:/*EOF*/
1: 68:/*EOF*/
call 0 returned 100%
1: 69:/*EOF*/
call 0 returned 100%
1: 70:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
1: 71:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
-: 72:/*EOF*/
-: 73:/*EOF*/
-: 74:/*EOF*/
-: 75:/*EOF*/
250: 76:/*EOF*/
call 0 returned 100%
250: 77:/*EOF*/
call 0 returned 100%
250: 78:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
250: 79:/*EOF*/
call 0 returned 100%
250: 80:/*EOF*/
call 0 returned 100%
250: 81:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 82:/*EOF*/
-: 83:/*EOF*/
-: 84:/*EOF*/
-: 85:/*EOF*/
-: 86:/*EOF*/
-: 87:/*EOF*/
-: 88:/*EOF*/
-: 89:/*EOF*/
-: 90:/*EOF*/
-: 91:/*EOF*/
-: 92:/*EOF*/
-: 93:/*EOF*/
-: 94:/*EOF*/
-: 95:/*EOF*/
-: 96:/*EOF*/
-: 97:/*EOF*/
-: 98:/*EOF*/
-: 99:/*EOF*/
-: 100:/*EOF*/
function detect_target_charset called 501 returned 100% blocks executed 33%
501: 101:/*EOF*/
-: 102:/*EOF*/
501: 103:/*EOF*/
-: 104:/*EOF*/
-: 105:/*EOF*/
501: 106:/*EOF*/
branch 0 taken 99% (fallthrough)
branch 1 taken 1%
-: 107:/*EOF*/
-: 108:/*EOF*/
500: 109:/*EOF*/
call 0 returned 100%
branch 1 taken 0% (fallthrough)
branch 2 taken 100%
-: 110:/*EOF*/
-: 111:/*EOF*/
#####: 112:/*EOF*/
call 0 never executed
call 1 never executed
-: 113:/*EOF*/
#####: 114:/*EOF*/
call 0 never executed
branch 1 never executed
branch 2 never executed
#####: 115:/*EOF*/
-: 116:/*EOF*/
#####: 117:/*EOF*/
call 0 never executed
-: 118:/*EOF*/
#####: 119:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 120:/*EOF*/
-: 121:/*EOF*/
-: 122:/*EOF*/
-: 123:/*EOF*/
-: 124:/*EOF*/
-: 125:/*EOF*/
-: 126:/*EOF*/
-: 127:/*EOF*/
-: 128:/*EOF*/
-: 129:/*EOF*/
-: 130:/*EOF*/
-: 131:/*EOF*/
-: 132:/*EOF*/
-: 133:/*EOF*/
-: 134:/*EOF*/
-: 135:/*EOF*/
-: 136:/*EOF*/
-: 137:/*EOF*/
function detect_user_language called 1 returned 100% blocks executed 77%
1: 138:/*EOF*/
-: 139:/*EOF*/
-: 140:/*EOF*/
-: 141:/*EOF*/
-: 142:/*EOF*/
-: 143:/*EOF*/
-: 144:/*EOF*/
-: 145:/*EOF*/
1: 146:/*EOF*/
-: 147:/*EOF*/
-: 148:/*EOF*/
3: 149:/*EOF*/
branch 0 taken 67%
branch 1 taken 33% (fallthrough)
2: 150:/*EOF*/
branch 0 taken 50% (fallthrough)
branch 1 taken 50%
2: 151:/*EOF*/
call 0 returned 100%
branch 1 taken 0% (fallthrough)
branch 2 taken 100%
#####: 152:/*EOF*/
2: 153:/*EOF*/
call 0 returned 100%
2: 154:/*EOF*/
call 0 returned 100%
branch 1 taken 0% (fallthrough)
branch 2 taken 100%
#####: 155:/*EOF*/
-: 156:/*EOF*/
#####: 157:/*EOF*/
call 0 never executed
-: 158:/*EOF*/
-: 159:/*EOF*/
2: 160:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
2: 161:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
branch 2 taken 100% (fallthrough)
branch 3 taken 0%
2: 162:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
2: 163:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
call 2 returned 100%
branch 3 taken 100% (fallthrough)
branch 4 taken 0%
2: 164:/*EOF*/
-: 165:/*EOF*/
#####: 166:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 167:/*EOF*/
-: 168:/*EOF*/
-: 169:/*EOF*/
-: 170:/*EOF*/
-: 171:/*EOF*/
1: 172:/*EOF*/
1: 173:/*EOF*/
-: 174:/*EOF*/
-: 175:/*EOF*/
-: 176:/*EOF*/
-: 177:/*EOF*/
-: 178:/*EOF*/
-: 179:/*EOF*/
-: 180:/*EOF*/
-: 181:/*EOF*/
-: 182:/*EOF*/
-: 183:/*EOF*/
-: 184:/*EOF*/
-: 185:/*EOF*/
-: 186:/*EOF*/
function locale_alias_convert called 251 returned 100% blocks executed 58%
251: 187:/*EOF*/
-: 188:/*EOF*/
-: 189:/*EOF*/
-: 190:/*EOF*/
-: 191:/*EOF*/
-: 192:/*EOF*/
-: 193:/*EOF*/
-: 194:/*EOF*/
-: 195:/*EOF*/
251: 196:/*EOF*/
branch 0 taken 99% (fallthrough)
branch 1 taken 1%
-: 197:/*EOF*/
-: 198:/*EOF*/
-: 199:/*EOF*/
250: 200:/*EOF*/
branch 0 taken 10% (fallthrough)
branch 1 taken 90%
25: 201:/*EOF*/
call 0 returned 100%
-: 202:/*EOF*/
-: 203:/*EOF*/
-: 204:/*EOF*/
225: 205:/*EOF*/
call 0 returned 100%
225: 206:/*EOF*/
call 0 returned 100%
225: 207:/*EOF*/
call 0 returned 100%
branch 1 taken 0% (fallthrough)
branch 2 taken 100%
#####: 208:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 209:/*EOF*/
-: 210:/*EOF*/
-: 211:/*EOF*/
-: 212:/*EOF*/
#####: 213:/*EOF*/
call 0 never executed
#####: 214:/*EOF*/
call 0 never executed
#####: 215:/*EOF*/
call 0 never executed
-: 216:/*EOF*/
-: 217:/*EOF*/
-: 218:/*EOF*/
-: 219:/*EOF*/
225: 220:/*EOF*/
225: 221:/*EOF*/
225: 222:/*EOF*/
18900: 223:/*EOF*/
call 0 returned 100%
branch 1 taken 99%
branch 2 taken 1% (fallthrough)
18529: 224:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
branch 2 taken 100% (fallthrough)
branch 3 taken 0%
158: 225:/*EOF*/
call 0 returned 100%
branch 1 taken 0% (fallthrough)
branch 2 taken 100%
branch 3 never executed
branch 4 never executed
-: 226:/*EOF*/
-: 227:/*EOF*/
#####: 228:/*EOF*/
branch 0 never executed
branch 1 never executed
-: 229:/*EOF*/
-: 230:/*EOF*/
#####: 231:/*EOF*/
branch 0 never executed
branch 1 never executed
branch 2 never executed
branch 3 never executed
#####: 232:/*EOF*/
#####: 233:/*EOF*/
call 0 never executed
#####: 234:/*EOF*/
-: 235:/*EOF*/
-: 236:/*EOF*/
225: 237:/*EOF*/
call 0 returned 100%
225: 238:/*EOF*/
call 0 returned 100%
-: 239:/*EOF*/
225: 240:/*EOF*/
call 0 returned 100%
225: 241:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
call 2 returned 100%
-: 242:/*EOF*/
-: 243:/*EOF*/
-: 244:/*EOF*/
-: 245:/*EOF*/
-: 246:/*EOF*/
-: 247:/*EOF*/
-: 248:/*EOF*/
-: 249:/*EOF*/
-: 250:/*EOF*/
-: 251:/*EOF*/
-: 252:/*EOF*/
-: 253:/*EOF*/
-: 254:/*EOF*/
-: 255:/*EOF*/
-: 256:/*EOF*/
function get_lang_codeset called 0 returned 0% blocks executed 0%
#####: 257:/*EOF*/
-: 258:/*EOF*/
#####: 259:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 260:/*EOF*/
call 0 never executed
-: 261:/*EOF*/
#####: 262:/*EOF*/
-: 263:/*EOF*/
-: 264:/*EOF*/
-: 265:/*EOF*/
-: 266:/*EOF*/
-: 267:/*EOF*/
-: 268:/*EOF*/
-: 269:/*EOF*/
-: 270:/*EOF*/
-: 271:/*EOF*/
function strip_locale_name called 251 returned 100% blocks executed 50%
251: 272:/*EOF*/
-: 273:/*EOF*/
-: 274:/*EOF*/
-: 275:/*EOF*/
-: 276:/*EOF*/
-: 277:/*EOF*/
-: 278:/*EOF*/
-: 279:/*EOF*/
251: 280:/*EOF*/
-: 281:/*EOF*/
-: 282:/*EOF*/
-: 283:/*EOF*/
-: 284:/*EOF*/
-: 285:/*EOF*/
-: 286:/*EOF*/
-: 287:/*EOF*/
251: 288:/*EOF*/
branch 0 taken 99% (fallthrough)
branch 1 taken 1%
-: 289:/*EOF*/
-: 290:/*EOF*/
250: 291:/*EOF*/
call 0 returned 100%
250: 292:/*EOF*/
-: 293:/*EOF*/
250: 294:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
-: 295:/*EOF*/
-: 296:/*EOF*/
-: 297:/*EOF*/
1: 298:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
branch 2 taken 0% (fallthrough)
branch 3 taken 100%
#####: 299:/*EOF*/
branch 0 never executed
branch 1 never executed
branch 2 never executed
branch 3 never executed
-: 300:/*EOF*/
-: 301:/*EOF*/
-: 302:/*EOF*/
#####: 303:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 304:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 305:/*EOF*/
#####: 306:/*EOF*/
#####: 307:/*EOF*/
-: 308:/*EOF*/
-: 309:/*EOF*/
-: 310:/*EOF*/
#####: 311:/*EOF*/
-: 312:/*EOF*/
-: 313:/*EOF*/
-: 314:/*EOF*/
1: 315:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 316:/*EOF*/
-: 317:/*EOF*/
-: 318:/*EOF*/
-: 319:/*EOF*/
-: 320:/*EOF*/
-: 321:/*EOF*/
-: 322:/*EOF*/
-: 323:/*EOF*/
-: 324:/*EOF*/
-: 325:/*EOF*/
-: 326:/*EOF*/
-: 327:/*EOF*/
-: 328:/*EOF*/
function static_iso639_alias_convert called 225 returned 100% blocks executed 70%
225: 329:/*EOF*/
-: 330:/*EOF*/
-: 331:/*EOF*/
-: 332:/*EOF*/
-: 333:/*EOF*/
-: 334:/*EOF*/
225: 335:/*EOF*/
-: 336:/*EOF*/
-: 337:/*EOF*/
-: 338:/*EOF*/
-: 339:/*EOF*/
-: 340:/*EOF*/
-: 341:/*EOF*/
-: 342:/*EOF*/
-: 343:/*EOF*/
-: 344:/*EOF*/
-: 345:/*EOF*/
-: 346:/*EOF*/
-: 347:/*EOF*/
-: 348:/*EOF*/
-: 349:/*EOF*/
-: 350:/*EOF*/
-: 351:/*EOF*/
-: 352:/*EOF*/
-: 353:/*EOF*/
-: 354:/*EOF*/
-: 355:/*EOF*/
-: 356:/*EOF*/
-: 357:/*EOF*/
-: 358:/*EOF*/
-: 359:/*EOF*/
-: 360:/*EOF*/
-: 361:/*EOF*/
-: 362:/*EOF*/
-: 363:/*EOF*/
-: 364:/*EOF*/
-: 365:/*EOF*/
-: 366:/*EOF*/
-: 367:/*EOF*/
-: 368:/*EOF*/
-: 369:/*EOF*/
-: 370:/*EOF*/
225: 371:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 372:/*EOF*/
-: 373:/*EOF*/
6975: 374:/*EOF*/
branch 0 taken 97%
branch 1 taken 3% (fallthrough)
6975: 375:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 376:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 377:/*EOF*/
-: 378:/*EOF*/
-: 379:/*EOF*/
#####: 380:/*EOF*/
call 0 never executed
-: 381:/*EOF*/
-: 382:/*EOF*/
-: 383:/*EOF*/
225: 384:/*EOF*/
call 0 returned 100%
-: 385:/*EOF*/
-: 386:/*EOF*/
-: 387:/*EOF*/
function codeset_free called 251 returned 100% blocks executed 67%
251: 388:/*EOF*/
-: 389:/*EOF*/
251: 390:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
251: 391:/*EOF*/
<<<<<< EOF
# path=/home/travis/build/nijel/enca/convert.c.gcov
-: 0:Source:convert.c
-: 0:Graph:/home/travis/build/nijel/enca/src/enca-convert.gcno
-: 0:Data:/home/travis/build/nijel/enca/src/enca-convert.gcda
-: 0:Runs:275
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
-: 62:/*EOF*/
-: 63:/*EOF*/
-: 64:/*EOF*/
-: 65:/*EOF*/
-: 66:/*EOF*/
-: 67:/*EOF*/
-: 68:/*EOF*/
-: 69:/*EOF*/
-: 70:/*EOF*/
-: 71:/*EOF*/
-: 72:/*EOF*/
-: 73:/*EOF*/
-: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
-: 80:/*EOF*/
-: 81:/*EOF*/
-: 82:/*EOF*/
-: 83:/*EOF*/
-: 84:/*EOF*/
-: 85:/*EOF*/
-: 86:/*EOF*/
-: 87:/*EOF*/
-: 88:/*EOF*/
-: 89:/*EOF*/
-: 90:/*EOF*/
-: 91:/*EOF*/
-: 92:/*EOF*/
-: 93:/*EOF*/
-: 94:/*EOF*/
-: 95:/*EOF*/
-: 96:/*EOF*/
-: 97:/*EOF*/
-: 98:/*EOF*/
-: 99:/*EOF*/
-: 100:/*EOF*/
-: 101:/*EOF*/
-: 102:/*EOF*/
-: 103:/*EOF*/
function convert called 62 returned 98% blocks executed 73%
62: 104:/*EOF*/
-: 105:/*EOF*/
-: 106:/*EOF*/
-: 107:/*EOF*/
-: 108:/*EOF*/
-: 109:/*EOF*/
62: 110:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 111:/*EOF*/
call 0 never executed
call 1 never executed
#####: 112:/*EOF*/
-: 113:/*EOF*/
-: 114:/*EOF*/
-: 115:/*EOF*/
-: 116:/*EOF*/
-: 117:/*EOF*/
62: 118:/*EOF*/
branch 0 taken 6% (fallthrough)
branch 1 taken 94%
4: 119:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 120:/*EOF*/
branch 0 never executed
branch 1 never executed
-: 121:/*EOF*/
-: 122:/*EOF*/
#####: 123:/*EOF*/
call 0 never executed
-: 124:/*EOF*/
-: 125:/*EOF*/
-: 126:/*EOF*/
-: 127:/*EOF*/
62: 128:/*EOF*/
129: 129:/*EOF*/
branch 0 taken 94%
branch 1 taken 6% (fallthrough)
63: 130:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 131:/*EOF*/
call 0 never executed
#####: 132:/*EOF*/
-: 133:/*EOF*/
63: 134:/*EOF*/
call 0 returned 98%
62: 135:/*EOF*/
branch 0 taken 10% (fallthrough)
branch 1 taken 90%
-: 136:/*EOF*/
-: 137:/*EOF*/
6: 138:/*EOF*/
branch 0 taken 17% (fallthrough)
branch 1 taken 83%
1: 139:/*EOF*/
call 0 returned 100%
-: 140:/*EOF*/
1: 141:/*EOF*/
-: 142:/*EOF*/
-: 143:/*EOF*/
6: 144:/*EOF*/
branch 0 taken 83% (fallthrough)
branch 1 taken 17%
-: 145:/*EOF*/
-: 146:/*EOF*/
5: 147:/*EOF*/
-: 148:/*EOF*/
-: 149:/*EOF*/
-: 150:/*EOF*/
8: 151:/*EOF*/
call 0 returned 100%
call 1 returned 100%
-: 152:/*EOF*/
-: 153:/*EOF*/
-: 154:/*EOF*/
4: 155:/*EOF*/
-: 156:/*EOF*/
-: 157:/*EOF*/
-: 158:/*EOF*/
4: 159:/*EOF*/
branch 0 taken 25% (fallthrough)
branch 1 taken 75%
1: 160:/*EOF*/
call 0 returned 100%
-: 161:/*EOF*/
-: 162:/*EOF*/
-: 163:/*EOF*/
-: 164:/*EOF*/
-: 165:/*EOF*/
-: 166:/*EOF*/
-: 167:/*EOF*/
-: 168:/*EOF*/
-: 169:/*EOF*/
function convert_builtin called 42 returned 100% blocks executed 69%
42: 170:/*EOF*/
-: 171:/*EOF*/
-: 172:/*EOF*/
-: 173:/*EOF*/
-: 174:/*EOF*/
-: 175:/*EOF*/
-: 176:/*EOF*/
-: 177:/*EOF*/
42: 178:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
42: 179:/*EOF*/
call 0 returned 100%
42: 180:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 181:/*EOF*/
-: 182:/*EOF*/
-: 183:/*EOF*/
-: 184:/*EOF*/
-: 185:/*EOF*/
42: 186:/*EOF*/
-: 187:/*EOF*/
42: 188:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 189:/*EOF*/
branch 0 never executed
branch 1 never executed
42: 190:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 191:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 192:/*EOF*/
-: 193:/*EOF*/
-: 194:/*EOF*/
-: 195:/*EOF*/
-: 196:/*EOF*/
-: 197:/*EOF*/
-: 198:/*EOF*/
-: 199:/*EOF*/
-: 200:/*EOF*/
42: 201:/*EOF*/
-: 202:/*EOF*/
42: 203:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 204:/*EOF*/
-: 205:/*EOF*/
42: 206:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 207:/*EOF*/
call 0 never executed
branch 1 never executed
branch 2 never executed
#####: 208:/*EOF*/
call 0 never executed
branch 1 never executed
branch 2 never executed
#####: 209:/*EOF*/
-: 210:/*EOF*/
42: 211:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 212:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 213:/*EOF*/
call 0 never executed
-: 214:/*EOF*/
-: 215:/*EOF*/
-: 216:/*EOF*/
-: 217:/*EOF*/
-: 218:/*EOF*/
42: 219:/*EOF*/
call 0 returned 100%
42: 220:/*EOF*/
branch 0 taken 95% (fallthrough)
branch 1 taken 5%
-: 221:/*EOF*/
-: 222:/*EOF*/
40: 223:/*EOF*/
branch 0 taken 35% (fallthrough)
branch 1 taken 65%
14: 224:/*EOF*/
call 0 returned 100%
-: 225:/*EOF*/
-: 226:/*EOF*/
-: 227:/*EOF*/
26: 228:/*EOF*/
26: 229:/*EOF*/
26: 230:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
-: 231:/*EOF*/
-: 232:/*EOF*/
-: 233:/*EOF*/
108: 234:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
-: 235:/*EOF*/
-: 236:/*EOF*/
108: 237:/*EOF*/
branch 0 taken 76% (fallthrough)
branch 1 taken 24%
-: 238:/*EOF*/
-: 239:/*EOF*/
-: 240:/*EOF*/
82: 241:/*EOF*/
82: 242:/*EOF*/
-: 243:/*EOF*/
4133873: 244:/*EOF*/
4133873: 245:/*EOF*/
4133873: 246:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
-: 247:/*EOF*/
-: 248:/*EOF*/
82: 249:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
-: 250:/*EOF*/
-: 251:/*EOF*/
82: 252:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
-: 253:/*EOF*/
-: 254:/*EOF*/
-: 255:/*EOF*/
-: 256:/*EOF*/
-: 257:/*EOF*/
-: 258:/*EOF*/
82: 259:/*EOF*/
call 0 returned 100%
branch 1 taken 100%
branch 2 taken 0% (fallthrough)
-: 260:/*EOF*/
-: 261:/*EOF*/
-: 262:/*EOF*/
-: 263:/*EOF*/
-: 264:/*EOF*/
-: 265:/*EOF*/
-: 266:/*EOF*/
-: 267:/*EOF*/
-: 268:/*EOF*/
-: 269:/*EOF*/
-: 270:/*EOF*/
-: 271:/*EOF*/
-: 272:/*EOF*/
-: 273:/*EOF*/
function copy_and_convert called 32 returned 100% blocks executed 84%
32: 274:/*EOF*/
-: 275:/*EOF*/
-: 276:/*EOF*/
-: 277:/*EOF*/
32: 278:/*EOF*/
branch 0 taken 56% (fallthrough)
branch 1 taken 44%
branch 2 taken 0% (fallthrough)
branch 3 taken 100%
#####: 279:/*EOF*/
call 0 never executed
call 1 never executed
#####: 280:/*EOF*/
#####: 281:/*EOF*/
-: 282:/*EOF*/
32: 283:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
32: 284:/*EOF*/
-: 285:/*EOF*/
32: 286:/*EOF*/
branch 0 taken 50% (fallthrough)
branch 1 taken 50%
16: 287:/*EOF*/
branch 0 taken 88% (fallthrough)
branch 1 taken 13%
14: 288:/*EOF*/
14: 289:/*EOF*/
-: 290:/*EOF*/
852026: 291:/*EOF*/
852026: 292:/*EOF*/
852026: 293:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
-: 294:/*EOF*/
16: 295:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
-: 296:/*EOF*/
-: 297:/*EOF*/
-: 298:/*EOF*/
-: 299:/*EOF*/
97: 300:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
-: 301:/*EOF*/
-: 302:/*EOF*/
97: 303:/*EOF*/
branch 0 taken 67% (fallthrough)
branch 1 taken 33%
-: 304:/*EOF*/
-: 305:/*EOF*/
65: 306:/*EOF*/
branch 0 taken 86% (fallthrough)
branch 1 taken 14%
56: 307:/*EOF*/
56: 308:/*EOF*/
-: 309:/*EOF*/
3280896: 310:/*EOF*/
3280896: 311:/*EOF*/
3280896: 312:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
-: 313:/*EOF*/
-: 314:/*EOF*/
65: 315:/*EOF*/
call 0 returned 100%
branch 1 taken 100%
branch 2 taken 0%
-: 316:/*EOF*/
-: 317:/*EOF*/
32: 318:/*EOF*/
call 0 returned 100%
-: 319:/*EOF*/
32: 320:/*EOF*/
-: 321:/*EOF*/
-: 322:/*EOF*/
-: 323:/*EOF*/
-: 324:/*EOF*/
-: 325:/*EOF*/
-: 326:/*EOF*/
function add_converter called 481 returned 100% blocks executed 72%
481: 327:/*EOF*/
-: 328:/*EOF*/
-: 329:/*EOF*/
-: 330:/*EOF*/
-: 331:/*EOF*/
-: 332:/*EOF*/
481: 333:/*EOF*/
-: 334:/*EOF*/
-: 335:/*EOF*/
481: 336:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
1: 337:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 338:/*EOF*/
1: 339:/*EOF*/
branch 0 taken 0%
branch 1 taken 100%
#####: 340:/*EOF*/
#####: 341:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 342:/*EOF*/
-: 343:/*EOF*/
-: 344:/*EOF*/
-: 345:/*EOF*/
-: 346:/*EOF*/
-: 347:/*EOF*/
480: 348:/*EOF*/
call 0 returned 100%
-: 349:/*EOF*/
480: 350:/*EOF*/
branch 0 taken 99% (fallthrough)
branch 1 taken 1%
-: 351:/*EOF*/
-: 352:/*EOF*/
-: 353:/*EOF*/
477: 354:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 355:/*EOF*/
477: 356:/*EOF*/
branch 0 taken 48% (fallthrough)
branch 1 taken 52%
248: 357:/*EOF*/
call 0 returned 100%
-: 358:/*EOF*/
229: 359:/*EOF*/
branch 0 taken 50%
branch 1 taken 50% (fallthrough)
-: 360:/*EOF*/
229: 361:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 362:/*EOF*/
call 0 never executed
-: 363:/*EOF*/
-: 364:/*EOF*/
#####: 365:/*EOF*/
-: 366:/*EOF*/
229: 367:/*EOF*/
-: 368:/*EOF*/
-: 369:/*EOF*/
229: 370:/*EOF*/
call 0 returned 100%
229: 371:/*EOF*/
-: 372:/*EOF*/
477: 373:/*EOF*/
477: 374:/*EOF*/
-: 375:/*EOF*/
477: 376:/*EOF*/
-: 377:/*EOF*/
-: 378:/*EOF*/
-: 379:/*EOF*/
-: 380:/*EOF*/
function external_converter_listed called 63 returned 100% blocks executed 100%
63: 381:/*EOF*/
-: 382:/*EOF*/
-: 383:/*EOF*/
-: 384:/*EOF*/
162: 385:/*EOF*/
branch 0 taken 65%
branch 1 taken 35% (fallthrough)
105: 386:/*EOF*/
branch 0 taken 94% (fallthrough)
branch 1 taken 6%
-: 387:/*EOF*/
-: 388:/*EOF*/
-: 389:/*EOF*/
-: 390:/*EOF*/
-: 391:/*EOF*/
-: 392:/*EOF*/
-: 393:/*EOF*/
-: 394:/*EOF*/
function print_converter_list called 8 returned 100% blocks executed 100%
8: 395:/*EOF*/
-: 396:/*EOF*/
-: 397:/*EOF*/
-: 398:/*EOF*/
40: 399:/*EOF*/
branch 0 taken 80%
branch 1 taken 20% (fallthrough)
64: 400:/*EOF*/
8: 401:/*EOF*/
-: 402:/*EOF*/
-: 403:/*EOF*/
-: 404:/*EOF*/
-: 405:/*EOF*/
-: 406:/*EOF*/
-: 407:/*EOF*/
function format_request_string called 15 returned 100% blocks executed 100%
15: 408:/*EOF*/
-: 409:/*EOF*/
-: 410:/*EOF*/
-: 411:/*EOF*/
-: 412:/*EOF*/
-: 413:/*EOF*/
-: 414:/*EOF*/
-: 415:/*EOF*/
15: 416:/*EOF*/
branch 0 taken 27% (fallthrough)
branch 1 taken 73%
-: 417:/*EOF*/
-: 418:/*EOF*/
15: 419:/*EOF*/
call 0 returned 100%
30: 420:/*EOF*/
call 0 returned 100%
30: 421:/*EOF*/
call 0 returned 100%
15: 422:/*EOF*/
-: 423:/*EOF*/
15: 424:/*EOF*/
branch 0 taken 20% (fallthrough)
branch 1 taken 80%
3: 425:/*EOF*/
call 0 returned 100%
3: 426:/*EOF*/
-: 427:/*EOF*/
-: 428:/*EOF*/
24: 429:/*EOF*/
call 0 returned 100%
24: 430:/*EOF*/
call 0 returned 100%
12: 431:/*EOF*/
-: 432:/*EOF*/
12: 433:/*EOF*/
call 0 returned 100%
-: 434:/*EOF*/
-: 435:/*EOF*/
15: 436:/*EOF*/
call 0 returned 100%
-: 437:/*EOF*/
15: 438:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
15: 439:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 440:/*EOF*/
15: 441:/*EOF*/
-: 442:/*EOF*/
-: 443:/*EOF*/
-: 444:/*EOF*/
-: 445:/*EOF*/
-: 446:/*EOF*/
-: 447:/*EOF*/
-: 448:/*EOF*/
-: 449:/*EOF*/
-: 450:/*EOF*/
-: 451:/*EOF*/
-: 452:/*EOF*/
-: 453:/*EOF*/
-: 454:/*EOF*/
-: 455:/*EOF*/
-: 456:/*EOF*/
-: 457:/*EOF*/
-: 458:/*EOF*/
-: 459:/*EOF*/
-: 460:/*EOF*/
function xtable called 42 returned 100% blocks executed 93%
42: 461:/*EOF*/
-: 462:/*EOF*/
-: 463:/*EOF*/
-: 464:/*EOF*/
-: 465:/*EOF*/
-: 466:/*EOF*/
-: 467:/*EOF*/
-: 468:/*EOF*/
42: 469:/*EOF*/
call 0 returned 100%
branch 1 taken 95% (fallthrough)
branch 2 taken 5%
40: 470:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
-: 471:/*EOF*/
-: 472:/*EOF*/
-: 473:/*EOF*/
40: 474:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 475:/*EOF*/
40: 476:/*EOF*/
call 0 returned 100%
-: 477:/*EOF*/
40: 478:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
40: 479:/*EOF*/
call 0 returned 100%
40: 480:/*EOF*/
call 0 returned 100%
40: 481:/*EOF*/
call 0 returned 100%
-: 482:/*EOF*/
281: 483:/*EOF*/
branch 0 taken 86%
branch 1 taken 14% (fallthrough)
241: 484:/*EOF*/
-: 485:/*EOF*/
-: 486:/*EOF*/
10240: 487:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
10240: 488:/*EOF*/
201: 489:/*EOF*/
branch 0 taken 83%
branch 1 taken 17% (fallthrough)
402: 490:/*EOF*/
-: 491:/*EOF*/
-: 492:/*EOF*/
-: 493:/*EOF*/
97: 494:/*EOF*/
branch 0 taken 100%
branch 1 taken 0% (fallthrough)
137: 495:/*EOF*/
branch 0 taken 29% (fallthrough)
branch 1 taken 71%
40: 496:/*EOF*/
40: 497:/*EOF*/
-: 498:/*EOF*/
-: 499:/*EOF*/
40: 500:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 501:/*EOF*/
-: 502:/*EOF*/
-: 503:/*EOF*/
-: 504:/*EOF*/
40: 505:/*EOF*/
call 0 returned 100%
-: 506:/*EOF*/
40: 507:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 508:/*EOF*/
40: 509:/*EOF*/
call 0 returned 100%
-: 510:/*EOF*/
-: 511:/*EOF*/
-: 512:/*EOF*/
40: 513:/*EOF*/
115: 514:/*EOF*/
branch 0 taken 100%
branch 1 taken 0% (fallthrough)
115: 515:/*EOF*/
branch 0 taken 35% (fallthrough)
branch 1 taken 65%
40: 516:/*EOF*/
40: 517:/*EOF*/
-: 518:/*EOF*/
-: 519:/*EOF*/
40: 520:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 521:/*EOF*/
-: 522:/*EOF*/
-: 523:/*EOF*/
40: 524:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 525:/*EOF*/
-: 526:/*EOF*/
-: 527:/*EOF*/
-: 528:/*EOF*/
-: 529:/*EOF*/
40: 530:/*EOF*/
call 0 returned 100%
40: 531:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
call 2 never executed
-: 532:/*EOF*/
-: 533:/*EOF*/
2621440: 534:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
2621440: 535:/*EOF*/
-: 536:/*EOF*/
10240: 537:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
10240: 538:/*EOF*/
-: 539:/*EOF*/
10240: 540:/*EOF*/
branch 0 taken 99% (fallthrough)
branch 1 taken 1%
10117: 541:/*EOF*/
-: 542:/*EOF*/
-: 543:/*EOF*/
-: 544:/*EOF*/
-: 545:/*EOF*/
-: 546:/*EOF*/
40: 547:/*EOF*/
call 0 returned 100%
branch 1 taken 8% (fallthrough)
branch 2 taken 93%
3: 548:/*EOF*/
3: 549:/*EOF*/
-: 550:/*EOF*/
-: 551:/*EOF*/
10240: 552:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
10240: 553:/*EOF*/
-: 554:/*EOF*/
10240: 555:/*EOF*/
branch 0 taken 99% (fallthrough)
branch 1 taken 1%
10201: 556:/*EOF*/
branch 0 taken 89% (fallthrough)
branch 1 taken 11%
9065: 557:/*EOF*/
-: 558:/*EOF*/
-: 559:/*EOF*/
40: 560:/*EOF*/
-: 561:/*EOF*/
-: 562:/*EOF*/
-: 563:/*EOF*/
function xdata_free called 40 returned 100% blocks executed 100%
40: 564:/*EOF*/
-: 565:/*EOF*/
40: 566:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
40: 567:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
40: 568:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
40: 569:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
40: 570:/*EOF*/
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lang_et.c.gcov
-: 0:Source:lang_et.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_et.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_et.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
-: 62:/*EOF*/
-: 63:/*EOF*/
-: 64:/*EOF*/
-: 65:/*EOF*/
-: 66:/*EOF*/
function hook called 24 returned 100% blocks executed 100%
24: 67:/*EOF*/
-: 68:/*EOF*/
24: 69:/*EOF*/
-: 70:/*EOF*/
-: 71:/*EOF*/
24: 72:/*EOF*/
24: 73:/*EOF*/
24: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
-: 80:/*EOF*/
-: 81:/*EOF*/
-: 82:/*EOF*/
-: 83:/*EOF*/
-: 84:/*EOF*/
-: 85:/*EOF*/
-: 86:/*EOF*/
function eol_hook called 0 returned 0% blocks executed 0%
#####: 87:/*EOF*/
-: 88:/*EOF*/
#####: 89:/*EOF*/
-: 90:/*EOF*/
-: 91:/*EOF*/
-: 92:/*EOF*/
-: 93:/*EOF*/
-: 94:/*EOF*/
-: 95:/*EOF*/
-: 96:/*EOF*/
-: 97:/*EOF*/
-: 98:/*EOF*/
-: 99:/*EOF*/
-: 100:/*EOF*/
-: 101:/*EOF*/
-: 102:/*EOF*/
-: 103:/*EOF*/
-: 104:/*EOF*/
-: 105:/*EOF*/
-: 106:/*EOF*/
-: 107:/*EOF*/
-: 108:/*EOF*/
24: 109:/*EOF*/
call 0 returned 100%
-: 110:/*EOF*/
-: 111:/*EOF*/
-: 112:/*EOF*/
-: 113:/*EOF*/
-: 114:/*EOF*/
-: 115:/*EOF*/
-: 116:/*EOF*/
-: 117:/*EOF*/
-: 118:/*EOF*/
-: 119:/*EOF*/
-: 120:/*EOF*/
-: 121:/*EOF*/
-: 122:/*EOF*/
-: 123:/*EOF*/
-: 124:/*EOF*/
-: 125:/*EOF*/
-: 126:/*EOF*/
-: 127:/*EOF*/
-: 128:/*EOF*/
#####: 129:/*EOF*/
call 0 never executed
-: 130:/*EOF*/
-: 131:/*EOF*/
-: 132:/*EOF*/
-: 133:/*EOF*/
-: 134:/*EOF*/
-: 135:/*EOF*/
-: 136:/*EOF*/
-: 137:/*EOF*/
-: 138:/*EOF*/
-: 139:/*EOF*/
-: 140:/*EOF*/
-: 141:/*EOF*/
-: 142:/*EOF*/
-: 143:/*EOF*/
-: 144:/*EOF*/
-: 145:/*EOF*/
-: 146:/*EOF*/
-: 147:/*EOF*/
-: 148:/*EOF*/
-: 149:/*EOF*/
-: 150:/*EOF*/
-: 151:/*EOF*/
-: 152:/*EOF*/
-: 153:/*EOF*/
-: 154:/*EOF*/
-: 155:/*EOF*/
-: 156:/*EOF*/
-: 157:/*EOF*/
-: 158:/*EOF*/
-: 159:/*EOF*/
-: 160:/*EOF*/
-: 161:/*EOF*/
-: 162:/*EOF*/
-: 163:/*EOF*/
24: 164:/*EOF*/
call 0 returned 100%
<<<<<< EOF
# path=/home/travis/build/nijel/enca/common.c.gcov
-: 0:Source:common.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/common.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/common.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
function enca_malloc called 6408 returned 100% blocks executed 60%
6408: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
6408: 41:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 42:/*EOF*/
6408: 43:/*EOF*/
6408: 44:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 45:/*EOF*/
6408: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
function enca_realloc called 189 returned 100% blocks executed 60%
189: 59:/*EOF*/
-: 60:/*EOF*/
189: 61:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 62:/*EOF*/
#####: 63:/*EOF*/
-: 64:/*EOF*/
-: 65:/*EOF*/
189: 66:/*EOF*/
189: 67:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 68:/*EOF*/
-: 69:/*EOF*/
-: 70:/*EOF*/
-: 71:/*EOF*/
-: 72:/*EOF*/
-: 73:/*EOF*/
-: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
-: 80:/*EOF*/
-: 81:/*EOF*/
-: 82:/*EOF*/
function enca_strdup called 2222 returned 100% blocks executed 100%
2222: 83:/*EOF*/
2222: 84:/*EOF*/
branch 0 taken 93% (fallthrough)
branch 1 taken 7%
-: 85:/*EOF*/
-: 86:/*EOF*/
4146: 87:/*EOF*/
call 0 returned 100%
-: 88:/*EOF*/
-: 89:/*EOF*/
-: 90:/*EOF*/
-: 91:/*EOF*/
-: 92:/*EOF*/
-: 93:/*EOF*/
-: 94:/*EOF*/
-: 95:/*EOF*/
-: 96:/*EOF*/
-: 97:/*EOF*/
-: 98:/*EOF*/
-: 99:/*EOF*/
-: 100:/*EOF*/
-: 101:/*EOF*/
-: 102:/*EOF*/
-: 103:/*EOF*/
-: 104:/*EOF*/
-: 105:/*EOF*/
-: 106:/*EOF*/
-: 107:/*EOF*/
-: 108:/*EOF*/
-: 109:/*EOF*/
-: 110:/*EOF*/
-: 111:/*EOF*/
-: 112:/*EOF*/
-: 113:/*EOF*/
-: 114:/*EOF*/
-: 115:/*EOF*/
-: 116:/*EOF*/
-: 117:/*EOF*/
-: 118:/*EOF*/
-: 119:/*EOF*/
-: 120:/*EOF*/
-: 121:/*EOF*/
-: 122:/*EOF*/
-: 123:/*EOF*/
-: 124:/*EOF*/
-: 125:/*EOF*/
-: 126:/*EOF*/
-: 127:/*EOF*/
-: 128:/*EOF*/
-: 129:/*EOF*/
-: 130:/*EOF*/
-: 131:/*EOF*/
-: 132:/*EOF*/
-: 133:/*EOF*/
-: 134:/*EOF*/
-: 135:/*EOF*/
-: 136:/*EOF*/
-: 137:/*EOF*/
-: 138:/*EOF*/
-: 139:/*EOF*/
-: 140:/*EOF*/
-: 141:/*EOF*/
-: 142:/*EOF*/
-: 143:/*EOF*/
-: 144:/*EOF*/
-: 145:/*EOF*/
-: 146:/*EOF*/
-: 147:/*EOF*/
-: 148:/*EOF*/
-: 149:/*EOF*/
-: 150:/*EOF*/
-: 151:/*EOF*/
-: 152:/*EOF*/
-: 153:/*EOF*/
-: 154:/*EOF*/
-: 155:/*EOF*/
-: 156:/*EOF*/
-: 157:/*EOF*/
-: 158:/*EOF*/
-: 159:/*EOF*/
-: 160:/*EOF*/
-: 161:/*EOF*/
-: 162:/*EOF*/
-: 163:/*EOF*/
-: 164:/*EOF*/
-: 165:/*EOF*/
-: 166:/*EOF*/
-: 167:/*EOF*/
-: 168:/*EOF*/
function enca_strconcat called 301 returned 100% blocks executed 86%
301: 169:/*EOF*/
-: 170:/*EOF*/
-: 171:/*EOF*/
-: 172:/*EOF*/
301: 173:/*EOF*/
-: 174:/*EOF*/
-: 175:/*EOF*/
-: 176:/*EOF*/
-: 177:/*EOF*/
-: 178:/*EOF*/
301: 179:/*EOF*/
301: 180:/*EOF*/
1226: 181:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
branch 2 taken 75%
branch 3 taken 25% (fallthrough)
925: 182:/*EOF*/
301: 183:/*EOF*/
-: 184:/*EOF*/
-: 185:/*EOF*/
301: 186:/*EOF*/
call 0 returned 100%
301: 187:/*EOF*/
1226: 188:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
branch 2 taken 75%
branch 3 taken 25% (fallthrough)
925: 189:/*EOF*/
301: 190:/*EOF*/
-: 191:/*EOF*/
301: 192:/*EOF*/
-: 193:/*EOF*/
-: 194:/*EOF*/
-: 195:/*EOF*/
-: 196:/*EOF*/
-: 197:/*EOF*/
-: 198:/*EOF*/
-: 199:/*EOF*/
-: 200:/*EOF*/
-: 201:/*EOF*/
-: 202:/*EOF*/
-: 203:/*EOF*/
-: 204:/*EOF*/
-: 205:/*EOF*/
-: 206:/*EOF*/
function enca_strappend called 189 returned 100% blocks executed 80%
189: 207:/*EOF*/
-: 208:/*EOF*/
-: 209:/*EOF*/
-: 210:/*EOF*/
-: 211:/*EOF*/
-: 212:/*EOF*/
-: 213:/*EOF*/
-: 214:/*EOF*/
-: 215:/*EOF*/
189: 216:/*EOF*/
189: 217:/*EOF*/
189: 218:/*EOF*/
567: 219:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
branch 2 taken 100% (fallthrough)
branch 3 taken 0%
branch 4 taken 67%
branch 5 taken 33% (fallthrough)
378: 220:/*EOF*/
189: 221:/*EOF*/
-: 222:/*EOF*/
-: 223:/*EOF*/
189: 224:/*EOF*/
call 0 returned 100%
189: 225:/*EOF*/
189: 226:/*EOF*/
567: 227:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
branch 2 taken 100% (fallthrough)
branch 3 taken 0%
branch 4 taken 67%
branch 5 taken 33% (fallthrough)
378: 228:/*EOF*/
189: 229:/*EOF*/
-: 230:/*EOF*/
189: 231:/*EOF*/
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lang_zh.c.gcov
-: 0:Source:lang_zh.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_zh.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_zh.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
function is_hz called 6 returned 100% blocks executed 100%
6: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
-: 62:/*EOF*/
-: 63:/*EOF*/
-: 64:/*EOF*/
-: 65:/*EOF*/
-: 66:/*EOF*/
-: 67:/*EOF*/
-: 68:/*EOF*/
-: 69:/*EOF*/
-: 70:/*EOF*/
-: 71:/*EOF*/
-: 72:/*EOF*/
-: 73:/*EOF*/
-: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
-: 80:/*EOF*/
-: 81:/*EOF*/
-: 82:/*EOF*/
-: 83:/*EOF*/
-: 84:/*EOF*/
function hook called 6 returned 100% blocks executed 40%
6: 85:/*EOF*/
-: 86:/*EOF*/
6: 87:/*EOF*/
6: 88:/*EOF*/
6: 89:/*EOF*/
-: 90:/*EOF*/
6: 91:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 92:/*EOF*/
-: 93:/*EOF*/
#####: 94:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 95:/*EOF*/
-: 96:/*EOF*/
#####: 97:/*EOF*/
-: 98:/*EOF*/
-: 99:/*EOF*/
-: 100:/*EOF*/
-: 101:/*EOF*/
-: 102:/*EOF*/
-: 103:/*EOF*/
-: 104:/*EOF*/
-: 105:/*EOF*/
-: 106:/*EOF*/
-: 107:/*EOF*/
-: 108:/*EOF*/
-: 109:/*EOF*/
-: 110:/*EOF*/
-: 111:/*EOF*/
-: 112:/*EOF*/
-: 113:/*EOF*/
-: 114:/*EOF*/
-: 115:/*EOF*/
-: 116:/*EOF*/
-: 117:/*EOF*/
function calc_rating called 6 returned 100% blocks executed 80%
6: 118:/*EOF*/
-: 119:/*EOF*/
6: 120:/*EOF*/
-: 121:/*EOF*/
-: 122:/*EOF*/
6: 123:/*EOF*/
6: 124:/*EOF*/
6: 125:/*EOF*/
-: 126:/*EOF*/
-: 127:/*EOF*/
-: 128:/*EOF*/
6: 129:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
call 2 never executed
-: 130:/*EOF*/
-: 131:/*EOF*/
-: 132:/*EOF*/
18: 133:/*EOF*/
branch 0 taken 75%
branch 1 taken 25% (fallthrough)
18: 134:/*EOF*/
18: 135:/*EOF*/
-: 136:/*EOF*/
-: 137:/*EOF*/
1374: 138:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
1374: 139:/*EOF*/
-: 140:/*EOF*/
-: 141:/*EOF*/
1374: 142:/*EOF*/
branch 0 taken 50% (fallthrough)
branch 1 taken 50%
684: 143:/*EOF*/
-: 144:/*EOF*/
684: 145:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
call 2 never executed
2052: 146:/*EOF*/
branch 0 taken 75%
branch 1 taken 25% (fallthrough)
2052: 147:/*EOF*/
branch 0 taken 67% (fallthrough)
branch 1 taken 33%
1374: 148:/*EOF*/
call 0 returned 100%
1374: 149:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
6: 150:/*EOF*/
-: 151:/*EOF*/
1368: 152:/*EOF*/
call 0 returned 100%
1368: 153:/*EOF*/
branch 0 taken 26% (fallthrough)
branch 1 taken 74%
351: 154:/*EOF*/
-: 155:/*EOF*/
-: 156:/*EOF*/
-: 157:/*EOF*/
-: 158:/*EOF*/
684: 159:/*EOF*/
684: 160:/*EOF*/
-: 161:/*EOF*/
-: 162:/*EOF*/
690: 163:/*EOF*/
branch 0 taken 99% (fallthrough)
branch 1 taken 1%
684: 164:/*EOF*/
-: 165:/*EOF*/
-: 166:/*EOF*/
-: 167:/*EOF*/
-: 168:/*EOF*/
-: 169:/*EOF*/
-: 170:/*EOF*/
6: 171:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
branch 2 never executed
branch 3 never executed
-: 172:/*EOF*/
#####: 173:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 174:/*EOF*/
-: 175:/*EOF*/
-: 176:/*EOF*/
6: 177:/*EOF*/
<<<<<< EOF
# path=/home/travis/build/nijel/enca/filters.c.gcov
-: 0:Source:filters.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/filters.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/filters.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
-: 62:/*EOF*/
-: 63:/*EOF*/
-: 64:/*EOF*/
-: 65:/*EOF*/
-: 66:/*EOF*/
-: 67:/*EOF*/
-: 68:/*EOF*/
-: 69:/*EOF*/
-: 70:/*EOF*/
-: 71:/*EOF*/
-: 72:/*EOF*/
-: 73:/*EOF*/
-: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
-: 80:/*EOF*/
-: 81:/*EOF*/
-: 82:/*EOF*/
-: 83:/*EOF*/
-: 84:/*EOF*/
-: 85:/*EOF*/
-: 86:/*EOF*/
-: 87:/*EOF*/
-: 88:/*EOF*/
-: 89:/*EOF*/
-: 90:/*EOF*/
-: 91:/*EOF*/
-: 92:/*EOF*/
-: 93:/*EOF*/
-: 94:/*EOF*/
-: 95:/*EOF*/
-: 96:/*EOF*/
-: 97:/*EOF*/
-: 98:/*EOF*/
-: 99:/*EOF*/
-: 100:/*EOF*/
-: 101:/*EOF*/
-: 102:/*EOF*/
-: 103:/*EOF*/
-: 104:/*EOF*/
-: 105:/*EOF*/
-: 106:/*EOF*/
-: 107:/*EOF*/
-: 108:/*EOF*/
-: 109:/*EOF*/
-: 110:/*EOF*/
-: 111:/*EOF*/
-: 112:/*EOF*/
-: 113:/*EOF*/
-: 114:/*EOF*/
-: 115:/*EOF*/
-: 116:/*EOF*/
-: 117:/*EOF*/
-: 118:/*EOF*/
-: 119:/*EOF*/
-: 120:/*EOF*/
-: 121:/*EOF*/
-: 122:/*EOF*/
-: 123:/*EOF*/
-: 124:/*EOF*/
-: 125:/*EOF*/
-: 126:/*EOF*/
-: 127:/*EOF*/
-: 128:/*EOF*/
-: 129:/*EOF*/
-: 130:/*EOF*/
-: 131:/*EOF*/
-: 132:/*EOF*/
-: 133:/*EOF*/
-: 134:/*EOF*/
-: 135:/*EOF*/
-: 136:/*EOF*/
-: 137:/*EOF*/
-: 138:/*EOF*/
-: 139:/*EOF*/
-: 140:/*EOF*/
-: 141:/*EOF*/
-: 142:/*EOF*/
-: 143:/*EOF*/
-: 144:/*EOF*/
-: 145:/*EOF*/
-: 146:/*EOF*/
-: 147:/*EOF*/
-: 148:/*EOF*/
-: 149:/*EOF*/
-: 150:/*EOF*/
-: 151:/*EOF*/
-: 152:/*EOF*/
-: 153:/*EOF*/
-: 154:/*EOF*/
-: 155:/*EOF*/
-: 156:/*EOF*/
-: 157:/*EOF*/
-: 158:/*EOF*/
-: 159:/*EOF*/
-: 160:/*EOF*/
-: 161:/*EOF*/
-: 162:/*EOF*/
-: 163:/*EOF*/
-: 164:/*EOF*/
-: 165:/*EOF*/
-: 166:/*EOF*/
-: 167:/*EOF*/
-: 168:/*EOF*/
-: 169:/*EOF*/
-: 170:/*EOF*/
-: 171:/*EOF*/
-: 172:/*EOF*/
-: 173:/*EOF*/
-: 174:/*EOF*/
-: 175:/*EOF*/
-: 176:/*EOF*/
-: 177:/*EOF*/
-: 178:/*EOF*/
-: 179:/*EOF*/
-: 180:/*EOF*/
-: 181:/*EOF*/
-: 182:/*EOF*/
-: 183:/*EOF*/
-: 184:/*EOF*/
-: 185:/*EOF*/
-: 186:/*EOF*/
-: 187:/*EOF*/
-: 188:/*EOF*/
-: 189:/*EOF*/
-: 190:/*EOF*/
-: 191:/*EOF*/
-: 192:/*EOF*/
-: 193:/*EOF*/
-: 194:/*EOF*/
-: 195:/*EOF*/
-: 196:/*EOF*/
-: 197:/*EOF*/
-: 198:/*EOF*/
-: 199:/*EOF*/
-: 200:/*EOF*/
-: 201:/*EOF*/
-: 202:/*EOF*/
-: 203:/*EOF*/
-: 204:/*EOF*/
-: 205:/*EOF*/
function enca_filter_boxdraw called 26 returned 100% blocks executed 100%
26: 206:/*EOF*/
-: 207:/*EOF*/
-: 208:/*EOF*/
-: 209:/*EOF*/
26: 210:/*EOF*/
-: 211:/*EOF*/
182: 212:/*EOF*/
branch 0 taken 86%
branch 1 taken 14% (fallthrough)
156: 213:/*EOF*/
call 0 returned 100%
-: 214:/*EOF*/
-: 215:/*EOF*/
-: 216:/*EOF*/
-: 217:/*EOF*/
26: 218:/*EOF*/
-: 219:/*EOF*/
-: 220:/*EOF*/
-: 221:/*EOF*/
-: 222:/*EOF*/
-: 223:/*EOF*/
-: 224:/*EOF*/
-: 225:/*EOF*/
-: 226:/*EOF*/
-: 227:/*EOF*/
-: 228:/*EOF*/
-: 229:/*EOF*/
-: 230:/*EOF*/
-: 231:/*EOF*/
-: 232:/*EOF*/
-: 233:/*EOF*/
-: 234:/*EOF*/
-: 235:/*EOF*/
-: 236:/*EOF*/
-: 237:/*EOF*/
-: 238:/*EOF*/
-: 239:/*EOF*/
function filter_boxdraw_out called 156 returned 100% blocks executed 84%
156: 240:/*EOF*/
-: 241:/*EOF*/
-: 242:/*EOF*/
-: 243:/*EOF*/
-: 244:/*EOF*/
-: 245:/*EOF*/
-: 246:/*EOF*/
-: 247:/*EOF*/
-: 248:/*EOF*/
-: 249:/*EOF*/
156: 250:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 251:/*EOF*/
156: 252:/*EOF*/
branch 0 taken 17% (fallthrough)
branch 1 taken 83%
208: 253:/*EOF*/
branch 0 taken 89%
branch 1 taken 11% (fallthrough)
208: 254:/*EOF*/
call 0 returned 100%
208: 255:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 256:/*EOF*/
26: 257:/*EOF*/
-: 258:/*EOF*/
-: 259:/*EOF*/
-: 260:/*EOF*/
156: 261:/*EOF*/
1222: 262:/*EOF*/
branch 0 taken 90%
branch 1 taken 10% (fallthrough)
1102: 263:/*EOF*/
branch 0 taken 3% (fallthrough)
branch 1 taken 97%
36: 264:/*EOF*/
36: 265:/*EOF*/
-: 266:/*EOF*/
-: 267:/*EOF*/
156: 268:/*EOF*/
branch 0 taken 23% (fallthrough)
branch 1 taken 77%
-: 269:/*EOF*/
-: 270:/*EOF*/
-: 271:/*EOF*/
-: 272:/*EOF*/
-: 273:/*EOF*/
-: 274:/*EOF*/
2359296: 275:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
2359260: 276:/*EOF*/
branch 0 taken 99% (fallthrough)
branch 1 taken 1%
branch 2 taken 1% (fallthrough)
branch 3 taken 99%
19354: 277:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
branch 2 taken 0%
branch 3 taken 100% (fallthrough)
-: 278:/*EOF*/
-: 279:/*EOF*/
19354: 280:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 281:/*EOF*/
#####: 282:/*EOF*/
-: 283:/*EOF*/
-: 284:/*EOF*/
-: 285:/*EOF*/
2339906: 286:/*EOF*/
-: 287:/*EOF*/
-: 288:/*EOF*/
-: 289:/*EOF*/
-: 290:/*EOF*/
-: 291:/*EOF*/
36: 292:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
36: 293:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 294:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 295:/*EOF*/
#####: 296:/*EOF*/
-: 297:/*EOF*/
-: 298:/*EOF*/
2359224: 299:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
2359224: 300:/*EOF*/
branch 0 taken 10% (fallthrough)
branch 1 taken 90%
227784: 301:/*EOF*/
branch 0 taken 16% (fallthrough)
branch 1 taken 84%
36544: 302:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 303:/*EOF*/
#####: 304:/*EOF*/
-: 305:/*EOF*/
-: 306:/*EOF*/
-: 307:/*EOF*/
36: 308:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
36: 309:/*EOF*/
branch 0 taken 11% (fallthrough)
branch 1 taken 89%
4: 310:/*EOF*/
branch 0 taken 50% (fallthrough)
branch 1 taken 50%
2: 311:/*EOF*/
2: 312:/*EOF*/
-: 313:/*EOF*/
-: 314:/*EOF*/
-: 315:/*EOF*/
-: 316:/*EOF*/
-: 317:/*EOF*/
-: 318:/*EOF*/
-: 319:/*EOF*/
-: 320:/*EOF*/
-: 321:/*EOF*/
-: 322:/*EOF*/
-: 323:/*EOF*/
-: 324:/*EOF*/
-: 325:/*EOF*/
-: 326:/*EOF*/
-: 327:/*EOF*/
-: 328:/*EOF*/
-: 329:/*EOF*/
-: 330:/*EOF*/
-: 331:/*EOF*/
-: 332:/*EOF*/
-: 333:/*EOF*/
-: 334:/*EOF*/
-: 335:/*EOF*/
function enca_language_hook_ncs called 296 returned 100% blocks executed 90%
296: 336:/*EOF*/
-: 337:/*EOF*/
-: 338:/*EOF*/
-: 339:/*EOF*/
296: 340:/*EOF*/
296: 341:/*EOF*/
296: 342:/*EOF*/
296: 343:/*EOF*/
296: 344:/*EOF*/
-: 345:/*EOF*/
-: 346:/*EOF*/
-: 347:/*EOF*/
296: 348:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
296: 349:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
296: 350:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 351:/*EOF*/
-: 352:/*EOF*/
-: 353:/*EOF*/
-: 354:/*EOF*/
-: 355:/*EOF*/
-: 356:/*EOF*/
-: 357:/*EOF*/
-: 358:/*EOF*/
-: 359:/*EOF*/
412: 360:/*EOF*/
branch 0 taken 79%
branch 1 taken 21% (fallthrough)
559: 361:/*EOF*/
-: 362:/*EOF*/
-: 363:/*EOF*/
559: 364:/*EOF*/
branch 0 taken 57% (fallthrough)
branch 1 taken 43%
-: 365:/*EOF*/
-: 366:/*EOF*/
319: 367:/*EOF*/
call 0 returned 100%
319: 368:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
call 2 never executed
-: 369:/*EOF*/
829: 370:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
branch 2 taken 62%
branch 3 taken 38% (fallthrough)
510: 371:/*EOF*/
319: 372:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
319: 373:/*EOF*/
-: 374:/*EOF*/
-: 375:/*EOF*/
-: 376:/*EOF*/
559: 377:/*EOF*/
1831: 378:/*EOF*/
branch 0 taken 88% (fallthrough)
branch 1 taken 12%
branch 2 taken 63%
branch 3 taken 37% (fallthrough)
713: 379:/*EOF*/
559: 380:/*EOF*/
branch 0 taken 74% (fallthrough)
branch 1 taken 26%
-: 381:/*EOF*/
-: 382:/*EOF*/
-: 383:/*EOF*/
-: 384:/*EOF*/
-: 385:/*EOF*/
364: 386:/*EOF*/
branch 0 taken 71%
branch 1 taken 29% (fallthrough)
364: 387:/*EOF*/
-: 388:/*EOF*/
2199: 389:/*EOF*/
branch 0 taken 83%
branch 1 taken 17% (fallthrough)
1835: 390:/*EOF*/
364: 391:/*EOF*/
branch 0 taken 43% (fallthrough)
branch 1 taken 57%
155: 392:/*EOF*/
-: 393:/*EOF*/
149: 394:/*EOF*/
branch 0 taken 98% (fallthrough)
branch 1 taken 2%
-: 395:/*EOF*/
-: 396:/*EOF*/
-: 397:/*EOF*/
146: 398:/*EOF*/
504: 399:/*EOF*/
branch 0 taken 71%
branch 1 taken 29% (fallthrough)
358: 400:/*EOF*/
-: 401:/*EOF*/
358: 402:/*EOF*/
2163: 403:/*EOF*/
branch 0 taken 83%
branch 1 taken 17% (fallthrough)
1805: 404:/*EOF*/
358: 405:/*EOF*/
-: 406:/*EOF*/
-: 407:/*EOF*/
146: 408:/*EOF*/
call 0 returned 100%
-: 409:/*EOF*/
146: 410:/*EOF*/
-: 411:/*EOF*/
-: 412:/*EOF*/
-: 413:/*EOF*/
-: 414:/*EOF*/
-: 415:/*EOF*/
-: 416:/*EOF*/
-: 417:/*EOF*/
-: 418:/*EOF*/
-: 419:/*EOF*/
-: 420:/*EOF*/
-: 421:/*EOF*/
-: 422:/*EOF*/
-: 423:/*EOF*/
-: 424:/*EOF*/
-: 425:/*EOF*/
-: 426:/*EOF*/
-: 427:/*EOF*/
-: 428:/*EOF*/
-: 429:/*EOF*/
-: 430:/*EOF*/
-: 431:/*EOF*/
-: 432:/*EOF*/
-: 433:/*EOF*/
function enca_language_hook_eol called 93 returned 100% blocks executed 90%
93: 434:/*EOF*/
-: 435:/*EOF*/
-: 436:/*EOF*/
-: 437:/*EOF*/
93: 438:/*EOF*/
93: 439:/*EOF*/
93: 440:/*EOF*/
93: 441:/*EOF*/
-: 442:/*EOF*/
-: 443:/*EOF*/
93: 444:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
93: 445:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
93: 446:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 447:/*EOF*/
-: 448:/*EOF*/
-: 449:/*EOF*/
36: 450:/*EOF*/
branch 0 taken 72%
branch 1 taken 28% (fallthrough)
93: 451:/*EOF*/
branch 0 taken 39% (fallthrough)
branch 1 taken 61%
-: 452:/*EOF*/
-: 453:/*EOF*/
-: 454:/*EOF*/
-: 455:/*EOF*/
72: 456:/*EOF*/
branch 0 taken 67%
branch 1 taken 33% (fallthrough)
72: 457:/*EOF*/
-: 458:/*EOF*/
-: 459:/*EOF*/
72: 460:/*EOF*/
branch 0 taken 72% (fallthrough)
branch 1 taken 28%
-: 461:/*EOF*/
-: 462:/*EOF*/
52: 463:/*EOF*/
call 0 returned 100%
52: 464:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
call 2 never executed
-: 465:/*EOF*/
117: 466:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
branch 2 taken 56%
branch 3 taken 44% (fallthrough)
65: 467:/*EOF*/
52: 468:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
52: 469:/*EOF*/
-: 470:/*EOF*/
-: 471:/*EOF*/
-: 472:/*EOF*/
72: 473:/*EOF*/
180: 474:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
branch 2 taken 33%
branch 3 taken 67% (fallthrough)
36: 475:/*EOF*/
72: 476:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 477:/*EOF*/
-: 478:/*EOF*/
-: 479:/*EOF*/
-: 480:/*EOF*/
12: 481:/*EOF*/
branch 0 taken 100%
branch 1 taken 0% (fallthrough)
48: 482:/*EOF*/
-: 483:/*EOF*/
48: 484:/*EOF*/
branch 0 taken 75% (fallthrough)
branch 1 taken 25%
-: 485:/*EOF*/
-: 486:/*EOF*/
72: 487:/*EOF*/
branch 0 taken 67%
branch 1 taken 33% (fallthrough)
72: 488:/*EOF*/
-: 489:/*EOF*/
72: 490:/*EOF*/
branch 0 taken 50% (fallthrough)
branch 1 taken 50%
branch 2 taken 100% (fallthrough)
branch 3 taken 0%
36: 491:/*EOF*/
36: 492:/*EOF*/
-: 493:/*EOF*/
-: 494:/*EOF*/
36: 495:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
36: 496:/*EOF*/
call 0 returned 100%
<<<<<< EOF
# path=/home/travis/build/nijel/enca/encnames.c.gcov
-: 0:Source:encnames.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/encnames.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/encnames.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
-: 62:/*EOF*/
-: 63:/*EOF*/
-: 64:/*EOF*/
-: 65:/*EOF*/
-: 66:/*EOF*/
-: 67:/*EOF*/
-: 68:/*EOF*/
-: 69:/*EOF*/
-: 70:/*EOF*/
-: 71:/*EOF*/
-: 72:/*EOF*/
-: 73:/*EOF*/
-: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
-: 80:/*EOF*/
-: 81:/*EOF*/
-: 82:/*EOF*/
-: 83:/*EOF*/
-: 84:/*EOF*/
-: 85:/*EOF*/
-: 86:/*EOF*/
-: 87:/*EOF*/
-: 88:/*EOF*/
-: 89:/*EOF*/
-: 90:/*EOF*/
-: 91:/*EOF*/
-: 92:/*EOF*/
-: 93:/*EOF*/
-: 94:/*EOF*/
-: 95:/*EOF*/
-: 96:/*EOF*/
-: 97:/*EOF*/
-: 98:/*EOF*/
-: 99:/*EOF*/
-: 100:/*EOF*/
-: 101:/*EOF*/
-: 102:/*EOF*/
-: 103:/*EOF*/
-: 104:/*EOF*/
-: 105:/*EOF*/
-: 106:/*EOF*/
-: 107:/*EOF*/
-: 108:/*EOF*/
-: 109:/*EOF*/
-: 110:/*EOF*/
-: 111:/*EOF*/
-: 112:/*EOF*/
-: 113:/*EOF*/
-: 114:/*EOF*/
-: 115:/*EOF*/
-: 116:/*EOF*/
-: 117:/*EOF*/
-: 118:/*EOF*/
-: 119:/*EOF*/
-: 120:/*EOF*/
-: 121:/*EOF*/
-: 122:/*EOF*/
-: 123:/*EOF*/
-: 124:/*EOF*/
-: 125:/*EOF*/
-: 126:/*EOF*/
-: 127:/*EOF*/
-: 128:/*EOF*/
-: 129:/*EOF*/
-: 130:/*EOF*/
-: 131:/*EOF*/
-: 132:/*EOF*/
-: 133:/*EOF*/
-: 134:/*EOF*/
-: 135:/*EOF*/
-: 136:/*EOF*/
function enca_charset_name called 668 returned 100% blocks executed 64%
668: 137:/*EOF*/
-: 138:/*EOF*/
-: 139:/*EOF*/
-: 140:/*EOF*/
-: 141:/*EOF*/
668: 142:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
branch 2 taken 100% (fallthrough)
branch 3 taken 0%
branch 4 taken 33% (fallthrough)
branch 5 taken 67%
branch 6 taken 100% (fallthrough)
branch 7 taken 0%
branch 8 taken 0% (fallthrough)
branch 9 taken 100%
-: 143:/*EOF*/
-: 144:/*EOF*/
-: 145:/*EOF*/
-: 146:/*EOF*/
2: 147:/*EOF*/
-: 148:/*EOF*/
-: 149:/*EOF*/
1: 150:/*EOF*/
-: 151:/*EOF*/
-: 152:/*EOF*/
-: 153:/*EOF*/
#####: 154:/*EOF*/
-: 155:/*EOF*/
-: 156:/*EOF*/
-: 157:/*EOF*/
-: 158:/*EOF*/
-: 159:/*EOF*/
665: 160:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 161:/*EOF*/
-: 162:/*EOF*/
665: 163:/*EOF*/
665: 164:/*EOF*/
branch 0 taken 0%
branch 1 taken 16%
branch 2 taken 81%
branch 3 taken 0%
branch 4 taken 3%
branch 5 taken 0%
branch 6 taken 0%
-: 165:/*EOF*/
#####: 166:/*EOF*/
-: 167:/*EOF*/
-: 168:/*EOF*/
106: 169:/*EOF*/
-: 170:/*EOF*/
-: 171:/*EOF*/
537: 172:/*EOF*/
-: 173:/*EOF*/
-: 174:/*EOF*/
#####: 175:/*EOF*/
branch 0 never executed
branch 1 never executed
-: 176:/*EOF*/
-: 177:/*EOF*/
22: 178:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 179:/*EOF*/
-: 180:/*EOF*/
#####: 181:/*EOF*/
branch 0 never executed
branch 1 never executed
-: 182:/*EOF*/
-: 183:/*EOF*/
-: 184:/*EOF*/
-: 185:/*EOF*/
-: 186:/*EOF*/
-: 187:/*EOF*/
-: 188:/*EOF*/
-: 189:/*EOF*/
-: 190:/*EOF*/
-: 191:/*EOF*/
-: 192:/*EOF*/
-: 193:/*EOF*/
-: 194:/*EOF*/
-: 195:/*EOF*/
-: 196:/*EOF*/
-: 197:/*EOF*/
-: 198:/*EOF*/
-: 199:/*EOF*/
-: 200:/*EOF*/
-: 201:/*EOF*/
-: 202:/*EOF*/
-: 203:/*EOF*/
-: 204:/*EOF*/
function enca_get_charset_aliases called 32 returned 100% blocks executed 100%
32: 205:/*EOF*/
-: 206:/*EOF*/
-: 207:/*EOF*/
-: 208:/*EOF*/
-: 209:/*EOF*/
-: 210:/*EOF*/
-: 211:/*EOF*/
-: 212:/*EOF*/
6752: 213:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
6720: 214:/*EOF*/
branch 0 taken 3% (fallthrough)
branch 1 taken 97%
-: 215:/*EOF*/
-: 216:/*EOF*/
32: 217:/*EOF*/
6752: 218:/*EOF*/
call 0 returned 100%
branch 1 taken 99%
branch 2 taken 1% (fallthrough)
6720: 219:/*EOF*/
branch 0 taken 3% (fallthrough)
branch 1 taken 97%
210: 220:/*EOF*/
-: 221:/*EOF*/
32: 222:/*EOF*/
-: 223:/*EOF*/
-: 224:/*EOF*/
-: 225:/*EOF*/
-: 226:/*EOF*/
-: 227:/*EOF*/
-: 228:/*EOF*/
-: 229:/*EOF*/
-: 230:/*EOF*/
-: 231:/*EOF*/
-: 232:/*EOF*/
-: 233:/*EOF*/
-: 234:/*EOF*/
-: 235:/*EOF*/
-: 236:/*EOF*/
function enca_get_surface_name called 204 returned 100% blocks executed 88%
204: 237:/*EOF*/
-: 238:/*EOF*/
-: 239:/*EOF*/
-: 240:/*EOF*/
-: 241:/*EOF*/
-: 242:/*EOF*/
204: 243:/*EOF*/
branch 0 taken 0%
branch 1 taken 25%
branch 2 taken 75%
branch 3 taken 0%
-: 244:/*EOF*/
-: 245:/*EOF*/
-: 246:/*EOF*/
-: 247:/*EOF*/
-: 248:/*EOF*/
#####: 249:/*EOF*/
call 0 never executed
#####: 250:/*EOF*/
-: 251:/*EOF*/
-: 252:/*EOF*/
-: 253:/*EOF*/
52: 254:/*EOF*/
572: 255:/*EOF*/
call 0 returned 100%
branch 1 taken 91%
branch 2 taken 9%
520: 256:/*EOF*/
branch 0 taken 6% (fallthrough)
branch 1 taken 94%
30: 257:/*EOF*/
call 0 returned 100%
-: 258:/*EOF*/
-: 259:/*EOF*/
-: 260:/*EOF*/
-: 261:/*EOF*/
-: 262:/*EOF*/
-: 263:/*EOF*/
152: 264:/*EOF*/
1672: 265:/*EOF*/
call 0 returned 100%
branch 1 taken 91%
branch 2 taken 9% (fallthrough)
1520: 266:/*EOF*/
branch 0 taken 10% (fallthrough)
branch 1 taken 90%
branch 2 taken 100% (fallthrough)
branch 3 taken 0%
159: 267:/*EOF*/
call 0 returned 100%
-: 268:/*EOF*/
-: 269:/*EOF*/
-: 270:/*EOF*/
-: 271:/*EOF*/
-: 272:/*EOF*/
-: 273:/*EOF*/
-: 274:/*EOF*/
-: 275:/*EOF*/
-: 276:/*EOF*/
204: 277:/*EOF*/
-: 278:/*EOF*/
-: 279:/*EOF*/
-: 280:/*EOF*/
-: 281:/*EOF*/
-: 282:/*EOF*/
-: 283:/*EOF*/
-: 284:/*EOF*/
-: 285:/*EOF*/
-: 286:/*EOF*/
-: 287:/*EOF*/
-: 288:/*EOF*/
function enca_charset_properties called 0 returned 0% blocks executed 0%
#####: 289:/*EOF*/
-: 290:/*EOF*/
#####: 291:/*EOF*/
branch 0 never executed
branch 1 never executed
-: 292:/*EOF*/
#####: 293:/*EOF*/
-: 294:/*EOF*/
-: 295:/*EOF*/
-: 296:/*EOF*/
-: 297:/*EOF*/
-: 298:/*EOF*/
-: 299:/*EOF*/
-: 300:/*EOF*/
-: 301:/*EOF*/
-: 302:/*EOF*/
-: 303:/*EOF*/
-: 304:/*EOF*/
-: 305:/*EOF*/
-: 306:/*EOF*/
-: 307:/*EOF*/
-: 308:/*EOF*/
-: 309:/*EOF*/
function enca_charset_natural_surface called 459 returned 100% blocks executed 100%
459: 310:/*EOF*/
-: 311:/*EOF*/
459: 312:/*EOF*/
branch 0 taken 99% (fallthrough)
branch 1 taken 1%
-: 313:/*EOF*/
-: 314:/*EOF*/
455: 315:/*EOF*/
-: 316:/*EOF*/
-: 317:/*EOF*/
-: 318:/*EOF*/
-: 319:/*EOF*/
-: 320:/*EOF*/
-: 321:/*EOF*/
-: 322:/*EOF*/
-: 323:/*EOF*/
-: 324:/*EOF*/
-: 325:/*EOF*/
-: 326:/*EOF*/
-: 327:/*EOF*/
-: 328:/*EOF*/
function enca_number_of_charsets called 3 returned 100% blocks executed 100%
3: 329:/*EOF*/
-: 330:/*EOF*/
3: 331:/*EOF*/
-: 332:/*EOF*/
-: 333:/*EOF*/
-: 334:/*EOF*/
-: 335:/*EOF*/
-: 336:/*EOF*/
-: 337:/*EOF*/
-: 338:/*EOF*/
-: 339:/*EOF*/
-: 340:/*EOF*/
-: 341:/*EOF*/
-: 342:/*EOF*/
-: 343:/*EOF*/
-: 344:/*EOF*/
-: 345:/*EOF*/
-: 346:/*EOF*/
-: 347:/*EOF*/
function enca_parse_encoding_name called 64 returned 100% blocks executed 56%
64: 348:/*EOF*/
-: 349:/*EOF*/
64: 350:/*EOF*/
-: 351:/*EOF*/
-: 352:/*EOF*/
64: 353:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 354:/*EOF*/
-: 355:/*EOF*/
64: 356:/*EOF*/
call 0 returned 100%
-: 357:/*EOF*/
64: 358:/*EOF*/
64: 359:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 360:/*EOF*/
64: 361:/*EOF*/
call 0 returned 100%
-: 362:/*EOF*/
128: 363:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
branch 2 never executed
branch 3 never executed
-: 364:/*EOF*/
#####: 365:/*EOF*/
-: 366:/*EOF*/
#####: 367:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 368:/*EOF*/
#####: 369:/*EOF*/
call 0 never executed
#####: 370:/*EOF*/
-: 371:/*EOF*/
64: 372:/*EOF*/
call 0 returned 100%
branch 1 taken 0% (fallthrough)
branch 2 taken 100%
#####: 373:/*EOF*/
64: 374:/*EOF*/
-: 375:/*EOF*/
64: 376:/*EOF*/
-: 377:/*EOF*/
-: 378:/*EOF*/
-: 379:/*EOF*/
-: 380:/*EOF*/
-: 381:/*EOF*/
-: 382:/*EOF*/
-: 383:/*EOF*/
-: 384:/*EOF*/
-: 385:/*EOF*/
-: 386:/*EOF*/
-: 387:/*EOF*/
-: 388:/*EOF*/
-: 389:/*EOF*/
function squeeze_compare called 36277 returned 100% blocks executed 91%
36277: 390:/*EOF*/
-: 391:/*EOF*/
-: 392:/*EOF*/
36277: 393:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
#####: 394:/*EOF*/
branch 0 never executed
branch 1 never executed
-: 395:/*EOF*/
-: 396:/*EOF*/
#####: 397:/*EOF*/
branch 0 never executed
branch 1 never executed
-: 398:/*EOF*/
-: 399:/*EOF*/
#####: 400:/*EOF*/
-: 401:/*EOF*/
-: 402:/*EOF*/
93102: 403:/*EOF*/
branch 0 taken 5% (fallthrough)
branch 1 taken 95%
branch 2 taken 5% (fallthrough)
branch 3 taken 95%
88855: 404:/*EOF*/
branch 0 taken 99% (fallthrough)
branch 1 taken 1%
branch 2 taken 1%
branch 3 taken 99% (fallthrough)
477: 405:/*EOF*/
94923: 406:/*EOF*/
branch 0 taken 99% (fallthrough)
branch 1 taken 1%
branch 2 taken 7%
branch 3 taken 93% (fallthrough)
6545: 407:/*EOF*/
-: 408:/*EOF*/
88378: 409:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
branch 2 taken 44% (fallthrough)
branch 3 taken 56%
branch 4 taken 36% (fallthrough)
branch 5 taken 64%
31553: 410:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
branch 2 taken 33% (fallthrough)
branch 3 taken 67%
-: 411:/*EOF*/
56825: 412:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
56825: 413:/*EOF*/
56825: 414:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
56825: 415:/*EOF*/
-: 416:/*EOF*/
-: 417:/*EOF*/
-: 418:/*EOF*/
-: 419:/*EOF*/
-: 420:/*EOF*/
-: 421:/*EOF*/
-: 422:/*EOF*/
-: 423:/*EOF*/
-: 424:/*EOF*/
-: 425:/*EOF*/
-: 426:/*EOF*/
-: 427:/*EOF*/
-: 428:/*EOF*/
-: 429:/*EOF*/
-: 430:/*EOF*/
-: 431:/*EOF*/
-: 432:/*EOF*/
-: 433:/*EOF*/
-: 434:/*EOF*/
-: 435:/*EOF*/
-: 436:/*EOF*/
-: 437:/*EOF*/
-: 438:/*EOF*/
-: 439:/*EOF*/
-: 440:/*EOF*/
-: 441:/*EOF*/
-: 442:/*EOF*/
-: 443:/*EOF*/
-: 444:/*EOF*/
-: 445:/*EOF*/
-: 446:/*EOF*/
-: 447:/*EOF*/
-: 448:/*EOF*/
-: 449:/*EOF*/
-: 450:/*EOF*/
-: 451:/*EOF*/
-: 452:/*EOF*/
-: 453:/*EOF*/
-: 454:/*EOF*/
-: 455:/*EOF*/
-: 456:/*EOF*/
-: 457:/*EOF*/
-: 458:/*EOF*/
-: 459:/*EOF*/
function alias_search called 4727 returned 100% blocks executed 94%
4727: 460:/*EOF*/
-: 461:/*EOF*/
-: 462:/*EOF*/
-: 463:/*EOF*/
4727: 464:/*EOF*/
4727: 465:/*EOF*/
-: 466:/*EOF*/
-: 467:/*EOF*/
4727: 468:/*EOF*/
call 0 returned 100%
4727: 469:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 470:/*EOF*/
4727: 471:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 472:/*EOF*/
-: 473:/*EOF*/
4727: 474:/*EOF*/
call 0 returned 100%
4727: 475:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 476:/*EOF*/
4727: 477:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 478:/*EOF*/
-: 479:/*EOF*/
26823: 480:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
26820: 481:/*EOF*/
-: 482:/*EOF*/
26820: 483:/*EOF*/
call 0 returned 100%
26820: 484:/*EOF*/
branch 0 taken 82% (fallthrough)
branch 1 taken 18%
-: 485:/*EOF*/
-: 486:/*EOF*/
22096: 487:/*EOF*/
branch 0 taken 48% (fallthrough)
branch 1 taken 52%
-: 488:/*EOF*/
-: 489:/*EOF*/
-: 490:/*EOF*/
-: 491:/*EOF*/
3: 492:/*EOF*/
call 0 returned 100%
branch 1 taken 0% (fallthrough)
branch 2 taken 100%
#####: 493:/*EOF*/
-: 494:/*EOF*/
-: 495:/*EOF*/
-: 496:/*EOF*/
-: 497:/*EOF*/
-: 498:/*EOF*/
-: 499:/*EOF*/
-: 500:/*EOF*/
-: 501:/*EOF*/
-: 502:/*EOF*/
-: 503:/*EOF*/
-: 504:/*EOF*/
-: 505:/*EOF*/
-: 506:/*EOF*/
function enca_name_to_charset called 4727 returned 100% blocks executed 100%
4727: 507:/*EOF*/
-: 508:/*EOF*/
-: 509:/*EOF*/
-: 510:/*EOF*/
4727: 511:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 512:/*EOF*/
-: 513:/*EOF*/
4727: 514:/*EOF*/
call 0 returned 100%
4727: 515:/*EOF*/
branch 0 taken 99% (fallthrough)
branch 1 taken 1%
-: 516:/*EOF*/
-: 517:/*EOF*/
-: 518:/*EOF*/
-: 519:/*EOF*/
-: 520:/*EOF*/
-: 521:/*EOF*/
-: 522:/*EOF*/
-: 523:/*EOF*/
-: 524:/*EOF*/
-: 525:/*EOF*/
-: 526:/*EOF*/
-: 527:/*EOF*/
function enca_name_to_surface called 0 returned 0% blocks executed 0%
#####: 528:/*EOF*/
-: 529:/*EOF*/
-: 530:/*EOF*/
-: 531:/*EOF*/
#####: 532:/*EOF*/
branch 0 never executed
branch 1 never executed
-: 533:/*EOF*/
-: 534:/*EOF*/
#####: 535:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 536:/*EOF*/
branch 0 never executed
branch 1 never executed
branch 2 never executed
branch 3 never executed
#####: 537:/*EOF*/
#####: 538:/*EOF*/
call 0 never executed
branch 1 never executed
branch 2 never executed
#####: 539:/*EOF*/
-: 540:/*EOF*/
-: 541:/*EOF*/
-: 542:/*EOF*/
-: 543:/*EOF*/
-: 544:/*EOF*/
-: 545:/*EOF*/
-: 546:/*EOF*/
-: 547:/*EOF*/
-: 548:/*EOF*/
-: 549:/*EOF*/
-: 550:/*EOF*/
-: 551:/*EOF*/
-: 552:/*EOF*/
-: 553:/*EOF*/
function check_surface_consistency called 64 returned 100% blocks executed 53%
64: 554:/*EOF*/
-: 555:/*EOF*/
192: 556:/*EOF*/
128: 557:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 558:/*EOF*/
128: 559:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
branch 2 taken 0% (fallthrough)
branch 3 taken 100%
-: 560:/*EOF*/
-: 561:/*EOF*/
-: 562:/*EOF*/
-: 563:/*EOF*/
-: 564:/*EOF*/
-: 565:/*EOF*/
-: 566:/*EOF*/
-: 567:/*EOF*/
-: 568:/*EOF*/
-: 569:/*EOF*/
-: 570:/*EOF*/
128: 571:/*EOF*/
-: 572:/*EOF*/
128: 573:/*EOF*/
branch 0 taken 0%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
branch 3 taken 100% (fallthrough)
#####: 574:/*EOF*/
branch 0 never executed
branch 1 never executed
branch 2 never executed
branch 3 never executed
#####: 575:/*EOF*/
-: 576:/*EOF*/
#####: 577:/*EOF*/
-: 578:/*EOF*/
-: 579:/*EOF*/
-: 580:/*EOF*/
-: 581:/*EOF*/
-: 582:/*EOF*/
-: 583:/*EOF*/
-: 584:/*EOF*/
-: 585:/*EOF*/
-: 586:/*EOF*/
-: 587:/*EOF*/
-: 588:/*EOF*/
-: 589:/*EOF*/
-: 590:/*EOF*/
-: 591:/*EOF*/
-: 592:/*EOF*/
-: 593:/*EOF*/
-: 594:/*EOF*/
-: 595:/*EOF*/
-: 596:/*EOF*/
-: 597:/*EOF*/
4727: 598:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 599:/*EOF*/
-: 600:/*EOF*/
28420: 601:/*EOF*/
branch 0 taken 86%
branch 1 taken 14% (fallthrough)
28420: 602:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 603:/*EOF*/
-: 604:/*EOF*/
28420: 605:/*EOF*/
branch 0 taken 98% (fallthrough)
branch 1 taken 2%
27974: 606:/*EOF*/
-: 607:/*EOF*/
-: 608:/*EOF*/
4727: 609:/*EOF*/
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lang_hr.c.gcov
-: 0:Source:lang_hr.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_hr.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_hr.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
-: 62:/*EOF*/
-: 63:/*EOF*/
-: 64:/*EOF*/
-: 65:/*EOF*/
function hook called 21 returned 100% blocks executed 100%
21: 66:/*EOF*/
-: 67:/*EOF*/
21: 68:/*EOF*/
-: 69:/*EOF*/
-: 70:/*EOF*/
-: 71:/*EOF*/
-: 72:/*EOF*/
-: 73:/*EOF*/
-: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
-: 80:/*EOF*/
function eol_hook called 0 returned 0% blocks executed 0%
#####: 81:/*EOF*/
-: 82:/*EOF*/
#####: 83:/*EOF*/
-: 84:/*EOF*/
-: 85:/*EOF*/
-: 86:/*EOF*/
-: 87:/*EOF*/
-: 88:/*EOF*/
-: 89:/*EOF*/
-: 90:/*EOF*/
-: 91:/*EOF*/
-: 92:/*EOF*/
-: 93:/*EOF*/
-: 94:/*EOF*/
-: 95:/*EOF*/
-: 96:/*EOF*/
-: 97:/*EOF*/
-: 98:/*EOF*/
-: 99:/*EOF*/
-: 100:/*EOF*/
-: 101:/*EOF*/
-: 102:/*EOF*/
#####: 103:/*EOF*/
call 0 never executed
-: 104:/*EOF*/
-: 105:/*EOF*/
-: 106:/*EOF*/
-: 107:/*EOF*/
-: 108:/*EOF*/
-: 109:/*EOF*/
-: 110:/*EOF*/
-: 111:/*EOF*/
-: 112:/*EOF*/
-: 113:/*EOF*/
-: 114:/*EOF*/
-: 115:/*EOF*/
-: 116:/*EOF*/
-: 117:/*EOF*/
-: 118:/*EOF*/
-: 119:/*EOF*/
-: 120:/*EOF*/
-: 121:/*EOF*/
-: 122:/*EOF*/
-: 123:/*EOF*/
-: 124:/*EOF*/
-: 125:/*EOF*/
-: 126:/*EOF*/
-: 127:/*EOF*/
-: 128:/*EOF*/
21: 129:/*EOF*/
call 0 returned 100%
<<<<<< EOF
# path=/home/travis/build/nijel/enca/filebuf.c.gcov
-: 0:Source:filebuf.c
-: 0:Graph:/home/travis/build/nijel/enca/src/enca-filebuf.gcno
-: 0:Data:/home/travis/build/nijel/enca/src/enca-filebuf.gcda
-: 0:Runs:275
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
-: 62:/*EOF*/
-: 63:/*EOF*/
-: 64:/*EOF*/
-: 65:/*EOF*/
-: 66:/*EOF*/
-: 67:/*EOF*/
function buffer_new called 477 returned 100% blocks executed 100%
477: 68:/*EOF*/
-: 69:/*EOF*/
-: 70:/*EOF*/
-: 71:/*EOF*/
477: 72:/*EOF*/
call 0 returned 100%
477: 73:/*EOF*/
branch 0 taken 52% (fallthrough)
branch 1 taken 48%
477: 74:/*EOF*/
call 0 returned 100%
477: 75:/*EOF*/
-: 76:/*EOF*/
477: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
-: 80:/*EOF*/
-: 81:/*EOF*/
-: 82:/*EOF*/
function buffer_free called 471 returned 100% blocks executed 100%
471: 83:/*EOF*/
-: 84:/*EOF*/
471: 85:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 86:/*EOF*/
-: 87:/*EOF*/
471: 88:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
471: 89:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 90:/*EOF*/
-: 91:/*EOF*/
-: 92:/*EOF*/
-: 93:/*EOF*/
-: 94:/*EOF*/
-: 95:/*EOF*/
-: 96:/*EOF*/
-: 97:/*EOF*/
-: 98:/*EOF*/
function expand_abbreviation called 503 returned 100% blocks executed 73%
503: 99:/*EOF*/
-: 100:/*EOF*/
-: 101:/*EOF*/
-: 102:/*EOF*/
-: 103:/*EOF*/
-: 104:/*EOF*/
-: 105:/*EOF*/
-: 106:/*EOF*/
503: 107:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
29: 108:/*EOF*/
branch 0 taken 88%
branch 1 taken 12%
29: 109:/*EOF*/
call 0 returned 100%
-: 110:/*EOF*/
-: 111:/*EOF*/
-: 112:/*EOF*/
-: 113:/*EOF*/
-: 114:/*EOF*/
499: 115:/*EOF*/
499: 116:/*EOF*/
499: 117:/*EOF*/
2554: 118:/*EOF*/
branch 0 taken 80%
branch 1 taken 20% (fallthrough)
2055: 119:/*EOF*/
branch 0 taken 24% (fallthrough)
branch 1 taken 76%
495: 120:/*EOF*/
495: 121:/*EOF*/
-: 122:/*EOF*/
-: 123:/*EOF*/
-: 124:/*EOF*/
-: 125:/*EOF*/
499: 126:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
8: 127:/*EOF*/
call 0 returned 100%
-: 128:/*EOF*/
-: 129:/*EOF*/
-: 130:/*EOF*/
4: 131:/*EOF*/
-: 132:/*EOF*/
-: 133:/*EOF*/
-: 134:/*EOF*/
495: 135:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 136:/*EOF*/
-: 137:/*EOF*/
-: 138:/*EOF*/
#####: 139:/*EOF*/
call 0 never executed
branch 1 never executed
branch 2 never executed
#####: 140:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 141:/*EOF*/
-: 142:/*EOF*/
-: 143:/*EOF*/
-: 144:/*EOF*/
-: 145:/*EOF*/
-: 146:/*EOF*/
495: 147:/*EOF*/
-: 148:/*EOF*/
-: 149:/*EOF*/
-: 150:/*EOF*/
-: 151:/*EOF*/
-: 152:/*EOF*/
function ffname_r called 289 returned 100% blocks executed 100%
289: 153:/*EOF*/
-: 154:/*EOF*/
289: 155:/*EOF*/
branch 0 never executed
branch 1 never executed
branch 2 never executed
branch 3 never executed
branch 4 never executed
branch 5 never executed
branch 6 taken 1% (fallthrough)
branch 7 taken 99%
-: 156:/*EOF*/
-: 157:/*EOF*/
-: 158:/*EOF*/
-: 159:/*EOF*/
function ffname_w called 1 returned 100% blocks executed 67%
1: 160:/*EOF*/
-: 161:/*EOF*/
1: 162:/*EOF*/
branch 0 never executed
branch 1 never executed
branch 2 taken 0% (fallthrough)
branch 3 taken 100%
-: 163:/*EOF*/
-: 164:/*EOF*/
-: 165:/*EOF*/
-: 166:/*EOF*/
function file_read called 694 returned 100% blocks executed 100%
694: 167:/*EOF*/
-: 168:/*EOF*/
694: 169:/*EOF*/
call 0 returned 100%
-: 170:/*EOF*/
-: 171:/*EOF*/
-: 172:/*EOF*/
-: 173:/*EOF*/
-: 174:/*EOF*/
-: 175:/*EOF*/
-: 176:/*EOF*/
-: 177:/*EOF*/
function file_read_limited called 19369 returned 100% blocks executed 48%
19369: 178:/*EOF*/
-: 179:/*EOF*/
-: 180:/*EOF*/
-: 181:/*EOF*/
19369: 182:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
19369: 183:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
19369: 184:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 185:/*EOF*/
19369: 186:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 187:/*EOF*/
-: 188:/*EOF*/
19369: 189:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 190:/*EOF*/
19369: 191:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
225: 192:/*EOF*/
-: 193:/*EOF*/
19144: 194:/*EOF*/
-: 195:/*EOF*/
38738: 196:/*EOF*/
-: 197:/*EOF*/
19369: 198:/*EOF*/
-: 199:/*EOF*/
-: 200:/*EOF*/
-: 201:/*EOF*/
19369: 202:/*EOF*/
branch 0 taken 13% (fallthrough)
branch 1 taken 87%
call 2 returned 100%
branch 3 taken 0% (fallthrough)
branch 4 taken 100%
#####: 203:/*EOF*/
call 0 never executed
-: 204:/*EOF*/
#####: 205:/*EOF*/
#####: 206:/*EOF*/
call 0 never executed
#####: 207:/*EOF*/
call 0 never executed
#####: 208:/*EOF*/
-: 209:/*EOF*/
-: 210:/*EOF*/
19369: 211:/*EOF*/
-: 212:/*EOF*/
-: 213:/*EOF*/
-: 214:/*EOF*/
-: 215:/*EOF*/
-: 216:/*EOF*/
-: 217:/*EOF*/
-: 218:/*EOF*/
-: 219:/*EOF*/
-: 220:/*EOF*/
function file_getline called 18675 returned 100% blocks executed 71%
18675: 221:/*EOF*/
-: 222:/*EOF*/
-: 223:/*EOF*/
-: 224:/*EOF*/
-: 225:/*EOF*/
-: 226:/*EOF*/
-: 227:/*EOF*/
-: 228:/*EOF*/
-: 229:/*EOF*/
18675: 230:/*EOF*/
-: 231:/*EOF*/
18675: 232:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
18675: 233:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 234:/*EOF*/
-: 235:/*EOF*/
18675: 236:/*EOF*/
18675: 237:/*EOF*/
-: 238:/*EOF*/
-: 239:/*EOF*/
-: 240:/*EOF*/
-: 241:/*EOF*/
18675: 242:/*EOF*/
18675: 243:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 244:/*EOF*/
-: 245:/*EOF*/
18675: 246:/*EOF*/
call 0 returned 100%
18675: 247:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
branch 2 taken 99% (fallthrough)
branch 3 taken 1%
-: 248:/*EOF*/
-: 249:/*EOF*/
18450: 250:/*EOF*/
18450: 251:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
branch 2 never executed
branch 3 never executed
-: 252:/*EOF*/
-: 253:/*EOF*/
-: 254:/*EOF*/
-: 255:/*EOF*/
-: 256:/*EOF*/
-: 257:/*EOF*/
18450: 258:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
18450: 259:/*EOF*/
18450: 260:/*EOF*/
call 0 returned 100%
-: 261:/*EOF*/
-: 262:/*EOF*/
-: 263:/*EOF*/
#####: 264:/*EOF*/
-: 265:/*EOF*/
18450: 266:/*EOF*/
-: 267:/*EOF*/
-: 268:/*EOF*/
-: 269:/*EOF*/
-: 270:/*EOF*/
-: 271:/*EOF*/
function file_write called 172 returned 100% blocks executed 53%
172: 272:/*EOF*/
-: 273:/*EOF*/
-: 274:/*EOF*/
-: 275:/*EOF*/
-: 276:/*EOF*/
172: 277:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
172: 278:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 279:/*EOF*/
172: 280:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 281:/*EOF*/
-: 282:/*EOF*/
172: 283:/*EOF*/
branch 0 taken 42% (fallthrough)
branch 1 taken 58%
73: 284:/*EOF*/
-: 285:/*EOF*/
99: 286:/*EOF*/
-: 287:/*EOF*/
172: 288:/*EOF*/
call 0 returned 100%
-: 289:/*EOF*/
172: 290:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 291:/*EOF*/
call 0 never executed
-: 292:/*EOF*/
#####: 293:/*EOF*/
#####: 294:/*EOF*/
call 0 never executed
#####: 295:/*EOF*/
call 0 never executed
#####: 296:/*EOF*/
-: 297:/*EOF*/
172: 298:/*EOF*/
-: 299:/*EOF*/
172: 300:/*EOF*/
-: 301:/*EOF*/
-: 302:/*EOF*/
-: 303:/*EOF*/
-: 304:/*EOF*/
-: 305:/*EOF*/
-: 306:/*EOF*/
-: 307:/*EOF*/
-: 308:/*EOF*/
-: 309:/*EOF*/
function file_temporary called 14 returned 100% blocks executed 63%
14: 310:/*EOF*/
-: 311:/*EOF*/
-: 312:/*EOF*/
-: 313:/*EOF*/
-: 314:/*EOF*/
14: 315:/*EOF*/
-: 316:/*EOF*/
-: 317:/*EOF*/
28: 318:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 319:/*EOF*/
14: 320:/*EOF*/
call 0 returned 100%
branch 1 taken 0% (fallthrough)
branch 2 taken 100%
-: 321:/*EOF*/
#####: 322:/*EOF*/
-: 323:/*EOF*/
-: 324:/*EOF*/
-: 325:/*EOF*/
#####: 326:/*EOF*/
#####: 327:/*EOF*/
-: 328:/*EOF*/
-: 329:/*EOF*/
14: 330:/*EOF*/
call 0 returned 100%
-: 331:/*EOF*/
14: 332:/*EOF*/
-: 333:/*EOF*/
-: 334:/*EOF*/
14: 335:/*EOF*/
call 0 returned 100%
branch 1 taken 0% (fallthrough)
branch 2 taken 100%
#####: 336:/*EOF*/
call 0 never executed
-: 337:/*EOF*/
-: 338:/*EOF*/
#####: 339:/*EOF*/
call 0 never executed
#####: 340:/*EOF*/
call 0 never executed
-: 341:/*EOF*/
-: 342:/*EOF*/
14: 343:/*EOF*/
branch 0 taken 93% (fallthrough)
branch 1 taken 7%
13: 344:/*EOF*/
call 0 returned 100%
-: 345:/*EOF*/
-: 346:/*EOF*/
-: 347:/*EOF*/
-: 348:/*EOF*/
-: 349:/*EOF*/
-: 350:/*EOF*/
-: 351:/*EOF*/
function file_seek called 18682 returned 100% blocks executed 44%
18682: 352:/*EOF*/
-: 353:/*EOF*/
-: 354:/*EOF*/
-: 355:/*EOF*/
18682: 356:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 357:/*EOF*/
18682: 358:/*EOF*/
call 0 returned 100%
18682: 359:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 360:/*EOF*/
call 0 never executed
-: 361:/*EOF*/
-: 362:/*EOF*/
#####: 363:/*EOF*/
call 0 never executed
#####: 364:/*EOF*/
call 0 never executed
-: 365:/*EOF*/
-: 366:/*EOF*/
18682: 367:/*EOF*/
-: 368:/*EOF*/
-: 369:/*EOF*/
-: 370:/*EOF*/
-: 371:/*EOF*/
-: 372:/*EOF*/
-: 373:/*EOF*/
function file_truncate called 12 returned 100% blocks executed 47%
12: 374:/*EOF*/
-: 375:/*EOF*/
-: 376:/*EOF*/
-: 377:/*EOF*/
12: 378:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
12: 379:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 380:/*EOF*/
12: 381:/*EOF*/
call 0 returned 100%
12: 382:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 383:/*EOF*/
12: 384:/*EOF*/
call 0 returned 100%
branch 1 taken 0% (fallthrough)
branch 2 taken 100%
-: 385:/*EOF*/
-: 386:/*EOF*/
#####: 387:/*EOF*/
call 0 never executed
-: 388:/*EOF*/
-: 389:/*EOF*/
-: 390:/*EOF*/
#####: 391:/*EOF*/
call 0 never executed
#####: 392:/*EOF*/
call 0 never executed
#####: 393:/*EOF*/
-: 394:/*EOF*/
-: 395:/*EOF*/
-: 396:/*EOF*/
-: 397:/*EOF*/
-: 398:/*EOF*/
-: 399:/*EOF*/
function file_unlink called 13 returned 100% blocks executed 50%
13: 400:/*EOF*/
-: 401:/*EOF*/
-: 402:/*EOF*/
-: 403:/*EOF*/
13: 404:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 405:/*EOF*/
13: 406:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 407:/*EOF*/
13: 408:/*EOF*/
call 0 returned 100%
13: 409:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 410:/*EOF*/
call 0 never executed
-: 411:/*EOF*/
-: 412:/*EOF*/
#####: 413:/*EOF*/
call 0 never executed
-: 414:/*EOF*/
-: 415:/*EOF*/
13: 416:/*EOF*/
-: 417:/*EOF*/
-: 418:/*EOF*/
-: 419:/*EOF*/
-: 420:/*EOF*/
-: 421:/*EOF*/
-: 422:/*EOF*/
-: 423:/*EOF*/
-: 424:/*EOF*/
function file_open called 713 returned 100% blocks executed 70%
713: 425:/*EOF*/
-: 426:/*EOF*/
713: 427:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
713: 428:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
713: 429:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
713: 430:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 431:/*EOF*/
713: 432:/*EOF*/
branch 0 taken 99% (fallthrough)
branch 1 taken 1%
711: 433:/*EOF*/
-: 434:/*EOF*/
-: 435:/*EOF*/
713: 436:/*EOF*/
branch 0 taken 21% (fallthrough)
branch 1 taken 79%
151: 437:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 438:/*EOF*/
151: 439:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
151: 440:/*EOF*/
151: 441:/*EOF*/
151: 442:/*EOF*/
-: 443:/*EOF*/
#####: 444:/*EOF*/
call 0 never executed
-: 445:/*EOF*/
-: 446:/*EOF*/
#####: 447:/*EOF*/
-: 448:/*EOF*/
-: 449:/*EOF*/
-: 450:/*EOF*/
562: 451:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 452:/*EOF*/
562: 453:/*EOF*/
call 0 returned 100%
562: 454:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
4: 455:/*EOF*/
call 0 returned 100%
call 1 returned 100%
-: 456:/*EOF*/
-: 457:/*EOF*/
-: 458:/*EOF*/
2: 459:/*EOF*/
call 0 returned 100%
2: 460:/*EOF*/
-: 461:/*EOF*/
-: 462:/*EOF*/
-: 463:/*EOF*/
560: 464:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
560: 465:/*EOF*/
call 0 returned 100%
560: 466:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 467:/*EOF*/
-: 468:/*EOF*/
560: 469:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 470:/*EOF*/
-: 471:/*EOF*/
#####: 472:/*EOF*/
-: 473:/*EOF*/
-: 474:/*EOF*/
-: 475:/*EOF*/
-: 476:/*EOF*/
-: 477:/*EOF*/
-: 478:/*EOF*/
-: 479:/*EOF*/
-: 480:/*EOF*/
-: 481:/*EOF*/
function file_close called 702 returned 100% blocks executed 50%
702: 482:/*EOF*/
-: 483:/*EOF*/
702: 484:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 485:/*EOF*/
-: 486:/*EOF*/
-: 487:/*EOF*/
-: 488:/*EOF*/
702: 489:/*EOF*/
branch 0 taken 18% (fallthrough)
branch 1 taken 82%
129: 490:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 491:/*EOF*/
-: 492:/*EOF*/
-: 493:/*EOF*/
-: 494:/*EOF*/
573: 495:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 496:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 497:/*EOF*/
-: 498:/*EOF*/
-: 499:/*EOF*/
-: 500:/*EOF*/
-: 501:/*EOF*/
573: 502:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 503:/*EOF*/
573: 504:/*EOF*/
call 0 returned 100%
branch 1 taken 0% (fallthrough)
branch 2 taken 100%
#####: 505:/*EOF*/
call 0 never executed
-: 506:/*EOF*/
-: 507:/*EOF*/
#####: 508:/*EOF*/
call 0 never executed
#####: 509:/*EOF*/
call 0 never executed
-: 510:/*EOF*/
573: 511:/*EOF*/
-: 512:/*EOF*/
573: 513:/*EOF*/
-: 514:/*EOF*/
-: 515:/*EOF*/
-: 516:/*EOF*/
-: 517:/*EOF*/
-: 518:/*EOF*/
function file_size called 560 returned 100% blocks executed 50%
560: 519:/*EOF*/
-: 520:/*EOF*/
-: 521:/*EOF*/
-: 522:/*EOF*/
-: 523:/*EOF*/
560: 524:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 525:/*EOF*/
560: 526:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 527:/*EOF*/
-: 528:/*EOF*/
560: 529:/*EOF*/
call 0 returned 100%
560: 530:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 531:/*EOF*/
560: 532:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 533:/*EOF*/
call 0 never executed
call 1 never executed
-: 534:/*EOF*/
#####: 535:/*EOF*/
#####: 536:/*EOF*/
call 0 never executed
#####: 537:/*EOF*/
-: 538:/*EOF*/
-: 539:/*EOF*/
560: 540:/*EOF*/
-: 541:/*EOF*/
-: 542:/*EOF*/
-: 543:/*EOF*/
-: 544:/*EOF*/
-: 545:/*EOF*/
function file_fileno.isra.0 called 572 returned 100% blocks executed 44%
572: 546:/*EOF*/
-: 547:/*EOF*/
-: 548:/*EOF*/
-: 549:/*EOF*/
572: 550:/*EOF*/
call 0 returned 100%
572: 551:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 552:/*EOF*/
-: 553:/*EOF*/
#####: 554:/*EOF*/
call 0 never executed
-: 555:/*EOF*/
#####: 556:/*EOF*/
#####: 557:/*EOF*/
call 0 never executed
#####: 558:/*EOF*/
-: 559:/*EOF*/
-: 560:/*EOF*/
-: 561:/*EOF*/
-: 562:/*EOF*/
-: 563:/*EOF*/
-: 564:/*EOF*/
-: 565:/*EOF*/
function file_new called 725 returned 100% blocks executed 100%
725: 566:/*EOF*/
-: 567:/*EOF*/
-: 568:/*EOF*/
725: 569:/*EOF*/
call 0 returned 100%
725: 570:/*EOF*/
call 0 returned 100%
725: 571:/*EOF*/
725: 572:/*EOF*/
725: 573:/*EOF*/
-: 574:/*EOF*/
725: 575:/*EOF*/
-: 576:/*EOF*/
-: 577:/*EOF*/
-: 578:/*EOF*/
-: 579:/*EOF*/
-: 580:/*EOF*/
-: 581:/*EOF*/
function file_free called 724 returned 100% blocks executed 100%
724: 582:/*EOF*/
-: 583:/*EOF*/
724: 584:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 585:/*EOF*/
-: 586:/*EOF*/
724: 587:/*EOF*/
branch 0 taken 8% (fallthrough)
branch 1 taken 92%
55: 588:/*EOF*/
call 0 returned 100%
724: 589:/*EOF*/
branch 0 taken 79% (fallthrough)
branch 1 taken 21%
724: 590:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
<<<<<< EOF
# path=/home/travis/build/nijel/enca/convert_extern.c.gcov
-: 0:Source:convert_extern.c
-: 0:Graph:/home/travis/build/nijel/enca/src/enca-convert_extern.gcno
-: 0:Data:/home/travis/build/nijel/enca/src/enca-convert_extern.gcda
-: 0:Runs:275
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
function convert_external called 4 returned 75% blocks executed 65%
4: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
-: 62:/*EOF*/
-: 63:/*EOF*/
-: 64:/*EOF*/
-: 65:/*EOF*/
-: 66:/*EOF*/
4: 67:/*EOF*/
-: 68:/*EOF*/
-: 69:/*EOF*/
4: 70:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 71:/*EOF*/
-: 72:/*EOF*/
-: 73:/*EOF*/
-: 74:/*EOF*/
4: 75:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 76:/*EOF*/
call 0 never executed
#####: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
4: 80:/*EOF*/
branch 0 taken 25% (fallthrough)
branch 1 taken 75%
-: 81:/*EOF*/
1: 82:/*EOF*/
call 0 returned 100%
1: 83:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 84:/*EOF*/
-: 85:/*EOF*/
1: 86:/*EOF*/
call 0 returned 100%
branch 1 taken 0% (fallthrough)
branch 2 taken 100%
#####: 87:/*EOF*/
call 0 never executed
#####: 88:/*EOF*/
call 0 never executed
-: 89:/*EOF*/
-: 90:/*EOF*/
-: 91:/*EOF*/
-: 92:/*EOF*/
-: 93:/*EOF*/
4: 94:/*EOF*/
call 0 returned 100%
call 1 returned 100%
call 2 returned 100%
-: 95:/*EOF*/
-: 96:/*EOF*/
-: 97:/*EOF*/
-: 98:/*EOF*/
4: 99:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
4: 100:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 101:/*EOF*/
4: 102:/*EOF*/
call 0 returned 100%
call 1 returned 100%
call 2 returned 100%
-: 103:/*EOF*/
-: 104:/*EOF*/
-: 105:/*EOF*/
-: 106:/*EOF*/
-: 107:/*EOF*/
-: 108:/*EOF*/
#####: 109:/*EOF*/
call 0 never executed
-: 110:/*EOF*/
-: 111:/*EOF*/
4: 112:/*EOF*/
4: 113:/*EOF*/
branch 0 taken 0%
branch 1 taken 100%
-: 114:/*EOF*/
#####: 115:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 116:/*EOF*/
-: 117:/*EOF*/
-: 118:/*EOF*/
-: 119:/*EOF*/
#####: 120:/*EOF*/
-: 121:/*EOF*/
-: 122:/*EOF*/
#####: 123:/*EOF*/
call 0 never executed
-: 124:/*EOF*/
-: 125:/*EOF*/
-: 126:/*EOF*/
4: 127:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 128:/*EOF*/
call 0 never executed
-: 129:/*EOF*/
#####: 130:/*EOF*/
call 0 never executed
#####: 131:/*EOF*/
call 0 never executed
-: 132:/*EOF*/
-: 133:/*EOF*/
4: 134:/*EOF*/
call 0 returned 100%
branch 1 taken 0% (fallthrough)
branch 2 taken 100%
-: 135:/*EOF*/
#####: 136:/*EOF*/
call 0 never executed
-: 137:/*EOF*/
#####: 138:/*EOF*/
call 0 never executed
#####: 139:/*EOF*/
call 0 never executed
-: 140:/*EOF*/
4: 141:/*EOF*/
branch 0 taken 25% (fallthrough)
branch 1 taken 75%
-: 142:/*EOF*/
2: 143:/*EOF*/
-: 144:/*EOF*/
1: 145:/*EOF*/
call 0 returned 0%
-: 146:/*EOF*/
-: 147:/*EOF*/
3: 148:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
3: 149:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 150:/*EOF*/
3: 151:/*EOF*/
branch 0 taken 33% (fallthrough)
branch 1 taken 67%
1: 152:/*EOF*/
call 0 returned 100%
1: 153:/*EOF*/
call 0 returned 100%
-: 154:/*EOF*/
-: 155:/*EOF*/
-: 156:/*EOF*/
3: 157:/*EOF*/
branch 0 taken 33% (fallthrough)
branch 1 taken 67%
-: 158:/*EOF*/
2: 159:/*EOF*/
-: 160:/*EOF*/
1: 161:/*EOF*/
1: 162:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 163:/*EOF*/
-: 164:/*EOF*/
1: 165:/*EOF*/
-: 166:/*EOF*/
-: 167:/*EOF*/
-: 168:/*EOF*/
-: 169:/*EOF*/
-: 170:/*EOF*/
-: 171:/*EOF*/
-: 172:/*EOF*/
function set_external_converter called 282 returned 100% blocks executed 82%
282: 173:/*EOF*/
-: 174:/*EOF*/
282: 175:/*EOF*/
branch 0 taken 2% (fallthrough)
branch 1 taken 98%
282: 176:/*EOF*/
branch 0 taken 99% (fallthrough)
branch 1 taken 1%
278: 177:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
branch 2 never executed
branch 3 never executed
#####: 178:/*EOF*/
#####: 179:/*EOF*/
-: 180:/*EOF*/
-: 181:/*EOF*/
-: 182:/*EOF*/
-: 183:/*EOF*/
-: 184:/*EOF*/
278: 185:/*EOF*/
call 0 returned 100%
-: 186:/*EOF*/
-: 187:/*EOF*/
4: 188:/*EOF*/
call 0 returned 100%
282: 189:/*EOF*/
-: 190:/*EOF*/
-: 191:/*EOF*/
-: 192:/*EOF*/
function check_external_converter called 6 returned 100% blocks executed 100%
6: 193:/*EOF*/
-: 194:/*EOF*/
-: 195:/*EOF*/
-: 196:/*EOF*/
-: 197:/*EOF*/
-: 198:/*EOF*/
-: 199:/*EOF*/
6: 200:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
6: 201:/*EOF*/
call 0 returned 100%
branch 1 taken 33% (fallthrough)
branch 2 taken 67%
4: 202:/*EOF*/
call 0 returned 100%
-: 203:/*EOF*/
-: 204:/*EOF*/
-: 205:/*EOF*/
-: 206:/*EOF*/
-: 207:/*EOF*/
-: 208:/*EOF*/
2: 209:/*EOF*/
<<<<<< EOF
# path=/home/travis/build/nijel/enca/#usr#include#x86_64-linux-gnu#sys#stat.h.gcov
-: 0:Source:/usr/include/x86_64-linux-gnu/sys/stat.h
-: 0:Graph:/home/travis/build/nijel/enca/src/enca-filebuf.gcno
-: 0:Data:/home/travis/build/nijel/enca/src/enca-filebuf.gcda
-: 0:Runs:275
-: 0:Programs:1
-: 1:/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
-: 2: This file is part of the GNU C Library.
-: 3:
-: 4: The GNU C Library is free software; you can redistribute it and/or
-: 5: modify it under the terms of the GNU Lesser General Public
-: 6: License as published by the Free Software Foundation; either
-: 7: version 2.1 of the License, or (at your option) any later version.
-: 8:
-: 9: The GNU C Library is distributed in the hope that it will be useful,
-: 10: but WITHOUT ANY WARRANTY; without even the implied warranty of
-: 11: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-: 12: Lesser General Public License for more details.
-: 13:
-: 14: You should have received a copy of the GNU Lesser General Public
-: 15: License along with the GNU C Library; if not, see
-: 16: . */
-: 17:
-: 18:/*
-: 19: * POSIX Standard: 5.6 File Characteristics
-: 20: */
-: 21:
-: 22:#ifndef _SYS_STAT_H
-: 23:#define _SYS_STAT_H 1
-: 24:
-: 25:#include
-: 26:
-: 27:#include /* For __mode_t and __dev_t. */
-: 28:
-: 29:#if defined __USE_XOPEN || defined __USE_XOPEN2K || defined __USE_ATFILE
-: 30:# if defined __USE_XOPEN || defined __USE_XOPEN2K
-: 31:# define __need_time_t
-: 32:# endif
-: 33:# ifdef __USE_ATFILE
-: 34:# define __need_timespec
-: 35:# endif
-: 36:# include /* For time_t resp. timespec. */
-: 37:#endif
-: 38:
-: 39:#if defined __USE_XOPEN || defined __USE_XOPEN2K
-: 40:/* The Single Unix specification says that some more types are
-: 41: available here. */
-: 42:# ifndef __dev_t_defined
-: 43:typedef __dev_t dev_t;
-: 44:# define __dev_t_defined
-: 45:# endif
-: 46:
-: 47:# ifndef __gid_t_defined
-: 48:typedef __gid_t gid_t;
-: 49:# define __gid_t_defined
-: 50:# endif
-: 51:
-: 52:# ifndef __ino_t_defined
-: 53:# ifndef __USE_FILE_OFFSET64
-: 54:typedef __ino_t ino_t;
-: 55:# else
-: 56:typedef __ino64_t ino_t;
-: 57:# endif
-: 58:# define __ino_t_defined
-: 59:# endif
-: 60:
-: 61:# ifndef __mode_t_defined
-: 62:typedef __mode_t mode_t;
-: 63:# define __mode_t_defined
-: 64:# endif
-: 65:
-: 66:# ifndef __nlink_t_defined
-: 67:typedef __nlink_t nlink_t;
-: 68:# define __nlink_t_defined
-: 69:# endif
-: 70:
-: 71:# ifndef __off_t_defined
-: 72:# ifndef __USE_FILE_OFFSET64
-: 73:typedef __off_t off_t;
-: 74:# else
-: 75:typedef __off64_t off_t;
-: 76:# endif
-: 77:# define __off_t_defined
-: 78:# endif
-: 79:
-: 80:# ifndef __uid_t_defined
-: 81:typedef __uid_t uid_t;
-: 82:# define __uid_t_defined
-: 83:# endif
-: 84:#endif /* X/Open */
-: 85:
-: 86:#ifdef __USE_UNIX98
-: 87:# ifndef __blkcnt_t_defined
-: 88:# ifndef __USE_FILE_OFFSET64
-: 89:typedef __blkcnt_t blkcnt_t;
-: 90:# else
-: 91:typedef __blkcnt64_t blkcnt_t;
-: 92:# endif
-: 93:# define __blkcnt_t_defined
-: 94:# endif
-: 95:
-: 96:# ifndef __blksize_t_defined
-: 97:typedef __blksize_t blksize_t;
-: 98:# define __blksize_t_defined
-: 99:# endif
-: 100:#endif /* Unix98 */
-: 101:
-: 102:__BEGIN_DECLS
-: 103:
-: 104:#include
-: 105:
-: 106:#if defined __USE_MISC || defined __USE_XOPEN
-: 107:# define S_IFMT __S_IFMT
-: 108:# define S_IFDIR __S_IFDIR
-: 109:# define S_IFCHR __S_IFCHR
-: 110:# define S_IFBLK __S_IFBLK
-: 111:# define S_IFREG __S_IFREG
-: 112:# ifdef __S_IFIFO
-: 113:# define S_IFIFO __S_IFIFO
-: 114:# endif
-: 115:# ifdef __S_IFLNK
-: 116:# define S_IFLNK __S_IFLNK
-: 117:# endif
-: 118:# if (defined __USE_MISC || defined __USE_UNIX98) \
-: 119: && defined __S_IFSOCK
-: 120:# define S_IFSOCK __S_IFSOCK
-: 121:# endif
-: 122:#endif
-: 123:
-: 124:/* Test macros for file types. */
-: 125:
-: 126:#define __S_ISTYPE(mode, mask) (((mode) & __S_IFMT) == (mask))
-: 127:
-: 128:#define S_ISDIR(mode) __S_ISTYPE((mode), __S_IFDIR)
-: 129:#define S_ISCHR(mode) __S_ISTYPE((mode), __S_IFCHR)
-: 130:#define S_ISBLK(mode) __S_ISTYPE((mode), __S_IFBLK)
-: 131:#define S_ISREG(mode) __S_ISTYPE((mode), __S_IFREG)
-: 132:#ifdef __S_IFIFO
-: 133:# define S_ISFIFO(mode) __S_ISTYPE((mode), __S_IFIFO)
-: 134:#endif
-: 135:#ifdef __S_IFLNK
-: 136:# define S_ISLNK(mode) __S_ISTYPE((mode), __S_IFLNK)
-: 137:#endif
-: 138:
-: 139:#if defined __USE_MISC && !defined __S_IFLNK
-: 140:# define S_ISLNK(mode) 0
-: 141:#endif
-: 142:
-: 143:#if (defined __USE_UNIX98 || defined __USE_XOPEN2K) \
-: 144: && defined __S_IFSOCK
-: 145:# define S_ISSOCK(mode) __S_ISTYPE((mode), __S_IFSOCK)
-: 146:#elif defined __USE_XOPEN2K
-: 147:# define S_ISSOCK(mode) 0
-: 148:#endif
-: 149:
-: 150:/* These are from POSIX.1b. If the objects are not implemented using separate
-: 151: distinct file types, the macros always will evaluate to zero. Unlike the
-: 152: other S_* macros the following three take a pointer to a `struct stat'
-: 153: object as the argument. */
-: 154:#ifdef __USE_POSIX199309
-: 155:# define S_TYPEISMQ(buf) __S_TYPEISMQ(buf)
-: 156:# define S_TYPEISSEM(buf) __S_TYPEISSEM(buf)
-: 157:# define S_TYPEISSHM(buf) __S_TYPEISSHM(buf)
-: 158:#endif
-: 159:
-: 160:
-: 161:/* Protection bits. */
-: 162:
-: 163:#define S_ISUID __S_ISUID /* Set user ID on execution. */
-: 164:#define S_ISGID __S_ISGID /* Set group ID on execution. */
-: 165:
-: 166:#if defined __USE_MISC || defined __USE_XOPEN
-: 167:/* Save swapped text after use (sticky bit). This is pretty well obsolete. */
-: 168:# define S_ISVTX __S_ISVTX
-: 169:#endif
-: 170:
-: 171:#define S_IRUSR __S_IREAD /* Read by owner. */
-: 172:#define S_IWUSR __S_IWRITE /* Write by owner. */
-: 173:#define S_IXUSR __S_IEXEC /* Execute by owner. */
-: 174:/* Read, write, and execute by owner. */
-: 175:#define S_IRWXU (__S_IREAD|__S_IWRITE|__S_IEXEC)
-: 176:
-: 177:#ifdef __USE_MISC
-: 178:# define S_IREAD S_IRUSR
-: 179:# define S_IWRITE S_IWUSR
-: 180:# define S_IEXEC S_IXUSR
-: 181:#endif
-: 182:
-: 183:#define S_IRGRP (S_IRUSR >> 3) /* Read by group. */
-: 184:#define S_IWGRP (S_IWUSR >> 3) /* Write by group. */
-: 185:#define S_IXGRP (S_IXUSR >> 3) /* Execute by group. */
-: 186:/* Read, write, and execute by group. */
-: 187:#define S_IRWXG (S_IRWXU >> 3)
-: 188:
-: 189:#define S_IROTH (S_IRGRP >> 3) /* Read by others. */
-: 190:#define S_IWOTH (S_IWGRP >> 3) /* Write by others. */
-: 191:#define S_IXOTH (S_IXGRP >> 3) /* Execute by others. */
-: 192:/* Read, write, and execute by others. */
-: 193:#define S_IRWXO (S_IRWXG >> 3)
-: 194:
-: 195:
-: 196:#ifdef __USE_MISC
-: 197:/* Macros for common mode bit masks. */
-: 198:# define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */
-: 199:# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
-: 200:# define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)/* 0666*/
-: 201:
-: 202:# define S_BLKSIZE 512 /* Block size for `st_blocks'. */
-: 203:#endif
-: 204:
-: 205:
-: 206:#ifndef __USE_FILE_OFFSET64
-: 207:/* Get file attributes for FILE and put them in BUF. */
-: 208:extern int stat (const char *__restrict __file,
-: 209: struct stat *__restrict __buf) __THROW __nonnull ((1, 2));
-: 210:
-: 211:/* Get file attributes for the file, device, pipe, or socket
-: 212: that file descriptor FD is open on and put them in BUF. */
-: 213:extern int fstat (int __fd, struct stat *__buf) __THROW __nonnull ((2));
-: 214:#else
-: 215:# ifdef __REDIRECT_NTH
-: 216:extern int __REDIRECT_NTH (stat, (const char *__restrict __file,
-: 217: struct stat *__restrict __buf), stat64)
-: 218: __nonnull ((1, 2));
-: 219:extern int __REDIRECT_NTH (fstat, (int __fd, struct stat *__buf), fstat64)
-: 220: __nonnull ((2));
-: 221:# else
-: 222:# define stat stat64
-: 223:# define fstat fstat64
-: 224:# endif
-: 225:#endif
-: 226:#ifdef __USE_LARGEFILE64
-: 227:extern int stat64 (const char *__restrict __file,
-: 228: struct stat64 *__restrict __buf) __THROW __nonnull ((1, 2));
-: 229:extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2));
-: 230:#endif
-: 231:
-: 232:#ifdef __USE_ATFILE
-: 233:/* Similar to stat, get the attributes for FILE and put them in BUF.
-: 234: Relative path names are interpreted relative to FD unless FD is
-: 235: AT_FDCWD. */
-: 236:# ifndef __USE_FILE_OFFSET64
-: 237:extern int fstatat (int __fd, const char *__restrict __file,
-: 238: struct stat *__restrict __buf, int __flag)
-: 239: __THROW __nonnull ((2, 3));
-: 240:# else
-: 241:# ifdef __REDIRECT_NTH
-: 242:extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file,
-: 243: struct stat *__restrict __buf,
-: 244: int __flag),
-: 245: fstatat64) __nonnull ((2, 3));
-: 246:# else
-: 247:# define fstatat fstatat64
-: 248:# endif
-: 249:# endif
-: 250:
-: 251:# ifdef __USE_LARGEFILE64
-: 252:extern int fstatat64 (int __fd, const char *__restrict __file,
-: 253: struct stat64 *__restrict __buf, int __flag)
-: 254: __THROW __nonnull ((2, 3));
-: 255:# endif
-: 256:#endif
-: 257:
-: 258:#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
-: 259:# ifndef __USE_FILE_OFFSET64
-: 260:/* Get file attributes about FILE and put them in BUF.
-: 261: If FILE is a symbolic link, do not follow it. */
-: 262:extern int lstat (const char *__restrict __file,
-: 263: struct stat *__restrict __buf) __THROW __nonnull ((1, 2));
-: 264:# else
-: 265:# ifdef __REDIRECT_NTH
-: 266:extern int __REDIRECT_NTH (lstat,
-: 267: (const char *__restrict __file,
-: 268: struct stat *__restrict __buf), lstat64)
-: 269: __nonnull ((1, 2));
-: 270:# else
-: 271:# define lstat lstat64
-: 272:# endif
-: 273:# endif
-: 274:# ifdef __USE_LARGEFILE64
-: 275:extern int lstat64 (const char *__restrict __file,
-: 276: struct stat64 *__restrict __buf)
-: 277: __THROW __nonnull ((1, 2));
-: 278:# endif
-: 279:#endif
-: 280:
-: 281:/* Set file access permissions for FILE to MODE.
-: 282: If FILE is a symbolic link, this affects its target instead. */
-: 283:extern int chmod (const char *__file, __mode_t __mode)
-: 284: __THROW __nonnull ((1));
-: 285:
-: 286:#ifdef __USE_MISC
-: 287:/* Set file access permissions for FILE to MODE.
-: 288: If FILE is a symbolic link, this affects the link itself
-: 289: rather than its target. */
-: 290:extern int lchmod (const char *__file, __mode_t __mode)
-: 291: __THROW __nonnull ((1));
-: 292:#endif
-: 293:
-: 294:/* Set file access permissions of the file FD is open on to MODE. */
-: 295:#ifdef __USE_POSIX
-: 296:extern int fchmod (int __fd, __mode_t __mode) __THROW;
-: 297:#endif
-: 298:
-: 299:#ifdef __USE_ATFILE
-: 300:/* Set file access permissions of FILE relative to
-: 301: the directory FD is open on. */
-: 302:extern int fchmodat (int __fd, const char *__file, __mode_t __mode,
-: 303: int __flag)
-: 304: __THROW __nonnull ((2)) __wur;
-: 305:#endif /* Use ATFILE. */
-: 306:
-: 307:
-: 308:
-: 309:/* Set the file creation mask of the current process to MASK,
-: 310: and return the old creation mask. */
-: 311:extern __mode_t umask (__mode_t __mask) __THROW;
-: 312:
-: 313:#ifdef __USE_GNU
-: 314:/* Get the current `umask' value without changing it.
-: 315: This function is only available under the GNU Hurd. */
-: 316:extern __mode_t getumask (void) __THROW;
-: 317:#endif
-: 318:
-: 319:/* Create a new directory named PATH, with permission bits MODE. */
-: 320:extern int mkdir (const char *__path, __mode_t __mode)
-: 321: __THROW __nonnull ((1));
-: 322:
-: 323:#ifdef __USE_ATFILE
-: 324:/* Like mkdir, create a new directory with permission bits MODE. But
-: 325: interpret relative PATH names relative to the directory associated
-: 326: with FD. */
-: 327:extern int mkdirat (int __fd, const char *__path, __mode_t __mode)
-: 328: __THROW __nonnull ((2));
-: 329:#endif
-: 330:
-: 331:/* Create a device file named PATH, with permission and special bits MODE
-: 332: and device number DEV (which can be constructed from major and minor
-: 333: device numbers with the `makedev' macro above). */
-: 334:#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
-: 335:extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev)
-: 336: __THROW __nonnull ((1));
-: 337:
-: 338:# ifdef __USE_ATFILE
-: 339:/* Like mknod, create a new device file with permission bits MODE and
-: 340: device number DEV. But interpret relative PATH names relative to
-: 341: the directory associated with FD. */
-: 342:extern int mknodat (int __fd, const char *__path, __mode_t __mode,
-: 343: __dev_t __dev) __THROW __nonnull ((2));
-: 344:# endif
-: 345:#endif
-: 346:
-: 347:
-: 348:/* Create a new FIFO named PATH, with permission bits MODE. */
-: 349:extern int mkfifo (const char *__path, __mode_t __mode)
-: 350: __THROW __nonnull ((1));
-: 351:
-: 352:#ifdef __USE_ATFILE
-: 353:/* Like mkfifo, create a new FIFO with permission bits MODE. But
-: 354: interpret relative PATH names relative to the directory associated
-: 355: with FD. */
-: 356:extern int mkfifoat (int __fd, const char *__path, __mode_t __mode)
-: 357: __THROW __nonnull ((2));
-: 358:#endif
-: 359:
-: 360:#ifdef __USE_ATFILE
-: 361:/* Set file access and modification times relative to directory file
-: 362: descriptor. */
-: 363:extern int utimensat (int __fd, const char *__path,
-: 364: const struct timespec __times[2],
-: 365: int __flags)
-: 366: __THROW __nonnull ((2));
-: 367:#endif
-: 368:
-: 369:#ifdef __USE_XOPEN2K8
-: 370:/* Set file access and modification times of the file associated with FD. */
-: 371:extern int futimens (int __fd, const struct timespec __times[2]) __THROW;
-: 372:#endif
-: 373:
-: 374:/* To allow the `struct stat' structure and the file type `mode_t'
-: 375: bits to vary without changing shared library major version number,
-: 376: the `stat' family of functions and `mknod' are in fact inline
-: 377: wrappers around calls to `xstat', `fxstat', `lxstat', and `xmknod',
-: 378: which all take a leading version-number argument designating the
-: 379: data structure and bits used. defines _STAT_VER with
-: 380: the version number corresponding to `struct stat' as defined in
-: 381: that file; and _MKNOD_VER with the version number corresponding to
-: 382: the S_IF* macros defined therein. It is arranged that when not
-: 383: inlined these function are always statically linked; that way a
-: 384: dynamically-linked executable always encodes the version number
-: 385: corresponding to the data structures it uses, so the `x' functions
-: 386: in the shared library can adapt without needing to recompile all
-: 387: callers. */
-: 388:
-: 389:#ifndef _STAT_VER
-: 390:# define _STAT_VER 0
-: 391:#endif
-: 392:#ifndef _MKNOD_VER
-: 393:# define _MKNOD_VER 0
-: 394:#endif
-: 395:
-: 396:/* Wrappers for stat and mknod system calls. */
-: 397:#ifndef __USE_FILE_OFFSET64
-: 398:extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf)
-: 399: __THROW __nonnull ((3));
-: 400:extern int __xstat (int __ver, const char *__filename,
-: 401: struct stat *__stat_buf) __THROW __nonnull ((2, 3));
-: 402:extern int __lxstat (int __ver, const char *__filename,
-: 403: struct stat *__stat_buf) __THROW __nonnull ((2, 3));
-: 404:extern int __fxstatat (int __ver, int __fildes, const char *__filename,
-: 405: struct stat *__stat_buf, int __flag)
-: 406: __THROW __nonnull ((3, 4));
-: 407:#else
-: 408:# ifdef __REDIRECT_NTH
-: 409:extern int __REDIRECT_NTH (__fxstat, (int __ver, int __fildes,
-: 410: struct stat *__stat_buf), __fxstat64)
-: 411: __nonnull ((3));
-: 412:extern int __REDIRECT_NTH (__xstat, (int __ver, const char *__filename,
-: 413: struct stat *__stat_buf), __xstat64)
-: 414: __nonnull ((2, 3));
-: 415:extern int __REDIRECT_NTH (__lxstat, (int __ver, const char *__filename,
-: 416: struct stat *__stat_buf), __lxstat64)
-: 417: __nonnull ((2, 3));
-: 418:extern int __REDIRECT_NTH (__fxstatat, (int __ver, int __fildes,
-: 419: const char *__filename,
-: 420: struct stat *__stat_buf, int __flag),
-: 421: __fxstatat64) __nonnull ((3, 4));
-: 422:
-: 423:# else
-: 424:# define __fxstat __fxstat64
-: 425:# define __xstat __xstat64
-: 426:# define __lxstat __lxstat64
-: 427:# endif
-: 428:#endif
-: 429:
-: 430:#ifdef __USE_LARGEFILE64
-: 431:extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf)
-: 432: __THROW __nonnull ((3));
-: 433:extern int __xstat64 (int __ver, const char *__filename,
-: 434: struct stat64 *__stat_buf) __THROW __nonnull ((2, 3));
-: 435:extern int __lxstat64 (int __ver, const char *__filename,
-: 436: struct stat64 *__stat_buf) __THROW __nonnull ((2, 3));
-: 437:extern int __fxstatat64 (int __ver, int __fildes, const char *__filename,
-: 438: struct stat64 *__stat_buf, int __flag)
-: 439: __THROW __nonnull ((3, 4));
-: 440:#endif
-: 441:extern int __xmknod (int __ver, const char *__path, __mode_t __mode,
-: 442: __dev_t *__dev) __THROW __nonnull ((2, 4));
-: 443:
-: 444:extern int __xmknodat (int __ver, int __fd, const char *__path,
-: 445: __mode_t __mode, __dev_t *__dev)
-: 446: __THROW __nonnull ((3, 5));
-: 447:
-: 448:#ifdef __USE_EXTERN_INLINES
-: 449:/* Inlined versions of the real stat and mknod functions. */
-: 450:
-: 451:__extern_inline int
-: 452:__NTH (stat (const char *__path, struct stat *__statbuf))
-: 453:{
-: 454: return __xstat (_STAT_VER, __path, __statbuf);
-: 455:}
-: 456:
-: 457:# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
-: 458:__extern_inline int
-: 459:__NTH (lstat (const char *__path, struct stat *__statbuf))
-: 460:{
-: 461: return __lxstat (_STAT_VER, __path, __statbuf);
-: 462:}
-: 463:# endif
-: 464:
-: 465:__extern_inline int
-: 466:__NTH (fstat (int __fd, struct stat *__statbuf))
-: 467:{
560: 468: return __fxstat (_STAT_VER, __fd, __statbuf);
call 0 returned 100%
-: 469:}
-: 470:
-: 471:# ifdef __USE_ATFILE
-: 472:__extern_inline int
-: 473:__NTH (fstatat (int __fd, const char *__filename, struct stat *__statbuf,
-: 474: int __flag))
-: 475:{
-: 476: return __fxstatat (_STAT_VER, __fd, __filename, __statbuf, __flag);
-: 477:}
-: 478:# endif
-: 479:
-: 480:# ifdef __USE_MISC
-: 481:__extern_inline int
-: 482:__NTH (mknod (const char *__path, __mode_t __mode, __dev_t __dev))
-: 483:{
-: 484: return __xmknod (_MKNOD_VER, __path, __mode, &__dev);
-: 485:}
-: 486:# endif
-: 487:
-: 488:# ifdef __USE_ATFILE
-: 489:__extern_inline int
-: 490:__NTH (mknodat (int __fd, const char *__path, __mode_t __mode,
-: 491: __dev_t __dev))
-: 492:{
-: 493: return __xmknodat (_MKNOD_VER, __fd, __path, __mode, &__dev);
-: 494:}
-: 495:# endif
-: 496:
-: 497:# if defined __USE_LARGEFILE64 \
-: 498: && (! defined __USE_FILE_OFFSET64 \
-: 499: || (defined __REDIRECT_NTH && defined __OPTIMIZE__))
-: 500:__extern_inline int
-: 501:__NTH (stat64 (const char *__path, struct stat64 *__statbuf))
-: 502:{
-: 503: return __xstat64 (_STAT_VER, __path, __statbuf);
-: 504:}
-: 505:
-: 506:# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
-: 507:__extern_inline int
-: 508:__NTH (lstat64 (const char *__path, struct stat64 *__statbuf))
-: 509:{
-: 510: return __lxstat64 (_STAT_VER, __path, __statbuf);
-: 511:}
-: 512:# endif
-: 513:
-: 514:__extern_inline int
-: 515:__NTH (fstat64 (int __fd, struct stat64 *__statbuf))
-: 516:{
-: 517: return __fxstat64 (_STAT_VER, __fd, __statbuf);
-: 518:}
-: 519:
-: 520:# ifdef __USE_ATFILE
-: 521:__extern_inline int
-: 522:__NTH (fstatat64 (int __fd, const char *__filename, struct stat64 *__statbuf,
-: 523: int __flag))
-: 524:{
-: 525: return __fxstatat64 (_STAT_VER, __fd, __filename, __statbuf, __flag);
-: 526:}
-: 527:# endif
-: 528:
-: 529:# endif
-: 530:
-: 531:#endif
-: 532:
-: 533:__END_DECLS
-: 534:
-: 535:
-: 536:#endif /* sys/stat.h */
<<<<<< EOF
# path=/home/travis/build/nijel/enca/unicodemap.c.gcov
-: 0:Source:unicodemap.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/unicodemap.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/unicodemap.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
-: 62:/*EOF*/
-: 63:/*EOF*/
-: 64:/*EOF*/
-: 65:/*EOF*/
-: 66:/*EOF*/
-: 67:/*EOF*/
-: 68:/*EOF*/
-: 69:/*EOF*/
-: 70:/*EOF*/
-: 71:/*EOF*/
-: 72:/*EOF*/
-: 73:/*EOF*/
-: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
-: 80:/*EOF*/
-: 81:/*EOF*/
-: 82:/*EOF*/
-: 83:/*EOF*/
-: 84:/*EOF*/
-: 85:/*EOF*/
-: 86:/*EOF*/
-: 87:/*EOF*/
-: 88:/*EOF*/
-: 89:/*EOF*/
-: 90:/*EOF*/
-: 91:/*EOF*/
-: 92:/*EOF*/
-: 93:/*EOF*/
-: 94:/*EOF*/
-: 95:/*EOF*/
-: 96:/*EOF*/
-: 97:/*EOF*/
-: 98:/*EOF*/
-: 99:/*EOF*/
-: 100:/*EOF*/
-: 101:/*EOF*/
-: 102:/*EOF*/
-: 103:/*EOF*/
-: 104:/*EOF*/
-: 105:/*EOF*/
-: 106:/*EOF*/
-: 107:/*EOF*/
-: 108:/*EOF*/
-: 109:/*EOF*/
-: 110:/*EOF*/
-: 111:/*EOF*/
-: 112:/*EOF*/
-: 113:/*EOF*/
-: 114:/*EOF*/
-: 115:/*EOF*/
-: 116:/*EOF*/
-: 117:/*EOF*/
-: 118:/*EOF*/
-: 119:/*EOF*/
-: 120:/*EOF*/
-: 121:/*EOF*/
-: 122:/*EOF*/
-: 123:/*EOF*/
-: 124:/*EOF*/
-: 125:/*EOF*/
-: 126:/*EOF*/
-: 127:/*EOF*/
-: 128:/*EOF*/
-: 129:/*EOF*/
-: 130:/*EOF*/
-: 131:/*EOF*/
-: 132:/*EOF*/
-: 133:/*EOF*/
-: 134:/*EOF*/
-: 135:/*EOF*/
-: 136:/*EOF*/
-: 137:/*EOF*/
-: 138:/*EOF*/
-: 139:/*EOF*/
-: 140:/*EOF*/
-: 141:/*EOF*/
-: 142:/*EOF*/
-: 143:/*EOF*/
-: 144:/*EOF*/
-: 145:/*EOF*/
-: 146:/*EOF*/
-: 147:/*EOF*/
-: 148:/*EOF*/
-: 149:/*EOF*/
-: 150:/*EOF*/
-: 151:/*EOF*/
-: 152:/*EOF*/
-: 153:/*EOF*/
-: 154:/*EOF*/
-: 155:/*EOF*/
-: 156:/*EOF*/
-: 157:/*EOF*/
-: 158:/*EOF*/
-: 159:/*EOF*/
-: 160:/*EOF*/
-: 161:/*EOF*/
-: 162:/*EOF*/
-: 163:/*EOF*/
-: 164:/*EOF*/
-: 165:/*EOF*/
-: 166:/*EOF*/
-: 167:/*EOF*/
-: 168:/*EOF*/
-: 169:/*EOF*/
-: 170:/*EOF*/
-: 171:/*EOF*/
-: 172:/*EOF*/
-: 173:/*EOF*/
-: 174:/*EOF*/
-: 175:/*EOF*/
-: 176:/*EOF*/
-: 177:/*EOF*/
-: 178:/*EOF*/
-: 179:/*EOF*/
-: 180:/*EOF*/
-: 181:/*EOF*/
-: 182:/*EOF*/
-: 183:/*EOF*/
-: 184:/*EOF*/
-: 185:/*EOF*/
-: 186:/*EOF*/
-: 187:/*EOF*/
-: 188:/*EOF*/
-: 189:/*EOF*/
-: 190:/*EOF*/
-: 191:/*EOF*/
-: 192:/*EOF*/
-: 193:/*EOF*/
-: 194:/*EOF*/
-: 195:/*EOF*/
-: 196:/*EOF*/
-: 197:/*EOF*/
-: 198:/*EOF*/
-: 199:/*EOF*/
-: 200:/*EOF*/
-: 201:/*EOF*/
-: 202:/*EOF*/
-: 203:/*EOF*/
-: 204:/*EOF*/
-: 205:/*EOF*/
-: 206:/*EOF*/
-: 207:/*EOF*/
-: 208:/*EOF*/
-: 209:/*EOF*/
-: 210:/*EOF*/
-: 211:/*EOF*/
-: 212:/*EOF*/
-: 213:/*EOF*/
-: 214:/*EOF*/
-: 215:/*EOF*/
-: 216:/*EOF*/
-: 217:/*EOF*/
-: 218:/*EOF*/
-: 219:/*EOF*/
-: 220:/*EOF*/
-: 221:/*EOF*/
-: 222:/*EOF*/
-: 223:/*EOF*/
-: 224:/*EOF*/
-: 225:/*EOF*/
-: 226:/*EOF*/
-: 227:/*EOF*/
-: 228:/*EOF*/
-: 229:/*EOF*/
-: 230:/*EOF*/
-: 231:/*EOF*/
-: 232:/*EOF*/
-: 233:/*EOF*/
-: 234:/*EOF*/
-: 235:/*EOF*/
-: 236:/*EOF*/
-: 237:/*EOF*/
-: 238:/*EOF*/
-: 239:/*EOF*/
-: 240:/*EOF*/
-: 241:/*EOF*/
-: 242:/*EOF*/
-: 243:/*EOF*/
-: 244:/*EOF*/
-: 245:/*EOF*/
-: 246:/*EOF*/
-: 247:/*EOF*/
-: 248:/*EOF*/
-: 249:/*EOF*/
-: 250:/*EOF*/
-: 251:/*EOF*/
-: 252:/*EOF*/
-: 253:/*EOF*/
-: 254:/*EOF*/
-: 255:/*EOF*/
-: 256:/*EOF*/
-: 257:/*EOF*/
-: 258:/*EOF*/
-: 259:/*EOF*/
-: 260:/*EOF*/
-: 261:/*EOF*/
-: 262:/*EOF*/
-: 263:/*EOF*/
-: 264:/*EOF*/
-: 265:/*EOF*/
-: 266:/*EOF*/
-: 267:/*EOF*/
-: 268:/*EOF*/
-: 269:/*EOF*/
-: 270:/*EOF*/
-: 271:/*EOF*/
-: 272:/*EOF*/
-: 273:/*EOF*/
-: 274:/*EOF*/
-: 275:/*EOF*/
-: 276:/*EOF*/
-: 277:/*EOF*/
-: 278:/*EOF*/
-: 279:/*EOF*/
-: 280:/*EOF*/
-: 281:/*EOF*/
-: 282:/*EOF*/
-: 283:/*EOF*/
-: 284:/*EOF*/
-: 285:/*EOF*/
-: 286:/*EOF*/
-: 287:/*EOF*/
-: 288:/*EOF*/
-: 289:/*EOF*/
-: 290:/*EOF*/
-: 291:/*EOF*/
-: 292:/*EOF*/
-: 293:/*EOF*/
-: 294:/*EOF*/
-: 295:/*EOF*/
-: 296:/*EOF*/
-: 297:/*EOF*/
-: 298:/*EOF*/
-: 299:/*EOF*/
-: 300:/*EOF*/
-: 301:/*EOF*/
-: 302:/*EOF*/
-: 303:/*EOF*/
-: 304:/*EOF*/
-: 305:/*EOF*/
-: 306:/*EOF*/
-: 307:/*EOF*/
-: 308:/*EOF*/
-: 309:/*EOF*/
-: 310:/*EOF*/
-: 311:/*EOF*/
-: 312:/*EOF*/
-: 313:/*EOF*/
-: 314:/*EOF*/
-: 315:/*EOF*/
-: 316:/*EOF*/
-: 317:/*EOF*/
-: 318:/*EOF*/
-: 319:/*EOF*/
-: 320:/*EOF*/
-: 321:/*EOF*/
-: 322:/*EOF*/
-: 323:/*EOF*/
-: 324:/*EOF*/
-: 325:/*EOF*/
-: 326:/*EOF*/
-: 327:/*EOF*/
-: 328:/*EOF*/
-: 329:/*EOF*/
-: 330:/*EOF*/
-: 331:/*EOF*/
-: 332:/*EOF*/
-: 333:/*EOF*/
-: 334:/*EOF*/
-: 335:/*EOF*/
-: 336:/*EOF*/
-: 337:/*EOF*/
-: 338:/*EOF*/
-: 339:/*EOF*/
-: 340:/*EOF*/
-: 341:/*EOF*/
-: 342:/*EOF*/
-: 343:/*EOF*/
-: 344:/*EOF*/
-: 345:/*EOF*/
-: 346:/*EOF*/
-: 347:/*EOF*/
-: 348:/*EOF*/
-: 349:/*EOF*/
-: 350:/*EOF*/
-: 351:/*EOF*/
-: 352:/*EOF*/
-: 353:/*EOF*/
-: 354:/*EOF*/
-: 355:/*EOF*/
-: 356:/*EOF*/
-: 357:/*EOF*/
-: 358:/*EOF*/
-: 359:/*EOF*/
-: 360:/*EOF*/
-: 361:/*EOF*/
-: 362:/*EOF*/
-: 363:/*EOF*/
-: 364:/*EOF*/
-: 365:/*EOF*/
-: 366:/*EOF*/
-: 367:/*EOF*/
-: 368:/*EOF*/
-: 369:/*EOF*/
-: 370:/*EOF*/
-: 371:/*EOF*/
-: 372:/*EOF*/
-: 373:/*EOF*/
-: 374:/*EOF*/
-: 375:/*EOF*/
-: 376:/*EOF*/
-: 377:/*EOF*/
-: 378:/*EOF*/
-: 379:/*EOF*/
-: 380:/*EOF*/
-: 381:/*EOF*/
-: 382:/*EOF*/
-: 383:/*EOF*/
-: 384:/*EOF*/
-: 385:/*EOF*/
-: 386:/*EOF*/
-: 387:/*EOF*/
-: 388:/*EOF*/
-: 389:/*EOF*/
-: 390:/*EOF*/
-: 391:/*EOF*/
-: 392:/*EOF*/
-: 393:/*EOF*/
-: 394:/*EOF*/
-: 395:/*EOF*/
-: 396:/*EOF*/
-: 397:/*EOF*/
-: 398:/*EOF*/
-: 399:/*EOF*/
-: 400:/*EOF*/
-: 401:/*EOF*/
-: 402:/*EOF*/
-: 403:/*EOF*/
-: 404:/*EOF*/
-: 405:/*EOF*/
-: 406:/*EOF*/
-: 407:/*EOF*/
-: 408:/*EOF*/
-: 409:/*EOF*/
-: 410:/*EOF*/
-: 411:/*EOF*/
-: 412:/*EOF*/
-: 413:/*EOF*/
-: 414:/*EOF*/
-: 415:/*EOF*/
-: 416:/*EOF*/
-: 417:/*EOF*/
-: 418:/*EOF*/
-: 419:/*EOF*/
-: 420:/*EOF*/
-: 421:/*EOF*/
-: 422:/*EOF*/
-: 423:/*EOF*/
-: 424:/*EOF*/
-: 425:/*EOF*/
-: 426:/*EOF*/
-: 427:/*EOF*/
-: 428:/*EOF*/
-: 429:/*EOF*/
-: 430:/*EOF*/
-: 431:/*EOF*/
-: 432:/*EOF*/
-: 433:/*EOF*/
-: 434:/*EOF*/
-: 435:/*EOF*/
-: 436:/*EOF*/
-: 437:/*EOF*/
-: 438:/*EOF*/
-: 439:/*EOF*/
-: 440:/*EOF*/
-: 441:/*EOF*/
-: 442:/*EOF*/
-: 443:/*EOF*/
-: 444:/*EOF*/
-: 445:/*EOF*/
-: 446:/*EOF*/
-: 447:/*EOF*/
-: 448:/*EOF*/
-: 449:/*EOF*/
-: 450:/*EOF*/
-: 451:/*EOF*/
-: 452:/*EOF*/
-: 453:/*EOF*/
-: 454:/*EOF*/
-: 455:/*EOF*/
-: 456:/*EOF*/
-: 457:/*EOF*/
-: 458:/*EOF*/
-: 459:/*EOF*/
-: 460:/*EOF*/
-: 461:/*EOF*/
-: 462:/*EOF*/
-: 463:/*EOF*/
-: 464:/*EOF*/
-: 465:/*EOF*/
-: 466:/*EOF*/
-: 467:/*EOF*/
-: 468:/*EOF*/
-: 469:/*EOF*/
-: 470:/*EOF*/
-: 471:/*EOF*/
-: 472:/*EOF*/
-: 473:/*EOF*/
-: 474:/*EOF*/
-: 475:/*EOF*/
-: 476:/*EOF*/
-: 477:/*EOF*/
-: 478:/*EOF*/
-: 479:/*EOF*/
-: 480:/*EOF*/
-: 481:/*EOF*/
-: 482:/*EOF*/
-: 483:/*EOF*/
-: 484:/*EOF*/
-: 485:/*EOF*/
-: 486:/*EOF*/
-: 487:/*EOF*/
-: 488:/*EOF*/
-: 489:/*EOF*/
-: 490:/*EOF*/
-: 491:/*EOF*/
-: 492:/*EOF*/
-: 493:/*EOF*/
-: 494:/*EOF*/
-: 495:/*EOF*/
-: 496:/*EOF*/
-: 497:/*EOF*/
-: 498:/*EOF*/
-: 499:/*EOF*/
-: 500:/*EOF*/
-: 501:/*EOF*/
-: 502:/*EOF*/
-: 503:/*EOF*/
-: 504:/*EOF*/
-: 505:/*EOF*/
-: 506:/*EOF*/
-: 507:/*EOF*/
-: 508:/*EOF*/
-: 509:/*EOF*/
-: 510:/*EOF*/
-: 511:/*EOF*/
-: 512:/*EOF*/
-: 513:/*EOF*/
-: 514:/*EOF*/
-: 515:/*EOF*/
-: 516:/*EOF*/
-: 517:/*EOF*/
-: 518:/*EOF*/
-: 519:/*EOF*/
-: 520:/*EOF*/
-: 521:/*EOF*/
-: 522:/*EOF*/
-: 523:/*EOF*/
-: 524:/*EOF*/
-: 525:/*EOF*/
-: 526:/*EOF*/
-: 527:/*EOF*/
-: 528:/*EOF*/
-: 529:/*EOF*/
-: 530:/*EOF*/
-: 531:/*EOF*/
-: 532:/*EOF*/
-: 533:/*EOF*/
-: 534:/*EOF*/
-: 535:/*EOF*/
-: 536:/*EOF*/
-: 537:/*EOF*/
-: 538:/*EOF*/
-: 539:/*EOF*/
-: 540:/*EOF*/
-: 541:/*EOF*/
function enca_charset_has_ucs2_map called 192 returned 100% blocks executed 100%
192: 542:/*EOF*/
-: 543:/*EOF*/
192: 544:/*EOF*/
call 0 returned 100%
-: 545:/*EOF*/
-: 546:/*EOF*/
-: 547:/*EOF*/
-: 548:/*EOF*/
-: 549:/*EOF*/
-: 550:/*EOF*/
-: 551:/*EOF*/
-: 552:/*EOF*/
-: 553:/*EOF*/
-: 554:/*EOF*/
-: 555:/*EOF*/
-: 556:/*EOF*/
-: 557:/*EOF*/
-: 558:/*EOF*/
function enca_charset_ucs2_map called 158 returned 100% blocks executed 100%
158: 559:/*EOF*/
-: 560:/*EOF*/
-: 561:/*EOF*/
-: 562:/*EOF*/
158: 563:/*EOF*/
call 0 returned 100%
-: 564:/*EOF*/
158: 565:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 566:/*EOF*/
-: 567:/*EOF*/
20960: 568:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
20960: 569:/*EOF*/
-: 570:/*EOF*/
19646: 571:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
19488: 572:/*EOF*/
-: 573:/*EOF*/
-: 574:/*EOF*/
-: 575:/*EOF*/
-: 576:/*EOF*/
-: 577:/*EOF*/
-: 578:/*EOF*/
-: 579:/*EOF*/
-: 580:/*EOF*/
-: 581:/*EOF*/
-: 582:/*EOF*/
-: 583:/*EOF*/
-: 584:/*EOF*/
-: 585:/*EOF*/
function find_charset_map called 362 returned 100% blocks executed 93%
362: 586:/*EOF*/
-: 587:/*EOF*/
-: 588:/*EOF*/
-: 589:/*EOF*/
-: 590:/*EOF*/
-: 591:/*EOF*/
362: 592:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 593:/*EOF*/
-: 594:/*EOF*/
362: 595:/*EOF*/
branch 0 taken 16% (fallthrough)
branch 1 taken 84%
1357: 596:/*EOF*/
branch 0 taken 96%
branch 1 taken 4% (fallthrough)
1357: 597:/*EOF*/
call 0 returned 100%
1357: 598:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 599:/*EOF*/
59: 600:/*EOF*/
-: 601:/*EOF*/
-: 602:/*EOF*/
4098: 603:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
4087: 604:/*EOF*/
branch 0 taken 9% (fallthrough)
branch 1 taken 91%
351: 605:/*EOF*/
-: 606:/*EOF*/
-: 607:/*EOF*/
-: 608:/*EOF*/
-: 609:/*EOF*/
-: 610:/*EOF*/
-: 611:/*EOF*/
-: 612:/*EOF*/
-: 613:/*EOF*/
-: 614:/*EOF*/
-: 615:/*EOF*/
-: 616:/*EOF*/
-: 617:/*EOF*/
-: 618:/*EOF*/
-: 619:/*EOF*/
-: 620:/*EOF*/
-: 621:/*EOF*/
-: 622:/*EOF*/
-: 623:/*EOF*/
-: 624:/*EOF*/
-: 625:/*EOF*/
function enca_charsets_subset_identical called 6 returned 100% blocks executed 84%
6: 626:/*EOF*/
-: 627:/*EOF*/
-: 628:/*EOF*/
-: 629:/*EOF*/
6: 630:/*EOF*/
call 0 returned 100%
6: 631:/*EOF*/
call 0 returned 100%
-: 632:/*EOF*/
-: 633:/*EOF*/
-: 634:/*EOF*/
-: 635:/*EOF*/
6: 636:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
6: 637:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 638:/*EOF*/
6: 639:/*EOF*/
6: 640:/*EOF*/
6: 641:/*EOF*/
6: 642:/*EOF*/
-: 643:/*EOF*/
1542: 644:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
1536: 645:/*EOF*/
branch 0 taken 38% (fallthrough)
branch 1 taken 63%
1536: 646:/*EOF*/
branch 0 taken 75% (fallthrough)
branch 1 taken 25%
-: 647:/*EOF*/
1536: 648:/*EOF*/
branch 0 taken 7% (fallthrough)
branch 1 taken 93%
108: 649:/*EOF*/
108: 650:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 651:/*EOF*/
branch 0 never executed
branch 1 never executed
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lang_be.c.gcov
-: 0:Source:lang_be.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_be.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_be.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
-: 62:/*EOF*/
-: 63:/*EOF*/
-: 64:/*EOF*/
-: 65:/*EOF*/
function hook called 0 returned 0% blocks executed 0%
#####: 66:/*EOF*/
-: 67:/*EOF*/
#####: 68:/*EOF*/
#####: 69:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 70:/*EOF*/
branch 0 never executed
branch 1 never executed
branch 2 never executed
branch 3 never executed
-: 71:/*EOF*/
-: 72:/*EOF*/
-: 73:/*EOF*/
-: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
-: 80:/*EOF*/
-: 81:/*EOF*/
-: 82:/*EOF*/
-: 83:/*EOF*/
-: 84:/*EOF*/
-: 85:/*EOF*/
-: 86:/*EOF*/
-: 87:/*EOF*/
-: 88:/*EOF*/
-: 89:/*EOF*/
-: 90:/*EOF*/
-: 91:/*EOF*/
-: 92:/*EOF*/
-: 93:/*EOF*/
-: 94:/*EOF*/
-: 95:/*EOF*/
#####: 96:/*EOF*/
call 0 never executed
-: 97:/*EOF*/
-: 98:/*EOF*/
-: 99:/*EOF*/
-: 100:/*EOF*/
-: 101:/*EOF*/
-: 102:/*EOF*/
-: 103:/*EOF*/
-: 104:/*EOF*/
-: 105:/*EOF*/
-: 106:/*EOF*/
-: 107:/*EOF*/
-: 108:/*EOF*/
-: 109:/*EOF*/
-: 110:/*EOF*/
-: 111:/*EOF*/
-: 112:/*EOF*/
-: 113:/*EOF*/
-: 114:/*EOF*/
-: 115:/*EOF*/
-: 116:/*EOF*/
-: 117:/*EOF*/
-: 118:/*EOF*/
-: 119:/*EOF*/
-: 120:/*EOF*/
-: 121:/*EOF*/
#####: 122:/*EOF*/
call 0 never executed
-: 123:/*EOF*/
-: 124:/*EOF*/
-: 125:/*EOF*/
-: 126:/*EOF*/
-: 127:/*EOF*/
-: 128:/*EOF*/
-: 129:/*EOF*/
-: 130:/*EOF*/
-: 131:/*EOF*/
-: 132:/*EOF*/
-: 133:/*EOF*/
-: 134:/*EOF*/
-: 135:/*EOF*/
-: 136:/*EOF*/
-: 137:/*EOF*/
-: 138:/*EOF*/
-: 139:/*EOF*/
-: 140:/*EOF*/
-: 141:/*EOF*/
-: 142:/*EOF*/
-: 143:/*EOF*/
-: 144:/*EOF*/
-: 145:/*EOF*/
-: 146:/*EOF*/
-: 147:/*EOF*/
#####: 148:/*EOF*/
call 0 never executed
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lang_hu.c.gcov
-: 0:Source:lang_hu.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_hu.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_hu.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
-: 62:/*EOF*/
-: 63:/*EOF*/
-: 64:/*EOF*/
function hook called 21 returned 100% blocks executed 100%
21: 65:/*EOF*/
-: 66:/*EOF*/
21: 67:/*EOF*/
-: 68:/*EOF*/
-: 69:/*EOF*/
21: 70:/*EOF*/
21: 71:/*EOF*/
21: 72:/*EOF*/
-: 73:/*EOF*/
-: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
-: 80:/*EOF*/
-: 81:/*EOF*/
-: 82:/*EOF*/
-: 83:/*EOF*/
-: 84:/*EOF*/
-: 85:/*EOF*/
-: 86:/*EOF*/
-: 87:/*EOF*/
-: 88:/*EOF*/
-: 89:/*EOF*/
-: 90:/*EOF*/
-: 91:/*EOF*/
21: 92:/*EOF*/
call 0 returned 100%
-: 93:/*EOF*/
-: 94:/*EOF*/
-: 95:/*EOF*/
-: 96:/*EOF*/
-: 97:/*EOF*/
-: 98:/*EOF*/
-: 99:/*EOF*/
-: 100:/*EOF*/
-: 101:/*EOF*/
-: 102:/*EOF*/
-: 103:/*EOF*/
-: 104:/*EOF*/
-: 105:/*EOF*/
-: 106:/*EOF*/
-: 107:/*EOF*/
-: 108:/*EOF*/
-: 109:/*EOF*/
-: 110:/*EOF*/
-: 111:/*EOF*/
-: 112:/*EOF*/
-: 113:/*EOF*/
-: 114:/*EOF*/
-: 115:/*EOF*/
-: 116:/*EOF*/
-: 117:/*EOF*/
-: 118:/*EOF*/
-: 119:/*EOF*/
-: 120:/*EOF*/
-: 121:/*EOF*/
21: 122:/*EOF*/
call 0 returned 100%
<<<<<< EOF
# path=/home/travis/build/nijel/enca/guess.c.gcov
-: 0:Source:guess.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/guess.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/guess.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
-: 62:/*EOF*/
-: 63:/*EOF*/
-: 64:/*EOF*/
-: 65:/*EOF*/
-: 66:/*EOF*/
-: 67:/*EOF*/
-: 68:/*EOF*/
-: 69:/*EOF*/
-: 70:/*EOF*/
-: 71:/*EOF*/
-: 72:/*EOF*/
-: 73:/*EOF*/
-: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
function enca_guess_init called 247 returned 100% blocks executed 89%
247: 79:/*EOF*/
-: 80:/*EOF*/
247: 81:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 82:/*EOF*/
247: 83:/*EOF*/
call 0 returned 100%
247: 84:/*EOF*/
branch 0 taken 10% (fallthrough)
branch 1 taken 90%
25: 85:/*EOF*/
25: 86:/*EOF*/
-: 87:/*EOF*/
-: 88:/*EOF*/
222: 89:/*EOF*/
call 0 returned 100%
222: 90:/*EOF*/
call 0 returned 100%
-: 91:/*EOF*/
-: 92:/*EOF*/
247: 93:/*EOF*/
247: 94:/*EOF*/
247: 95:/*EOF*/
-: 96:/*EOF*/
-: 97:/*EOF*/
-: 98:/*EOF*/
-: 99:/*EOF*/
-: 100:/*EOF*/
-: 101:/*EOF*/
-: 102:/*EOF*/
-: 103:/*EOF*/
function enca_guess_destroy called 246 returned 100% blocks executed 100%
246: 104:/*EOF*/
-: 105:/*EOF*/
246: 106:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
246: 107:/*EOF*/
branch 0 taken 90% (fallthrough)
branch 1 taken 10%
246: 108:/*EOF*/
branch 0 taken 90% (fallthrough)
branch 1 taken 10%
246: 109:/*EOF*/
-: 110:/*EOF*/
-: 111:/*EOF*/
-: 112:/*EOF*/
-: 113:/*EOF*/
-: 114:/*EOF*/
-: 115:/*EOF*/
-: 116:/*EOF*/
-: 117:/*EOF*/
-: 118:/*EOF*/
-: 119:/*EOF*/
-: 120:/*EOF*/
-: 121:/*EOF*/
-: 122:/*EOF*/
-: 123:/*EOF*/
-: 124:/*EOF*/
-: 125:/*EOF*/
-: 126:/*EOF*/
-: 127:/*EOF*/
-: 128:/*EOF*/
-: 129:/*EOF*/
-: 130:/*EOF*/
function enca_analyse called 420 returned 100% blocks executed 75%
420: 131:/*EOF*/
-: 132:/*EOF*/
-: 133:/*EOF*/
-: 134:/*EOF*/
420: 135:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
420: 136:/*EOF*/
420: 137:/*EOF*/
call 0 returned 100%
-: 138:/*EOF*/
-: 139:/*EOF*/
-: 140:/*EOF*/
-: 141:/*EOF*/
-: 142:/*EOF*/
-: 143:/*EOF*/
-: 144:/*EOF*/
-: 145:/*EOF*/
-: 146:/*EOF*/
-: 147:/*EOF*/
-: 148:/*EOF*/
-: 149:/*EOF*/
-: 150:/*EOF*/
-: 151:/*EOF*/
-: 152:/*EOF*/
-: 153:/*EOF*/
-: 154:/*EOF*/
-: 155:/*EOF*/
-: 156:/*EOF*/
-: 157:/*EOF*/
-: 158:/*EOF*/
-: 159:/*EOF*/
function enca_analyse_const called 64 returned 100% blocks executed 75%
64: 160:/*EOF*/
-: 161:/*EOF*/
-: 162:/*EOF*/
-: 163:/*EOF*/
64: 164:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
64: 165:/*EOF*/
64: 166:/*EOF*/
call 0 returned 100%
-: 167:/*EOF*/
-: 168:/*EOF*/
-: 169:/*EOF*/
-: 170:/*EOF*/
-: 171:/*EOF*/
-: 172:/*EOF*/
-: 173:/*EOF*/
-: 174:/*EOF*/
-: 175:/*EOF*/
-: 176:/*EOF*/
-: 177:/*EOF*/
-: 178:/*EOF*/
-: 179:/*EOF*/
function analyse called 484 returned 100% blocks executed 92%
484: 180:/*EOF*/
-: 181:/*EOF*/
-: 182:/*EOF*/
-: 183:/*EOF*/
484: 184:/*EOF*/
-: 185:/*EOF*/
-: 186:/*EOF*/
484: 187:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
3: 188:/*EOF*/
3: 189:/*EOF*/
-: 190:/*EOF*/
481: 191:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 192:/*EOF*/
-: 193:/*EOF*/
481: 194:/*EOF*/
-: 195:/*EOF*/
481: 196:/*EOF*/
481: 197:/*EOF*/
-: 198:/*EOF*/
481: 199:/*EOF*/
481: 200:/*EOF*/
-: 201:/*EOF*/
481: 202:/*EOF*/
call 0 returned 100%
481: 203:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
2: 204:/*EOF*/
-: 205:/*EOF*/
-: 206:/*EOF*/
-: 207:/*EOF*/
481: 208:/*EOF*/
branch 0 taken 5% (fallthrough)
branch 1 taken 95%
26: 209:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 210:/*EOF*/
481: 211:/*EOF*/
-: 212:/*EOF*/
-: 213:/*EOF*/
-: 214:/*EOF*/
-: 215:/*EOF*/
-: 216:/*EOF*/
-: 217:/*EOF*/
-: 218:/*EOF*/
-: 219:/*EOF*/
-: 220:/*EOF*/
-: 221:/*EOF*/
-: 222:/*EOF*/
-: 223:/*EOF*/
function make_guess called 481 returned 100% blocks executed 90%
481: 224:/*EOF*/
-: 225:/*EOF*/
481: 226:/*EOF*/
481: 227:/*EOF*/
481: 228:/*EOF*/
481: 229:/*EOF*/
481: 230:/*EOF*/
481: 231:/*EOF*/
481: 232:/*EOF*/
481: 233:/*EOF*/
-: 234:/*EOF*/
-: 235:/*EOF*/
-: 236:/*EOF*/
-: 237:/*EOF*/
-: 238:/*EOF*/
-: 239:/*EOF*/
-: 240:/*EOF*/
481: 241:/*EOF*/
branch 0 taken 50% (fallthrough)
branch 1 taken 50%
242: 242:/*EOF*/
call 0 returned 100%
242: 243:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 244:/*EOF*/
-: 245:/*EOF*/
-: 246:/*EOF*/
481: 247:/*EOF*/
call 0 returned 100%
-: 248:/*EOF*/
-: 249:/*EOF*/
481: 250:/*EOF*/
branch 0 taken 94% (fallthrough)
branch 1 taken 6%
branch 2 taken 10% (fallthrough)
branch 3 taken 90%
43: 251:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
43: 252:/*EOF*/
branch 0 taken 77% (fallthrough)
branch 1 taken 23%
-: 253:/*EOF*/
-: 254:/*EOF*/
-: 255:/*EOF*/
33: 256:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
call 2 returned 100%
branch 3 taken 100% (fallthrough)
branch 4 taken 0%
-: 257:/*EOF*/
33: 258:/*EOF*/
33: 259:/*EOF*/
33: 260:/*EOF*/
call 0 returned 100%
-: 261:/*EOF*/
-: 262:/*EOF*/
33: 263:/*EOF*/
branch 0 taken 91% (fallthrough)
branch 1 taken 9%
branch 2 taken 0% (fallthrough)
branch 3 taken 100%
-: 264:/*EOF*/
#####: 265:/*EOF*/
#####: 266:/*EOF*/
call 0 never executed
#####: 267:/*EOF*/
#####: 268:/*EOF*/
-: 269:/*EOF*/
-: 270:/*EOF*/
-: 271:/*EOF*/
-: 272:/*EOF*/
471: 273:/*EOF*/
branch 0 taken 7% (fallthrough)
branch 1 taken 93%
branch 2 taken 100% (fallthrough)
branch 3 taken 0%
32: 274:/*EOF*/
branch 0 taken 16% (fallthrough)
branch 1 taken 84%
-: 275:/*EOF*/
-: 276:/*EOF*/
-: 277:/*EOF*/
-: 278:/*EOF*/
444: 279:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
branch 2 never executed
branch 3 never executed
-: 280:/*EOF*/
-: 281:/*EOF*/
-: 282:/*EOF*/
-: 283:/*EOF*/
-: 284:/*EOF*/
444: 285:/*EOF*/
branch 0 taken 99% (fallthrough)
branch 1 taken 1%
branch 2 taken 100% (fallthrough)
branch 3 taken 0%
branch 4 taken 100% (fallthrough)
branch 5 taken 0%
439: 286:/*EOF*/
branch 0 taken 77% (fallthrough)
branch 1 taken 23%
-: 287:/*EOF*/
-: 288:/*EOF*/
-: 289:/*EOF*/
-: 290:/*EOF*/
-: 291:/*EOF*/
-: 292:/*EOF*/
-: 293:/*EOF*/
-: 294:/*EOF*/
-: 295:/*EOF*/
343: 296:/*EOF*/
branch 0 taken 15% (fallthrough)
branch 1 taken 85%
52: 297:/*EOF*/
branch 0 taken 50% (fallthrough)
branch 1 taken 50%
26: 298:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
26: 299:/*EOF*/
26: 300:/*EOF*/
52: 301:/*EOF*/
call 0 returned 100%
26: 302:/*EOF*/
-: 303:/*EOF*/
-: 304:/*EOF*/
-: 305:/*EOF*/
343: 306:/*EOF*/
343: 307:/*EOF*/
branch 0 taken 8% (fallthrough)
branch 1 taken 92%
26: 308:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 309:/*EOF*/
call 0 never executed
#####: 310:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 311:/*EOF*/
-: 312:/*EOF*/
26: 313:/*EOF*/
call 0 returned 100%
-: 314:/*EOF*/
-: 315:/*EOF*/
-: 316:/*EOF*/
343: 317:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 318:/*EOF*/
-: 319:/*EOF*/
-: 320:/*EOF*/
343: 321:/*EOF*/
call 0 returned 100%
-: 322:/*EOF*/
-: 323:/*EOF*/
343: 324:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
2: 325:/*EOF*/
call 0 returned 100%
-: 326:/*EOF*/
2: 327:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 328:/*EOF*/
-: 329:/*EOF*/
#####: 330:/*EOF*/
#####: 331:/*EOF*/
-: 332:/*EOF*/
-: 333:/*EOF*/
-: 334:/*EOF*/
-: 335:/*EOF*/
-: 336:/*EOF*/
343: 337:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
branch 2 taken 100% (fallthrough)
branch 3 taken 0%
343: 338:/*EOF*/
branch 0 taken 98% (fallthrough)
branch 1 taken 2%
-: 339:/*EOF*/
-: 340:/*EOF*/
-: 341:/*EOF*/
-: 342:/*EOF*/
-: 343:/*EOF*/
337: 344:/*EOF*/
branch 0 taken 99% (fallthrough)
branch 1 taken 1%
-: 345:/*EOF*/
-: 346:/*EOF*/
-: 347:/*EOF*/
335: 348:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
-: 349:/*EOF*/
-: 350:/*EOF*/
-: 351:/*EOF*/
335: 352:/*EOF*/
call 0 returned 100%
branch 1 taken 75% (fallthrough)
branch 2 taken 25%
-: 353:/*EOF*/
-: 354:/*EOF*/
-: 355:/*EOF*/
-: 356:/*EOF*/
-: 357:/*EOF*/
-: 358:/*EOF*/
-: 359:/*EOF*/
-: 360:/*EOF*/
-: 361:/*EOF*/
-: 362:/*EOF*/
-: 363:/*EOF*/
-: 364:/*EOF*/
-: 365:/*EOF*/
-: 366:/*EOF*/
-: 367:/*EOF*/
-: 368:/*EOF*/
251: 369:/*EOF*/
branch 0 taken 98% (fallthrough)
branch 1 taken 2%
1547: 370:/*EOF*/
branch 0 taken 86%
branch 1 taken 14%
1547: 371:/*EOF*/
397579: 372:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
396032: 373:/*EOF*/
-: 374:/*EOF*/
-: 375:/*EOF*/
-: 376:/*EOF*/
6: 377:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
6: 378:/*EOF*/
call 0 returned 100%
-: 379:/*EOF*/
-: 380:/*EOF*/
-: 381:/*EOF*/
251: 382:/*EOF*/
call 0 returned 100%
-: 383:/*EOF*/
-: 384:/*EOF*/
251: 385:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
branch 2 taken 92% (fallthrough)
branch 3 taken 8%
230: 386:/*EOF*/
call 0 returned 100%
-: 387:/*EOF*/
-: 388:/*EOF*/
-: 389:/*EOF*/
251: 390:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
branch 2 taken 98% (fallthrough)
branch 3 taken 2%
245: 391:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
-: 392:/*EOF*/
-: 393:/*EOF*/
-: 394:/*EOF*/
251: 395:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 396:/*EOF*/
#####: 397:/*EOF*/
-: 398:/*EOF*/
-: 399:/*EOF*/
502: 400:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
251: 401:/*EOF*/
-: 402:/*EOF*/
3: 403:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
branch 2 taken 100% (fallthrough)
branch 3 taken 0%
3: 404:/*EOF*/
call 0 returned 100%
-: 405:/*EOF*/
-: 406:/*EOF*/
-: 407:/*EOF*/
248: 408:/*EOF*/
-: 409:/*EOF*/
248: 410:/*EOF*/
-: 411:/*EOF*/
-: 412:/*EOF*/
-: 413:/*EOF*/
-: 414:/*EOF*/
-: 415:/*EOF*/
-: 416:/*EOF*/
-: 417:/*EOF*/
-: 418:/*EOF*/
-: 419:/*EOF*/
-: 420:/*EOF*/
-: 421:/*EOF*/
-: 422:/*EOF*/
-: 423:/*EOF*/
function filter_binary called 0 returned 0% blocks executed 0%
#####: 424:/*EOF*/
-: 425:/*EOF*/
-: 426:/*EOF*/
-: 427:/*EOF*/
-: 428:/*EOF*/
-: 429:/*EOF*/
-: 430:/*EOF*/
-: 431:/*EOF*/
-: 432:/*EOF*/
#####: 433:/*EOF*/
#####: 434:/*EOF*/
#####: 435:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 436:/*EOF*/
branch 0 never executed
branch 1 never executed
-: 437:/*EOF*/
-: 438:/*EOF*/
#####: 439:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 440:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 441:/*EOF*/
#####: 442:/*EOF*/
branch 0 never executed
branch 1 never executed
-: 443:/*EOF*/
#####: 444:/*EOF*/
-: 445:/*EOF*/
-: 446:/*EOF*/
#####: 447:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 448:/*EOF*/
#####: 449:/*EOF*/
-: 450:/*EOF*/
-: 451:/*EOF*/
-: 452:/*EOF*/
#####: 453:/*EOF*/
-: 454:/*EOF*/
-: 455:/*EOF*/
-: 456:/*EOF*/
-: 457:/*EOF*/
-: 458:/*EOF*/
#####: 459:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 460:/*EOF*/
#####: 461:/*EOF*/
-: 462:/*EOF*/
-: 463:/*EOF*/
-: 464:/*EOF*/
-: 465:/*EOF*/
#####: 466:/*EOF*/
-: 467:/*EOF*/
-: 468:/*EOF*/
-: 469:/*EOF*/
-: 470:/*EOF*/
-: 471:/*EOF*/
-: 472:/*EOF*/
-: 473:/*EOF*/
-: 474:/*EOF*/
-: 475:/*EOF*/
-: 476:/*EOF*/
-: 477:/*EOF*/
-: 478:/*EOF*/
-: 479:/*EOF*/
-: 480:/*EOF*/
-: 481:/*EOF*/
function ambiguous_hook called 3 returned 100% blocks executed 100%
3: 482:/*EOF*/
-: 483:/*EOF*/
3: 484:/*EOF*/
3: 485:/*EOF*/
3: 486:/*EOF*/
3: 487:/*EOF*/
-: 488:/*EOF*/
-: 489:/*EOF*/
24: 490:/*EOF*/
branch 0 taken 88%
branch 1 taken 13% (fallthrough)
21: 491:/*EOF*/
branch 0 taken 86% (fallthrough)
branch 1 taken 14%
18: 492:/*EOF*/
branch 0 taken 33% (fallthrough)
branch 1 taken 67%
6: 493:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
6: 494:/*EOF*/
-: 495:/*EOF*/
-: 496:/*EOF*/
-: 497:/*EOF*/
-: 498:/*EOF*/
3: 499:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
3: 500:/*EOF*/
call 0 returned 100%
-: 501:/*EOF*/
3: 502:/*EOF*/
3: 503:/*EOF*/
-: 504:/*EOF*/
-: 505:/*EOF*/
-: 506:/*EOF*/
-: 507:/*EOF*/
-: 508:/*EOF*/
-: 509:/*EOF*/
-: 510:/*EOF*/
-: 511:/*EOF*/
-: 512:/*EOF*/
-: 513:/*EOF*/
-: 514:/*EOF*/
-: 515:/*EOF*/
-: 516:/*EOF*/
-: 517:/*EOF*/
-: 518:/*EOF*/
-: 519:/*EOF*/
-: 520:/*EOF*/
-: 521:/*EOF*/
815: 522:/*EOF*/
branch 0 taken 78%
branch 1 taken 22% (fallthrough)
branch 2 taken 92%
branch 3 taken 8% (fallthrough)
branch 4 taken 56%
branch 5 taken 44% (fallthrough)
branch 6 taken 50%
branch 7 taken 50% (fallthrough)
959: 523:/*EOF*/
call 0 returned 100%
branch 1 taken 92% (fallthrough)
branch 2 taken 8%
call 3 returned 100%
branch 4 taken 53% (fallthrough)
branch 5 taken 47%
call 6 returned 100%
branch 7 taken 77% (fallthrough)
branch 8 taken 23%
call 9 returned 100%
branch 10 taken 98% (fallthrough)
branch 11 taken 2%
-: 524:/*EOF*/
-: 525:/*EOF*/
-: 526:/*EOF*/
-: 527:/*EOF*/
-: 528:/*EOF*/
-: 529:/*EOF*/
-: 530:/*EOF*/
-: 531:/*EOF*/
-: 532:/*EOF*/
-: 533:/*EOF*/
-: 534:/*EOF*/
-: 535:/*EOF*/
-: 536:/*EOF*/
-: 537:/*EOF*/
-: 538:/*EOF*/
-: 539:/*EOF*/
-: 540:/*EOF*/
-: 541:/*EOF*/
-: 542:/*EOF*/
-: 543:/*EOF*/
function looks_like_qp called 33 returned 100% blocks executed 91%
33: 544:/*EOF*/
-: 545:/*EOF*/
-: 546:/*EOF*/
-: 547:/*EOF*/
-: 548:/*EOF*/
-: 549:/*EOF*/
-: 550:/*EOF*/
-: 551:/*EOF*/
-: 552:/*EOF*/
-: 553:/*EOF*/
-: 554:/*EOF*/
-: 555:/*EOF*/
-: 556:/*EOF*/
-: 557:/*EOF*/
-: 558:/*EOF*/
-: 559:/*EOF*/
-: 560:/*EOF*/
-: 561:/*EOF*/
-: 562:/*EOF*/
-: 563:/*EOF*/
-: 564:/*EOF*/
-: 565:/*EOF*/
-: 566:/*EOF*/
-: 567:/*EOF*/
-: 568:/*EOF*/
33: 569:/*EOF*/
33: 570:/*EOF*/
-: 571:/*EOF*/
33: 572:/*EOF*/
33: 573:/*EOF*/
-: 574:/*EOF*/
-: 575:/*EOF*/
-: 576:/*EOF*/
-: 577:/*EOF*/
-: 578:/*EOF*/
33: 579:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 580:/*EOF*/
-: 581:/*EOF*/
-: 582:/*EOF*/
33: 583:/*EOF*/
1503: 584:/*EOF*/
branch 0 taken 99% (fallthrough)
branch 1 taken 1%
branch 2 taken 99%
branch 3 taken 1% (fallthrough)
1437: 585:/*EOF*/
branch 0 taken 59% (fallthrough)
branch 1 taken 41%
846: 586:/*EOF*/
846: 587:/*EOF*/
846: 588:/*EOF*/
branch 0 taken 4% (fallthrough)
branch 1 taken 96%
66: 589:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
66: 590:/*EOF*/
branch 0 taken 50%
branch 1 taken 50% (fallthrough)
33: 591:/*EOF*/
33: 592:/*EOF*/
-: 593:/*EOF*/
33: 594:/*EOF*/
-: 595:/*EOF*/
-: 596:/*EOF*/
813: 597:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
branch 2 taken 100% (fallthrough)
branch 3 taken 0%
813: 598:/*EOF*/
813: 599:/*EOF*/
-: 600:/*EOF*/
-: 601:/*EOF*/
-: 602:/*EOF*/
-: 603:/*EOF*/
813: 604:/*EOF*/
813: 605:/*EOF*/
-: 606:/*EOF*/
591: 607:/*EOF*/
-: 608:/*EOF*/
-: 609:/*EOF*/
-: 610:/*EOF*/
-: 611:/*EOF*/
33: 612:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 613:/*EOF*/
-: 614:/*EOF*/
33: 615:/*EOF*/
-: 616:/*EOF*/
-: 617:/*EOF*/
33: 618:/*EOF*/
33: 619:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 620:/*EOF*/
branch 0 never executed
branch 1 never executed
#####: 621:/*EOF*/
#####: 622:/*EOF*/
#####: 623:/*EOF*/
call 0 never executed
#####: 624:/*EOF*/
#####: 625:/*EOF*/
-: 626:/*EOF*/
-: 627:/*EOF*/
-: 628:/*EOF*/
-: 629:/*EOF*/
-: 630:/*EOF*/
-: 631:/*EOF*/
33: 632:/*EOF*/
33: 633:/*EOF*/
33: 634:/*EOF*/
912: 635:/*EOF*/
branch 0 taken 97% (fallthrough)
branch 1 taken 3%
branch 2 taken 99%
branch 3 taken 1% (fallthrough)
1692: 636:/*EOF*/
846: 637:/*EOF*/
846: 638:/*EOF*/
846: 639:/*EOF*/
branch 0 taken 4% (fallthrough)
branch 1 taken 96%
66: 640:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
66: 641:/*EOF*/
branch 0 taken 50%
branch 1 taken 50%
33: 642:/*EOF*/
-: 643:/*EOF*/
-: 644:/*EOF*/
813: 645:/*EOF*/
813: 646:/*EOF*/
-: 647:/*EOF*/
846: 648:/*EOF*/
846: 649:/*EOF*/
-: 650:/*EOF*/
66: 651:/*EOF*/
-: 652:/*EOF*/
33: 653:/*EOF*/
-: 654:/*EOF*/
-: 655:/*EOF*/
-: 656:/*EOF*/
-: 657:/*EOF*/
-: 658:/*EOF*/
-: 659:/*EOF*/
-: 660:/*EOF*/
-: 661:/*EOF*/
-: 662:/*EOF*/
-: 663:/*EOF*/
-: 664:/*EOF*/
-: 665:/*EOF*/
-: 666:/*EOF*/
function enca_eol_surface called 460 returned 100% blocks executed 100%
460: 667:/*EOF*/
-: 668:/*EOF*/
-: 669:/*EOF*/
-: 670:/*EOF*/
-: 671:/*EOF*/
-: 672:/*EOF*/
-: 673:/*EOF*/
-: 674:/*EOF*/
-: 675:/*EOF*/
14860: 676:/*EOF*/
branch 0 taken 97%
branch 1 taken 3% (fallthrough)
14410: 677:/*EOF*/
branch 0 taken 5% (fallthrough)
branch 1 taken 95%
branch 2 taken 98% (fallthrough)
branch 3 taken 2%
-: 678:/*EOF*/
-: 679:/*EOF*/
-: 680:/*EOF*/
450: 681:/*EOF*/
branch 0 taken 53% (fallthrough)
branch 1 taken 47%
-: 682:/*EOF*/
-: 683:/*EOF*/
240: 684:/*EOF*/
branch 0 taken 83% (fallthrough)
branch 1 taken 17%
-: 685:/*EOF*/
-: 686:/*EOF*/
199: 687:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 688:/*EOF*/
-: 689:/*EOF*/
-: 690:/*EOF*/
199: 691:/*EOF*/
24070: 692:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
23672: 693:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 694:/*EOF*/
23672: 695:/*EOF*/
23672: 696:/*EOF*/
-: 697:/*EOF*/
-: 698:/*EOF*/
-: 699:/*EOF*/
-: 700:/*EOF*/
-: 701:/*EOF*/
-: 702:/*EOF*/
-: 703:/*EOF*/
-: 704:/*EOF*/
-: 705:/*EOF*/
-: 706:/*EOF*/
-: 707:/*EOF*/
-: 708:/*EOF*/
-: 709:/*EOF*/
-: 710:/*EOF*/
-: 711:/*EOF*/
-: 712:/*EOF*/
-: 713:/*EOF*/
-: 714:/*EOF*/
function enca_find_max_sec called 433 returned 100% blocks executed 92%
433: 715:/*EOF*/
-: 716:/*EOF*/
433: 717:/*EOF*/
433: 718:/*EOF*/
-: 719:/*EOF*/
-: 720:/*EOF*/
433: 721:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
call 2 never executed
-: 722:/*EOF*/
-: 723:/*EOF*/
2731: 724:/*EOF*/
branch 0 taken 86%
branch 1 taken 14%
2731: 725:/*EOF*/
-: 726:/*EOF*/
-: 727:/*EOF*/
2731: 728:/*EOF*/
branch 0 taken 84%
branch 1 taken 16% (fallthrough)
2298: 729:/*EOF*/
-: 730:/*EOF*/
9765: 731:/*EOF*/
branch 0 taken 76%
branch 1 taken 24%
7467: 732:/*EOF*/
branch 0 taken 35% (fallthrough)
branch 1 taken 65%
2599: 733:/*EOF*/
-: 734:/*EOF*/
2599: 735:/*EOF*/
2599: 736:/*EOF*/
2599: 737:/*EOF*/
-: 738:/*EOF*/
-: 739:/*EOF*/
-: 740:/*EOF*/
433: 741:/*EOF*/
-: 742:/*EOF*/
-: 743:/*EOF*/
-: 744:/*EOF*/
-: 745:/*EOF*/
-: 746:/*EOF*/
-: 747:/*EOF*/
-: 748:/*EOF*/
-: 749:/*EOF*/
-: 750:/*EOF*/
function count_characters called 516 returned 100% blocks executed 100%
516: 751:/*EOF*/
-: 752:/*EOF*/
516: 753:/*EOF*/
516: 754:/*EOF*/
516: 755:/*EOF*/
-: 756:/*EOF*/
-: 757:/*EOF*/
516: 758:/*EOF*/
516: 759:/*EOF*/
-: 760:/*EOF*/
132612: 761:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
132096: 762:/*EOF*/
-: 763:/*EOF*/
1883028: 764:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
1883028: 765:/*EOF*/
-: 766:/*EOF*/
132096: 767:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
132096: 768:/*EOF*/
branch 0 taken 11% (fallthrough)
branch 1 taken 89%
14964: 769:/*EOF*/
-: 770:/*EOF*/
-: 771:/*EOF*/
66048: 772:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
66048: 773:/*EOF*/
516: 774:/*EOF*/
-: 775:/*EOF*/
-: 776:/*EOF*/
-: 777:/*EOF*/
-: 778:/*EOF*/
-: 779:/*EOF*/
-: 780:/*EOF*/
-: 781:/*EOF*/
-: 782:/*EOF*/
-: 783:/*EOF*/
-: 784:/*EOF*/
-: 785:/*EOF*/
-: 786:/*EOF*/
function check_significant called 335 returned 100% blocks executed 100%
335: 787:/*EOF*/
-: 788:/*EOF*/
335: 789:/*EOF*/
335: 790:/*EOF*/
-: 791:/*EOF*/
335: 792:/*EOF*/
-: 793:/*EOF*/
335: 794:/*EOF*/
branch 0 taken 98% (fallthrough)
branch 1 taken 2%
-: 795:/*EOF*/
-: 796:/*EOF*/
84224: 797:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
84224: 798:/*EOF*/
branch 0 taken 27% (fallthrough)
branch 1 taken 73%
22353: 799:/*EOF*/
-: 800:/*EOF*/
-: 801:/*EOF*/
329: 802:/*EOF*/
-: 803:/*EOF*/
-: 804:/*EOF*/
-: 805:/*EOF*/
-: 806:/*EOF*/
-: 807:/*EOF*/
-: 808:/*EOF*/
-: 809:/*EOF*/
-: 810:/*EOF*/
-: 811:/*EOF*/
-: 812:/*EOF*/
-: 813:/*EOF*/
-: 814:/*EOF*/
-: 815:/*EOF*/
function test_garbage called 245 returned 100% blocks executed 100%
245: 816:/*EOF*/
-: 817:/*EOF*/
245: 818:/*EOF*/
245: 819:/*EOF*/
245: 820:/*EOF*/
-: 821:/*EOF*/
-: 822:/*EOF*/
-: 823:/*EOF*/
-: 824:/*EOF*/
245: 825:/*EOF*/
245: 826:/*EOF*/
31605: 827:/*EOF*/
branch 0 taken 99%
branch 1 taken 1% (fallthrough)
31360: 828:/*EOF*/
-: 829:/*EOF*/
245: 830:/*EOF*/
245: 831:/*EOF*/
-: 832:/*EOF*/
-: 833:/*EOF*/
-: 834:/*EOF*/
-: 835:/*EOF*/
-: 836:/*EOF*/
-: 837:/*EOF*/
-: 838:/*EOF*/
-: 839:/*EOF*/
-: 840:/*EOF*/
-: 841:/*EOF*/
-: 842:/*EOF*/
-: 843:/*EOF*/
-: 844:/*EOF*/
-: 845:/*EOF*/
-: 846:/*EOF*/
-: 847:/*EOF*/
-: 848:/*EOF*/
-: 849:/*EOF*/
-: 850:/*EOF*/
-: 851:/*EOF*/
-: 852:/*EOF*/
function enca_set_multibyte called 247 returned 100% blocks executed 67%
247: 853:/*EOF*/
-: 854:/*EOF*/
-: 855:/*EOF*/
247: 856:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
247: 857:/*EOF*/
247: 858:/*EOF*/
-: 859:/*EOF*/
-: 860:/*EOF*/
-: 861:/*EOF*/
-: 862:/*EOF*/
-: 863:/*EOF*/
-: 864:/*EOF*/
-: 865:/*EOF*/
-: 866:/*EOF*/
-: 867:/*EOF*/
-: 868:/*EOF*/
-: 869:/*EOF*/
-: 870:/*EOF*/
-: 871:/*EOF*/
-: 872:/*EOF*/
-: 873:/*EOF*/
function enca_get_multibyte called 0 returned 0% blocks executed 0%
#####: 874:/*EOF*/
-: 875:/*EOF*/
#####: 876:/*EOF*/
branch 0 never executed
branch 1 never executed
call 2 never executed
#####: 877:/*EOF*/
-: 878:/*EOF*/
-: 879:/*EOF*/
-: 880:/*EOF*/
-: 881:/*EOF*/
-: 882:/*EOF*/
-: 883:/*EOF*/
-: 884:/*EOF*/
-: 885:/*EOF*/
-: 886:/*EOF*/
-: 887:/*EOF*/
-: 888:/*EOF*/
-: 889:/*EOF*/
-: 890:/*EOF*/
-: 891:/*EOF*/
-: 892:/*EOF*/
-: 893:/*EOF*/
-: 894:/*EOF*/
-: 895:/*EOF*/
-: 896:/*EOF*/
-: 897:/*EOF*/
-: 898:/*EOF*/
-: 899:/*EOF*/
-: 900:/*EOF*/
function enca_set_interpreted_surfaces called 0 returned 0% blocks executed 0%
#####: 901:/*EOF*/
-: 902:/*EOF*/
-: 903:/*EOF*/
#####: 904:/*EOF*/
branch 0 never executed
branch 1 never executed
call 2 never executed
#####: 905:/*EOF*/
#####: 906:/*EOF*/
-: 907:/*EOF*/
-: 908:/*EOF*/
-: 909:/*EOF*/
-: 910:/*EOF*/
-: 911:/*EOF*/
-: 912:/*EOF*/
-: 913:/*EOF*/
-: 914:/*EOF*/
-: 915:/*EOF*/
-: 916:/*EOF*/
-: 917:/*EOF*/
-: 918:/*EOF*/
-: 919:/*EOF*/
-: 920:/*EOF*/
-: 921:/*EOF*/
function enca_get_interpreted_surfaces called 0 returned 0% blocks executed 0%
#####: 922:/*EOF*/
-: 923:/*EOF*/
#####: 924:/*EOF*/
branch 0 never executed
branch 1 never executed
call 2 never executed
#####: 925:/*EOF*/
-: 926:/*EOF*/
-: 927:/*EOF*/
-: 928:/*EOF*/
-: 929:/*EOF*/
-: 930:/*EOF*/
-: 931:/*EOF*/
-: 932:/*EOF*/
-: 933:/*EOF*/
-: 934:/*EOF*/
-: 935:/*EOF*/
-: 936:/*EOF*/
-: 937:/*EOF*/
-: 938:/*EOF*/
-: 939:/*EOF*/
-: 940:/*EOF*/
-: 941:/*EOF*/
-: 942:/*EOF*/
function enca_set_ambiguity called 247 returned 100% blocks executed 67%
247: 943:/*EOF*/
-: 944:/*EOF*/
-: 945:/*EOF*/
247: 946:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
247: 947:/*EOF*/
247: 948:/*EOF*/
-: 949:/*EOF*/
-: 950:/*EOF*/
-: 951:/*EOF*/
-: 952:/*EOF*/
-: 953:/*EOF*/
-: 954:/*EOF*/
-: 955:/*EOF*/
-: 956:/*EOF*/
-: 957:/*EOF*/
-: 958:/*EOF*/
-: 959:/*EOF*/
-: 960:/*EOF*/
-: 961:/*EOF*/
-: 962:/*EOF*/
function enca_get_ambiguity called 0 returned 0% blocks executed 0%
#####: 963:/*EOF*/
-: 964:/*EOF*/
#####: 965:/*EOF*/
branch 0 never executed
branch 1 never executed
call 2 never executed
#####: 966:/*EOF*/
-: 967:/*EOF*/
-: 968:/*EOF*/
-: 969:/*EOF*/
-: 970:/*EOF*/
-: 971:/*EOF*/
-: 972:/*EOF*/
-: 973:/*EOF*/
-: 974:/*EOF*/
-: 975:/*EOF*/
-: 976:/*EOF*/
-: 977:/*EOF*/
-: 978:/*EOF*/
-: 979:/*EOF*/
-: 980:/*EOF*/
-: 981:/*EOF*/
-: 982:/*EOF*/
-: 983:/*EOF*/
function enca_set_filtering called 484 returned 100% blocks executed 67%
484: 984:/*EOF*/
-: 985:/*EOF*/
-: 986:/*EOF*/
484: 987:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
484: 988:/*EOF*/
484: 989:/*EOF*/
-: 990:/*EOF*/
-: 991:/*EOF*/
-: 992:/*EOF*/
-: 993:/*EOF*/
-: 994:/*EOF*/
-: 995:/*EOF*/
-: 996:/*EOF*/
-: 997:/*EOF*/
-: 998:/*EOF*/
-: 999:/*EOF*/
-: 1000:/*EOF*/
-: 1001:/*EOF*/
-: 1002:/*EOF*/
-: 1003:/*EOF*/
function enca_get_filtering called 0 returned 0% blocks executed 0%
#####: 1004:/*EOF*/
-: 1005:/*EOF*/
#####: 1006:/*EOF*/
branch 0 never executed
branch 1 never executed
call 2 never executed
#####: 1007:/*EOF*/
-: 1008:/*EOF*/
-: 1009:/*EOF*/
-: 1010:/*EOF*/
-: 1011:/*EOF*/
-: 1012:/*EOF*/
-: 1013:/*EOF*/
-: 1014:/*EOF*/
-: 1015:/*EOF*/
-: 1016:/*EOF*/
-: 1017:/*EOF*/
-: 1018:/*EOF*/
-: 1019:/*EOF*/
-: 1020:/*EOF*/
-: 1021:/*EOF*/
-: 1022:/*EOF*/
-: 1023:/*EOF*/
-: 1024:/*EOF*/
function enca_set_garbage_test called 247 returned 100% blocks executed 67%
247: 1025:/*EOF*/
-: 1026:/*EOF*/
-: 1027:/*EOF*/
247: 1028:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
247: 1029:/*EOF*/
247: 1030:/*EOF*/
-: 1031:/*EOF*/
-: 1032:/*EOF*/
-: 1033:/*EOF*/
-: 1034:/*EOF*/
-: 1035:/*EOF*/
-: 1036:/*EOF*/
-: 1037:/*EOF*/
-: 1038:/*EOF*/
-: 1039:/*EOF*/
-: 1040:/*EOF*/
-: 1041:/*EOF*/
-: 1042:/*EOF*/
-: 1043:/*EOF*/
-: 1044:/*EOF*/
function enca_get_garbage_test called 0 returned 0% blocks executed 0%
#####: 1045:/*EOF*/
-: 1046:/*EOF*/
#####: 1047:/*EOF*/
branch 0 never executed
branch 1 never executed
call 2 never executed
#####: 1048:/*EOF*/
-: 1049:/*EOF*/
-: 1050:/*EOF*/
-: 1051:/*EOF*/
-: 1052:/*EOF*/
-: 1053:/*EOF*/
-: 1054:/*EOF*/
-: 1055:/*EOF*/
-: 1056:/*EOF*/
-: 1057:/*EOF*/
-: 1058:/*EOF*/
-: 1059:/*EOF*/
-: 1060:/*EOF*/
-: 1061:/*EOF*/
-: 1062:/*EOF*/
-: 1063:/*EOF*/
-: 1064:/*EOF*/
-: 1065:/*EOF*/
-: 1066:/*EOF*/
-: 1067:/*EOF*/
-: 1068:/*EOF*/
-: 1069:/*EOF*/
-: 1070:/*EOF*/
-: 1071:/*EOF*/
-: 1072:/*EOF*/
-: 1073:/*EOF*/
-: 1074:/*EOF*/
function enca_set_termination_strictness called 484 returned 100% blocks executed 67%
484: 1075:/*EOF*/
-: 1076:/*EOF*/
-: 1077:/*EOF*/
484: 1078:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
484: 1079:/*EOF*/
484: 1080:/*EOF*/
-: 1081:/*EOF*/
-: 1082:/*EOF*/
-: 1083:/*EOF*/
-: 1084:/*EOF*/
-: 1085:/*EOF*/
-: 1086:/*EOF*/
-: 1087:/*EOF*/
-: 1088:/*EOF*/
-: 1089:/*EOF*/
-: 1090:/*EOF*/
-: 1091:/*EOF*/
-: 1092:/*EOF*/
-: 1093:/*EOF*/
-: 1094:/*EOF*/
-: 1095:/*EOF*/
function enca_get_termination_strictness called 0 returned 0% blocks executed 0%
#####: 1096:/*EOF*/
-: 1097:/*EOF*/
#####: 1098:/*EOF*/
branch 0 never executed
branch 1 never executed
call 2 never executed
#####: 1099:/*EOF*/
-: 1100:/*EOF*/
-: 1101:/*EOF*/
-: 1102:/*EOF*/
-: 1103:/*EOF*/
-: 1104:/*EOF*/
-: 1105:/*EOF*/
-: 1106:/*EOF*/
-: 1107:/*EOF*/
-: 1108:/*EOF*/
-: 1109:/*EOF*/
-: 1110:/*EOF*/
-: 1111:/*EOF*/
-: 1112:/*EOF*/
-: 1113:/*EOF*/
-: 1114:/*EOF*/
-: 1115:/*EOF*/
-: 1116:/*EOF*/
-: 1117:/*EOF*/
-: 1118:/*EOF*/
-: 1119:/*EOF*/
function enca_set_significant called 484 returned 100% blocks executed 67%
484: 1120:/*EOF*/
-: 1121:/*EOF*/
-: 1122:/*EOF*/
484: 1123:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
484: 1124:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 1125:/*EOF*/
-: 1126:/*EOF*/
484: 1127:/*EOF*/
484: 1128:/*EOF*/
-: 1129:/*EOF*/
-: 1130:/*EOF*/
-: 1131:/*EOF*/
-: 1132:/*EOF*/
-: 1133:/*EOF*/
-: 1134:/*EOF*/
-: 1135:/*EOF*/
-: 1136:/*EOF*/
-: 1137:/*EOF*/
-: 1138:/*EOF*/
-: 1139:/*EOF*/
-: 1140:/*EOF*/
-: 1141:/*EOF*/
-: 1142:/*EOF*/
-: 1143:/*EOF*/
-: 1144:/*EOF*/
function enca_get_significant called 0 returned 0% blocks executed 0%
#####: 1145:/*EOF*/
-: 1146:/*EOF*/
#####: 1147:/*EOF*/
branch 0 never executed
branch 1 never executed
call 2 never executed
#####: 1148:/*EOF*/
-: 1149:/*EOF*/
-: 1150:/*EOF*/
-: 1151:/*EOF*/
-: 1152:/*EOF*/
-: 1153:/*EOF*/
-: 1154:/*EOF*/
-: 1155:/*EOF*/
-: 1156:/*EOF*/
-: 1157:/*EOF*/
-: 1158:/*EOF*/
-: 1159:/*EOF*/
-: 1160:/*EOF*/
-: 1161:/*EOF*/
-: 1162:/*EOF*/
-: 1163:/*EOF*/
-: 1164:/*EOF*/
-: 1165:/*EOF*/
-: 1166:/*EOF*/
-: 1167:/*EOF*/
-: 1168:/*EOF*/
-: 1169:/*EOF*/
-: 1170:/*EOF*/
-: 1171:/*EOF*/
function enca_set_threshold called 247 returned 100% blocks executed 67%
247: 1172:/*EOF*/
-: 1173:/*EOF*/
-: 1174:/*EOF*/
247: 1175:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
247: 1176:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 1177:/*EOF*/
-: 1178:/*EOF*/
247: 1179:/*EOF*/
247: 1180:/*EOF*/
-: 1181:/*EOF*/
-: 1182:/*EOF*/
-: 1183:/*EOF*/
-: 1184:/*EOF*/
-: 1185:/*EOF*/
-: 1186:/*EOF*/
-: 1187:/*EOF*/
-: 1188:/*EOF*/
-: 1189:/*EOF*/
-: 1190:/*EOF*/
-: 1191:/*EOF*/
-: 1192:/*EOF*/
-: 1193:/*EOF*/
-: 1194:/*EOF*/
-: 1195:/*EOF*/
function enca_get_threshold called 0 returned 0% blocks executed 0%
#####: 1196:/*EOF*/
-: 1197:/*EOF*/
#####: 1198:/*EOF*/
branch 0 never executed
branch 1 never executed
call 2 never executed
#####: 1199:/*EOF*/
<<<<<< EOF
# path=/home/travis/build/nijel/enca/enca.c.gcov
-: 0:Source:enca.c
-: 0:Graph:/home/travis/build/nijel/enca/src/enca-enca.gcno
-: 0:Data:/home/travis/build/nijel/enca/src/enca-enca.gcda
-: 0:Runs:275
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
function main called 275 returned 89% blocks executed 90%
275: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
275: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
275: 47:/*EOF*/
call 0 returned 90%
-: 48:/*EOF*/
-: 49:/*EOF*/
247: 50:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 51:/*EOF*/
247: 52:/*EOF*/
call 0 returned 100%
247: 53:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
#####: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
#####: 62:/*EOF*/
call 0 never executed
-: 63:/*EOF*/
-: 64:/*EOF*/
247: 65:/*EOF*/
call 0 returned 100%
247: 66:/*EOF*/
call 0 returned 100%
247: 67:/*EOF*/
call 0 returned 100%
247: 68:/*EOF*/
call 0 returned 100%
-: 69:/*EOF*/
-: 70:/*EOF*/
247: 71:/*EOF*/
branch 0 taken 40% (fallthrough)
branch 1 taken 60%
-: 72:/*EOF*/
149: 73:/*EOF*/
call 0 returned 100%
-: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
434: 77:/*EOF*/
branch 0 taken 78%
branch 1 taken 22% (fallthrough)
337: 78:/*EOF*/
call 0 returned 99%
336: 79:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
336: 80:/*EOF*/
-: 81:/*EOF*/
-: 82:/*EOF*/
-: 83:/*EOF*/
-: 84:/*EOF*/
246: 85:/*EOF*/
call 0 returned 100%
246: 86:/*EOF*/
call 0 returned 100%
246: 87:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
246: 88:/*EOF*/
branch 0 taken 24% (fallthrough)
branch 1 taken 76%
246: 89:/*EOF*/
branch 0 taken 39% (fallthrough)
branch 1 taken 61%
-: 90:/*EOF*/
246: 91:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
3: 92:/*EOF*/
-: 93:/*EOF*/
246: 94:/*EOF*/
-: 95:/*EOF*/
-: 96:/*EOF*/
-: 97:/*EOF*/
-: 98:/*EOF*/
-: 99:/*EOF*/
-: 100:/*EOF*/
function process_file called 732 returned 99% blocks executed 91%
732: 101:/*EOF*/
-: 102:/*EOF*/
-: 103:/*EOF*/
-: 104:/*EOF*/
-: 105:/*EOF*/
732: 106:/*EOF*/
-: 107:/*EOF*/
-: 108:/*EOF*/
-: 109:/*EOF*/
-: 110:/*EOF*/
732: 111:/*EOF*/
branch 0 taken 34% (fallthrough)
branch 1 taken 66%
246: 112:/*EOF*/
call 0 returned 100%
246: 113:/*EOF*/
-: 114:/*EOF*/
-: 115:/*EOF*/
-: 116:/*EOF*/
486: 117:/*EOF*/
branch 0 taken 51% (fallthrough)
branch 1 taken 49%
247: 118:/*EOF*/
call 0 returned 100%
-: 119:/*EOF*/
486: 120:/*EOF*/
branch 0 taken 51% (fallthrough)
branch 1 taken 49%
247: 121:/*EOF*/
call 0 returned 100%
247: 122:/*EOF*/
branch 0 taken 0% (fallthrough)
branch 1 taken 100%
call 2 never executed
-: 123:/*EOF*/
-: 124:/*EOF*/
-: 125:/*EOF*/
486: 126:/*EOF*/
call 0 returned 100%
486: 127:/*EOF*/
branch 0 taken 87% (fallthrough)
branch 1 taken 13%
call 2 returned 100%
branch 3 taken 1% (fallthrough)
branch 4 taken 99%
2: 128:/*EOF*/
call 0 returned 100%
2: 129:/*EOF*/
-: 130:/*EOF*/
484: 131:/*EOF*/
call 0 returned 100%
branch 1 taken 0% (fallthrough)
branch 2 taken 100%
#####: 132:/*EOF*/
call 0 never executed
#####: 133:/*EOF*/
-: 134:/*EOF*/
484: 135:/*EOF*/
branch 0 taken 87% (fallthrough)
branch 1 taken 13%
420: 136:/*EOF*/
call 0 returned 100%
-: 137:/*EOF*/
-: 138:/*EOF*/
484: 139:/*EOF*/
call 0 returned 100%
484: 140:/*EOF*/
branch 0 taken 13% (fallthrough)
branch 1 taken 87%
64: 141:/*EOF*/
call 0 returned 100%
-: 142:/*EOF*/
420: 143:/*EOF*/
call 0 returned 100%
-: 144:/*EOF*/
-: 145:/*EOF*/
484: 146:/*EOF*/
branch 0 taken 13% (fallthrough)
branch 1 taken 87%
64: 147:/*EOF*/
-: 148:/*EOF*/
64: 149:/*EOF*/
branch 0 taken 97% (fallthrough)
branch 1 taken 3%
62: 150:/*EOF*/
call 0 returned 98%
-: 151:/*EOF*/
2: 152:/*EOF*/
call 0 returned 100%
branch 1 taken 0% (fallthrough)
branch 2 taken 100%
#####: 153:/*EOF*/
call 0 never executed
-: 154:/*EOF*/
#####: 155:/*EOF*/
-: 156:/*EOF*/
-: 157:/*EOF*/
2: 158:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
2: 159:/*EOF*/
call 0 returned 100%
-: 160:/*EOF*/
-: 161:/*EOF*/
63: 162:/*EOF*/
call 0 returned 100%
63: 163:/*EOF*/
branch 0 taken 92% (fallthrough)
branch 1 taken 8%
branch 2 taken 3% (fallthrough)
branch 3 taken 97%
2: 164:/*EOF*/
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
63: 165:/*EOF*/
branch 0 taken 94% (fallthrough)
branch 1 taken 6%
-: 166:/*EOF*/
-: 167:/*EOF*/
59: 168:/*EOF*/
branch 0 taken 2% (fallthrough)
branch 1 taken 98%
-: 169:/*EOF*/
-: 170:/*EOF*/
-: 171:/*EOF*/
420: 172:/*EOF*/
call 0 returned 100%
call 1 returned 100%
420: 173:/*EOF*/
branch 0 taken 23% (fallthrough)
branch 1 taken 77%
97: 174:/*EOF*/
call 0 returned 100%
-: 175:/*EOF*/
420: 176:/*EOF*/
call 0 returned 100%
-: 177:/*EOF*/
420: 178:/*EOF*/
-: 179:/*EOF*/
-: 180:/*EOF*/
-: 181:/*EOF*/
-: 182:/*EOF*/
-: 183:/*EOF*/
-: 184:/*EOF*/
-: 185:/*EOF*/
-: 186:/*EOF*/
function dwim_libenca_options.isra.0 called 484 returned 100% blocks executed 100%
484: 187:/*EOF*/
-: 188:/*EOF*/
484: 189:/*EOF*/
484: 190:/*EOF*/
484: 191:/*EOF*/
-: 192:/*EOF*/
-: 193:/*EOF*/
-: 194:/*EOF*/
484: 195:/*EOF*/
branch 0 taken 99% (fallthrough)
branch 1 taken 1%
-: 196:/*EOF*/
-: 197:/*EOF*/
481: 198:/*EOF*/
484: 199:/*EOF*/
call 0 returned 100%
-: 200:/*EOF*/
-: 201:/*EOF*/
484: 202:/*EOF*/
branch 0 taken 67% (fallthrough)
branch 1 taken 33%
322: 203:/*EOF*/
call 0 returned 100%
-: 204:/*EOF*/
162: 205:/*EOF*/
call 0 returned 100%
-: 206:/*EOF*/
484: 207:/*EOF*/
call 0 returned 100%
484: 208:/*EOF*/
-: 209:/*EOF*/
-: 210:/*EOF*/
-: 211:/*EOF*/
-: 212:/*EOF*/
-: 213:/*EOF*/
function print_results called 420 returned 100% blocks executed 50%
420: 214:/*EOF*/
-: 215:/*EOF*/
-: 216:/*EOF*/
-: 217:/*EOF*/
-: 218:/*EOF*/
-: 219:/*EOF*/
840: 220:/*EOF*/
420: 221:/*EOF*/
call 0 returned 100%
-: 222:/*EOF*/
420: 223:/*EOF*/
branch 0 taken 68% (fallthrough)
branch 1 taken 32%
284: 224:/*EOF*/
call 0 returned 100%
-: 225:/*EOF*/
420: 226:/*EOF*/
branch 0 taken 0%
branch 1 taken 88%
branch 2 taken 12%
branch 3 taken 0%
branch 4 taken 0%
branch 5 taken 0%
branch 6 taken 0%
branch 7 taken 0%
-: 227:/*EOF*/
#####: 228:/*EOF*/
call 0 never executed
#####: 229:/*EOF*/
-: 230:/*EOF*/
-: 231:/*EOF*/
368: 232:/*EOF*/
branch 0 taken 32% (fallthrough)
branch 1 taken 68%
117: 233:/*EOF*/
call 0 returned 100%
117: 234:/*EOF*/
call 0 returned 100%
call 1 returned 100%
117: 235:/*EOF*/
call 0 returned 100%
117: 236:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 237:/*EOF*/
-: 238:/*EOF*/
251: 239:/*EOF*/
call 0 returned 100%
call 1 returned 100%
-: 240:/*EOF*/
-: 241:/*EOF*/
-: 242:/*EOF*/
-: 243:/*EOF*/
52: 244:/*EOF*/
branch 0 taken 38% (fallthrough)
branch 1 taken 62%
20: 245:/*EOF*/
call 0 returned 100%
20: 246:/*EOF*/
call 0 returned 100%
call 1 returned 100%
20: 247:/*EOF*/
call 0 returned 100%
20: 248:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 249:/*EOF*/
-: 250:/*EOF*/
32: 251:/*EOF*/
call 0 returned 100%
call 1 returned 100%
-: 252:/*EOF*/
-: 253:/*EOF*/
-: 254:/*EOF*/
#####: 255:/*EOF*/
call 0 never executed
call 1 never executed
#####: 256:/*EOF*/
-: 257:/*EOF*/
-: 258:/*EOF*/
#####: 259:/*EOF*/
call 0 never executed
branch 1 never executed
branch 2 never executed
#####: 260:/*EOF*/
call 0 never executed
call 1 never executed
-: 261:/*EOF*/
#####: 262:/*EOF*/
call 0 never executed
call 1 never executed
-: 263:/*EOF*/
-: 264:/*EOF*/
-: 265:/*EOF*/
#####: 266:/*EOF*/
call 0 never executed
branch 1 never executed
branch 2 never executed
#####: 267:/*EOF*/
call 0 never executed
call 1 never executed
-: 268:/*EOF*/
#####: 269:/*EOF*/
call 0 never executed
call 1 never executed
-: 270:/*EOF*/
-: 271:/*EOF*/
-: 272:/*EOF*/
#####: 273:/*EOF*/
call 0 never executed
branch 1 never executed
branch 2 never executed
#####: 274:/*EOF*/
call 0 never executed
call 1 never executed
-: 275:/*EOF*/
#####: 276:/*EOF*/
call 0 never executed
call 1 never executed
-: 277:/*EOF*/
-: 278:/*EOF*/
-: 279:/*EOF*/
#####: 280:/*EOF*/
call 0 never executed
-: 281:/*EOF*/
-: 282:/*EOF*/
-: 283:/*EOF*/
420: 284:/*EOF*/
branch 0 taken 1% (fallthrough)
branch 1 taken 99%
branch 2 taken 0% (fallthrough)
branch 3 taken 100%
#####: 285:/*EOF*/
call 0 never executed
-: 286:/*EOF*/
420: 287:/*EOF*/
-: 288:/*EOF*/
-: 289:/*EOF*/
-: 290:/*EOF*/
-: 291:/*EOF*/
-: 292:/*EOF*/
-: 293:/*EOF*/
function indent_surface called 20 returned 100% blocks executed 100%
20: 294:/*EOF*/
-: 295:/*EOF*/
-: 296:/*EOF*/
-: 297:/*EOF*/
60: 298:/*EOF*/
branch 0 taken 50%
branch 1 taken 50% (fallthrough)
20: 299:/*EOF*/
40: 300:/*EOF*/
20: 301:/*EOF*/
call 0 returned 100%
-: 302:/*EOF*/
20: 303:/*EOF*/
-: 304:/*EOF*/
-: 305:/*EOF*/
-: 306:/*EOF*/
-: 307:/*EOF*/
-: 308:/*EOF*/
function double_utf8_chk called 97 returned 100% blocks executed 100%
97: 309:/*EOF*/
-: 310:/*EOF*/
-: 311:/*EOF*/
-: 312:/*EOF*/
-: 313:/*EOF*/
-: 314:/*EOF*/
-: 315:/*EOF*/
194: 316:/*EOF*/
branch 0 taken 51% (fallthrough)
branch 1 taken 49%
97: 317:/*EOF*/
-: 318:/*EOF*/
-: 319:/*EOF*/
49: 320:/*EOF*/
call 0 returned 100%
49: 321:/*EOF*/
branch 0 taken 78% (fallthrough)
branch 1 taken 22%
-: 322:/*EOF*/
-: 323:/*EOF*/
38: 324:/*EOF*/
call 0 returned 100%
38: 325:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
-: 326:/*EOF*/
38: 327:/*EOF*/
branch 0 taken 71% (fallthrough)
branch 1 taken 29%
-: 328:/*EOF*/
-: 329:/*EOF*/
-: 330:/*EOF*/
-: 331:/*EOF*/
55: 332:/*EOF*/
branch 0 taken 59%
branch 1 taken 41% (fallthrough)
110: 333:/*EOF*/
call 0 returned 100%
-: 334:/*EOF*/
38: 335:/*EOF*/
38: 336:/*EOF*/
branch 0 taken 100% (fallthrough)
branch 1 taken 0%
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lang_bg.c.gcov
-: 0:Source:lang_bg.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_bg.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_bg.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
-: 62:/*EOF*/
-: 63:/*EOF*/
-: 64:/*EOF*/
function hook called 0 returned 0% blocks executed 0%
#####: 65:/*EOF*/
-: 66:/*EOF*/
#####: 67:/*EOF*/
-: 68:/*EOF*/
-: 69:/*EOF*/
-: 70:/*EOF*/
-: 71:/*EOF*/
-: 72:/*EOF*/
-: 73:/*EOF*/
-: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
function hook_winmac called 0 returned 0% blocks executed 0%
#####: 80:/*EOF*/
-: 81:/*EOF*/
-: 82:/*EOF*/
-: 83:/*EOF*/
-: 84:/*EOF*/
-: 85:/*EOF*/
-: 86:/*EOF*/
#####: 87:/*EOF*/
call 0 never executed
-: 88:/*EOF*/
-: 89:/*EOF*/
-: 90:/*EOF*/
-: 91:/*EOF*/
-: 92:/*EOF*/
-: 93:/*EOF*/
-: 94:/*EOF*/
-: 95:/*EOF*/
-: 96:/*EOF*/
-: 97:/*EOF*/
-: 98:/*EOF*/
-: 99:/*EOF*/
-: 100:/*EOF*/
-: 101:/*EOF*/
-: 102:/*EOF*/
-: 103:/*EOF*/
-: 104:/*EOF*/
-: 105:/*EOF*/
-: 106:/*EOF*/
-: 107:/*EOF*/
-: 108:/*EOF*/
-: 109:/*EOF*/
-: 110:/*EOF*/
-: 111:/*EOF*/
-: 112:/*EOF*/
-: 113:/*EOF*/
#####: 114:/*EOF*/
call 0 never executed
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lang_ru.c.gcov
-: 0:Source:lang_ru.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_ru.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_ru.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
-: 62:/*EOF*/
-: 63:/*EOF*/
-: 64:/*EOF*/
-: 65:/*EOF*/
function hook called 0 returned 0% blocks executed 0%
#####: 66:/*EOF*/
-: 67:/*EOF*/
#####: 68:/*EOF*/
-: 69:/*EOF*/
-: 70:/*EOF*/
-: 71:/*EOF*/
-: 72:/*EOF*/
-: 73:/*EOF*/
-: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
-: 80:/*EOF*/
function eol_hook called 0 returned 0% blocks executed 0%
#####: 81:/*EOF*/
-: 82:/*EOF*/
#####: 83:/*EOF*/
-: 84:/*EOF*/
-: 85:/*EOF*/
-: 86:/*EOF*/
-: 87:/*EOF*/
-: 88:/*EOF*/
-: 89:/*EOF*/
-: 90:/*EOF*/
-: 91:/*EOF*/
-: 92:/*EOF*/
-: 93:/*EOF*/
-: 94:/*EOF*/
-: 95:/*EOF*/
-: 96:/*EOF*/
-: 97:/*EOF*/
-: 98:/*EOF*/
-: 99:/*EOF*/
-: 100:/*EOF*/
-: 101:/*EOF*/
-: 102:/*EOF*/
#####: 103:/*EOF*/
call 0 never executed
-: 104:/*EOF*/
-: 105:/*EOF*/
-: 106:/*EOF*/
-: 107:/*EOF*/
-: 108:/*EOF*/
-: 109:/*EOF*/
-: 110:/*EOF*/
-: 111:/*EOF*/
-: 112:/*EOF*/
-: 113:/*EOF*/
-: 114:/*EOF*/
-: 115:/*EOF*/
-: 116:/*EOF*/
-: 117:/*EOF*/
-: 118:/*EOF*/
-: 119:/*EOF*/
-: 120:/*EOF*/
-: 121:/*EOF*/
-: 122:/*EOF*/
-: 123:/*EOF*/
-: 124:/*EOF*/
-: 125:/*EOF*/
-: 126:/*EOF*/
-: 127:/*EOF*/
-: 128:/*EOF*/
#####: 129:/*EOF*/
call 0 never executed
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lang_sl.c.gcov
-: 0:Source:lang_sl.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_sl.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_sl.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*EOF*/
-: 2:/*EOF*/
-: 3:/*EOF*/
-: 4:/*EOF*/
-: 5:/*EOF*/
-: 6:/*EOF*/
-: 7:/*EOF*/
-: 8:/*EOF*/
-: 9:/*EOF*/
-: 10:/*EOF*/
-: 11:/*EOF*/
-: 12:/*EOF*/
-: 13:/*EOF*/
-: 14:/*EOF*/
-: 15:/*EOF*/
-: 16:/*EOF*/
-: 17:/*EOF*/
-: 18:/*EOF*/
-: 19:/*EOF*/
-: 20:/*EOF*/
-: 21:/*EOF*/
-: 22:/*EOF*/
-: 23:/*EOF*/
-: 24:/*EOF*/
-: 25:/*EOF*/
-: 26:/*EOF*/
-: 27:/*EOF*/
-: 28:/*EOF*/
-: 29:/*EOF*/
-: 30:/*EOF*/
-: 31:/*EOF*/
-: 32:/*EOF*/
-: 33:/*EOF*/
-: 34:/*EOF*/
-: 35:/*EOF*/
-: 36:/*EOF*/
-: 37:/*EOF*/
-: 38:/*EOF*/
-: 39:/*EOF*/
-: 40:/*EOF*/
-: 41:/*EOF*/
-: 42:/*EOF*/
-: 43:/*EOF*/
-: 44:/*EOF*/
-: 45:/*EOF*/
-: 46:/*EOF*/
-: 47:/*EOF*/
-: 48:/*EOF*/
-: 49:/*EOF*/
-: 50:/*EOF*/
-: 51:/*EOF*/
-: 52:/*EOF*/
-: 53:/*EOF*/
-: 54:/*EOF*/
-: 55:/*EOF*/
-: 56:/*EOF*/
-: 57:/*EOF*/
-: 58:/*EOF*/
-: 59:/*EOF*/
-: 60:/*EOF*/
-: 61:/*EOF*/
-: 62:/*EOF*/
-: 63:/*EOF*/
function eol_hook called 0 returned 0% blocks executed 0%
#####: 64:/*EOF*/
-: 65:/*EOF*/
#####: 66:/*EOF*/
-: 67:/*EOF*/
-: 68:/*EOF*/
-: 69:/*EOF*/
-: 70:/*EOF*/
-: 71:/*EOF*/
-: 72:/*EOF*/
-: 73:/*EOF*/
-: 74:/*EOF*/
-: 75:/*EOF*/
-: 76:/*EOF*/
-: 77:/*EOF*/
-: 78:/*EOF*/
-: 79:/*EOF*/
-: 80:/*EOF*/
-: 81:/*EOF*/
-: 82:/*EOF*/
-: 83:/*EOF*/
-: 84:/*EOF*/
-: 85:/*EOF*/
#####: 86:/*EOF*/
call 0 never executed
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lib/.libs/lang_lv.c.gcov
-: 0:Source:lang_lv.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_lv.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_lv.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*
-: 2: encoding data and routines dependent on language; latvian
-: 3:
-: 4: Copyright (C) 2003 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#ifdef HAVE_CONFIG_H
-: 20:# include "config.h"
-: 21:#endif /* HAVE_CONFIG_H */
-: 22:
-: 23:#include "enca.h"
-: 24:#include "internal.h"
-: 25:#include "data/latvian/latvian.h"
-: 26:
-: 27:/* Local prototypes. */
-: 28:static int hook(EncaAnalyserState *analyser);
-: 29:static int hook_iso13win(EncaAnalyserState *analyser);
-: 30:static int hook_baltwin(EncaAnalyserState *analyser);
-: 31:
-: 32:/**
-: 33: * ENCA_LANGUAGE_LV:
-: 34: *
-: 35: * Latvian language.
-: 36: *
-: 37: * Everything the world out there needs to know about this language.
-: 38: **/
-: 39:const EncaLanguageInfo ENCA_LANGUAGE_LV = {
-: 40: "lv",
-: 41: "latvian",
-: 42: NCHARSETS,
-: 43: CHARSET_NAMES,
-: 44: CHARSET_WEIGHTS,
-: 45: SIGNIFICANT,
-: 46: CHARSET_LETTERS,
-: 47: CHARSET_PAIRS,
-: 48: WEIGHT_SUM,
-: 49: &hook,
-: 50: NULL,
-: 51: NULL,
-: 52: NULL
-: 53:};
-: 54:
-: 55:/**
-: 56: * hook:
-: 57: * @analyser: Analyser state whose charset ratings are to be modified.
-: 58: *
-: 59: * Launches language specific hooks for language "lv".
-: 60: *
-: 61: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 62: * otherwise.
-: 63: **/
-: 64:static int
24: 65:hook(EncaAnalyserState *analyser)
-: 66:{
24: 67: int chg = 0;
-: 68:
-: 69: /* we may want to run both, and in this order */
24: 70: chg += hook_baltwin(analyser);
24: 71: chg += hook_iso13win(analyser);
24: 72: return chg;
-: 73:}
-: 74:
-: 75:/**
-: 76: * hook_baltwin:
-: 77: * @analyser: Analyser state whose charset ratings are to be modified.
-: 78: *
-: 79: * Decides between cp1257, iso8859-13 and baltic charsets for language "lv".
-: 80: *
-: 81: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 82: * otherwise.
-: 83: **/
-: 84:static int
-: 85:hook_baltwin(EncaAnalyserState *analyser)
-: 86:{
-: 87: static const unsigned char list_cp1257[] = {
-: 88: 0xe7, 0xf0, 0xf2, 0xfe, 0xd0, 0xde
-: 89: };
-: 90: static const unsigned char list_iso885913[] = {
-: 91: 0xe7, 0xf0, 0xf2, 0xfe, 0xd0, 0xde
-: 92: };
-: 93: static const unsigned char list_baltic[] = {
-: 94: 0xec, 0xf9, 0xf1, 0xea, 0xd9, 0xcc
-: 95: };
-: 96: static EncaLanguageHookData1CS hookdata[] = {
-: 97: MAKE_HOOK_LINE(cp1257),
-: 98: MAKE_HOOK_LINE(iso885913),
-: 99: MAKE_HOOK_LINE(baltic),
-: 100: };
-: 101:
24: 102: return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata);
-: 103:}
-: 104:
-: 105:/**
-: 106: * hook_iso13win:
-: 107: * @analyser: Analyser state whose charset ratings are to be modified.
-: 108: *
-: 109: * Decides between iso8859-13 and cp1257 charsets for language "lv".
-: 110: *
-: 111: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 112: * otherwise.
-: 113: **/
-: 114:static int
-: 115:hook_iso13win(EncaAnalyserState *analyser)
-: 116:{
-: 117: static EncaLanguageHookDataEOL hookdata[] = {
-: 118: { "iso885913", ENCA_SURFACE_EOL_LF, (size_t)-1 },
-: 119: { "cp1257", ENCA_SURFACE_MASK_EOL, (size_t)-1 },
-: 120: };
-: 121:
24: 122: return enca_language_hook_eol(analyser, ELEMENTS(hookdata), hookdata);
-: 123:}
-: 124:
-: 125:/* vim: ts=2
-: 126: */
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lib/.libs/lang_pl.c.gcov
-: 0:Source:lang_pl.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_pl.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_pl.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*
-: 2: encoding data and routines dependent on language; polish
-: 3:
-: 4: Copyright (C) 2000-2003 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#ifdef HAVE_CONFIG_H
-: 20:# include "config.h"
-: 21:#endif /* HAVE_CONFIG_H */
-: 22:
-: 23:#include "enca.h"
-: 24:#include "internal.h"
-: 25:#include "data/polish/polish.h"
-: 26:
-: 27:/* Local prototypes. */
-: 28:static int hook(EncaAnalyserState *analyser);
-: 29:static int eol_hook(EncaAnalyserState *analyser);
-: 30:static int hook_iso1250(EncaAnalyserState *analyser);
-: 31:static int hook_balt13(EncaAnalyserState *analyser);
-: 32:static int hook_isowin(EncaAnalyserState *analyser);
-: 33:
-: 34:/**
-: 35: * ENCA_LANGUAGE_PL:
-: 36: *
-: 37: * Polish language.
-: 38: *
-: 39: * Everything the world out there needs to know about this language.
-: 40: **/
-: 41:const EncaLanguageInfo ENCA_LANGUAGE_PL = {
-: 42: "pl",
-: 43: "polish",
-: 44: NCHARSETS,
-: 45: CHARSET_NAMES,
-: 46: CHARSET_WEIGHTS,
-: 47: SIGNIFICANT,
-: 48: CHARSET_LETTERS,
-: 49: CHARSET_PAIRS,
-: 50: WEIGHT_SUM,
-: 51: &hook,
-: 52: &eol_hook,
-: 53: NULL,
-: 54: NULL
-: 55:};
-: 56:
-: 57:/**
-: 58: * hook:
-: 59: * @analyser: Analyser state whose charset ratings are to be modified.
-: 60: *
-: 61: * Launches language specific hooks for language "pl".
-: 62: *
-: 63: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 64: * otherwise.
-: 65: **/
-: 66:static int
27: 67:hook(EncaAnalyserState *analyser)
-: 68:{
54: 69: return hook_iso1250(analyser)
45: 70: || hook_balt13(analyser);
-: 71:}
-: 72:
-: 73:/**
-: 74: * eol_hook:
-: 75: * @analyser: Analyser state whose charset ratings are to be modified.
-: 76: *
-: 77: * Launches language specific EOL hooks for language "pl".
-: 78: *
-: 79: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 80: * otherwise.
-: 81: **/
-: 82:static int
#####: 83:eol_hook(EncaAnalyserState *analyser)
-: 84:{
#####: 85: return hook_isowin(analyser);
-: 86:}
-: 87:
-: 88:/**
-: 89: * hook_isowin:
-: 90: * @analyser: Analyser state whose charset ratings are to be modified.
-: 91: *
-: 92: * Decides between iso8859-2 and cp1250 charsets for language "pl".
-: 93: *
-: 94: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 95: * otherwise.
-: 96: **/
-: 97:static int
-: 98:hook_isowin(EncaAnalyserState *analyser)
-: 99:{
-: 100: static EncaLanguageHookDataEOL hookdata[] = {
-: 101: { "cp1250", ENCA_SURFACE_EOL_CRLF, (size_t)-1 },
-: 102: { "iso88592", ENCA_SURFACE_MASK_EOL, (size_t)-1 },
-: 103: };
-: 104:
#####: 105: return enca_language_hook_eol(analyser, ELEMENTS(hookdata), hookdata);
-: 106:}
-: 107:
-: 108:/**
-: 109: * hook_iso1250:
-: 110: * @analyser: Analyser state whose charset ratings are to be modified.
-: 111: *
-: 112: * Decides between iso8859-2 and cp1250 charsets for language "pl".
-: 113: *
-: 114: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 115: * otherwise.
-: 116: **/
-: 117:static int
-: 118:hook_iso1250(EncaAnalyserState *analyser)
-: 119:{
-: 120: static const unsigned char list_iso88592[] = {
-: 121: 0xb1, 0xb6, 0xbc, 0xa6
-: 122: };
-: 123: static const unsigned char list_cp1250[] = {
-: 124: 0xb9, 0x9c, 0x9f, 0x8,
-: 125: };
-: 126: static EncaLanguageHookData1CS hookdata[] = {
-: 127: MAKE_HOOK_LINE(iso88592),
-: 128: MAKE_HOOK_LINE(cp1250),
-: 129: };
-: 130:
27: 131: return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata);
-: 132:}
-: 133:
-: 134:/**
-: 135: * hook_balt13:
-: 136: * @analyser: Analyser state whose charset ratings are to be modified.
-: 137: *
-: 138: * Decides between baltic and iso8859-13 charsets for language "pl".
-: 139: *
-: 140: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 141: * otherwise.
-: 142: **/
-: 143:static int
-: 144:hook_balt13(EncaAnalyserState *analyser)
-: 145:{
-: 146: static const unsigned char list_baltic[] = {
-: 147: 0xf0, 0xeb, 0xf2, 0xfe
-: 148: };
-: 149: static const unsigned char list_iso885913[] = {
-: 150: 0xf9, 0xe0, 0xf1, 0xea
-: 151: };
-: 152: static EncaLanguageHookData1CS hookdata[] = {
-: 153: MAKE_HOOK_LINE(baltic),
-: 154: MAKE_HOOK_LINE(iso885913),
-: 155: };
-: 156:
18: 157: return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata);
-: 158:}
-: 159:
-: 160:/* vim: ts=2
-: 161: */
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lib/.libs/zh_weight_gbk.h.gcov
-: 0:Source:../data/chinese/zh_weight_gbk.h
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_zh.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_zh.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/* This header file is in the public domain.
-: 2: Most of its content is generated by gperf, with modifications
-: 3: Chinese frequency table courtesy of Dept. of CS, Tsinghua Univeristy, Beijing
-: 4: See http://fhpi.yingkou.net.cn/bbs/1951/messages/2903.html
-: 5:*/
-: 6:
-: 7:/* ANSI-C code produced by gperf version 3.0.1 */
-: 8:/* Command-line: gperf -L ANSI-C -I -C -E -n -o -c -D -t zh_weight_gbk.txt */
-: 9:/* Computed positions: -k'1-2' */
-: 10:
-: 11:#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
-: 12: && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
-: 13: && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
-: 14: && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
-: 15: && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
-: 16: && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
-: 17: && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
-: 18: && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
-: 19: && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
-: 20: && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
-: 21: && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
-: 22: && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
-: 23: && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
-: 24: && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
-: 25: && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
-: 26: && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
-: 27: && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
-: 28: && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
-: 29: && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
-: 30: && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
-: 31: && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
-: 32: && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
-: 33: && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
-: 34:/* The character set is not based on ISO-646. */
-: 35:#error "gperf generated tables don't work with this execution character set. Please report a bug to ."
-: 36:#endif
-: 37:
-: 38:/* maximum key range = 1014, duplicates = 0 */
-: 39:
-: 40:#ifdef __GNUC__
-: 41:__inline
-: 42:#else
-: 43:#ifdef __cplusplus
-: 44:inline
-: 45:#endif
-: 46:#endif
-: 47:/*ARGSUSED*/
-: 48:static unsigned int
-: 49:hash_gbk (register const unsigned char *str)
-: 50:{
-: 51: static const unsigned short asso_values[] =
-: 52: {
-: 53: 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-: 54: 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-: 55: 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-: 56: 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-: 57: 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-: 58: 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-: 59: 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-: 60: 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-: 61: 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-: 62: 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-: 63: 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-: 64: 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-: 65: 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-: 66: 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-: 67: 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-: 68: 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-: 69: 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-: 70: 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-: 71: 1014, 1014, 1014, 340, 218, 345, 88, 505, 245, 8,
-: 72: 63, 310, 325, 225, 40, 18, 410, 500, 510, 455,
-: 73: 280, 400, 375, 255, 371, 480, 510, 60, 85, 5,
-: 74: 450, 108, 160, 95, 35, 45, 365, 0, 55, 165,
-: 75: 90, 10, 25, 103, 41, 24, 336, 465, 1, 401,
-: 76: 176, 16, 186, 486, 475, 340, 270, 481, 400, 511,
-: 77: 511, 66, 76, 81, 145, 463, 390, 431, 273, 306,
-: 78: 263, 113, 438, 31, 278, 285, 411, 30, 13, 4,
-: 79: 9, 158, 3, 48, 483, 415, 291, 246, 220, 85,
-: 80: 263, 336, 131, 183, 455, 86, 116, 151, 218, 143,
-: 81: 81, 505, 381, 455, 261, 358, 508, 460, 138, 225,
-: 82: 233, 1014, 391, 78, 3, 130, 56, 490, 43, 343,
-: 83: 155, 46, 1014
-: 84: };
684: 85: return asso_values[(unsigned char)str[1]+47] + asso_values[(unsigned char)str[0]+7];
-: 86:}
-: 87:
684: 88:static const struct zh_weight *in_gbk (register const unsigned char *str)
-: 89:{
-: 90: enum
-: 91: {
-: 92: TOTAL_KEYWORDS = 500,
-: 93: MIN_WORD_LENGTH = 2,
-: 94: MAX_WORD_LENGTH = 2,
-: 95: MIN_HASH_VALUE = 0,
-: 96: MAX_HASH_VALUE = 1013
-: 97: };
-: 98:
-: 99: static const struct zh_weight wordlist[] =
-: 100: {
-: 101: {"\322\252",0.0045003},
-: 102: {"\322\265",0.0065423},
-: 103: {"\322\327",0.0006749},
-: 104: {"\322\324",0.0038364},
-: 105: {"\312\265",0.002744},
-: 106: {"\312\327",0.0006626},
-: 107: {"\322\325",0.0004998},
-: 108: {"\326\252",0.0006257},
-: 109: {"\326\265",0.0006514},
-: 110: {"\266\324",0.0032427},
-: 111: {"\326\367",0.0027957},
-: 112: {"\312\325",0.0012488},
-: 113: {"\312\256",0.0016297},
-: 114: {"\312\323",0.000674},
-: 115: {"\326\256",0.001919},
-: 116: {"\266\323",0.0009591},
-: 117: {"\322\262",0.001974},
-: 118: {"\327\252",0.0007108},
-: 119: {"\326\270",0.0007731},
-: 120: {"\327\367",0.0040521},
-: 121: {"\327\324",0.0022824},
-: 122: {"\312\257",0.0004908},
-: 123: {"\274\323",0.0023829},
-: 124: {"\266\257",0.0023694},
-: 125: {"\274\270",0.0008733},
-: 126: {"\326\257",0.0007599},
-: 127: {"\317\265",0.0013262},
-: 128: {"\327\323",0.0015414},
-: 129: {"\273\252",0.0012136},
-: 130: {"\326\316",0.0009927},
-: 131: {"\274\257",0.0010417},
-: 132: {"\326\247",0.0007224},
-: 133: {"\312\261",0.0030057},
-: 134: {"\274\322",0.0039648},
-: 135: {"\320\324",0.0011996},
-: 136: {"\273\256",0.0007059},
-: 137: {"\326\261",0.0005522},
-: 138: {"\266\250",0.0024269},
-: 139: {"\266\376",0.001247},
-: 140: {"\323\252",0.0011203},
-: 141: {"\326\330",0.0023459},
-: 142: {"\317\257",0.0004695},
-: 143: {"\274\373",0.0007272},
-: 144: {"\266\253",0.0011892},
-: 145: {"\274\376",0.0009711},
-: 146: {"\273\257",0.0023838},
-: 147: {"\267\242",0.0053412},
-: 148: {"\310\325",0.0036327},
-: 149: {"\327\250",0.0009373},
-: 150: {"\312\302",0.0018604},
-: 151: {"\274\253",0.0006288},
-: 152: {"\273\247",0.0005598},
-: 153: {"\320\316",0.0009425},
-: 154: {"\317\373",0.0006543},
-: 155: {"\320\247",0.0009217},
-: 156: {"\322\351",0.0011071},
-: 157: {"\317\330",0.0009752},
-: 158: {"\273\250",0.0005451},
-: 159: {"\312\351",0.001001},
-: 160: {"\273\330",0.0006653},
-: 161: {"\263\265",0.0010894},
-: 162: {"\312\241",0.0016366},
-: 163: {"\310\316",0.0012122},
-: 164: {"\274\303",0.0026701},
-: 165: {"\316\252",0.0054216},
-: 166: {"\273\371",0.0014197},
-: 167: {"\316\367",0.0012152},
-: 168: {"\312\246",0.00052},
-: 169: {"\317\302",0.0021357},
-: 170: {"\327\366",0.0007036},
-: 171: {"\274\344",0.0010701},
-: 172: {"\310\250",0.0009164},
-: 173: {"\327\351",0.0011894},
-: 174: {"\267\250",0.0025935},
-: 175: {"\267\376",0.0008639},
-: 176: {"\327\241",0.000485},
-: 177: {"\320\302",0.002897},
-: 178: {"\326\260",0.000867},
-: 179: {"\310\253",0.0032345},
-: 180: {"\322\345",0.0011046},
-: 181: {"\326\244",0.0007621},
-: 182: {"\316\257",0.001456},
-: 183: {"\274\260",0.0012255},
-: 184: {"\263\247",0.0012368},
-: 185: {"\314\270",0.0006043},
-: 186: {"\316\322",0.0034646},
-: 187: {"\320\304",0.0014967},
-: 188: {"\327\260",0.000643},
-: 189: {"\320\241",0.0016135},
-: 190: {"\323\303",0.002668},
-: 191: {"\325\373",0.0006271},
-: 192: {"\320\255",0.0007439},
-: 193: {"\325\376",0.002679},
-: 194: {"\266\370",0.0018881},
-: 195: {"\311\253",0.0005973},
-: 196: {"\327\345",0.0005358},
-: 197: {"\273\260",0.000621},
-: 198: {"\310\241",0.0009919},
-: 199: {"\325\371",0.0007016},
-: 200: {"\273\244",0.0005659},
-: 201: {"\274\341",0.0004694},
-: 202: {"\323\246",0.0014049},
-: 203: {"\322\346",0.0008483},
-: 204: {"\314\250",0.0008597},
-: 205: {"\322\375",0.0006632},
-: 206: {"\314\330",0.0012592},
-: 207: {"\323\260",0.000514},
-: 208: {"\312\375",0.0008388},
-: 209: {"\312\326",0.0009187},
-: 210: {"\324\252",0.002067},
-: 211: {"\263\366",0.0042527},
-: 212: {"\326\326",0.0018411},
-: 213: {"\327\305",0.0014365},
-: 214: {"\273\341",0.0051579},
-: 215: {"\263\241",0.0030636},
-: 216: {"\320\370",0.0005217},
-: 217: {"\316\304",0.0018717},
-: 218: {"\273\361",0.0004915},
-: 219: {"\316\336",0.0010303},
-: 220: {"\312\267",0.0004954},
-: 221: {"\322\342",0.0011669},
-: 222: {"\327\245",0.0004875},
-: 223: {"\320\350",0.0007022},
-: 224: {"\320\305",0.000977},
-: 225: {"\312\271",0.001449},
-: 226: {"\317\326",0.0025147},
-: 227: {"\273\375",0.0006935},
-: 228: {"\263\244",0.0025652},
-: 229: {"\311\314",0.0016298},
-: 230: {"\323\305",0.0008197},
-: 231: {"\263\314",0.0012378},
-: 232: {"\315\373",0.0005027},
-: 233: {"\315\250",0.0015692},
-: 234: {"\324\261",0.0018995},
-: 235: {"\267\305",0.0010846},
-: 236: {"\323\375",0.0009705},
-: 237: {"\316\345",0.0007467},
-: 238: {"\323\326",0.0009509},
-: 239: {"\310\375",0.0017945},
-: 240: {"\273\267",0.0006218},
-: 241: {"\310\245",0.0013444},
-: 242: {"\267\326",0.002317},
-: 243: {"\311\361",0.0005762},
-: 244: {"\314\345",0.0021551},
-: 245: {"\322\362",0.0010577},
-: 246: {"\273\271",0.0014906},
-: 247: {"\311\350",0.0022181},
-: 248: {"\326\335",0.000633},
-: 249: {"\324\302",0.0024389},
-: 250: {"\316\361",0.0018869},
-: 251: {"\261\270",0.0006344},
-: 252: {"\325\305",0.0007204},
-: 253: {"\310\267",0.0006259},
-: 254: {"\272\323",0.0005451},
-: 255: {"\314\341",0.0016334},
-: 256: {"\316\305",0.0004727},
-: 257: {"\325\346",0.0006076},
-: 258: {"\324\366",0.0014225},
-: 259: {"\325\375",0.0013077},
-: 260: {"\263\326",0.0010342},
-: 261: {"\265\367",0.0012018},
-: 262: {"\312\334",0.0008222},
-: 263: {"\317\347",0.0007924},
-: 264: {"\324\255",0.0009897},
-: 265: {"\272\316",0.0005162},
-: 266: {"\261\261",0.0015279},
-: 267: {"\317\362",0.0014073},
-: 268: {"\261\250",0.0027135},
-: 269: {"\273\362",0.0006972},
-: 270: {"\261\330",0.0006812},
-: 271: {"\317\363",0.0004946},
-: 272: {"\322\275",0.0005415},
-: 273: {"\327\334",0.0018397},
-: 274: {"\325\342",0.0043446},
-: 275: {"\312\275",0.0008493},
-: 276: {"\325\271",0.0030534},
-: 277: {"\310\347",0.0012367},
-: 278: {"\301\252",0.0009379},
-: 279: {"\267\347",0.0007326},
-: 280: {"\301\367",0.0008055},
-: 281: {"\301\242",0.0015778},
-: 282: {"\265\261",0.001657},
-: 283: {"\327\337",0.0006468},
-: 284: {"\312\320",0.0046659},
-: 285: {"\314\342",0.0013688},
-: 286: {"\265\330",0.0047688},
-: 287: {"\326\320",0.0076843},
-: 288: {"\312\333",0.0004988},
-: 289: {"\317\337",0.0005442},
-: 290: {"\265\253",0.0010253},
-: 291: {"\272\303",0.0017451},
-: 292: {"\311\347",0.0020607},
-: 293: {"\261\344",0.0007406},
-: 294: {"\315\305",0.0009523},
-: 295: {"\320\355",0.0005616},
-: 296: {"\320\313",0.0005636},
-: 297: {"\274\333",0.0010855},
-: 298: {"\265\302",0.0005846},
-: 299: {"\270\367",0.001779},
-: 300: {"\325\362",0.000663},
-: 301: {"\326\312",0.0009775},
-: 302: {"\270\256",0.0009796},
-: 303: {"\265\303",0.0019729},
-: 304: {"\310\313",0.0080773},
-: 305: {"\274\312",0.0012275},
-: 306: {"\315\254",0.0026107},
-: 307: {"\265\304",0.0341277},
-: 308: {"\323\311",0.0013801},
-: 309: {"\320\320",0.0041784},
-: 310: {"\327\312",0.0027448},
-: 311: {"\267\275",0.002853},
-: 312: {"\315\267",0.0007873},
-: 313: {"\310\317",0.0008819},
-: 314: {"\323\320",0.0077624},
-: 315: {"\312\263",0.0004878},
-: 316: {"\315\342",0.0022498},
-: 317: {"\266\340",0.0032382},
-: 318: {"\312\274",0.0004855},
-: 319: {"\311\355",0.0006168},
-: 320: {"\266\274",0.0014503},
-: 321: {"\271\262",0.0010536},
-: 322: {"\262\242",0.0012383},
-: 323: {"\270\261",0.0006302},
-: 324: {"\325\337",0.0022472},
-: 325: {"\311\275",0.0011044},
-: 326: {"\260\270",0.0005503},
-: 327: {"\274\274",0.0016091},
-: 328: {"\325\275",0.0008112},
-: 329: {"\263\311",0.0037219},
-: 330: {"\311\317",0.0048331},
-: 331: {"\260\262",0.00114},
-: 332: {"\327\274",0.0007058},
-: 333: {"\270\371",0.000545},
-: 334: {"\271\373",0.0008799},
-: 335: {"\312\251",0.0009187},
-: 336: {"\317\340",0.0010087},
-: 337: {"\271\330",0.0023261},
-: 338: {"\301\246",0.0022943},
-: 339: {"\262\316",0.0006661},
-: 340: {"\303\367",0.0014369},
-: 341: {"\271\253",0.0031331},
-: 342: {"\305\256",0.0006045},
-: 343: {"\327\356",0.0012694},
-: 344: {"\315\362",0.0020929},
-: 345: {"\270\303",0.0006501},
-: 346: {"\270\366",0.0043881},
-: 347: {"\324\362",0.0005586},
-: 348: {"\270\304",0.0018059},
-: 349: {"\317\356",0.0011181},
-: 350: {"\312\307",0.0076122},
-: 351: {"\312\365",0.0014501},
-: 352: {"\273\356",0.0011783},
-: 353: {"\321\247",0.0027139},
-: 354: {"\316\312",0.0015404},
-: 355: {"\310\374",0.0004837},
-: 356: {"\265\245",0.0008341},
-: 357: {"\312\266",0.0005749},
-: 358: {"\274\307",0.0013592},
-: 359: {"\320\251",0.0013308},
-: 360: {"\322\321",0.0015716},
-: 361: {"\322\332",0.000824},
-: 362: {"\317\353",0.0008423},
-: 363: {"\303\373",0.0014078},
-: 364: {"\274\266",0.0009423},
-: 365: {"\271\246",0.0005073},
-: 366: {"\321\371",0.0008296},
-: 367: {"\275\323",0.0007936},
-: 368: {"\326\332",0.0006362},
-: 369: {"\262\351",0.000721},
-: 370: {"\324\313",0.0009758},
-: 371: {"\325\274",0.0005246},
-: 372: {"\273\365",0.0005011},
-: 373: {"\271\244",0.0050114},
-: 374: {"\324\275",0.0004797},
-: 375: {"\323\353",0.0019506},
-: 376: {"\301\326",0.0007135},
-: 377: {"\266\310",0.0015281},
-: 378: {"\270\370",0.0007847},
-: 379: {"\310\353",0.0015621},
-: 380: {"\311\356",0.0008945},
-: 381: {"\301\254",0.0004976},
-: 382: {"\321\351",0.0005062},
-: 383: {"\270\361",0.0008735},
-: 384: {"\321\241",0.0006163},
-: 385: {"\313\265",0.0019478},
-: 386: {"\267\307",0.000531},
-: 387: {"\275\250",0.0032052},
-: 388: {"\274\315",0.0004974},
-: 389: {"\272\363",0.0021836},
-: 390: {"\313\256",0.0016446},
-: 391: {"\270\346",0.0005829},
-: 392: {"\265\347",0.001873},
-: 393: {"\275\253",0.0014281},
-: 394: {"\317\310",0.0010976},
-: 395: {"\312\306",0.0006866},
-: 396: {"\323\332",0.0026086},
-: 397: {"\272\334",0.000797},
-: 398: {"\326\306",0.0026895},
-: 399: {"\267\321",0.0009271},
-: 400: {"\322\273",0.0112731},
-: 401: {"\271\346",0.0013724},
-: 402: {"\263\307",0.0010251},
-: 403: {"\261\355",0.0013294},
-: 404: {"\271\375",0.0020606},
-: 405: {"\274\306",0.00135},
-: 406: {"\320\315",0.0006771},
-: 407: {"\326\273",0.0008284},
-: 408: {"\312\276",0.0004949},
-: 409: {"\275\366",0.0005794},
-: 410: {"\262\305",0.0006942},
-: 411: {"\326\276",0.0008129},
-: 412: {"\313\373",0.0031435},
-: 413: {"\321\370",0.0004942},
-: 414: {"\315\263",0.0011475},
-: 415: {"\300\373",0.0018856},
-: 416: {"\314\365",0.0012831},
-: 417: {"\275\255",0.0009106},
-: 418: {"\304\334",0.0022237},
-: 419: {"\272\317",0.0023691},
-: 420: {"\274\272",0.0006239},
-: 421: {"\324\274",0.000501},
-: 422: {"\313\371",0.0015791},
-: 423: {"\271\342",0.0005461},
-: 424: {"\277\252",0.0031058},
-: 425: {"\271\271",0.0007005},
-: 426: {"\303\361",0.0035945},
-: 427: {"\265\275",0.0036926},
-: 428: {"\312\300",0.0010821},
-: 429: {"\264\323",0.001703},
-: 430: {"\303\305",0.0014059},
-: 431: {"\326\301",0.0007778},
-: 432: {"\275\314",0.0013183},
-: 433: {"\317\372",0.0008187},
-: 434: {"\303\346",0.0020167},
-: 435: {"\267\264",0.0006176},
-: 436: {"\273\372",0.0023189},
-: 437: {"\313\304",0.0009759},
-: 438: {"\304\317",0.00114},
-: 439: {"\310\273",0.001088},
-: 440: {"\264\316",0.0014362},
-: 441: {"\263\243",0.0008196},
-: 442: {"\275\370",0.0032419},
-: 443: {"\275\341",0.0011242},
-: 444: {"\301\313",0.0079237},
-: 445: {"\300\255",0.0005527},
-: 446: {"\310\272",0.0005419},
-: 447: {"\275\361",0.0013712},
-: 448: {"\301\275",0.0013376},
-: 449: {"\315\365",0.0006086},
-: 450: {"\313\260",0.0007012},
-: 451: {"\276\253",0.0007159},
-: 452: {"\301\317",0.0005776},
-: 453: {"\264\253",0.0007021},
-: 454: {"\315\266",0.0011592},
-: 455: {"\314\354",0.0016483},
-: 456: {"\301\320",0.0005658},
-: 457: {"\306\344",0.0017313},
-: 458: {"\311\331",0.0009361},
-: 459: {"\316\273",0.0016007},
-: 460: {"\271\334",0.001622},
-: 461: {"\270\337",0.0025748},
-: 462: {"\311\372",0.0039844},
-: 463: {"\302\267",0.001188},
-: 464: {"\276\366",0.0011549},
-: 465: {"\324\332",0.0082045},
-: 466: {"\265\263",0.0011413},
-: 467: {"\270\311",0.0009596},
-: 468: {"\265\274",0.0011932},
-: 469: {"\277\366",0.0005979},
-: 470: {"\276\255",0.0049223},
-: 471: {"\307\351",0.0011166},
-: 472: {"\275\342",0.0011085},
-: 473: {"\270\320",0.0005274},
-: 474: {"\271\311",0.0005495},
-: 475: {"\264\246",0.0009814},
-: 476: {"\270\333",0.0005587},
-: 477: {"\316\357",0.0010483},
-: 478: {"\313\375",0.0005373},
-: 479: {"\262\337",0.0006082},
-: 480: {"\306\370",0.0005779},
-: 481: {"\307\260",0.0020531},
-: 482: {"\262\275",0.0010507},
-: 483: {"\271\333",0.0007736},
-: 484: {"\262\311",0.0006097},
-: 485: {"\324\354",0.0009483},
-: 486: {"\264\345",0.0009976},
-: 487: {"\315\306",0.0006574},
-: 488: {"\324\360",0.0006355},
-: 489: {"\307\345",0.0005405},
-: 490: {"\275\347",0.0010474},
-: 491: {"\324\264",0.0005666},
-: 492: {"\264\370",0.0006134},
-: 493: {"\313\271",0.0006023},
-: 494: {"\307\370",0.0022413},
-: 495: {"\321\317",0.0006039},
-: 496: {"\304\307",0.0007224},
-: 497: {"\324\331",0.0005426},
-: 498: {"\261\310",0.001161},
-: 499: {"\321\320",0.0009783},
-: 500: {"\324\272",0.0010515},
-: 501: {"\270\374",0.0008908},
-: 502: {"\304\277",0.0015919},
-: 503: {"\306\267",0.0023513},
-: 504: {"\276\326",0.0009665},
-: 505: {"\265\332",0.0017413},
-: 506: {"\302\355",0.0005587},
-: 507: {"\272\315",0.0067636},
-: 508: {"\315\352",0.0006563},
-: 509: {"\304\321",0.0007756},
-: 510: {"\261\243",0.0014976},
-: 511: {"\304\332",0.0016149},
-: 512: {"\315\301",0.0005437},
-: 513: {"\302\311",0.0005375},
-: 514: {"\272\243",0.0015815},
-: 515: {"\265\310",0.0021605},
-: 516: {"\261\360",0.0007577},
-: 517: {"\301\277",0.0015425},
-: 518: {"\260\374",0.0006314},
-: 519: {"\262\274",0.0005445},
-: 520: {"\275\317",0.0005458},
-: 521: {"\271\251",0.000632},
-: 522: {"\302\333",0.0007584},
-: 523: {"\261\273",0.000825},
-: 524: {"\261\276",0.0024993},
-: 525: {"\265\343",0.0013538},
-: 526: {"\304\243",0.0004864},
-: 527: {"\302\312",0.0005754},
-: 528: {"\303\263",0.0006242},
-: 529: {"\306\363",0.0027556},
-: 530: {"\300\355",0.0029849},
-: 531: {"\276\335",0.0009205},
-: 532: {"\261\352",0.0009393},
-: 533: {"\264\362",0.0005953},
-: 534: {"\300\317",0.0008237},
-: 535: {"\301\354",0.0011289},
-: 536: {"\305\251",0.001983},
-: 537: {"\264\363",0.0066078},
-: 538: {"\307\363",0.0009944},
-: 539: {"\262\277",0.0033026},
-: 540: {"\321\353",0.0004698},
-: 541: {"\306\275",0.0016647},
-: 542: {"\260\321",0.0010343},
-: 543: {"\275\374",0.0009063},
-: 544: {"\321\307",0.0006162},
-: 545: {"\265\300",0.0012275},
-: 546: {"\304\352",0.0071346},
-: 547: {"\276\337",0.0006981},
-: 548: {"\303\307",0.0030767},
-: 549: {"\321\266",0.000496},
-: 550: {"\264\313",0.0011388},
-: 551: {"\277\313",0.0005433},
-: 552: {"\303\277",0.000715},
-: 553: {"\271\343",0.0011772},
-: 554: {"\277\311",0.0018478},
-: 555: {"\270\273",0.0004872},
-: 556: {"\313\274",0.0006569},
-: 557: {"\300\340",0.0005014},
-: 558: {"\313\374",0.0005788},
-: 559: {"\260\354",0.0013224},
-: 560: {"\270\272",0.0005072},
-: 561: {"\260\264",0.0004965},
-: 562: {"\262\306",0.0005022},
-: 563: {"\300\356",0.0006669},
-: 564: {"\271\372",0.0106651},
-: 565: {"\270\357",0.0012506},
-: 566: {"\262\273",0.0063303},
-: 567: {"\260\331",0.0006978},
-: 568: {"\275\332",0.000558},
-: 569: {"\262\372",0.0043545},
-: 570: {"\276\263",0.0005699},
-: 571: {"\303\264",0.0006158},
-: 572: {"\276\374",0.0009727},
-: 573: {"\307\340",0.0005662},
-: 574: {"\303\273",0.0008714},
-: 575: {"\305\372",0.0007277},
-: 576: {"\276\251",0.0012137},
-: 577: {"\277\356",0.0005576},
-: 578: {"\275\360",0.001743},
-: 579: {"\275\273",0.0011534},
-: 580: {"\303\300",0.0013899},
-: 581: {"\300\315",0.0005726},
-: 582: {"\306\332",0.0012406},
-: 583: {"\276\277",0.0007264},
-: 584: {"\307\277",0.0013442},
-: 585: {"\300\264",0.0034731},
-: 586: {"\277\332",0.0012146},
-: 587: {"\313\276",0.0017401},
-: 588: {"\313\331",0.0005376},
-: 589: {"\276\315",0.0021619},
-: 590: {"\306\360",0.0015911},
-: 591: {"\300\372",0.0005352},
-: 592: {"\277\315",0.0004833},
-: 593: {"\300\357",0.0014032},
-: 594: {"\277\354",0.0006737},
-: 595: {"\264\264",0.0007723},
-: 596: {"\277\306",0.0014751},
-: 597: {"\277\264",0.0008716},
-: 598: {"\276\331",0.0006836},
-: 599: {"\264\372",0.0016641},
-: 600: {"\264\357",0.0012618}
-: 601: };
-: 602:
-: 603: static const short lookup[] =
-: 604: {
-: 605: 0, 1, -1, 2, 3, -1, 4, -1, 5, 6,
-: 606: 7, 8, 9, 10, 11, 12, -1, -1, 13, -1,
-: 607: 14, 15, -1, -1, 16, 17, 18, -1, 19, 20,
-: 608: 21, 22, -1, 23, 24, 25, 26, -1, 27, -1,
-: 609: 28, 29, -1, 30, -1, 31, 32, -1, 33, 34,
-: 610: 35, 36, -1, 37, 38, 39, -1, -1, 40, -1,
-: 611: 41, 42, -1, 43, 44, 45, -1, -1, 46, 47,
-: 612: 48, 49, -1, 50, -1, 51, 52, -1, 53, -1,
-: 613: 54, 55, -1, 56, -1, 57, 58, -1, 59, 60,
-: 614: 61, 62, -1, -1, 63, 64, 65, -1, 66, -1,
-: 615: 67, 68, -1, 69, 70, 71, 72, -1, 73, 74,
-: 616: 75, 76, -1, 77, -1, 78, 79, -1, 80, -1,
-: 617: 81, 82, -1, 83, 84, 85, 86, -1, 87, -1,
-: 618: 88, 89, -1, 90, -1, 91, 92, -1, 93, -1,
-: 619: 94, 95, -1, 96, -1, 97, 98, -1, 99, 100,
-: 620: 101, 102, -1, 103, -1, 104, 105, -1, 106, -1,
-: 621: 107, -1, -1, 108, -1, 109, 110, -1, 111, -1,
-: 622: 112, 113, -1, 114, -1, 115, 116, -1, 117, -1,
-: 623: 118, 119, -1, 120, -1, 121, -1, -1, 122, -1,
-: 624: 123, 124, -1, 125, -1, 126, 127, -1, 128, -1,
-: 625: 129, 130, -1, 131, -1, 132, 133, -1, 134, -1,
-: 626: 135, 136, -1, 137, -1, 138, 139, -1, -1, -1,
-: 627: 140, 141, -1, 142, 143, 144, 145, -1, 146, -1,
-: 628: 147, 148, -1, 149, 150, 151, 152, -1, 153, 154,
-: 629: 155, 156, -1, 157, -1, 158, 159, -1, 160, -1,
-: 630: -1, 161, -1, 162, -1, 163, 164, -1, -1, 165,
-: 631: 166, -1, -1, 167, -1, 168, 169, -1, 170, -1,
-: 632: 171, 172, -1, 173, -1, 174, 175, -1, 176, -1,
-: 633: 177, 178, -1, 179, -1, 180, 181, -1, 182, -1,
-: 634: 183, 184, -1, 185, -1, 186, 187, -1, 188, -1,
-: 635: 189, 190, -1, 191, 192, 193, 194, -1, 195, 196,
-: 636: -1, 197, -1, 198, -1, 199, 200, -1, -1, -1,
-: 637: 201, 202, -1, 203, 204, 205, 206, -1, 207, -1,
-: 638: 208, 209, -1, 210, -1, -1, 211, -1, 212, -1,
-: 639: 213, 214, -1, 215, 216, 217, 218, -1, 219, 220,
-: 640: 221, 222, -1, 223, -1, 224, 225, -1, 226, -1,
-: 641: 227, 228, -1, 229, 230, 231, 232, -1, 233, -1,
-: 642: 234, 235, -1, 236, -1, 237, 238, -1, 239, -1,
-: 643: 240, 241, -1, 242, -1, 243, 244, -1, 245, -1,
-: 644: 246, 247, -1, 248, -1, 249, 250, -1, 251, -1,
-: 645: 252, 253, -1, 254, -1, 255, 256, -1, 257, -1,
-: 646: 258, 259, -1, -1, -1, 260, 261, -1, 262, 263,
-: 647: 264, 265, -1, 266, -1, 267, 268, -1, 269, -1,
-: 648: 270, 271, -1, 272, -1, 273, 274, -1, 275, 276,
-: 649: 277, 278, -1, 279, -1, 280, 281, -1, 282, -1,
-: 650: 283, 284, -1, 285, -1, 286, 287, -1, 288, -1,
-: 651: 289, 290, -1, 291, -1, 292, 293, -1, 294, -1,
-: 652: 295, 296, -1, 297, 298, 299, 300, -1, 301, 302,
-: 653: 303, 304, -1, 305, -1, 306, 307, -1, 308, -1,
-: 654: 309, 310, -1, 311, -1, 312, 313, -1, 314, 315,
-: 655: 316, 317, -1, 318, 319, 320, 321, -1, 322, -1,
-: 656: 323, 324, -1, 325, -1, 326, 327, -1, 328, -1,
-: 657: 329, 330, -1, 331, -1, 332, 333, -1, 334, -1,
-: 658: 335, 336, -1, 337, -1, 338, 339, -1, 340, -1,
-: 659: 341, 342, -1, 343, -1, 344, 345, -1, 346, -1,
-: 660: 347, 348, -1, 349, -1, 350, -1, -1, 351, -1,
-: 661: 352, 353, -1, 354, -1, 355, 356, -1, 357, -1,
-: 662: 358, 359, -1, 360, -1, 361, 362, -1, 363, -1,
-: 663: 364, 365, -1, 366, -1, 367, -1, -1, 368, -1,
-: 664: 369, 370, -1, 371, -1, 372, -1, -1, 373, -1,
-: 665: 374, 375, -1, 376, -1, 377, -1, -1, 378, -1,
-: 666: 379, -1, -1, 380, -1, 381, 382, -1, 383, -1,
-: 667: 384, 385, -1, 386, -1, 387, 388, -1, 389, -1,
-: 668: 390, -1, -1, -1, -1, 391, 392, -1, -1, -1,
-: 669: 393, -1, -1, 394, -1, 395, -1, -1, 396, 397,
-: 670: 398, 399, -1, 400, -1, 401, 402, -1, 403, -1,
-: 671: 404, 405, -1, 406, -1, 407, 408, -1, 409, -1,
-: 672: 410, 411, -1, 412, -1, 413, 414, -1, 415, -1,
-: 673: 416, -1, -1, 417, -1, 418, -1, -1, 419, -1,
-: 674: 420, 421, -1, 422, -1, -1, -1, -1, -1, 423,
-: 675: 424, -1, -1, -1, -1, 425, 426, -1, -1, -1,
-: 676: -1, 427, -1, 428, -1, -1, 429, -1, -1, -1,
-: 677: 430, -1, -1, 431, -1, -1, -1, -1, -1, -1,
-: 678: 432, -1, -1, 433, -1, 434, 435, -1, 436, -1,
-: 679: -1, -1, -1, 437, -1, 438, 439, -1, -1, -1,
-: 680: 440, 441, -1, 442, -1, 443, 444, -1, -1, -1,
-: 681: 445, -1, -1, 446, -1, 447, 448, -1, 449, -1,
-: 682: -1, -1, -1, 450, -1, 451, -1, -1, -1, -1,
-: 683: 452, -1, -1, 453, -1, 454, -1, -1, -1, -1,
-: 684: 455, 456, -1, 457, -1, 458, 459, -1, -1, -1,
-: 685: -1, -1, -1, -1, -1, 460, -1, -1, 461, -1,
-: 686: -1, -1, -1, 462, -1, 463, -1, -1, 464, -1,
-: 687: 465, -1, -1, 466, -1, 467, -1, -1, -1, -1,
-: 688: -1, -1, -1, -1, -1, 468, 469, -1, -1, -1,
-: 689: 470, -1, -1, 471, -1, -1, 472, -1, -1, -1,
-: 690: 473, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-: 691: -1, 474, -1, -1, -1, 475, -1, -1, 476, -1,
-: 692: 477, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-: 693: -1, -1, -1, -1, -1, 478, 479, -1, -1, -1,
-: 694: -1, -1, -1, 480, -1, 481, -1, -1, -1, -1,
-: 695: 482, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-: 696: 483, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-: 697: 484, -1, -1, -1, -1, 485, -1, -1, -1, -1,
-: 698: -1, 486, -1, 487, -1, -1, -1, -1, 488, -1,
-: 699: 489, -1, -1, -1, -1, 490, -1, -1, 491, -1,
-: 700: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-: 701: -1, -1, -1, 492, -1, 493, -1, -1, -1, -1,
-: 702: 494, -1, -1, 495, -1, 496, -1, -1, -1, -1,
-: 703: -1, -1, -1, 497, -1, -1, -1, -1, -1, -1,
-: 704: -1, -1, -1, -1, -1, 498, -1, -1, -1, -1,
-: 705: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-: 706: -1, -1, -1, 499
-: 707: };
-: 708:
684: 709: register int key = hash_gbk (str);
-: 710:
684: 711: if (key <= MAX_HASH_VALUE && key >= 0)
-: 712: {
345: 713: register int index = lookup[key];
-: 714:
345: 715: if (index >= 0)
-: 716: {
300: 717: register const unsigned char *s = wordlist[index].name;
-: 718:
300: 719: if (*str == *s && str[1] == s[1])
174: 720: return &wordlist[index];
-: 721: }
-: 722: }
-: 723: return 0;
-: 724:}
-: 725:
-: 726:/**
-: 727: * is_gbk:
-: 728: * @str: Pointer to a 16-bit wide character.
-: 729: *
-: 730: * Dosen't support GB18030 quadbyte (32-bit) characters yet
-: 731: *
-: 732: * Returns: One if the wide character is within GBK charset range, zero otherwise
-: 733: **/
-: 734:
684: 735:static int is_gbk(const unsigned char *str)
-: 736:{
684: 737: unsigned char high = str[0];
684: 738: unsigned char low = str[1];
-: 739:
1368: 740: return high >=0x81 && high <= 0xfe
684: 741: && low >= 0x40 && low <= 0xfe && low != 0x7f;
-: 742:}
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lib/.libs/lang_lt.c.gcov
-: 0:Source:lang_lt.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_lt.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_lt.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*
-: 2: encoding data and routines dependent on language; lithuanian
-: 3:
-: 4: Copyright (C) 2003 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#ifdef HAVE_CONFIG_H
-: 20:# include "config.h"
-: 21:#endif /* HAVE_CONFIG_H */
-: 22:
-: 23:#include "enca.h"
-: 24:#include "internal.h"
-: 25:#include "data/lithuanian/lithuanian.h"
-: 26:
-: 27:/* Local prototypes. */
-: 28:static int hook(EncaAnalyserState *analyser);
-: 29:static int hook_iso13win(EncaAnalyserState *analyser);
-: 30:static int hook_baltwin(EncaAnalyserState *analyser);
-: 31:static int hook_lat4balt(EncaAnalyserState *analyser);
-: 32:
-: 33:/**
-: 34: * ENCA_LANGUAGE_LT:
-: 35: *
-: 36: * Lithuanian language.
-: 37: *
-: 38: * Everything the world out there needs to know about this language.
-: 39: **/
-: 40:const EncaLanguageInfo ENCA_LANGUAGE_LT = {
-: 41: "lt",
-: 42: "lithuanian",
-: 43: NCHARSETS,
-: 44: CHARSET_NAMES,
-: 45: CHARSET_WEIGHTS,
-: 46: SIGNIFICANT,
-: 47: CHARSET_LETTERS,
-: 48: CHARSET_PAIRS,
-: 49: WEIGHT_SUM,
-: 50: &hook,
-: 51: NULL,
-: 52: NULL,
-: 53: NULL
-: 54:};
-: 55:
-: 56:/**
-: 57: * hook:
-: 58: * @analyser: Analyser state whose charset ratings are to be modified.
-: 59: *
-: 60: * Launches language specific hooks for language "lt".
-: 61: *
-: 62: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 63: * otherwise.
-: 64: **/
-: 65:static int
21: 66:hook(EncaAnalyserState *analyser)
-: 67:{
21: 68: int chg = 0;
-: 69:
-: 70: /* we may want to run both, and in this order */
33: 71: chg += hook_baltwin(analyser) || hook_lat4balt(analyser);
21: 72: chg += hook_iso13win(analyser);
21: 73: return chg;
-: 74:}
-: 75:
-: 76:/**
-: 77: * hook_iso13win:
-: 78: * @analyser: Analyser state whose charset ratings are to be modified.
-: 79: *
-: 80: * Decides between iso8859-13 and cp1257 charsets for language "lt".
-: 81: *
-: 82: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 83: * otherwise.
-: 84: **/
-: 85:static int
-: 86:hook_iso13win(EncaAnalyserState *analyser)
-: 87:{
-: 88: static EncaLanguageHookDataEOL hookdata[] = {
-: 89: { "iso885913", ENCA_SURFACE_EOL_LF, (size_t)-1 },
-: 90: { "cp1257", ENCA_SURFACE_MASK_EOL, (size_t)-1 },
-: 91: };
-: 92:
21: 93: return enca_language_hook_eol(analyser, ELEMENTS(hookdata), hookdata);
-: 94:}
-: 95:
-: 96:/**
-: 97: * hook_baltwin:
-: 98: * @analyser: Analyser state whose charset ratings are to be modified.
-: 99: *
-: 100: * Decides between cp1257, iso8859-13 and baltic charsets for language "lt".
-: 101: *
-: 102: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 103: * otherwise.
-: 104: **/
-: 105:static int
-: 106:hook_baltwin(EncaAnalyserState *analyser)
-: 107:{
-: 108: static const unsigned char list_cp1257[] = {
-: 109: 0xf0, 0xfe, 0xeb, 0xe8, 0xd0, 0xde, 0xc8
-: 110: };
-: 111: static const unsigned char list_iso885913[] = {
-: 112: 0xf0, 0xfe, 0xeb, 0xe8, 0xd0, 0xde, 0xc8
-: 113: };
-: 114: static const unsigned char list_baltic[] = {
-: 115: 0xf9, 0xea, 0xe7, 0xd9, 0xca, 0xc7, 0xc0
-: 116: };
-: 117: static EncaLanguageHookData1CS hookdata[] = {
-: 118: MAKE_HOOK_LINE(cp1257),
-: 119: MAKE_HOOK_LINE(iso885913),
-: 120: MAKE_HOOK_LINE(baltic),
-: 121: };
-: 122:
21: 123: return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata);
-: 124:}
-: 125:
-: 126:/**
-: 127: * hook_lat4balt:
-: 128: * @analyser: Analyser state whose charset ratings are to be modified.
-: 129: *
-: 130: * Decides between iso8859-4 and baltic charsets for language "lt".
-: 131: *
-: 132: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 133: * otherwise.
-: 134: **/
-: 135:static int
-: 136:hook_lat4balt(EncaAnalyserState *analyser)
-: 137:{
-: 138: static const unsigned char list_iso88594[] = {
-: 139: 0xec, 0xb9, 0xbe, 0xb1, 0xfe, 0xe8, 0xa9, 0xae, 0xc8
-: 140: };
-: 141: static const unsigned char list_baltic[] = {
-: 142: 0xe1, 0xf8, 0xe6, 0xe0, 0xfb, 0xeb, 0xd9, 0xca, 0xc0
-: 143: };
-: 144: static EncaLanguageHookData1CS hookdata[] = {
-: 145: MAKE_HOOK_LINE(iso88594),
-: 146: MAKE_HOOK_LINE(baltic),
-: 147: };
-: 148:
12: 149: return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata);
-: 150:}
-: 151:
-: 152:/* vim: ts=2
-: 153: */
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lib/.libs/multibyte.c.gcov
-: 0:Source:multibyte.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/multibyte.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/multibyte.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*
-: 2: multibyte character set checks
-: 3:
-: 4: Copyright (C) 2000-2003 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#ifdef HAVE_CONFIG_H
-: 20:# include "config.h"
-: 21:#endif /* HAVE_CONFIG_H */
-: 22:
-: 23:#include
-: 24:
-: 25:#include "enca.h"
-: 26:#include "internal.h"
-: 27:
-: 28:/*
-: 29: * See http://www.unicode.org/unicode/faq/utf_bom.html#25 for BOMs:
-: 30: * 00 00 FE FF UTF-32, big-endian
-: 31: * FF FE 00 00 UTF-32, little-endian
-: 32: * FE FF UTF-16, big-endian
-: 33: * FF FE UTF-16, little-endian
-: 34: * EF BB BF UTF-8
-: 35: */
-: 36:
-: 37:/* Local prototypes. */
-: 38:static int is_valid_utf8 (EncaAnalyserState *analyser);
-: 39:static int looks_like_TeX (EncaAnalyserState *analyser);
-: 40:static int is_valid_utf7 (EncaAnalyserState *analyser);
-: 41:static int looks_like_hz (EncaAnalyserState *analyser);
-: 42:static int looks_like_ucs2 (EncaAnalyserState *analyser);
-: 43:static int looks_like_ucs4 (EncaAnalyserState *analyser);
-: 44:static int looks_like_utf8 (EncaAnalyserState *analyser);
-: 45:static size_t what_if_it_was_ucs4 (const unsigned char *buffer,
-: 46: size_t size,
-: 47: size_t min_chars,
-: 48: EncaSurface *crlf_surf);
-: 49:static void shuffle_byte_order (unsigned char *buffer,
-: 50: size_t size,
-: 51: EncaSurface permutation);
-: 52:
-: 53:/* Multibyte test lists.
-: 54: * These arrays must be NULL-terminated. */
-: 55:EncaGuessFunc ENCA_MULTIBYTE_TESTS_ASCII[] = {
-: 56: &is_valid_utf7,
-: 57: &looks_like_TeX,
-: 58: &looks_like_hz,
-: 59: NULL
-: 60:};
-: 61:
-: 62:EncaGuessFunc ENCA_MULTIBYTE_TESTS_8BIT[] = {
-: 63: &is_valid_utf8,
-: 64: NULL
-: 65:};
-: 66:
-: 67:EncaGuessFunc ENCA_MULTIBYTE_TESTS_BINARY[] = {
-: 68: &looks_like_ucs4,
-: 69: &looks_like_ucs2,
-: 70: NULL
-: 71:};
-: 72:
-: 73:EncaGuessFunc ENCA_MULTIBYTE_TESTS_8BIT_TOLERANT[] = {
-: 74: &looks_like_utf8,
-: 75: NULL
-: 76:};
-: 77:
-: 78:/**
-: 79: * is_valid_utf8:
-: 80: * @analyser: Analyser whose buffer is to be checked.
-: 81: *
-: 82: * Checks whether @analyser->buffer contains valid UTF-8.
-: 83: *
-: 84: * Directly modifies @analyser->result on success.
-: 85: *
-: 86: * Returns: Nonzero when @analyser->result was set, zero othewrise.
-: 87: **/
-: 88:static int
439: 89:is_valid_utf8(EncaAnalyserState *analyser)
-: 90:{
-: 91: static int utf8 = ENCA_CS_UNKNOWN; /* UTF-8 charset */
439: 92: size_t size = analyser->size;
439: 93: const unsigned char *buffer = analyser->buffer;
439: 94: const size_t *const counts = analyser->counts;
-: 95:
-: 96: /* Bonus added when we catch a byte order marker. */
-: 97: size_t bom_bonus;
-: 98:
439: 99: int remains_10xxxxxx = 0; /* how many next bytes have to be 10xxxxxx */
439: 100: int utf8count = 0; /* number of UTF-8 encoded characters */
-: 101: size_t i;
-: 102: unsigned char b;
-: 103:
-: 104: /* Bytes 0xfe and 0xff just cannot appear in utf-8 in any case. */
439: 105: if (counts[0xfe] || counts[0xff])
-: 106: return 0;
-: 107:
-: 108: /* Initialize when we are called the first time. */
410: 109: if (utf8 == ENCA_CS_UNKNOWN) {
215: 110: utf8 = enca_name_to_charset("utf-8");
215: 111: assert(utf8 != ENCA_CS_UNKNOWN);
-: 112: }
-: 113:
-: 114: /* Check BOM */
410: 115: bom_bonus = (size_t)(sqrt((double)size) + size/10.0);
410: 116: if (size >= 3
410: 117: && buffer[0] == 0xef && buffer[1] == 0xbb && buffer[2] == 0xbf) {
3: 118: utf8count += bom_bonus;
3: 119: buffer += 3;
3: 120: size -= 3;
-: 121: }
-: 122:
-: 123: /* Parse. */
13881: 124: for (i = 0; i < size; i++) {
13780: 125: b = buffer[i];
13780: 126: if (!remains_10xxxxxx) {
10319: 127: if ((b & 0x80) == 0) /* 7bit characters */
7347: 128: continue;
2972: 129: if ((b & 0xe0) == 0xc0) { /* 110xxxxx 10xxxxxx sequence */
2081: 130: remains_10xxxxxx = 1;
2081: 131: utf8count++;
2081: 132: continue;
-: 133: }
891: 134: if ((b & 0xf0) == 0xe0) { /* 1110xxxx 2 x 10xxxxxx sequence */
732: 135: remains_10xxxxxx = 2;
732: 136: utf8count++;
732: 137: continue;
-: 138: }
-: 139: /* Following are valid 32-bit UCS characters, but not 16-bit Unicode,
-: 140: they are very rare, nevertheless we accept them. */
159: 141: if ((b & 0xf8) == 0xf0) { /* 1110xxxx 3 x 10xxxxxx sequence */
18: 142: remains_10xxxxxx = 3;
18: 143: utf8count++;
18: 144: continue;
-: 145: }
141: 146: if ((b & 0xfc) == 0xf8) { /* 1110xxxx 4 x 10xxxxxx sequence */
3: 147: remains_10xxxxxx = 4;
3: 148: utf8count++;
3: 149: continue;
-: 150: }
138: 151: if ((b & 0xfe) == 0xfc) { /* 1110xxxx 5 x 10xxxxxx sequence */
9: 152: remains_10xxxxxx = 5;
9: 153: utf8count++;
9: 154: continue;
-: 155: }
-: 156: /* We can get here only when input is invalid: (b & 0xc0) == 0x80. */
-: 157: return 0;
-: 158: }
-: 159: else {
-: 160: /* Broken 10xxxxxx sequence? */
3461: 161: if ((b & 0xc0) != 0x80) {
-: 162: return 0;
-: 163: }
3281: 164: remains_10xxxxxx--;
-: 165: }
-: 166: }
-: 167:
-: 168: /* Unfinished 10xxxxxx sequence. */
101: 169: if (remains_10xxxxxx != 0 && analyser->options.termination_strictness > 0)
-: 170: return 0;
-: 171:
101: 172: if (utf8count < (int)analyser->options.min_chars)
-: 173: return 0;
-: 174:
101: 175: analyser->result.charset = utf8;
101: 176: analyser->result.surface |= enca_eol_surface(buffer, size, counts);
101: 177: return 1;
-: 178:}
-: 179:
-: 180:/**
-: 181: * looks_like_TeX:
-: 182: * @analyser: Analyser whose buffer is to be checked.
-: 183: *
-: 184: * Checks whether @analyser->buffer contains TeX-encoded 8bit characters.
-: 185: *
-: 186: * Directly modifies @analyser->result on success.
-: 187: *
-: 188: * Returns: Nonzero when @analyser->result was set, zero othewrise.
-: 189: **/
-: 190:static int
40: 191:looks_like_TeX(EncaAnalyserState *analyser)
-: 192:{
-: 193: /* TeX escape character, skip-characters, punctuation and alpha accents */
-: 194:
-: 195: /* THIS IS A GENERATED TABLE, see tools/expand_table.pl */
-: 196: static const unsigned char TEX_ACCPUNCT[] = {
-: 197: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 198: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 199: 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0,
-: 200: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
-: 201: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 202: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
-: 203: 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 204: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
-: 205: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 206: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 207: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 208: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 209: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 210: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 211: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 212: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 213: };
-: 214:
-: 215: /* THIS IS A GENERATED TABLE, see tools/expand_table.pl */
-: 216: static const unsigned char TEX_ACCALPHA[] = {
-: 217: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 218: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 219: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 220: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 221: 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
-: 222: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 223: 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
-: 224: 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 225: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 226: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 227: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 228: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 229: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 230: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 231: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 232: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 233: };
-: 234:
-: 235: static const unsigned char TEX_ESCAPE = '\\';
-: 236: static const unsigned char TEX_BRACE = '{';
-: 237:
-: 238: static int TeX = ENCA_CS_UNKNOWN; /* TeX charset */
-: 239:
40: 240: const unsigned char *const buffer = analyser->buffer;
40: 241: const size_t size = analyser->size;
40: 242: const size_t *const counts = analyser->counts;
-: 243:
40: 244: size_t TeXaccents = 0; /* number of TeX accents */
-: 245: const unsigned char *p;
-: 246:
-: 247: /* When the file doesn't contain enough escape characters,
-: 248: don't waste time scanning it. */
40: 249: if (counts[TEX_ESCAPE] < analyser->options.min_chars)
-: 250: return 0;
-: 251:
-: 252: /* Initialize when we are called the first time. */
4: 253: if (TeX == ENCA_CS_UNKNOWN) {
4: 254: TeX = enca_name_to_charset("TeX");
4: 255: assert(TeX != ENCA_CS_UNKNOWN);
-: 256: }
-: 257:
-: 258: /* [roughly] count TeX accents */
4: 259: p = memchr(buffer, TEX_ESCAPE, size);
76: 260: while (p != NULL && (size_t)(p-buffer) + 2 < size) {
68: 261: if (*p == TEX_ESCAPE) {
40: 262: p++;
40: 263: if (*p == TEX_ESCAPE)
#####: 264: p++; /* catch \\ */
40: 265: if (TEX_ACCPUNCT[*p]
12: 266: || (TEX_ACCALPHA[*p]
#####: 267: && (*++p == TEX_BRACE || enca_isspace((char)*p)))) {
40: 268: while ((size_t)(p-buffer) + 1 < size
40: 269: && (*++p == TEX_BRACE || enca_isspace((char)*p)))
-: 270: ;
28: 271: if (enca_isalpha(*p)) TeXaccents++;
-: 272: }
40: 273: continue;
-: 274: }
28: 275: p = memchr(p, TEX_ESCAPE, size - (p - buffer));
-: 276: }
-: 277:
4: 278: if (TeXaccents < analyser->options.min_chars)
-: 279: return 0;
-: 280:
4: 281: analyser->result.charset = TeX;
4: 282: analyser->result.surface |= enca_eol_surface(buffer, size, counts);
4: 283: return 1;
-: 284:}
-: 285:
-: 286:/**
-: 287: * is_valid_utf7:
-: 288: * @analyser: Analyser whose buffer is to be checked.
-: 289: *
-: 290: * Checks whether @analyser->buffer contains valid UTF-7
-: 291: *
-: 292: * Directly modifies @analyser->result on success.
-: 293: *
-: 294: * Returns: Nonzero when @analyser->result was set, zero othewrise.
-: 295: **/
-: 296:static int
43: 297:is_valid_utf7(EncaAnalyserState *analyser)
-: 298:{
-: 299: /* UTF-7 special characters. */
-: 300: static const unsigned char UTF7_ESCAPE = '+';
-: 301: /* This is not a bug. `+-' is `+' in UTF-7. */
-: 302: static const unsigned char UTF7_PLUS = '-';
-: 303:
-: 304: /* Base64 base (or so-called set B), see RFC1521, RFC1642 */
-: 305: /* THIS IS A GENERATED TABLE, see tools/expand_table.pl */
-: 306: static const short int BASE64[] = {
-: 307: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 308: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 309: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64,
-: 310: 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, 0,
-: 311: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
-: 312: 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 0, 0, 0, 0, 0,
-: 313: 0, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
-: 314: 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 0, 0, 0, 0,
-: 315: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 316: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 317: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 318: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 319: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 320: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 321: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 322: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 323: };
-: 324:
-: 325: static int utf7 = ENCA_CS_UNKNOWN; /* UTF-7 charset */
-: 326:
43: 327: const unsigned char *const buffer = analyser->buffer;
43: 328: const size_t size = analyser->size;
43: 329: const size_t *const counts = analyser->counts;
-: 330:
43: 331: size_t utf7count = 0; /* number of >7bit characters */
-: 332: unsigned char *p,*q;
-: 333:
-: 334: /* When the file doesn't contain enough UTF-7 shift characters,
-: 335: don't waste time scanning it. */
43: 336: if (counts[UTF7_ESCAPE] < analyser->options.min_chars)
-: 337: return 0;
-: 338:
-: 339: /* Initialize when we are called the first time. */
6: 340: if (utf7 == ENCA_CS_UNKNOWN) {
6: 341: utf7 = enca_name_to_charset("utf-7");
6: 342: assert(utf7 != ENCA_CS_UNKNOWN);
-: 343: }
-: 344:
6: 345: p = memchr(buffer, UTF7_ESCAPE, size);
45: 346: while (p != NULL && (size_t)(p-buffer) + 1 < size) {
36: 347: p++;
36: 348: if (*p == UTF7_PLUS) { /* +- */
-: 349: /* Don't count +- since it's often used for 0x00b1 in plain 7bit ascii. */
-: 350: /* utf7count++; */
-: 351: } else {
315: 352: for (q = p; (size_t)(q-buffer) < size && BASE64[*q]; q++)
-: 353: ;
36: 354: if ((size_t)(q-buffer) == size) {
-: 355: p = q;
-: 356: break;
-: 357: }
-: 358: /* check whether all padding bits are 0's (don't try to understand how) */
36: 359: if (q-p == 0
33: 360: || ((BASE64[*(q-1)]-1) & 0x3f>>(6 - 6*(q - p)%8)))
-: 361: return 0;
-: 362:
33: 363: utf7count += 6*(q - p)/16;
33: 364: p = q;
-: 365: }
33: 366: p = memchr(p, UTF7_ESCAPE, size - (p - buffer));
-: 367: }
-: 368:
-: 369: /* p != NULL means unsinished sequence here. */
3: 370: if (p != NULL && analyser->options.termination_strictness > 0)
-: 371: return 0;
-: 372:
3: 373: if (utf7count < analyser->options.min_chars)
-: 374: return 0;
-: 375:
3: 376: analyser->result.charset = utf7;
3: 377: analyser->result.surface |= enca_eol_surface(buffer, size, counts);
3: 378: return 1;
-: 379:}
-: 380:
-: 381:/**
-: 382: * looks_like_ucs2:
-: 383: * @analyser: Analyser whose buffer is to be checked.
-: 384: *
-: 385: * Checks whether @analyser->buffer contains UCS-2 encoded characters.
-: 386: *
-: 387: * Directly modifies @analyser->result on success.
-: 388: *
-: 389: * Returns: Nonzero when @analyser->result was set, zero othewrise.
-: 390: **/
-: 391:static int
26: 392:looks_like_ucs2(EncaAnalyserState *analyser)
-: 393:{
-: 394: static int ucs2 = ENCA_CS_UNKNOWN; /* UCS-2 charset id */
-: 395:
26: 396: const unsigned char *const buffer = analyser->buffer;
26: 397: const size_t size = analyser->size;
26: 398: const size_t *const counts = analyser->counts;
-: 399:
-: 400: /* Bonus added when we catch a byte order marker. */
-: 401: size_t bom_bonus;
-: 402:
26: 403: size_t ucs2count = 0; /* something like number of good ucs-2 characters */
26: 404: unsigned int byte_order = 0; /* default byte order is little endian
-: 405: * (msb first) */
26: 406: unsigned int byte_order_changes = 0; /* how many times byte_order changed */
26: 407: size_t cr = 0; /* number of CR's */
26: 408: size_t lf = 0; /* number of LF's */
26: 409: int crlf_ok = 1; /* are all LF's preceeded by CR's? */
-: 410: unsigned char b1, b2;
-: 411: double r;
-: 412: size_t i;
-: 413:
-: 414: /* The number of bytes must be of course even */
26: 415: if (size%2 != 0)
-: 416: return 0;
-: 417:
24: 418: bom_bonus = (size_t)(sqrt((double)size) + size/10.0);
-: 419:
-: 420: /* When the file doesn't contain enough zeros,
-: 421: don't waste time scanning it. */
48: 422: r = (2.0*(counts[0] + counts[1] + counts[2] + counts[3] + counts[4])
24: 423: + bom_bonus)/size;
24: 424: if (r < log(analyser->options.threshold + EPSILON))
-: 425: return 0;
-: 426:
-: 427: /* Initialize when we are called the first time. */
21: 428: if (ucs2 == ENCA_CS_UNKNOWN) {
9: 429: ucs2 = enca_name_to_charset("ucs-2");
9: 430: assert(ucs2 != ENCA_CS_UNKNOWN);
-: 431: }
-: 432:
-: 433: /* Try to catch lsb even when it doesn't start with endian marker. */
21: 434: if (buffer[1] == 0 && enca_isprint(buffer[0]))
6: 435: byte_order = 1;
-: 436:
-: 437: /* Scan buffer. */
1119: 438: for (i = 0; i < size; i += 2) {
1119: 439: b1 = buffer[i + byte_order];
1119: 440: b2 = buffer[i+1 - byte_order];
-: 441: /* Byte order marker detection. */
1119: 442: if (b1 == 0xfe && b2 == 0xff) {
9: 443: if (i == 0)
9: 444: ucs2count += bom_bonus;
-: 445: else
#####: 446: byte_order_changes++;
9: 447: continue;
-: 448: }
1110: 449: if (b1 == 0xff && b2 == 0xfe) {
3: 450: byte_order = 1-byte_order;
3: 451: if (i == 0)
3: 452: ucs2count += bom_bonus;
-: 453: else
#####: 454: byte_order_changes++;
3: 455: continue;
-: 456: }
-: 457: /* Black magic.
-: 458: * When almost any word can be UCS-2 character, we have to assume some
-: 459: * are far more probable. */
1107: 460: if (b1 == 0) {
816: 461: ucs2count += (enca_isprint(b2) || enca_isspace(b2)) ? 2 : 0;
-: 462: /* check EOLs */
816: 463: if (b2 == CR)
3: 464: cr++;
816: 465: if (b2 == LF) {
90: 466: lf++;
90: 467: if (i > 0
90: 468: && (buffer[i-1-byte_order] != CR
3: 469: || buffer[i-2+byte_order] != 0))
87: 470: crlf_ok = 0;
-: 471: }
-: 472: }
-: 473: else {
291: 474: if (b1 <= 4)
288: 475: ucs2count += 2;
-: 476: }
-: 477: }
-: 478:
-: 479: /* Now we have to decide what we tell to the caller. */
21: 480: r = (double)ucs2count/size;
21: 481: if (r < log(analyser->options.threshold + EPSILON)
21: 482: || ucs2count/2 < analyser->options.min_chars)
-: 483: return 0;
-: 484:
21: 485: analyser->result.charset = ucs2;
-: 486:
-: 487: /* Byte order surface. */
21: 488: if (byte_order_changes)
#####: 489: analyser->result.surface |= ENCA_SURFACE_PERM_MIX;
-: 490: else
21: 491: analyser->result.surface |= byte_order ? ENCA_SURFACE_PERM_21: 0;
-: 492:
-: 493: /* EOL surface. */
21: 494: if (cr == 0)
18: 495: analyser->result.surface |= ENCA_SURFACE_EOL_LF;
-: 496: else {
3: 497: if (lf == 0)
#####: 498: analyser->result.surface |= ENCA_SURFACE_EOL_CR;
-: 499: else {
3: 500: analyser->result.surface |= crlf_ok
-: 501: ? ENCA_SURFACE_EOL_CRLF
-: 502: : ENCA_SURFACE_EOL_MIX;
-: 503: }
-: 504: }
-: 505:
-: 506: return 1;
-: 507:}
-: 508:
-: 509:/**
-: 510: * looks_like_ucs4:
-: 511: * @analyser: Analyser whose buffer is to be checked.
-: 512: *
-: 513: * Checks whether @analyser->buffer contains UCS-4 encoded characters.
-: 514: *
-: 515: * Directly modifies @analyser->result on success.
-: 516: *
-: 517: * Returns: Nonzero when @analyser->result was set, zero othewrise.
-: 518: **/
-: 519:static int
32: 520:looks_like_ucs4(EncaAnalyserState *analyser)
-: 521:{
-: 522: static const EncaSurface PERMS[] = {
-: 523: ENCA_SURFACE_PERM_4321,
-: 524: ENCA_SURFACE_PERM_21
-: 525: };
-: 526:
-: 527: static int ucs4 = ENCA_CS_UNKNOWN; /* UCS-4 charset id */
-: 528:
32: 529: unsigned char *buffer = analyser->buffer;
32: 530: const size_t size = analyser->size;
32: 531: const size_t *const counts = analyser->counts;
-: 532:
32: 533: ssize_t ucs4count = 0; /* ucs-4-icity */
-: 534: size_t count_perm[4]; /* counts for various byteorders */
-: 535: EncaSurface eol[4]; /* EOL types for various byteorders */
-: 536: double r; /* rating */
-: 537: size_t i, max;
-: 538:
-: 539: /* The number of bytes must be of course multiple of 4. */
32: 540: if (size%4 != 0)
-: 541: return 0;
-: 542:
-: 543: /* When the file doesn't contain enough zeros (and other small bytes),
-: 544: don't waste time scanning it. */
42: 545: r = (4.0*(counts[0] + counts[1] + counts[2] + counts[3] + counts[4])/3.0)
21: 546: /size;
21: 547: if (r < log(analyser->options.threshold + EPSILON))
-: 548: return 0;
-: 549:
-: 550: /* Initialize when we are called the first time. */
18: 551: if (ucs4 == ENCA_CS_UNKNOWN) {
8: 552: ucs4 = enca_name_to_charset("ucs-4");
8: 553: assert(ucs4 != ENCA_CS_UNKNOWN);
-: 554: }
-: 555:
-: 556: /* Try all sensible unsigned charorders and find maximum.
-: 557: At the end the buffer has the same byteorder as it had, but when
-: 558: the buffer have to be considered const, work on copy. */
18: 559: if (analyser->options.const_buffer) {
#####: 560: buffer = memcpy(enca_malloc(size), buffer, size);
-: 561: }
-: 562:
18: 563: max = 0;
90: 564: for (i = 0; i < 4; i++) {
72: 565: count_perm[i] = what_if_it_was_ucs4(buffer, size,
-: 566: analyser->options.min_chars,
72: 567: eol + i);
72: 568: if (count_perm[i] > count_perm[max])
3: 569: max = i;
72: 570: shuffle_byte_order(buffer, size, PERMS[i%2]);
-: 571: }
-: 572:
18: 573: if (analyser->options.const_buffer)
#####: 574: enca_free(buffer);
-: 575:
-: 576: /* Use quite a cruel selection to restrain other byteorders. */
18: 577: ucs4count = 2*count_perm[max];
90: 578: for (i = 0; i < 4; i++)
72: 579: ucs4count -= count_perm[i];
-: 580:
-: 581: /* Now we have to decide what we tell to the caller. */
18: 582: r = (double)ucs4count/size;
18: 583: if (r < log(analyser->options.threshold + EPSILON)
6: 584: || ucs4count/4 < (int)analyser->options.min_chars)
-: 585: return 0;
-: 586:
6: 587: analyser->result.charset = ucs4;
-: 588: /* Compute what permutation corresponds to max. */
9: 589: for (i = 0; i < max; i++)
3: 590: analyser->result.surface ^= PERMS[i%2];
6: 591: analyser->result.surface |= eol[max];
-: 592:
6: 593: return 1;
-: 594:}
-: 595:
-: 596:/**
-: 597: * what_if_it_was_ucs4:
-: 598: * @buffer: Buffer to be checked.
-: 599: * @size: Size of @buffer.
-: 600: * @min_chars: Minimal number of `nice' UCS-4 characters to succeede.
-: 601: * @crlf_surf: Where detected EOL surface type should be stored.
-: 602: *
-: 603: * Checks whether @buffer contains little endian UCS-4 encoded characters.
-: 604: *
-: 605: * Assumes @buffer contains little endian UCS-4 and returns the number of
-: 606: * `good' characters, and in case it's at least @min_chars, finds EOL surface
-: 607: * type too.
-: 608: *
-: 609: * Returns: The number of `good' UCS-4 characters with some bonus for a good
-: 610: * BOM.
-: 611: **/
-: 612:static size_t
72: 613:what_if_it_was_ucs4(const unsigned char *buffer,
-: 614: size_t size,
-: 615: size_t min_chars,
-: 616: EncaSurface *crlf_surf)
-: 617:{
-: 618: /* Bonus added when we catch a byte order marker. */
-: 619: size_t bom_bonus;
-: 620:
72: 621: size_t count = 0; /* ucs-4-icity */
72: 622: size_t cr = 0; /* number of CR's */
72: 623: size_t lf = 0; /* number of LF's */
72: 624: int crlf_ok = 1; /* are all LF's preceeded by CR's? */
-: 625: size_t i;
-: 626:
-: 627: /* check BOM */
72: 628: bom_bonus = (size_t)(sqrt((double)size) + size/20.0);
72: 629: if (size) {
72: 630: if (buffer[0] == 0 && buffer[1] == 0
12: 631: && buffer[2] == 0xfe && buffer[3] == 0xff) {
#####: 632: count += bom_bonus;
#####: 633: buffer += 4;
#####: 634: size -= 4;
-: 635: }
-: 636: }
-: 637:
4320: 638: for (i = 0; i < size; i += 4) {
-: 639: /* Does it look like little endian ucs-4? */
4248: 640: if (buffer[i] == 0 && buffer[i+1] == 0) {
1392: 641: if (buffer[i+2] == 0)
504: 642: count += enca_isprint(buffer[i+3]) || enca_isspace(buffer[i+3]) ? 4 : 0;
-: 643: else {
888: 644: if (buffer[i+2] < 5)
192: 645: count += 4;
-: 646: }
-: 647: }
-: 648: }
-: 649:
-: 650: /* Detect EOL surface
-: 651: * To be 100% portable, we do it the ugly way: by testing individual bytes. */
72: 652: if (count/4 >= min_chars) {
696: 653: for (i = 0; i < size; i += 4) {
696: 654: if (buffer[i+3] == CR && buffer[i+2] == 0
#####: 655: && buffer[i+1] == 0 && buffer[i] == 0)
#####: 656: cr++;
696: 657: if (buffer[i+3] == LF && buffer[i+2] == 0
54: 658: && buffer[i+1] == 0 && buffer[i] == 0) {
54: 659: lf++;
54: 660: if (crlf_ok && i > 0
6: 661: && (buffer[i-1] != CR || buffer[i-2] != 0
#####: 662: || buffer[i-3] != 0 || buffer[i-4] != 0))
6: 663: crlf_ok = 0;
-: 664: }
-: 665: }
-: 666: /* EOL surface result */
6: 667: if (cr == 0)
6: 668: *crlf_surf = ENCA_SURFACE_EOL_LF;
-: 669: else {
#####: 670: if (lf == 0)
#####: 671: *crlf_surf = ENCA_SURFACE_EOL_CR;
-: 672: else
#####: 673: *crlf_surf = crlf_ok ? ENCA_SURFACE_EOL_CRLF : ENCA_SURFACE_EOL_MIX;
-: 674: }
-: 675: }
-: 676:
72: 677: return count;
-: 678:}
-: 679:
-: 680:/**
-: 681: * shuffle_byte_order:
-: 682: * @buffer: Buffer to be shuffled.
-: 683: * @size: Size of @buffer.
-: 684: * @permutation: Permutation type, possible values mean
-: 685: * 0 no change
-: 686: * ENCA_SURFACE_PERM_4321 4321
-: 687: * ENCA_SURFACE_PERM_21 21 (== 2143)
-: 688: * ENCA_SURFACE_PERM_21|ENCA_SURFACE_PERM_4321 3412
-: 689: *
-: 690: * Performs given permutation on @buffer.
-: 691: **/
-: 692:static void
72: 693:shuffle_byte_order(unsigned char *buffer,
-: 694: size_t size,
-: 695: EncaSurface permutation)
-: 696:{
-: 697: size_t i;
-: 698: unsigned char b;
-: 699:
72: 700: if (permutation & ENCA_SURFACE_PERM_4321) {
2124: 701: for (i = 0; i < size; i += 4) {
2124: 702: b = buffer[i];
2124: 703: buffer[i] = buffer[i+3];
2124: 704: buffer [i+3] = b;
-: 705:
2124: 706: b = buffer[i+1];
2124: 707: buffer[i+1] = buffer[i+2];
2124: 708: buffer[i+2] = b;
-: 709: }
-: 710: }
-: 711:
72: 712: if (permutation & ENCA_SURFACE_PERM_21) {
4248: 713: for (i = 0; i < size; i += 2) {
4248: 714: b = buffer[i];
4248: 715: buffer[i] = buffer[i+1];
4248: 716: buffer [i+1] = b;
-: 717: }
-: 718: }
72: 719:}
-: 720:
-: 721:/**
-: 722: * looks_like_utf8:
-: 723: * @analyser: Analyser whose buffer is to be checked.
-: 724: *
-: 725: * Checks whether @analyser->buffer may contain UTF-8.
-: 726: *
-: 727: * This is a fault-tolerant version of is_valid_utf8, intended to be used after
-: 728: * filtering, when a few stray 8bit characters may appear in the sample.
-: 729: *
-: 730: * Directly modifies @analyser->result on success.
-: 731: *
-: 732: * Returns: Nonzero when @analyser->result was set, zero othewrise.
-: 733: **/
-: 734:static int
343: 735:looks_like_utf8(EncaAnalyserState *analyser)
-: 736:{
-: 737: static int utf8 = ENCA_CS_UNKNOWN; /* UTF-8 charset */
343: 738: size_t size = analyser->size;
343: 739: const unsigned char *buffer = analyser->buffer;
343: 740: const size_t *const counts = analyser->counts;
-: 741:
-: 742: /* Bonus added when we catch a byte order marker. */
-: 743: size_t bom_bonus;
-: 744:
343: 745: int remains_10xxxxxx = 0; /* how many next bytes have to be 10xxxxxx */
343: 746: int utf8count = 0; /* number of UTF-8 encoded characters */
343: 747: int failures = 0; /* number of invalid sequences encountered */
-: 748: size_t i;
-: 749: unsigned char b;
-: 750:
-: 751: /* Initialize when we are called the first time. */
343: 752: if (utf8 == ENCA_CS_UNKNOWN) {
190: 753: utf8 = enca_name_to_charset("utf-8");
190: 754: assert(utf8 != ENCA_CS_UNKNOWN);
-: 755: }
-: 756:
-: 757: /* Check BOM */
343: 758: bom_bonus = (size_t)(sqrt((double)size) + size/10.0);
343: 759: if (size >= 3
343: 760: && buffer[0] == 0xef && buffer[1] == 0xbb && buffer[2] == 0xbf) {
#####: 761: utf8count += bom_bonus;
#####: 762: buffer += 3;
#####: 763: size -= 3;
-: 764: }
-: 765:
-: 766: /* Parse. */
1729572: 767: for (i = 0; i < size; i++) {
1729229: 768: b = buffer[i];
1729229: 769: if (!remains_10xxxxxx) {
1474025: 770: if ((b & 0x80) == 0) /* 7bit characters */
1119520: 771: continue;
354505: 772: if ((b & 0xe0) == 0xc0) { /* 110xxxxx 10xxxxxx sequence */
158596: 773: remains_10xxxxxx = 1;
158596: 774: utf8count++;
158596: 775: continue;
-: 776: }
195909: 777: if ((b & 0xf0) == 0xe0) { /* 1110xxxx 2 x 10xxxxxx sequence */
63109: 778: remains_10xxxxxx = 2;
63109: 779: utf8count++;
63109: 780: continue;
-: 781: }
-: 782: /* Following are valid 32-bit UCS characters, but not 16-bit Unicode,
-: 783: they are very rare, nevertheless we accept them. */
132800: 784: if ((b & 0xf8) == 0xf0) { /* 1110xxxx 3 x 10xxxxxx sequence */
18454: 785: remains_10xxxxxx = 3;
18454: 786: utf8count++;
18454: 787: continue;
-: 788: }
114346: 789: if ((b & 0xfc) == 0xf8) { /* 1110xxxx 4 x 10xxxxxx sequence */
174: 790: remains_10xxxxxx = 4;
174: 791: utf8count++;
174: 792: continue;
-: 793: }
114172: 794: if ((b & 0xfe) == 0xfc) { /* 1110xxxx 5 x 10xxxxxx sequence */
2102: 795: remains_10xxxxxx = 5;
2102: 796: utf8count++;
2102: 797: continue;
-: 798: }
-: 799: /* We can get here only when input is invalid: (b & 0xc0) == 0x80. */
112070: 800: failures++;
112070: 801: remains_10xxxxxx = 0;
-: 802: }
-: 803: else {
-: 804: /* Broken 10xxxxxx sequence? */
255204: 805: if ((b & 0xc0) != 0x80) {
239591: 806: failures++;
239591: 807: utf8count--;
239591: 808: remains_10xxxxxx = 0;
-: 809: }
-: 810: else
15613: 811: remains_10xxxxxx--;
-: 812: }
-: 813: }
-: 814:
-: 815: /* Unfinished 10xxxxxx sequence. */
343: 816: if (remains_10xxxxxx != 0 && analyser->options.termination_strictness > 0)
#####: 817: failures += 2;
-: 818:
-: 819: /* Tolerate a small number of failures. */
343: 820: if (failures > exp(-7*(analyser->options.threshold - 1.0))*utf8count/2.0)
-: 821: return 0;
-: 822:
6: 823: analyser->result.charset = utf8;
6: 824: analyser->result.surface |= enca_eol_surface(buffer, size, counts);
6: 825: if (failures > 0)
2: 826: analyser->result.surface |= ENCA_SURFACE_EOL_BIN;
-: 827: return 1;
-: 828:}
-: 829:
-: 830:/**
-: 831: * looks_like_hz:
-: 832: * @analyser: An analyser.
-: 833: *
-: 834: * Checks whether @analyser buffer is HZ-encoded. See RFC 1843
-: 835: *
-: 836: * Directly modifies @analyser->result on success.
-: 837: *
-: 838: * Returns: Nonzero when @analyser->result was set, zero othewrise.
-: 839: **/
-: 840:static int
36: 841:looks_like_hz(EncaAnalyserState *analyser)
-: 842:{
36: 843: unsigned char *buffer = analyser->buffer;
36: 844: size_t size = analyser->size;
-: 845: static int hz = ENCA_CS_UNKNOWN; /* HZ charset */
36: 846: size_t hzcount = 0; /* number of qp encoded characters */
36: 847: unsigned char *p = buffer;
36: 848: const size_t *const counts = analyser->counts;
-: 849:
-: 850: int escaped; /* true when we're in 8-bit mode */
-: 851: unsigned int i;
-: 852:
-: 853: /* Initialize when we are called the first time. */
36: 854: if (hz == ENCA_CS_UNKNOWN) {
36: 855: hz = enca_name_to_charset("hz");
36: 856: assert(hz != ENCA_CS_UNKNOWN);
-: 857: }
-: 858:
219: 859: for (i = 0; i < analyser->ncharsets; i++)
186: 860: if (analyser->charsets[i] == hz)
-: 861: goto goahead;
-: 862: return 0;
-: 863:
-: 864:goahead:
-: 865: /* When the file doesn't contain escape characters,
-: 866: don't waste time scanning it. */
3: 867: if (counts['{'] == 0
3: 868: || counts['}'] == 0
3: 869: || counts['~'] == 0)
-: 870: return 0;
-: 871:
-: 872: /* Move to first escaped-in */
-: 873: /* FIXME: Things will be simpler if we have strnstr()? */
3: 874: while ((size_t)(p - buffer) + 2 < size) {
3: 875: p = memchr(p, '~', size - (p - buffer));
3: 876: if (p == NULL)
-: 877: return 0;
3: 878: if (p[1] == '{') {
3: 879: escaped = 1;
3: 880: p += 2;
3: 881: break;
#####: 882: } else if (p[1] == '\n') {
#####: 883: p += 2;
#####: 884: } else if (p[1] == '~') {
#####: 885: p += 2;
-: 886: } else
#####: 887: p += 2;
-: 888: }
-: 889:
-: 890: /* Check if it's valid HZ and count hz encoded characters. */
699: 891: while (p < buffer + size) {
696: 892: if (*p == '~' && p < buffer + size - 1) {
9: 893: switch (p[1]) {
-: 894: case '~':
#####: 895: if (escaped) {
#####: 896: p++;
#####: 897: hzcount++;
-: 898: } else {
#####: 899: p += 2;
-: 900: }
-: 901: break;
-: 902: case '{':
3: 903: if (!escaped) {
3: 904: p += 2;
3: 905: escaped = 1;
-: 906: } else {
-: 907: return 0;
-: 908: }
3: 909: break;
-: 910: case '}':
6: 911: if (escaped) {
6: 912: escaped = 0;
6: 913: p += 2;
-: 914: } else {
-: 915: return 0;
-: 916: }
6: 917: break;
-: 918: case '\n':
#####: 919: if (escaped) {
-: 920: return 0;
-: 921: }
#####: 922: p += 2;
#####: 923: break;
-: 924: default:
#####: 925: if (!escaped) {
-: 926: return 0;
-: 927: }
#####: 928: p++;
-: 929: }
-: 930: } else {
-: 931: /* Spaces, CR or LF not allowed in escaped block */
687: 932: if (escaped) {
684: 933: if (*p < ' ') {
-: 934: return 0;
-: 935: }
684: 936: hzcount++;
-: 937: }
687: 938: p++;
-: 939: }
-: 940: }
-: 941:
3: 942: if (hzcount < analyser->options.min_chars)
-: 943: return 0;
-: 944:
-: 945: /* Unfinished escaped block here. */
3: 946: if (escaped && analyser->options.termination_strictness > 0)
-: 947: return 0;
-: 948:
3: 949: analyser->result.charset = hz;
3: 950: analyser->result.surface |= enca_eol_surface(buffer, size, counts);
-: 951:
3: 952: return 1;
-: 953:}
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lib/.libs/lang.c.gcov
-: 0:Source:lang.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*
-: 2: uniform interface to particular languages
-: 3:
-: 4: Copyright (C) 2000-2003 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#ifdef HAVE_CONFIG_H
-: 20:# include "config.h"
-: 21:#endif /* HAVE_CONFIG_H */
-: 22:
-: 23:#include "enca.h"
-: 24:#include "internal.h"
-: 25:
-: 26:/**
-: 27: * Language `none'.
-: 28: *
-: 29: * This language has no regular charsets, so only multibyte encodings are
-: 30: * tested
-: 31: **/
-: 32:static const EncaLanguageInfo ENCA_LANGUAGE___ = {
-: 33: "__", /* name */
-: 34: "none", /* human name */
-: 35: 0, /* number of charsets */
-: 36: NULL, /* their names */
-: 37: NULL, /* character weights */
-: 38: NULL, /* significancy data */
-: 39: NULL, /* letter data */
-: 40: NULL, /* pair data */
-: 41: 0, /* sum of weights */
-: 42: NULL, /* hook function */
-: 43: NULL, /* eolhook function */
-: 44: NULL, /* lcuchook function */
-: 45: NULL, /* ratinghook function */
-: 46:};
-: 47:
-: 48:/* All languages. */
-: 49:static const EncaLanguageInfo *const LANGUAGE_LIST[] = {
-: 50: &ENCA_LANGUAGE_BE, /* Belarusian. */
-: 51: &ENCA_LANGUAGE_BG, /* Bulgarian. */
-: 52: &ENCA_LANGUAGE_CS, /* Czech. */
-: 53: &ENCA_LANGUAGE_ET, /* Estonian. */
-: 54: &ENCA_LANGUAGE_HR, /* Croatian. */
-: 55: &ENCA_LANGUAGE_HU, /* Hungarian. */
-: 56: &ENCA_LANGUAGE_LT, /* Latvian. */
-: 57: &ENCA_LANGUAGE_LV, /* Lithuanian. */
-: 58: &ENCA_LANGUAGE_PL, /* Polish. */
-: 59: &ENCA_LANGUAGE_RU, /* Russian. */
-: 60: &ENCA_LANGUAGE_SK, /* Slovak. */
-: 61: &ENCA_LANGUAGE_SL, /* Slovene. */
-: 62: &ENCA_LANGUAGE_UK, /* Ukrainian. */
-: 63: &ENCA_LANGUAGE_ZH, /* Chinese. */
-: 64: &ENCA_LANGUAGE___, /* None. */
-: 65:};
-: 66:
-: 67:#define NLANGUAGES (ELEMENTS(LANGUAGE_LIST))
-: 68:
-: 69:/* Local prototypes. */
-: 70:static int* language_charsets_ids(const EncaLanguageInfo *lang);
-: 71:static const EncaLanguageInfo* find_language(const char *langname);
-: 72:
-: 73:/**
-: 74: * enca_language_init:
-: 75: * @analyser: Analyzer state to be initialized for this language.
-: 76: * @langname: Two-letter ISO-639 language code.
-: 77: *
-: 78: * Initializes analyser for language @langname.
-: 79: *
-: 80: * Assumes @analyser is unitinialized, calling with an initialized @analyser
-: 81: * leads to memory leak.
-: 82: *
-: 83: * Returns: Nonzero on success, zero otherwise.
-: 84: **/
-: 85:int
247: 86:enca_language_init(EncaAnalyserState *analyser,
-: 87: const char *langname)
-: 88:{
-: 89: const EncaLanguageInfo *lang;
-: 90:
247: 91: assert(langname != NULL);
-: 92:
247: 93: analyser->lang = NULL;
247: 94: analyser->ncharsets = 0;
247: 95: analyser->charsets = NULL;
247: 96: analyser->lcbits = NULL;
247: 97: analyser->ucbits = NULL;
-: 98:
247: 99: lang = find_language(langname);
247: 100: if (lang == NULL)
-: 101: return 0;
-: 102:
247: 103: analyser->lang = lang;
247: 104: if (lang->ncharsets == 0)
-: 105: return 1;
-: 106:
222: 107: analyser->ncharsets = lang->ncharsets;
222: 108: analyser->charsets = language_charsets_ids(lang);
-: 109:
222: 110: return 1;
-: 111:}
-: 112:
-: 113:/**
-: 114: * enca_language_destroy:
-: 115: * @analyser: Analyzer state whose language part should be destroyed.
-: 116: *
-: 117: * Destroys the language part of analyser state @analyser.
-: 118: **/
-: 119:void
246: 120:enca_language_destroy(EncaAnalyserState *analyser)
-: 121:{
246: 122: enca_free(analyser->charsets);
246: 123: enca_free(analyser->lcbits);
246: 124: enca_free(analyser->ucbits);
246: 125: analyser->ncharsets = 0;
246: 126: analyser->lang = NULL;
246: 127:}
-: 128:
-: 129:/**
-: 130: * enca_get_languages:
-: 131: * @n: The number of languages will be stored here.
-: 132: *
-: 133: * Returns list of known languages.
-: 134: *
-: 135: * The returned strings are two-letter ISO-639 language codes, the same as
-: 136: * enca_analyser_alloc() accepts.
-: 137: *
-: 138: * The list of languages has to be freed by caller; the strings themselves
-: 139: * must be considered constant and must NOT be freed.
-: 140: *
-: 141: * Returns: The list of languages, storing their number into *@n.
-: 142: **/
-: 143:const char**
1: 144:enca_get_languages(size_t *n)
-: 145:{
-: 146: const char **languages;
-: 147: size_t i;
-: 148:
1: 149: languages = NEW(const char*, NLANGUAGES);
16: 150: for (i = 0; i < NLANGUAGES; i++)
15: 151: languages[i] = LANGUAGE_LIST[i]->name;
-: 152:
1: 153: *n = NLANGUAGES;
1: 154: return languages;
-: 155:}
-: 156:
-: 157:/**
-: 158: * enca_analyser_language:
-: 159: * @analyser: An analyser.
-: 160: *
-: 161: * Returns name of language which was @analyser initialized for.
-: 162: *
-: 163: * The returned string must be considered constant and must NOT be freed.
-: 164: *
-: 165: * Returns: The language name.
-: 166: **/
-: 167:const char*
#####: 168:enca_analyser_language(EncaAnalyser analyser)
-: 169:{
#####: 170: assert(analyser != NULL);
#####: 171: return analyser->lang->name;
-: 172:}
-: 173:
-: 174:/**
-: 175: * enca_language_english_name:
-: 176: * @lang: A two-letter language code, such as obtained from
-: 177: * enca_analyser_language() or enca_get_languages().
-: 178: *
-: 179: * Returns an English name of a language given its ISO-639 code.
-: 180: *
-: 181: * The returned string must be considered constant and must NOT be freed.
-: 182: *
-: 183: * Returns: The English language name.
-: 184: **/
-: 185:const char*
30: 186:enca_language_english_name(const char *lang)
-: 187:{
-: 188: const EncaLanguageInfo *linfo;
-: 189:
30: 190: linfo = find_language(lang);
30: 191: if (!linfo)
-: 192: return NULL;
-: 193:
30: 194: return linfo->humanname;
-: 195:}
-: 196:
-: 197:/**
-: 198: * enca_get_language_charsets:
-: 199: * @langname: Two-letter ISO-639 language code.
-: 200: * @n: The number of charsets will be stored here.
-: 201: *
-: 202: * Returns list of identifiers of charsets supported for language @language.
-: 203: *
-: 204: * The list of charset identifiers has to be freed by caller.
-: 205: *
-: 206: * Returns: The list of charsets, storing their number into *@n. When language
-: 207: * contains no charsets or @langname is invalid, #NULL is returned
-: 208: * and zero stored into *@n.
-: 209: **/
-: 210:int*
55: 211:enca_get_language_charsets(const char *langname,
-: 212: size_t *n)
-: 213:{
-: 214: const EncaLanguageInfo *lang;
-: 215:
55: 216: assert(langname != NULL);
-: 217:
55: 218: lang = find_language(langname);
55: 219: if (lang == NULL) {
#####: 220: *n = 0;
#####: 221: return NULL;
-: 222: }
-: 223:
55: 224: *n = lang->ncharsets;
55: 225: return language_charsets_ids(lang);
-: 226:}
-: 227:
-: 228:/**
-: 229: * language_charsets_ids:
-: 230: * @lang: A language.
-: 231: *
-: 232: * Creates and fills table of charset identifiers of charsets supported for
-: 233: * language @lang.
-: 234: *
-: 235: * The size of the table is determined by @lang->ncharsets.
-: 236: *
-: 237: * Returns: The charsets id table; #NULL when @lang has no charsets.
-: 238: **/
-: 239:static int*
277: 240:language_charsets_ids(const EncaLanguageInfo *lang)
-: 241:{
-: 242: int *charsets;
-: 243: size_t i;
-: 244:
277: 245: assert(lang != NULL);
-: 246:
277: 247: if (lang->ncharsets == 0)
-: 248: return NULL;
-: 249:
276: 250: charsets = NEW(int, lang->ncharsets);
1958: 251: for (i = 0; i < lang->ncharsets; i++) {
1682: 252: charsets[i] = enca_name_to_charset(lang->csnames[i]);
1682: 253: assert(charsets[i] != ENCA_CS_UNKNOWN);
-: 254: }
-: 255:
-: 256: return charsets;
-: 257:}
-: 258:
-: 259:/**
-: 260: * find_language:
-: 261: * @langname: Language (i.e. locale) name.
-: 262: *
-: 263: * Finds language @langname.
-: 264: *
-: 265: * Returns: Pointer to its language information data; #NULL if not found.
-: 266: **/
-: 267:static const EncaLanguageInfo*
332: 268:find_language(const char *langname)
-: 269:{
332: 270: const EncaLanguageInfo *lang = NULL;
-: 271: size_t i;
-: 272:
332: 273: if (langname == NULL)
-: 274: return NULL;
-: 275:
2134: 276: for (i = 0; i < NLANGUAGES; i++) {
2466: 277: if (strcmp(langname, LANGUAGE_LIST[i]->name) == 0) {
-: 278: lang = LANGUAGE_LIST[i];
-: 279: break;
-: 280: }
-: 281: }
-: 282:
-: 283: return lang;
-: 284:}
-: 285:
-: 286:/**
-: 287: * enca_get_charset_similarity_matrix:
-: 288: * @lang: A language.
-: 289: *
-: 290: * Computes character weight similarity matrix for language @lang.
-: 291: *
-: 292: * sim[i,j] is normalized to sim[i,i] thus:
-: 293: * - a row i contains ,probabilities` different languages will look like the
-: 294: * i-th one
-: 295: * - a column i contains ,probabilities` the i-th language will look like
-: 296: * the other languages.
-: 297: *
-: 298: * For all practical applications, the higher one of sim[i,j] and sim[j,i]
-: 299: * is important.
-: 300: *
-: 301: * Note: this is not used anywhere, only by simtable.
-: 302: *
-: 303: * Returns: The matrix, its size is determined by @lang->ncharsets; #NULL
-: 304: * for language with no charsets.
-: 305: **/
-: 306:double*
13: 307:enca_get_charset_similarity_matrix(const EncaLanguageInfo *lang)
-: 308:{
13: 309: const size_t n = lang->ncharsets;
13: 310: const unsigned short int *const *w = lang->weights;
13: 311: const unsigned short int *s = lang->significant;
-: 312:
-: 313: double *smat;
-: 314: size_t i, j, c;
-: 315:
13: 316: assert(lang != NULL);
-: 317:
13: 318: if (n == 0)
-: 319: return NULL;
-: 320:
-: 321: /* Below diagonal. */
13: 322: smat = NEW(double, n*n);
91: 323: for (i = 0; i < n; i++) {
279: 324: for (j = 0; j <= i; j++) {
279: 325: smat[i*n + j] = 0.0;
71703: 326: for (c = 0; c < 0x100; c++)
71424: 327: smat[i*n + j] += (double)w[i][c] * (double)w[j][c] / (s[c] + EPSILON);
-: 328: }
-: 329: }
-: 330:
-: 331: /* Above diagonal. */
91: 332: for (i = 0; i < n; i++) {
279: 333: for (j = i+1; j < n; j++)
201: 334: smat[i*n + j] = smat[j*n + i];
-: 335: }
-: 336:
-: 337: /* Normalize. */
78: 338: for (i = 0; i < n; i++) {
78: 339: double wmax = smat[i*n + i];
-: 340:
558: 341: for (j = 0; j < n; j++) {
480: 342: smat[i*n + j] /= wmax;
-: 343: }
-: 344: }
-: 345:
-: 346: return smat;
-: 347:}
-: 348:/* vim: ts=2
-: 349: */
-: 350:
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lib/.libs/lang_uk.c.gcov
-: 0:Source:lang_uk.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_uk.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_uk.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*
-: 2: encoding data and routines dependent on language; ukrainian
-: 3:
-: 4: Copyright (C) 2000-2003 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#ifdef HAVE_CONFIG_H
-: 20:# include "config.h"
-: 21:#endif /* HAVE_CONFIG_H */
-: 22:
-: 23:#include "enca.h"
-: 24:#include "internal.h"
-: 25:#include "data/ukrainian/ukrainian.h"
-: 26:
-: 27:/* Local prototypes. */
-: 28:static int hook(EncaAnalyserState *analyser);
-: 29:static int eol_hook(EncaAnalyserState *analyser);
-: 30:static int hook_mac1251(EncaAnalyserState *analyser);
-: 31:static int hook_isokoi(EncaAnalyserState *analyser);
-: 32:static int hook_ibm1125(EncaAnalyserState *analyser);
-: 33:static int hook_macwin(EncaAnalyserState *analyser);
-: 34:
-: 35:/**
-: 36: * ENCA_LANGUAGE_UK:
-: 37: *
-: 38: * Ukrainian language.
-: 39: *
-: 40: * Everything the world out there needs to know about this language.
-: 41: **/
-: 42:const EncaLanguageInfo ENCA_LANGUAGE_UK = {
-: 43: "uk",
-: 44: "ukrainian",
-: 45: NCHARSETS,
-: 46: CHARSET_NAMES,
-: 47: CHARSET_WEIGHTS,
-: 48: SIGNIFICANT,
-: 49: CHARSET_LETTERS,
-: 50: CHARSET_PAIRS,
-: 51: WEIGHT_SUM,
-: 52: &hook,
-: 53: &eol_hook,
-: 54: NULL,
-: 55: NULL
-: 56:};
-: 57:
-: 58:/**
-: 59: * hook:
-: 60: * @analyser: Analyser state whose charset ratings are to be modified.
-: 61: *
-: 62: * Launches language specific hooks for language "uk".
-: 63: *
-: 64: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 65: * otherwise.
-: 66: **/
-: 67:static int
#####: 68:hook(EncaAnalyserState *analyser)
-: 69:{
#####: 70: return hook_mac1251(analyser)
#####: 71: || hook_isokoi(analyser)
#####: 72: || hook_ibm1125(analyser);
-: 73:}
-: 74:
-: 75:/**
-: 76: * eol_hook:
-: 77: * @analyser: Analyser state whose charset ratings are to be modified.
-: 78: *
-: 79: * Launches language specific EOL hooks for language "uk".
-: 80: *
-: 81: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 82: * otherwise.
-: 83: **/
-: 84:static int
#####: 85:eol_hook(EncaAnalyserState *analyser)
-: 86:{
#####: 87: return hook_macwin(analyser);
-: 88:}
-: 89:
-: 90:/**
-: 91: * hook_macwin:
-: 92: * @analyser: Analyser state whose charset ratings are to be modified.
-: 93: *
-: 94: * Decides between maccyr and cp1251 charsets for language "uk".
-: 95: *
-: 96: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 97: * otherwise.
-: 98: **/
-: 99:static int
-: 100:hook_macwin(EncaAnalyserState *analyser)
-: 101:{
-: 102: static EncaLanguageHookDataEOL hookdata[] = {
-: 103: { "maccyr", ENCA_SURFACE_EOL_CR, (size_t)-1 },
-: 104: { "cp1251", ENCA_SURFACE_MASK_EOL, (size_t)-1 },
-: 105: };
-: 106:
#####: 107: return enca_language_hook_eol(analyser, ELEMENTS(hookdata), hookdata);
-: 108:}
-: 109:
-: 110:/**
-: 111: * hook_mac1251:
-: 112: * @analyser: Analyser state whose charset ratings are to be modified.
-: 113: *
-: 114: * Decides between maccyr and cp1251 charsets for language "uk".
-: 115: *
-: 116: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 117: * otherwise.
-: 118: **/
-: 119:static int
-: 120:hook_mac1251(EncaAnalyserState *analyser)
-: 121:{
-: 122: static const unsigned char list_maccyr[] = {
-: 123: 0xb4, 0xdf, 0xbb, 0x82, 0x8f
-: 124: };
-: 125: static const unsigned char list_cp1251[] = {
-: 126: 0xb3, 0xff, 0xbf, 0xc2, 0xcf
-: 127: };
-: 128: static EncaLanguageHookData1CS hookdata[] = {
-: 129: MAKE_HOOK_LINE(maccyr),
-: 130: MAKE_HOOK_LINE(cp1251),
-: 131: };
-: 132:
#####: 133: return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata);
-: 134:}
-: 135:
-: 136:/**
-: 137: * hook_isokoi:
-: 138: * @analyser: Analyser state whose charset ratings are to be modified.
-: 139: *
-: 140: * Decides between iso8859-5 and koi8u charsets for language "uk".
-: 141: *
-: 142: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 143: * otherwise.
-: 144: **/
-: 145:static int
-: 146:hook_isokoi(EncaAnalyserState *analyser)
-: 147:{
-: 148: static const unsigned char list_iso88595[] = {
-: 149: 0xdd, 0xe2, 0xf6, 0xe0, 0xde, 0xe1, 0xe3, 0xdc, 0xdf, 0xef, 0xec
-: 150: };
-: 151: static const unsigned char list_koi8u[] = {
-: 152: 0xcf, 0xc1, 0xce, 0xc9, 0xa6, 0xc5, 0xcb, 0xcc, 0xc4, 0xcd, 0xc7
-: 153: };
-: 154: static EncaLanguageHookData1CS hookdata[] = {
-: 155: MAKE_HOOK_LINE(iso88595),
-: 156: MAKE_HOOK_LINE(koi8u),
-: 157: };
-: 158:
#####: 159: return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata);
-: 160:}
-: 161:
-: 162:/**
-: 163: * hook_ibm1125:
-: 164: * @analyser: Analyser state whose charset ratings are to be modified.
-: 165: *
-: 166: * Decides between cp1125 and ibm855 charsets for language "uk".
-: 167: *
-: 168: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 169: * otherwise.
-: 170: **/
-: 171:static int
-: 172:hook_ibm1125(EncaAnalyserState *analyser)
-: 173:{
-: 174: static const unsigned char list_cp1125[] = {
-: 175: 0xae, 0xad, 0xe2, 0xf7, 0xe0, 0xa5, 0xab, 0xaf, 0xef, 0xaa, 0xa7
-: 176: };
-: 177: static const unsigned char list_ibm855[] = {
-: 178: 0xd6, 0xd4, 0xb7, 0x8a, 0xeb, 0xc6, 0xd0, 0xd2, 0xd8, 0xde, 0xf3
-: 179: };
-: 180: static EncaLanguageHookData1CS hookdata[] = {
-: 181: MAKE_HOOK_LINE(cp1125),
-: 182: MAKE_HOOK_LINE(ibm855),
-: 183: };
-: 184:
#####: 185: return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata);
-: 186:}
-: 187:
-: 188:/* vim: ts=2
-: 189: */
-: 190:
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lib/.libs/lang_cs.c.gcov
-: 0:Source:lang_cs.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_cs.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_cs.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*
-: 2: encoding data and routines dependent on language; czech
-: 3:
-: 4: Copyright (C) 2000-2003 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#ifdef HAVE_CONFIG_H
-: 20:# include "config.h"
-: 21:#endif /* HAVE_CONFIG_H */
-: 22:
-: 23:#include "enca.h"
-: 24:#include "internal.h"
-: 25:#include "data/czech/czech.h"
-: 26:
-: 27:/* Local prototypes. */
-: 28:static int hook(EncaAnalyserState *analyser);
-: 29:static int eol_hook(EncaAnalyserState *analyser);
-: 30:static int hook_iso1250(EncaAnalyserState *analyser);
-: 31:static int hook_ibmkam(EncaAnalyserState *analyser);
-: 32:static int hook_isowin(EncaAnalyserState *analyser);
-: 33:
-: 34:/**
-: 35: * ENCA_LANGUAGE_CS:
-: 36: *
-: 37: * Czech language.
-: 38: *
-: 39: * Everything the world out there needs to know about this language.
-: 40: **/
-: 41:const EncaLanguageInfo ENCA_LANGUAGE_CS = {
-: 42: "cs",
-: 43: "czech",
-: 44: NCHARSETS,
-: 45: CHARSET_NAMES,
-: 46: CHARSET_WEIGHTS,
-: 47: SIGNIFICANT,
-: 48: CHARSET_LETTERS,
-: 49: CHARSET_PAIRS,
-: 50: WEIGHT_SUM,
-: 51: &hook,
-: 52: &eol_hook,
-: 53: NULL,
-: 54: NULL
-: 55:};
-: 56:
-: 57:/**
-: 58: * hook:
-: 59: * @analyser: Analyser state whose charset ratings are to be modified.
-: 60: *
-: 61: * Launches language specific hooks for language "cs".
-: 62: *
-: 63: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 64: * otherwise.
-: 65: **/
-: 66:static int
59: 67:hook(EncaAnalyserState *analyser)
-: 68:{
118: 69: return hook_iso1250(analyser)
83: 70: || hook_ibmkam(analyser);
-: 71:}
-: 72:
-: 73:/**
-: 74: * eol_hook:
-: 75: * @analyser: Analyser state whose charset ratings are to be modified.
-: 76: *
-: 77: * Launches language specific EOL hooks for language "cs".
-: 78: *
-: 79: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 80: * otherwise.
-: 81: **/
-: 82:static int
3: 83:eol_hook(EncaAnalyserState *analyser)
-: 84:{
3: 85: return hook_isowin(analyser);
-: 86:}
-: 87:
-: 88:/**
-: 89: * hook_isowin:
-: 90: * @analyser: Analyser state whose charset ratings are to be modified.
-: 91: *
-: 92: * Decides between iso8859-2 and cp1250 charsets for language "cs".
-: 93: *
-: 94: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 95: * otherwise.
-: 96: **/
-: 97:static int
-: 98:hook_isowin(EncaAnalyserState *analyser)
-: 99:{
-: 100: static EncaLanguageHookDataEOL hookdata[] = {
-: 101: { "cp1250", ENCA_SURFACE_EOL_CRLF, (size_t)-1 },
-: 102: { "iso88592", ENCA_SURFACE_MASK_EOL, (size_t)-1 },
-: 103: };
-: 104:
3: 105: return enca_language_hook_eol(analyser, ELEMENTS(hookdata), hookdata);
-: 106:}
-: 107:
-: 108:/**
-: 109: * hook_iso1250:
-: 110: * @analyser: Analyser state whose charset ratings are to be modified.
-: 111: *
-: 112: * Decides between iso8859-2 and cp1250 charsets for language "cs".
-: 113: *
-: 114: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 115: * otherwise.
-: 116: **/
-: 117:static int
-: 118:hook_iso1250(EncaAnalyserState *analyser)
-: 119:{
-: 120: static const unsigned char list_iso88592[] = {
-: 121: 0xbe, 0xb9, 0xbb, 0xa9, 0xae
-: 122: };
-: 123: static const unsigned char list_cp1250[] = {
-: 124: 0x9e, 0x9a, 0x9d, 0x8a, 0x8e
-: 125: };
-: 126: static EncaLanguageHookData1CS hookdata[] = {
-: 127: MAKE_HOOK_LINE(iso88592),
-: 128: MAKE_HOOK_LINE(cp1250),
-: 129: };
-: 130:
59: 131: return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata);
-: 132:}
-: 133:
-: 134:/**
-: 135: * hook_ibmkam:
-: 136: * @analyser: Analyser state whose charset ratings are to be modified.
-: 137: *
-: 138: * Decides between ibm852 and keybcs2 charsets for language "cs".
-: 139: *
-: 140: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 141: * otherwise.
-: 142: **/
-: 143:static int
-: 144:hook_ibmkam(EncaAnalyserState *analyser)
-: 145:{
-: 146: static const unsigned char list_ibm852[] = {
-: 147: 0xd8, 0xa7, 0xfd, 0xe7, 0x9f, 0xec, 0x85
-: 148: };
-: 149: static const unsigned char list_keybcs2[] = {
-: 150: 0x88, 0x91, 0xa9, 0x87, 0xa8, 0x98, 0x96
-: 151: };
-: 152: static EncaLanguageHookData1CS hookdata[] = {
-: 153: MAKE_HOOK_LINE(ibm852),
-: 154: MAKE_HOOK_LINE(keybcs2),
-: 155: };
-: 156:
24: 157: return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata);
-: 158:}
-: 159:
-: 160:/* vim: ts=2
-: 161: */
-: 162:
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lib/.libs/string3.h.gcov
-: 0:Source:/usr/include/x86_64-linux-gnu/bits/string3.h
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/multibyte.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/multibyte.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/* Copyright (C) 2004-2016 Free Software Foundation, Inc.
-: 2: This file is part of the GNU C Library.
-: 3:
-: 4: The GNU C Library is free software; you can redistribute it and/or
-: 5: modify it under the terms of the GNU Lesser General Public
-: 6: License as published by the Free Software Foundation; either
-: 7: version 2.1 of the License, or (at your option) any later version.
-: 8:
-: 9: The GNU C Library is distributed in the hope that it will be useful,
-: 10: but WITHOUT ANY WARRANTY; without even the implied warranty of
-: 11: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-: 12: Lesser General Public License for more details.
-: 13:
-: 14: You should have received a copy of the GNU Lesser General Public
-: 15: License along with the GNU C Library; if not, see
-: 16: . */
-: 17:
-: 18:#ifndef _STRING_H
-: 19:# error "Never use directly; include instead."
-: 20:#endif
-: 21:
-: 22:#if !__GNUC_PREREQ (5,0)
-: 23:__warndecl (__warn_memset_zero_len,
-: 24: "memset used with constant zero length parameter; this could be due to transposed parameters");
-: 25:#endif
-: 26:
-: 27:#ifndef __cplusplus
-: 28:/* XXX This is temporarily. We should not redefine any of the symbols
-: 29: and instead integrate the error checking into the original
-: 30: definitions. */
-: 31:# undef memcpy
-: 32:# undef memmove
-: 33:# undef memset
-: 34:# undef strcat
-: 35:# undef strcpy
-: 36:# undef strncat
-: 37:# undef strncpy
-: 38:# ifdef __USE_GNU
-: 39:# undef mempcpy
-: 40:# undef stpcpy
-: 41:# endif
-: 42:# ifdef __USE_MISC
-: 43:# undef bcopy
-: 44:# undef bzero
-: 45:# endif
-: 46:#endif
-: 47:
-: 48:
-: 49:__fortify_function void *
-: 50:__NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
-: 51: size_t __len))
-: 52:{
#####: 53: return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
-: 54:}
-: 55:
-: 56:__fortify_function void *
-: 57:__NTH (memmove (void *__dest, const void *__src, size_t __len))
-: 58:{
-: 59: return __builtin___memmove_chk (__dest, __src, __len, __bos0 (__dest));
-: 60:}
-: 61:
-: 62:#ifdef __USE_GNU
-: 63:__fortify_function void *
-: 64:__NTH (mempcpy (void *__restrict __dest, const void *__restrict __src,
-: 65: size_t __len))
-: 66:{
-: 67: return __builtin___mempcpy_chk (__dest, __src, __len, __bos0 (__dest));
-: 68:}
-: 69:#endif
-: 70:
-: 71:
-: 72:/* The first two tests here help to catch a somewhat common problem
-: 73: where the second and third parameter are transposed. This is
-: 74: especially problematic if the intended fill value is zero. In this
-: 75: case no work is done at all. We detect these problems by referring
-: 76: non-existing functions. */
-: 77:__fortify_function void *
-: 78:__NTH (memset (void *__dest, int __ch, size_t __len))
-: 79:{
-: 80: /* GCC-5.0 and newer implements these checks in the compiler, so we don't
-: 81: need them here. */
-: 82:#if !__GNUC_PREREQ (5,0)
-: 83: if (__builtin_constant_p (__len) && __len == 0
-: 84: && (!__builtin_constant_p (__ch) || __ch != 0))
-: 85: {
-: 86: __warn_memset_zero_len ();
-: 87: return __dest;
-: 88: }
-: 89:#endif
-: 90: return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
-: 91:}
-: 92:
-: 93:#ifdef __USE_MISC
-: 94:__fortify_function void
-: 95:__NTH (bcopy (const void *__src, void *__dest, size_t __len))
-: 96:{
-: 97: (void) __builtin___memmove_chk (__dest, __src, __len, __bos0 (__dest));
-: 98:}
-: 99:
-: 100:__fortify_function void
-: 101:__NTH (bzero (void *__dest, size_t __len))
-: 102:{
-: 103: (void) __builtin___memset_chk (__dest, '\0', __len, __bos0 (__dest));
-: 104:}
-: 105:#endif
-: 106:
-: 107:__fortify_function char *
-: 108:__NTH (strcpy (char *__restrict __dest, const char *__restrict __src))
-: 109:{
-: 110: return __builtin___strcpy_chk (__dest, __src, __bos (__dest));
-: 111:}
-: 112:
-: 113:#ifdef __USE_GNU
-: 114:__fortify_function char *
-: 115:__NTH (stpcpy (char *__restrict __dest, const char *__restrict __src))
-: 116:{
-: 117: return __builtin___stpcpy_chk (__dest, __src, __bos (__dest));
-: 118:}
-: 119:#endif
-: 120:
-: 121:
-: 122:__fortify_function char *
-: 123:__NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
-: 124: size_t __len))
-: 125:{
-: 126: return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
-: 127:}
-: 128:
-: 129:// XXX We have no corresponding builtin yet.
-: 130:extern char *__stpncpy_chk (char *__dest, const char *__src, size_t __n,
-: 131: size_t __destlen) __THROW;
-: 132:extern char *__REDIRECT_NTH (__stpncpy_alias, (char *__dest, const char *__src,
-: 133: size_t __n), stpncpy);
-: 134:
-: 135:__fortify_function char *
-: 136:__NTH (stpncpy (char *__dest, const char *__src, size_t __n))
-: 137:{
-: 138: if (__bos (__dest) != (size_t) -1
-: 139: && (!__builtin_constant_p (__n) || __n > __bos (__dest)))
-: 140: return __stpncpy_chk (__dest, __src, __n, __bos (__dest));
-: 141: return __stpncpy_alias (__dest, __src, __n);
-: 142:}
-: 143:
-: 144:
-: 145:__fortify_function char *
-: 146:__NTH (strcat (char *__restrict __dest, const char *__restrict __src))
-: 147:{
-: 148: return __builtin___strcat_chk (__dest, __src, __bos (__dest));
-: 149:}
-: 150:
-: 151:
-: 152:__fortify_function char *
-: 153:__NTH (strncat (char *__restrict __dest, const char *__restrict __src,
-: 154: size_t __len))
-: 155:{
-: 156: return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest));
-: 157:}
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lib/.libs/lang_sk.c.gcov
-: 0:Source:lang_sk.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_sk.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_sk.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*
-: 2: encoding data and routines dependent on language; slovak
-: 3:
-: 4: Copyright (C) 2000-2003 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#ifdef HAVE_CONFIG_H
-: 20:# include "config.h"
-: 21:#endif /* HAVE_CONFIG_H */
-: 22:
-: 23:#include "enca.h"
-: 24:#include "internal.h"
-: 25:#include "data/slovak/slovak.h"
-: 26:
-: 27:/* Local prototypes. */
-: 28:static int hook(EncaAnalyserState *analyser);
-: 29:static int eol_hook(EncaAnalyserState *analyser);
-: 30:static int hook_iso1250(EncaAnalyserState *analyser);
-: 31:static int hook_ibmkam(EncaAnalyserState *analyser);
-: 32:static int hook_isowin(EncaAnalyserState *analyser);
-: 33:
-: 34:/**
-: 35: * ENCA_LANGUAGE_SK:
-: 36: *
-: 37: * Slovak language.
-: 38: *
-: 39: * Everything the world out there needs to know about this language.
-: 40: **/
-: 41:const EncaLanguageInfo ENCA_LANGUAGE_SK = {
-: 42: "sk",
-: 43: "slovak",
-: 44: NCHARSETS,
-: 45: CHARSET_NAMES,
-: 46: CHARSET_WEIGHTS,
-: 47: SIGNIFICANT,
-: 48: CHARSET_LETTERS,
-: 49: CHARSET_PAIRS,
-: 50: WEIGHT_SUM,
-: 51: &hook,
-: 52: &eol_hook,
-: 53: NULL,
-: 54: NULL
-: 55:};
-: 56:
-: 57:/**
-: 58: * hook:
-: 59: * @analyser: Analyser state whose charset ratings are to be modified.
-: 60: *
-: 61: * Launches language specific hooks for language "sk".
-: 62: *
-: 63: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 64: * otherwise.
-: 65: **/
-: 66:static int
27: 67:hook(EncaAnalyserState *analyser)
-: 68:{
54: 69: return hook_iso1250(analyser)
45: 70: || hook_ibmkam(analyser);
-: 71:}
-: 72:
-: 73:/**
-: 74: * eol_hook:
-: 75: * @analyser: Analyser state whose charset ratings are to be modified.
-: 76: *
-: 77: * Launches language specific EOL hooks for language "sk".
-: 78: *
-: 79: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 80: * otherwise.
-: 81: **/
-: 82:static int
#####: 83:eol_hook(EncaAnalyserState *analyser)
-: 84:{
#####: 85: return hook_isowin(analyser);
-: 86:}
-: 87:
-: 88:/**
-: 89: * hook_isowin:
-: 90: * @analyser: Analyser state whose charset ratings are to be modified.
-: 91: *
-: 92: * Decides between iso8859-2 and cp1250 charsets for language "sk".
-: 93: *
-: 94: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 95: * otherwise.
-: 96: **/
-: 97:static int
-: 98:hook_isowin(EncaAnalyserState *analyser)
-: 99:{
-: 100: static EncaLanguageHookDataEOL hookdata[] = {
-: 101: { "cp1250", ENCA_SURFACE_EOL_CRLF, (size_t)-1 },
-: 102: { "iso88592", ENCA_SURFACE_MASK_EOL, (size_t)-1 },
-: 103: };
-: 104:
#####: 105: return enca_language_hook_eol(analyser, ELEMENTS(hookdata), hookdata);
-: 106:}
-: 107:
-: 108:/**
-: 109: * hook_iso1250:
-: 110: * @analyser: Analyser state whose charset ratings are to be modified.
-: 111: *
-: 112: * Decides between iso8859-2 and cp1250 charsets for language "sk".
-: 113: *
-: 114: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 115: * otherwise.
-: 116: **/
-: 117:static int
-: 118:hook_iso1250(EncaAnalyserState *analyser)
-: 119:{
-: 120: static const unsigned char list_iso88592[] = {
-: 121: 0xb9, 0xbb, 0xb5, 0xa9, 0xae
-: 122: };
-: 123: static const unsigned char list_cp1250[] = {
-: 124: 0x9e, 0x9a, 0x9d, 0x8a, 0x8e
-: 125: };
-: 126: static EncaLanguageHookData1CS hookdata[] = {
-: 127: MAKE_HOOK_LINE(iso88592),
-: 128: MAKE_HOOK_LINE(cp1250),
-: 129: };
-: 130:
27: 131: return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata);
-: 132:}
-: 133:
-: 134:/**
-: 135: * hook_ibmkam:
-: 136: * @analyser: Analyser state whose charset ratings are to be modified.
-: 137: *
-: 138: * Decides between ibm852 and keybcs2 charsets for language "sk".
-: 139: *
-: 140: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 141: * otherwise.
-: 142: **/
-: 143:static int
-: 144:hook_ibmkam(EncaAnalyserState *analyser)
-: 145:{
-: 146: static const unsigned char list_ibm852[] = {
-: 147: 0xa7, 0xe7, 0xec, 0x9c, 0x96, 0xd4, 0xe5
-: 148: };
-: 149: static const unsigned char list_keybcs2[] = {
-: 150: 0x87, 0x91, 0xa8, 0x98, 0x8c, 0x83, 0xa4
-: 151: };
-: 152: static EncaLanguageHookData1CS hookdata[] = {
-: 153: MAKE_HOOK_LINE(ibm852),
-: 154: MAKE_HOOK_LINE(keybcs2),
-: 155: };
-: 156:
18: 157: return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata);
-: 158:}
-: 159:
-: 160:/* vim: ts=2
-: 161: */
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lib/.libs/utf8_double.c.gcov
-: 0:Source:utf8_double.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/utf8_double.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/utf8_double.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*
-: 2: checks for doubly-encoded utf-8
-: 3:
-: 4: Copyright (C) 2000-2002 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#ifdef HAVE_CONFIG_H
-: 20:# include "config.h"
-: 21:#endif /* HAVE_CONFIG_H */
-: 22:
-: 23:#include
-: 24:#include
-: 25:
-: 26:#include "enca.h"
-: 27:#include "internal.h"
-: 28:
-: 29:/* Local prototypes. */
-: 30:static void compute_double_utf8_weights (EncaAnalyserState *analyser);
-: 31:static void create_ucs2_weight_table (EncaUTFCheckData *amap,
-: 32: size_t size,
-: 33: int *wbuf);
-: 34:static void mark_scratch_buffer (EncaAnalyserState *analyser);
-: 35:
-: 36:/**
-: 37: * enca_double_utf8_init:
-: 38: * @analyser: Analyzer state to be initialized.
-: 39: *
-: 40: * Initializes double-UTF-8 check.
-: 41: *
-: 42: * In fact it initializes the fields to #NULL's, they are actually initialized
-: 43: * only when needed.
-: 44: **/
-: 45:void
247: 46:enca_double_utf8_init(EncaAnalyserState *analyser)
-: 47:{
247: 48: analyser->utfch = NULL;
247: 49: analyser->utfbuf = NULL;
247: 50:}
-: 51:
-: 52:/**
-: 53: * enca_double_utf8_destroy:
-: 54: * @analyser: Analyzer state whose double-UTF-8 check part should be destroyed.
-: 55: *
-: 56: * Destroys the double-UTF-8 check part of analyser state @analyser.
-: 57: **/
-: 58:void
246: 59:enca_double_utf8_destroy(EncaAnalyserState *analyser)
-: 60:{
-: 61: size_t i;
-: 62:
246: 63: if (analyser->utfch == NULL)
-: 64: return;
-: 65:
13: 66: enca_free(analyser->utfbuf);
-: 67:
91: 68: for (i = 0; i < analyser->ncharsets; i++) {
78: 69: enca_free(analyser->utfch[i].ucs2);
78: 70: enca_free(analyser->utfch[i].weights);
-: 71: }
13: 72: enca_free(analyser->utfch);
-: 73:}
-: 74:
-: 75:/**
-: 76: * enca_double_utf8_check:
-: 77: * @analyser: Analyzer state determinig the language for double-UTF-8 check.
-: 78: * @buffer: The buffer to be checked [@size].
-: 79: * @size: The size of @buffer.
-: 80: *
-: 81: * Checks buffer for double-UTF-8 encoding.
-: 82: *
-: 83: * Double-UTF-8 encoding is the result of [errorneous] conversion of UTF-8 text
-: 84: * to UTF-8 again, as if it was in some 8bit charset. This is quite hard to
-: 85: * recover from.
-: 86: *
-: 87: * The analayser mostly only determines what language will be assumed,
-: 88: * the rest of this test is independent on the main guessing routines.
-: 89: * When @buffer doesn't containing UTF-8 text, the result is undefined
-: 90: * (namely, false positives are possible).
-: 91: *
-: 92: * Calling this function when language is `none' has currently no effect.
-: 93: *
-: 94: * Returns: Nonzero, when @buffer probably contains doubly-UTF-8 encoded text.
-: 95: * More precisely, it returns the number of charsets which are
-: 96: * possible candidates for source charset. You can then use
-: 97: * enca_double_utf8_get_candidates() to retrieve the charsets.
-: 98: **/
-: 99:int
49: 100:enca_double_utf8_check(EncaAnalyser analyser,
-: 101: const unsigned char *buffer,
-: 102: size_t size)
-: 103:{
49: 104: long int ucs4char = 0;
49: 105: int remains_10xxxxxx = 0;
-: 106: size_t i;
-: 107:
49: 108: if (analyser->ncharsets == 0 || analyser->lang->weights == 0)
-: 109: return 0;
-: 110:
-: 111: /* Compute weights when we are called the first time. */
42: 112: if (analyser->utfch == NULL)
13: 113: compute_double_utf8_weights(analyser);
-: 114:
42: 115: mark_scratch_buffer(analyser);
-: 116:
-: 117: /* Parse. */
5348: 118: for (i = 0; i < size; i++) {
5306: 119: unsigned char b = buffer[i];
-: 120:
5306: 121: if (!remains_10xxxxxx) {
3688: 122: if ((b & 0x80) == 0) /* 7bit characters */
2346: 123: continue;
1342: 124: if ((b & 0xe0) == 0xc0) { /* 110xxxxx 10xxxxxx sequence */
1066: 125: ucs4char = b & 0x1f;
1066: 126: remains_10xxxxxx = 1;
1066: 127: continue;
-: 128: }
276: 129: if ((b & 0xf0) == 0xe0) { /* 1110xxxx 2 x 10xxxxxx sequence */
276: 130: ucs4char = b & 0x0f;
276: 131: remains_10xxxxxx = 2;
276: 132: continue;
-: 133: }
-: 134: /* Following are valid 32-bit UCS characters, but not 16-bit Unicode,
-: 135: nevertheless we accept them. */
#####: 136: if ((b & 0xf8) == 0xf0) { /* 1110xxxx 3 x 10xxxxxx sequence */
#####: 137: ucs4char = b & 0x07;
#####: 138: remains_10xxxxxx = 3;
#####: 139: continue;
-: 140: }
#####: 141: if ((b & 0xfc) == 0xf8) { /* 1110xxxx 4 x 10xxxxxx sequence */
#####: 142: ucs4char = b & 0x03;
#####: 143: remains_10xxxxxx = 4;
#####: 144: continue;
-: 145: }
#####: 146: if ((b & 0xfe) == 0xfc) { /* 1110xxxx 5 x 10xxxxxx sequence */
#####: 147: ucs4char = b & 0x01;
#####: 148: remains_10xxxxxx = 5;
#####: 149: continue;
-: 150: }
-: 151: /* We can get here only when input is invalid: (b & 0xc0) == 0x80. */
-: 152: remains_10xxxxxx = 0;
-: 153: }
-: 154: else {
-: 155: /* Broken 10xxxxxx sequence? */
1618: 156: if ((b & 0xc0) != 0x80) {
-: 157: remains_10xxxxxx = 0;
-: 158: }
-: 159: else {
-: 160: /* Good 10xxxxxx continuation. */
1618: 161: ucs4char <<= 6;
1618: 162: ucs4char |= b & 0x3f;
1618: 163: remains_10xxxxxx--;
-: 164:
-: 165: /* Do we have a whole character?
-: 166: * (We must not touch positions in utfbuf containing zeroes.) */
3236: 167: if (remains_10xxxxxx == 0
1618: 168: && ucs4char < 0x10000
1342: 169: && analyser->utfbuf[ucs4char] != 0) {
784: 170: if (analyser->utfbuf[ucs4char] < 0)
164: 171: analyser->utfbuf[ucs4char] = 1;
-: 172: else
620: 173: analyser->utfbuf[ucs4char]++;
-: 174: }
-: 175: }
-: 176: }
-: 177: }
-: 178:
-: 179: /* Compute the ratings. */
247: 180: for (i = 0; i < analyser->ncharsets; i++) {
247: 181: EncaUTFCheckData *amap = analyser->utfch + i;
-: 182: size_t j;
-: 183:
247: 184: amap->rating = 0.0;
247: 185: amap->result = 0;
5814: 186: for (j = 0; j < amap->size; j++)
5567: 187: amap->rating += analyser->utfbuf[amap->ucs2[j]] * amap->weights[j];
-: 188: }
-: 189:
-: 190: /* Now check whether we've found some negative ratings. */
-: 191: {
-: 192: size_t min = 0;
-: 193: size_t max = 0;
-: 194:
205: 195: for (i = 1; i < analyser->ncharsets; i++) {
205: 196: if (analyser->utfch[i].rating < analyser->utfch[min].rating)
33: 197: min = i;
205: 198: if (analyser->utfch[i].rating > analyser->utfch[max].rating)
21: 199: max = i;
-: 200: }
-: 201:
42: 202: if (analyser->utfch[min].rating < 0.0
39: 203: && -analyser->utfch[min].rating > 0.5*analyser->utfch[max].rating) {
38: 204: size_t total = 0;
38: 205: double q = analyser->utfch[min].rating
38: 206: * (1.0 - 45.0*exp(-4.5*analyser->options.threshold));
-: 207:
261: 208: for (i = 0; i < analyser->ncharsets; i++) {
223: 209: if (analyser->utfch[i].rating < q) {
55: 210: analyser->utfch[i].result = 1;
55: 211: total++;
-: 212: }
-: 213: }
38: 214: return total;
-: 215: }
-: 216: }
-: 217:
-: 218: return 0;
-: 219:}
-: 220:
-: 221:/**
-: 222: * enca_double_utf8_get_candidates:
-: 223: * @analyser: Analyzer state for which double-UTF-8 candidates are to be
-: 224: * returned.
-: 225: *
-: 226: * Returns array of double-UTF-8 source charset candidates from the last check.
-: 227: *
-: 228: * The returned array should be freed by caller then no longer needed. Its
-: 229: * is the return value of the preceding enca_double_utf8_check() call.
-: 230: *
-: 231: * When called before any double-UTF-8 test has been performed yet or after
-: 232: * and unsuccessfull double-UTF-8 test, it returns NULL, but the result after
-: 233: * an unsuccessfull check should be considered undefined.
-: 234: *
-: 235: * Returns: An array containing charset id's of possible source charsets from
-: 236: * which the sample was doubly-UTF-8 encoded. The array may contain
-: 237: * only one value, but usually enca is not able to decide between
-: 238: * e.g. ISO-8859-2 and Win1250, thus more candidates are returned.
-: 239: **/
-: 240:int*
38: 241:enca_double_utf8_get_candidates(EncaAnalyser analyser)
-: 242:{
38: 243: size_t j = 0;
-: 244: size_t i;
-: 245: int *candidates;
-: 246:
38: 247: assert(analyser);
38: 248: if (analyser->utfch == NULL)
-: 249: return NULL;
-: 250:
223: 251: for (i = 0; i < analyser->ncharsets; i++) {
223: 252: if (analyser->utfch[i].result)
55: 253: j++;
-: 254: }
-: 255:
38: 256: if (j == 0)
-: 257: return NULL;
-: 258:
38: 259: candidates = NEW(int, j);
38: 260: j = 0;
261: 261: for (i = 0; i < analyser->ncharsets; i++) {
223: 262: if (analyser->utfch[i].result) {
55: 263: candidates[j] = analyser->charsets[i];
55: 264: j++;
-: 265: }
-: 266: }
-: 267:
-: 268: return candidates;
-: 269:}
-: 270:
-: 271:/**
-: 272: * compute_double_utf8_weights:
-: 273: * @analyser: Analyzer state whose double-UTF-8 check weigths should be
-: 274: * computed.
-: 275: *
-: 276: * Computes UCS-2 character weights used in double-UTF-8 check. Must be
-: 277: * called at most once for a given analyser. It also allocates the scratch
-: 278: * buffer analyser->utfbuf and leaves it filled with zeroes.
-: 279: **/
-: 280:static void
13: 281:compute_double_utf8_weights(EncaAnalyserState *analyser)
-: 282:{
-: 283: int *buf;
-: 284: unsigned int ucs2map[0x100];
-: 285: size_t i, j;
-: 286:
13: 287: assert(analyser != NULL);
13: 288: assert(analyser->lang != NULL);
13: 289: assert(analyser->utfch == NULL);
13: 290: assert(analyser->utfbuf == NULL);
13: 291: if (analyser->ncharsets == 0)
#####: 292: return;
-: 293:
13: 294: analyser->utfch = NEW(EncaUTFCheckData, analyser->ncharsets);
13: 295: analyser->utfbuf = NEW(int, 0x10000);
13: 296: buf = analyser->utfbuf;
-: 297:
851981: 298: for (i = 0; i < 0x10000; i++)
851968: 299: buf[i] = 0;
-: 300:
-: 301: /* For all charsets compute UTF-8 prefix byte occurence tables and select
-: 302: * those characters having the highest difference between occurences when
-: 303: * counted as UTF-8 prefix and when counted as a regular character. */
78: 304: for (j = 0; j < analyser->ncharsets; j++) {
78: 305: const unsigned short int *const w = analyser->lang->weights[j];
78: 306: size_t table_size = 0;
-: 307:
78: 308: assert(enca_charset_has_ucs2_map(analyser->charsets[j]));
78: 309: enca_charset_ucs2_map(analyser->charsets[j], ucs2map);
-: 310:
-: 311: /* Go through all characters, some maps may map even 7bits to something
-: 312: * else. Compute required table size meanwhile. */
20046: 313: for (i = 0; i < 0x100; i++) {
19968: 314: unsigned int ucs2c = ucs2map[i];
19968: 315: assert(ucs2c < 0x10000);
-: 316:
19968: 317: if (w[i] == 0)
18343: 318: continue;
-: 319:
-: 320: /* Count the character weight as positive. */
1625: 321: if (ucs2c < 0x80 || ucs2c == ENCA_NOT_A_CHAR)
#####: 322: continue;
-: 323:
1625: 324: if (buf[ucs2c] == 0)
1603: 325: table_size++;
1625: 326: buf[ucs2c] += w[i];
-: 327:
-: 328: /* Transform the character and count UTF-8 transformed first byte weight
-: 329: * as negative. */
1625: 330: if (ucs2c < 0x800)
1622: 331: ucs2c = ucs2map[0xc0 | (ucs2c >> 6)];
-: 332: else
3: 333: ucs2c = ucs2map[0xe0 | (ucs2c >> 12)];
-: 334:
1625: 335: if (ucs2c < 0x80 || ucs2c == ENCA_NOT_A_CHAR)
#####: 336: continue;
-: 337:
1625: 338: if (buf[ucs2c] == 0)
175: 339: table_size++;
1625: 340: buf[ucs2c] -= w[i];
1625: 341: if (buf[ucs2c] == 0)
1: 342: buf[ucs2c] = 1;
-: 343: }
-: 344:
-: 345: /* Build the table of significant UCS-2 characters, i.e. characters
-: 346: * having nonzero weight. */
78: 347: create_ucs2_weight_table(analyser->utfch + j, table_size, buf);
-: 348: }
-: 349:}
-: 350:
-: 351:/**
-: 352: * create_ucs2_weight_table:
-: 353: * @amap: A pointer to Double-UTF8-check data to be filled.
-: 354: * @size: The number of UCS-2 characters with nonzero weight in @wbuf.
-: 355: * @wbuf: UCS-2 character weights [@size].
-: 356: *
-: 357: * Creates `compressed' UCS-2 weight table.
-: 358: **/
-: 359:static void
78: 360:create_ucs2_weight_table(EncaUTFCheckData *amap,
-: 361: size_t size,
-: 362: int *wbuf)
-: 363:{
-: 364: unsigned int ucs2c;
-: 365: size_t i;
-: 366:
78: 367: amap->size = size;
78: 368: amap->ucs2 = NEW(int, size);
78: 369: amap->weights = NEW(int, size);
-: 370:
78: 371: i = 0;
5111886: 372: for (ucs2c = 0; ucs2c < 0x10000; ucs2c++) {
5111808: 373: if (wbuf[ucs2c] != 0) {
1778: 374: assert(i < size);
-: 375:
1778: 376: amap->ucs2[i] = ucs2c;
1778: 377: amap->weights[i] = wbuf[ucs2c];
1778: 378: wbuf[ucs2c] = 0; /* Fill the buffer with zeroes. */
1778: 379: i++;
-: 380: }
-: 381: }
-: 382:
78: 383: assert(i == size);
78: 384:}
-: 385:
-: 386:/**
-: 387: * mark_scratch_buffer:
-: 388: * @analyser: Analyzer whose significant ucs2 characters are to be marked in
-: 389: * @analyser->utfbuf.
-: 390: *
-: 391: * Marks significant characters in @analyser->utfbuf with -1.
-: 392: *
-: 393: * The @analyser->utfbuf buffer is magic. Once we found the significant
-: 394: * characters in compute_double_utf8_weights(), we always keep zeroes at
-: 395: * positions of nonsiginifant characters. This way we never have to scan
-: 396: * through the whole buffer, not even to fill it wit zeroes -- we put zeroes
-: 397: * only where we know we changed it.
-: 398: *
-: 399: * -1 is used to mark significant characters before counting, because it's not
-: 400: * zero.
-: 401: **/
-: 402:static void
42: 403:mark_scratch_buffer(EncaAnalyserState *analyser)
-: 404:{
-: 405: size_t i, j;
-: 406:
289: 407: for (j = 0; j < analyser->ncharsets; j++) {
247: 408: EncaUTFCheckData *amap = analyser->utfch + j;
-: 409:
5814: 410: for (i = 0; i < amap->size; i++)
5567: 411: analyser->utfbuf[amap->ucs2[i]] = -1;
-: 412: }
42: 413:}
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lib/.libs/pair.c.gcov
-: 0:Source:pair.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/pair.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/pair.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*
-: 2: pair-frequency based tests (used for 8bit-dense languages)
-: 3:
-: 4: Copyright (C) 2003 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#ifdef HAVE_CONFIG_H
-: 20:# include "config.h"
-: 21:#endif /* HAVE_CONFIG_H */
-: 22:
-: 23:#include
-: 24:#include
-: 25:
-: 26:#include "enca.h"
-: 27:#include "internal.h"
-: 28:
-: 29:/* Local prototypes. */
-: 30:static size_t count_all_8bit_pairs(EncaAnalyserState *analyser);
-: 31:static void compute_pair2bits(EncaAnalyserState *analyser);
-: 32:static void count_good_pairs(EncaAnalyserState *analyser);
-: 33:
-: 34:/**
-: 35: * enca_pair_init:
-: 36: * @analyser: Analyzer state to be initialized.
-: 37: *
-: 38: * Initializes pair statistics data.
-: 39: *
-: 40: * In fact it just sets everything to #NULL, to be initialized when needed.
-: 41: **/
-: 42:void
247: 43:enca_pair_init(EncaAnalyserState *analyser)
-: 44:{
247: 45: analyser->bitcounts = NULL;
247: 46: analyser->pairratings = NULL;
247: 47: analyser->pair2bits = NULL;
247: 48:}
-: 49:
-: 50:/**
-: 51: * enca_pair_destroy:
-: 52: * @analyser: Analyzer state whose pair statistics part should be destroyed.
-: 53: *
-: 54: * Destroys the pair statistics part of analyser state @analyser.
-: 55: **/
-: 56:void
246: 57:enca_pair_destroy(EncaAnalyserState *analyser)
-: 58:{
246: 59: enca_free(analyser->pair2bits);
246: 60: enca_free(analyser->bitcounts);
246: 61: enca_free(analyser->pairratings);
246: 62:}
-: 63:
-: 64:/**
-: 65: * enca_pair_analyse:
-: 66: * @analyser: Analysed containing the sample for pair frequency analysis.
-: 67: *
-: 68: * Performs pair-frequency based analysis, provided that the language supports
-: 69: * it (does nothing otherwise).
-: 70: *
-: 71: * Returns: Nonzero when the character set was succesfully determined,
-: 72: * @analyser->@result.@charset is then directly modified.
-: 73: **/
-: 74:int
335: 75:enca_pair_analyse(EncaAnalyserState *analyser)
-: 76:{
335: 77: const unsigned char *const *letters = analyser->lang->letters;
335: 78: const unsigned char **const *pairs = analyser->lang->pairs;
335: 79: size_t ncharsets = analyser->ncharsets;
-: 80: size_t i, best, all8bitpairs;
-: 81: double q;
-: 82:
335: 83: if (!letters || !pairs)
-: 84: return 0;
-: 85:
84: 86: if (!analyser->pairratings)
44: 87: analyser->pairratings = NEW(size_t, ncharsets);
-: 88:
-: 89: /* count the good pairs and find winner
-: 90: * initialize when we are called the first time */
84: 91: if (!analyser->pair2bits) {
44: 92: compute_pair2bits(analyser);
44: 93: analyser->bitcounts = NEW(size_t, 1 << ncharsets);
-: 94: }
168: 95: memset(analyser->pairratings, 0, ncharsets*sizeof(size_t));
168: 96: all8bitpairs = count_all_8bit_pairs(analyser);
84: 97: count_good_pairs(analyser);
-: 98:
84: 99: best = 0;
483: 100: for (i = 1; i < ncharsets; i++) {
399: 101: if (analyser->pairratings[i] > analyser->pairratings[best])
104: 102: best = i;
-: 103: }
-: 104:
-: 105: /* Just a Right Value */
84: 106: q = 1.0 - exp(3.0*(1.0 - analyser->options.threshold));
84: 107: if (analyser->pairratings[best] >= analyser->options.min_chars
84: 108: && analyser->pairratings[best] >= q*all8bitpairs) {
84: 109: analyser->result.charset = analyser->charsets[best];
84: 110: return 1;
-: 111: }
-: 112:
-: 113: /* I don't like saying it, but the sample seems to be garbage... */
-: 114: return 0;
-: 115:}
-: 116:
-: 117:/**
-: 118: * count_all_8bit_pairs:
-: 119: * @analyser: An analyser.
-: 120: *
-: 121: * Count all pairs containing at least one 8bit characters.
-: 122: *
-: 123: * Returns: The number of such pairs.
-: 124: **/
-: 125:static size_t
-: 126:count_all_8bit_pairs(EncaAnalyserState *analyser)
-: 127:{
84: 128: unsigned char *buffer = analyser->buffer;
84: 129: size_t size = analyser->size;
-: 130: size_t i, c, sum8bits;
-: 131:
84: 132: sum8bits = 0;
84: 133: c = FILL_NONLETTER;
528335: 134: for (i = size; i; i--) {
528251: 135: if ((c | *buffer) & 0x80)
446125: 136: sum8bits++;
528251: 137: c = *(buffer++);
-: 138: }
84: 139: if (size && (c & 0x80))
4: 140: sum8bits++;
-: 141:
-: 142: return sum8bits;
-: 143:}
-: 144:
-: 145:/**
-: 146: * count_good_pairs:
-: 147: * @analyser: An analyser.
-: 148: *
-: 149: * Count `good' pairs for each charset.
-: 150: *
-: 151: * Makes use of @analyser->pair2bits. See compute_pair2bits() comment for
-: 152: * description of how it works.
-: 153: **/
-: 154:static void
84: 155:count_good_pairs(EncaAnalyserState *analyser)
-: 156:{
84: 157: size_t *ratings = analyser->pairratings;
84: 158: unsigned char *pair2bits = analyser->pair2bits;
84: 159: size_t *bitcounts = analyser->bitcounts;
84: 160: size_t ncharsets = analyser->ncharsets;
84: 161: const unsigned char *buffer = analyser->buffer;
84: 162: size_t size = analyser->size;
-: 163: size_t i, j, c, cs;
-: 164:
84: 165: assert(ncharsets <= 8);
84: 166: assert(pair2bits);
84: 167: assert(bitcounts);
84: 168: assert(ratings);
-: 169:
168: 170: memset(bitcounts, 0, (1 << ncharsets)*sizeof(size_t));
84: 171: c = FILL_NONLETTER << 8;
528335: 172: for (i = size; i; i--) {
528251: 173: bitcounts[pair2bits[c | *buffer]]++;
528251: 174: c = *(buffer++) << 8;
-: 175: }
84: 176: if (size)
84: 177: bitcounts[pair2bits[c | FILL_NONLETTER]]++;
-: 178:
168: 179: memset(ratings, 0, ncharsets*sizeof(size_t));
567: 180: for (cs = 0; cs < ncharsets; cs++) {
483: 181: size_t bit = 1 << cs;
483: 182: size_t rating = 0;
-: 183:
6258: 184: for (i = 0; i < (1U << ncharsets); i += 2*bit) {
22092: 185: for (j = i+bit; j < i+2*bit; j++)
16800: 186: rating += bitcounts[j];
-: 187: }
483: 188: ratings[cs] = rating;
-: 189: }
84: 190:}
-: 191:
-: 192:/**
-: 193: * compute_pair2bits:
-: 194: * @analyser: An analyser.
-: 195: *
-: 196: * Allocate and fill @analyser->@pair2bits.
-: 197: *
-: 198: * The meaning of pair2bits is following: it's indexed by pairs (0x100*first
-: 199: * + second) and each @pair2bits element has set a bit corresponding to a
-: 200: * charset when the pair is `good' for the charset.
-: 201: *
-: 202: * To determine `good' pair counts for all charsets we don't have to count
-: 203: * the pairs, we only have to count the bit combinations (@bitcounts) and the
-: 204: * per charset pair counts can be easily constructed from them -- by summing
-: 205: * those with the particular bit set.
-: 206: **/
-: 207:static void
44: 208:compute_pair2bits(EncaAnalyserState *analyser)
-: 209:{
44: 210: size_t ncharsets = analyser->ncharsets;
-: 211: size_t cs, c;
-: 212:
44: 213: assert(analyser->pair2bits == NULL);
44: 214: assert(analyser->ncharsets <= 8);
-: 215:
44: 216: analyser->pair2bits = NEW(unsigned char, 0x10000);
88: 217: memset(analyser->pair2bits, 0, 0x10000);
297: 218: for (cs = 0; cs < ncharsets; cs++) {
253: 219: const unsigned char *letters = analyser->lang->letters[cs];
253: 220: const unsigned char *const *pairs = analyser->lang->pairs[cs];
253: 221: size_t bit = 1 << cs;
-: 222:
65021: 223: for (c = 0; c < 0x100; c++) {
64768: 224: size_t j = letters[c];
-: 225:
64768: 226: if (j != 255) {
54714: 227: const unsigned char *s = pairs[j];
54714: 228: unsigned char *p = analyser->pair2bits + (c << 8);
-: 229:
-: 230: /* set the corresponding bit for all pairs */
-: 231: do {
2204983: 232: p[(size_t)*(s++)] |= bit;
2204983: 233: } while (*s);
-: 234: }
-: 235: }
-: 236: }
44: 237:}
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lib/.libs/lang_et.c.gcov
-: 0:Source:lang_et.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_et.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_et.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*
-: 2: encoding data and routines dependent on language; estonian
-: 3:
-: 4: Copyright (C) 2003 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#ifdef HAVE_CONFIG_H
-: 20:# include "config.h"
-: 21:#endif /* HAVE_CONFIG_H */
-: 22:
-: 23:#include "enca.h"
-: 24:#include "internal.h"
-: 25:#include "data/estonian/estonian.h"
-: 26:
-: 27:/* Local prototypes. */
-: 28:static int hook(EncaAnalyserState *analyser);
-: 29:static int eol_hook(EncaAnalyserState *analyser);
-: 30:static int hook_iso13win(EncaAnalyserState *analyser);
-: 31:static int hook_iso4win(EncaAnalyserState *analyser);
-: 32:static int hook_allinone(EncaAnalyserState *analyser);
-: 33:
-: 34:/**
-: 35: * ENCA_LANGUAGE_ET:
-: 36: *
-: 37: * Estonian language.
-: 38: *
-: 39: * Everything the world out there needs to know about this language.
-: 40: **/
-: 41:const EncaLanguageInfo ENCA_LANGUAGE_ET = {
-: 42: "et",
-: 43: "estonian",
-: 44: NCHARSETS,
-: 45: CHARSET_NAMES,
-: 46: CHARSET_WEIGHTS,
-: 47: SIGNIFICANT,
-: 48: CHARSET_LETTERS,
-: 49: CHARSET_PAIRS,
-: 50: WEIGHT_SUM,
-: 51: &hook,
-: 52: &eol_hook,
-: 53: NULL,
-: 54: NULL
-: 55:};
-: 56:
-: 57:/**
-: 58: * hook:
-: 59: * @analyser: Analyser state whose charset ratings are to be modified.
-: 60: *
-: 61: * Launches language specific hooks for language "et".
-: 62: *
-: 63: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 64: * otherwise.
-: 65: **/
-: 66:static int
24: 67:hook(EncaAnalyserState *analyser)
-: 68:{
24: 69: int chg = 0;
-: 70:
-: 71: /* we may want to run both, and in this order */
24: 72: chg += hook_allinone(analyser);
24: 73: chg += hook_iso13win(analyser);
24: 74: return chg;
-: 75:}
-: 76:
-: 77:/**
-: 78: * eol_hook:
-: 79: * @analyser: Analyser state whose charset ratings are to be modified.
-: 80: *
-: 81: * Launches language specific EOL hooks for language "et".
-: 82: *
-: 83: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 84: * otherwise.
-: 85: **/
-: 86:static int
#####: 87:eol_hook(EncaAnalyserState *analyser)
-: 88:{
#####: 89: return hook_iso4win(analyser);
-: 90:}
-: 91:
-: 92:/**
-: 93: * hook_iso13win:
-: 94: * @analyser: Analyser state whose charset ratings are to be modified.
-: 95: *
-: 96: * Decides between iso8859-13 and cp1257 charsets for language "et".
-: 97: *
-: 98: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 99: * otherwise.
-: 100: **/
-: 101:static int
-: 102:hook_iso13win(EncaAnalyserState *analyser)
-: 103:{
-: 104: static EncaLanguageHookDataEOL hookdata[] = {
-: 105: { "iso885913", ENCA_SURFACE_EOL_LF, (size_t)-1 },
-: 106: { "cp1257", ENCA_SURFACE_MASK_EOL, (size_t)-1 },
-: 107: };
-: 108:
24: 109: return enca_language_hook_eol(analyser, ELEMENTS(hookdata), hookdata);
-: 110:}
-: 111:
-: 112:/**
-: 113: * hook_iso4win:
-: 114: * @analyser: Analyser state whose charset ratings are to be modified.
-: 115: *
-: 116: * Decides between iso8859-4 and cp1257 charsets for language "et".
-: 117: *
-: 118: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 119: * otherwise.
-: 120: **/
-: 121:static int
-: 122:hook_iso4win(EncaAnalyserState *analyser)
-: 123:{
-: 124: static EncaLanguageHookDataEOL hookdata[] = {
-: 125: { "iso88594", ENCA_SURFACE_EOL_LF, (size_t)-1 },
-: 126: { "cp1257", ENCA_SURFACE_MASK_EOL, (size_t)-1 },
-: 127: };
-: 128:
#####: 129: return enca_language_hook_eol(analyser, ELEMENTS(hookdata), hookdata);
-: 130:}
-: 131:
-: 132:/**
-: 133: * hook_allinone:
-: 134: * @analyser: Analyser state whose charset ratings are to be modified.
-: 135: *
-: 136: * Decides between iso8859-4, iso8859-13, cp1257, and baltic charsets for
-: 137: * language "et".
-: 138: *
-: 139: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 140: * otherwise.
-: 141: **/
-: 142:static int
-: 143:hook_allinone(EncaAnalyserState *analyser)
-: 144:{
-: 145: static const unsigned char list_iso88594[] = {
-: 146: 0xb9, 0xbe, 0xa9, 0xae
-: 147: };
-: 148: static const unsigned char list_iso885913[] = {
-: 149: 0xf0, 0xfe, 0xd0, 0xde
-: 150: };
-: 151: static const unsigned char list_baltic[] = {
-: 152: 0xf9, 0xea, 0xd9, 0xca
-: 153: };
-: 154: static const unsigned char list_cp1257[] = {
-: 155: 0xf0, 0xfe, 0xd0, 0xde
-: 156: };
-: 157: static EncaLanguageHookData1CS hookdata[] = {
-: 158: MAKE_HOOK_LINE(iso88594),
-: 159: MAKE_HOOK_LINE(iso885913),
-: 160: MAKE_HOOK_LINE(baltic),
-: 161: MAKE_HOOK_LINE(cp1257),
-: 162: };
-: 163:
24: 164: return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata);
-: 165:}
-: 166:
-: 167:/* vim: ts=2
-: 168: */
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lib/.libs/common.c.gcov
-: 0:Source:common.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/common.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/common.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*
-: 2: memory and string operations and some more common stuff
-: 3:
-: 4: Copyright (C) 2000-2002 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#ifdef HAVE_CONFIG_H
-: 20:# include "config.h"
-: 21:#endif /* HAVE_CONFIG_H */
-: 22:
-: 23:#include
-: 24:
-: 25:#include "enca.h"
-: 26:#include "internal.h"
-: 27:
-: 28:/**
-: 29: * enca_malloc:
-: 30: * @size: The number of bytes to allocate.
-: 31: *
-: 32: * Allocates memory, always successfully (when fails, aborts program).
-: 33: *
-: 34: * Returns: Pointer to the newly allocated memory.
-: 35: **/
-: 36:void*
6408: 37:enca_malloc(size_t size)
-: 38:{
-: 39: void *ptr;
-: 40:
6408: 41: if (size == 0)
#####: 42: size = 1;
6408: 43: ptr = malloc(size);
6408: 44: assert(ptr != NULL);
-: 45:
6408: 46: return ptr;
-: 47:}
-: 48:
-: 49:/**
-: 50: * enca_realloc:
-: 51: * @ptr: Pointer to block of previously allocated memory.
-: 52: * @size: The number of bytes to resize the block.
-: 53: *
-: 54: * Reallocates memory, always successfully (when fails, aborts program).
-: 55: *
-: 56: * Returns: Pointer to the newly allocated memory, #NULL when @size is zero.
-: 57: **/
-: 58:void*
189: 59:enca_realloc(void *ptr, size_t size)
-: 60:{
189: 61: if (size == 0) {
#####: 62: free(ptr);
#####: 63: return NULL;
-: 64: }
-: 65:
189: 66: ptr = realloc(ptr, size);
189: 67: assert(ptr != NULL);
-: 68:
-: 69: return ptr;
-: 70:}
-: 71:
-: 72:/**
-: 73: * enca_strdup:
-: 74: * @s: A string.
-: 75: *
-: 76: * Duplicates string.
-: 77: *
-: 78: * Will be defined as strdup() when system provides it.
-: 79: *
-: 80: * Returns: The newly allocated string copy.
-: 81: **/
-: 82:char*
2222: 83:enca_strdup(const char *s) {
2222: 84: if (s == NULL)
-: 85: return NULL;
-: 86: else
4146: 87: return strcpy(enca_malloc(strlen(s) + 1), s);
-: 88:}
-: 89:
-: 90:#ifndef HAVE_STRSTR
-: 91:/**
-: 92: * enca_strstr:
-: 93: * @haystack: A string where to search.
-: 94: * @needle: A string to find.
-: 95: *
-: 96: * Finds occurence of a substring in a string.
-: 97: *
-: 98: * Will be defined as strstr() when system provides it.
-: 99: *
-: 100: * Returns: Pointer to the first occurence of @needle in @haystack; #NULL if
-: 101: * not found.
-: 102: **/
-: 103:const char*
-: 104:enca_strstr(const char *haystack,
-: 105: const char *needle)
-: 106:{
-: 107: char c;
-: 108: size_t n;
-: 109:
-: 110: /* handle singularities */
-: 111: if (needle == NULL)
-: 112: return haystack;
-: 113: if ((n = strlen(needle)) == 0)
-: 114: return haystack;
-: 115:
-: 116: /* search */
-: 117: c = needle[0];
-: 118: while ((haystack = strchr(haystack, c)) != NULL) {
-: 119: if (strncmp(haystack, needle, n) == 0)
-: 120: return haystack;
-: 121: }
-: 122:
-: 123: return NULL;
-: 124:}
-: 125:#endif
-: 126:
-: 127:#ifndef HAVE_STPCPY
-: 128:/**
-: 129: * enca_stpcpy:
-: 130: * @dest: A string.
-: 131: * @src: A string to append.
-: 132: *
-: 133: * Appends a string to the end of another strings, returning pointer to
-: 134: * the terminating zero byte.
-: 135: *
-: 136: * Will be defined as stpcpy() when system provides it.
-: 137: *
-: 138: * Caller is responisble for providing @dest long enough to hold the result.
-: 139: *
-: 140: * Returns: Pointer to the terminating zero byte of resulting string.
-: 141: **/
-: 142:char*
-: 143:enca_stpcpy(char *dest,
-: 144: const char *src)
-: 145:{
-: 146: const char *p = src;
-: 147:
-: 148: if (src == NULL)
-: 149: return dest;
-: 150:
-: 151: while (*p != '\0')
-: 152: *dest++ = *p++;
-: 153:
-: 154: *dest = '\0';
-: 155: return dest;
-: 156:}
-: 157:#endif
-: 158:
-: 159:/**
-: 160: * enca_strconcat:
-: 161: * @str: A string.
-: 162: * @...: A #NULL-terminated list of string to append.
-: 163: *
-: 164: * Concatenates arbitrary (but at least one) number of strings.
-: 165: *
-: 166: * Returns: All the strings concatenated together.
-: 167: **/
-: 168:char*
301: 169:enca_strconcat(const char *str,
-: 170: ...)
-: 171:{
-: 172: va_list ap;
301: 173: char *result = NULL;
-: 174: size_t n;
-: 175: const char *s;
-: 176: char *r;
-: 177:
-: 178: /* compute size of resulting string */
301: 179: n = 1;
301: 180: va_start(ap, str);
1226: 181: for (s = str; s != NULL; s = va_arg(ap, const char*))
925: 182: n += strlen(s);
301: 183: va_end(ap);
-: 184:
-: 185: /* and construct it using the smart stpcpy() function */
301: 186: r = result = (char*)enca_malloc(n);
301: 187: va_start(ap, str);
1226: 188: for (s = str; s != NULL; s = va_arg(ap, const char*))
925: 189: r = enca_stpcpy(r, s);
301: 190: va_end(ap);
-: 191:
301: 192: return result;
-: 193:}
-: 194:
-: 195:/**
-: 196: * enca_strappend:
-: 197: * @str: A string.
-: 198: * @...: A #NULL-terminated list of string to append.
-: 199: *
-: 200: * Appends arbitrary number of strings to a string.
-: 201: *
-: 202: * The string @str is destroyed (reallocated), the others are kept.
-: 203: *
-: 204: * Returns: All the strings concatenated together.
-: 205: **/
-: 206:char*
189: 207:enca_strappend(char *str,
-: 208: ...)
-: 209:{
-: 210: va_list ap;
-: 211: size_t n, n1;
-: 212: const char *s;
-: 213: char *r;
-: 214:
-: 215: /* compute size of resulting string */
189: 216: n1 = strlen(str);
189: 217: n = 1 + n1;
189: 218: va_start(ap, str);
567: 219: for (s = va_arg(ap, const char*); s != NULL; s = va_arg(ap, const char*))
378: 220: n += strlen(s);
189: 221: va_end(ap);
-: 222:
-: 223: /* and construct it using the smart stpcpy() function */
189: 224: str = (char*)enca_realloc(str, n);
189: 225: r = str + n1;
189: 226: va_start(ap, str);
567: 227: for (s = va_arg(ap, const char*); s != NULL; s = va_arg(ap, const char*))
378: 228: r = enca_stpcpy(r, s);
189: 229: va_end(ap);
-: 230:
189: 231: return str;
-: 232:}
-: 233:
-: 234:/* vim: ts=2
-: 235: */
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lib/.libs/lang_zh.c.gcov
-: 0:Source:lang_zh.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_zh.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_zh.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*
-: 2: language info: chinese
-: 3:
-: 4: Copyright (C) 2005 Meng Jie (Zuxy)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#ifdef HAVE_CONFIG_H
-: 20:# include "config.h"
-: 21:#endif /* HAVE_CONFIG_H */
-: 22:
-: 23:#include "enca.h"
-: 24:#include "internal.h"
-: 25:#include "data/chinese/chinese.h"
-: 26:
-: 27:static int hook(EncaAnalyserState *analyser);
-: 28:static int calc_rating(EncaAnalyserState *analyser);
-: 29:/* Not 8-bit clean, can't be a HZ here */
6: 30:static int is_hz(const unsigned char* str __attribute__((unused))) { return 0; }
-: 31:
-: 32:static const char *const CHARSET_NAMES[] = {
-: 33: "gbk",
-: 34: "big5",
-: 35: "hz"
-: 36:};
-: 37:
-: 38:static ValidityFunc* validity_check_table[] = {
-: 39: is_gbk,
-: 40: is_big5,
-: 41: is_hz
-: 42:};
-: 43:
-: 44:static RateFunc* rate_calc_table[] = {
-: 45: in_gbk,
-: 46: in_big5,
-: 47: NULL
-: 48:};
-: 49:
-: 50:#define NCHARSETS (sizeof(CHARSET_NAMES)/sizeof(const char* const))
-: 51:
-: 52:/**
-: 53: * ENCA_LANGUAGE_ZH:
-: 54: *
-: 55: * Chinese language.
-: 56: *
-: 57: * Everything the world out there needs to know about this language.
-: 58: **/
-: 59:const EncaLanguageInfo ENCA_LANGUAGE_ZH = {
-: 60: "zh",
-: 61: "chinese",
-: 62: NCHARSETS,
-: 63: CHARSET_NAMES,
-: 64: 0,
-: 65: 0,
-: 66: 0,
-: 67: 0,
-: 68: 0,
-: 69: &hook,
-: 70: NULL,
-: 71: NULL,
-: 72: &calc_rating
-: 73:};
-: 74:
-: 75:/**
-: 76: * hook:
-: 77: * @analyser: Analyser state whose charset ratings are to be modified.
-: 78: *
-: 79: * Adjust ratings for language "zh", see calc_rating below.
-: 80: *
-: 81: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 82: * otherwise.
-: 83: **/
-: 84:static int
6: 85:hook(EncaAnalyserState *analyser)
-: 86:{
6: 87: const size_t* order = analyser->order;
6: 88: double* rating_first = &analyser->ratings[order[0]];
6: 89: double* rating_second = &analyser->ratings[order[1]];
-: 90:
6: 91: if (*rating_second < 0) {
#####: 92: *rating_second = 0.;
-: 93:
#####: 94: if (*rating_first < 0)
#####: 95: *rating_first = 0.;
-: 96: else
#####: 97: *rating_first = 1.; /* Make sure that the first won */
-: 98:
-: 99: return 1;
-: 100: }
-: 101:
-: 102: return 0;
-: 103:}
-: 104:
-: 105:/**
-: 106: * calc_rating:
-: 107: * @analyser: An analyser.
-: 108: *
-: 109: * Calculating ratings for GBK and Big5, respectively, and
-: 110: * ratings may be set to negative values when invalid a character
-: 111: * for a charset was encoutered. This should not affect the result of
-: 112: * enca_find_max_sec, but must be adjust to positive by hook for
-: 113: * the final comparison.
-: 114: *
-: 115: * Returns: Always return 1
-: 116: **/
-: 117:
6: 118:static int calc_rating(EncaAnalyserState *analyser)
-: 119:{
6: 120: int islowbyte = 0;
-: 121: unsigned int i, j;
-: 122: unsigned char low;
6: 123: const size_t size = analyser->size;
6: 124: const unsigned char *buffer = analyser->buffer;
6: 125: double *ratings = analyser->ratings;
-: 126: int continue_check[NCHARSETS];
-: 127: const struct zh_weight* pweight;
-: 128:
6: 129: assert(analyser->ncharsets == NCHARSETS
-: 130: && sizeof(rate_calc_table)/sizeof(RateFunc*) == NCHARSETS
-: 131: && sizeof(validity_check_table)/sizeof(ValidityFunc*) == NCHARSETS);
-: 132:
18: 133: for (i = 0; i < NCHARSETS; i++) {
18: 134: continue_check[i] = 1;
18: 135: ratings[i] = 0.;
-: 136: }
-: 137:
1374: 138: for (i = 0; i < size; i++) {
1374: 139: low = buffer[i];
-: 140:
-: 141: /* low byte */
1374: 142: if (islowbyte) {
684: 143: const unsigned char* hanzi = buffer + i - 1;
-: 144:
684: 145: assert(i);
2052: 146: for (j = 0; j < NCHARSETS; j++) {
2052: 147: if (continue_check[j]) {
1374: 148: continue_check[j] = validity_check_table[j](hanzi);
1374: 149: if (!continue_check[j])
6: 150: ratings[j] = -1.;
-: 151: else {
1368: 152: pweight = rate_calc_table[j](hanzi);
1368: 153: if (pweight)
351: 154: ratings[j] += pweight->freq;
-: 155: }
-: 156: }
-: 157: }
-: 158:
684: 159: islowbyte = 0;
684: 160: continue;
-: 161: }
-: 162:
690: 163: if (low & 0x80)
684: 164: islowbyte = 1;
-: 165: }
-: 166:#ifdef DEBUG
-: 167: printf("GBK: %f, BIG5: %f\n", ratings[0], ratings[1]);
-: 168:#endif
-: 169:
-: 170: /* Unfinished DBCS. */
6: 171: if (islowbyte && analyser->options.termination_strictness > 0)
-: 172: {
#####: 173: for (i = 0; i < NCHARSETS; i++)
#####: 174: ratings[i] = 0.;
-: 175: }
-: 176:
6: 177: return 1;
-: 178:}
-: 179:
-: 180:/* vim: ts=2
-: 181: */
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lib/.libs/filters.c.gcov
-: 0:Source:filters.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/filters.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/filters.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*
-: 2: filters and hooks that various languages can use
-: 3:
-: 4: Copyright (C) 2000-2003 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#ifdef HAVE_CONFIG_H
-: 20:# include "config.h"
-: 21:#endif /* HAVE_CONFIG_H */
-: 22:
-: 23:#include
-: 24:
-: 25:#include "enca.h"
-: 26:#include "internal.h"
-: 27:
-: 28:/**
-: 29: * EncaBoxDraw:
-: 30: * @csname: Charset name.
-: 31: * @isvbox: All other box drawing characters.
-: 32: * @h1: Horizontal line character (light).
-: 33: * @h2: Horizontal line character (heavy).
-: 34: *
-: 35: * Information about box-drawing characters for a charset.
-: 36: **/
-: 37:struct _EncaBoxDraw {
-: 38: const char *csname;
-: 39: const unsigned char *isvbox;
-: 40: unsigned char h1;
-: 41: unsigned char h2;
-: 42:};
-: 43:
-: 44:typedef struct _EncaBoxDraw EncaBoxDraw;
-: 45:
-: 46:/* THIS IS A GENERATED TABLE, see tools/expand_table.pl */
-: 47:static const unsigned char BOXVERT_IBM852[] = {
-: 48: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 49: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 50: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 51: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 52: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 53: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 54: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 55: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 56: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 57: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 58: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 59: 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1,
-: 60: 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0,
-: 61: 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0,
-: 62: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 63: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 64:};
-: 65:
-: 66:/* These are identical */
-: 67:#define BOXVERT_IBM775 BOXVERT_IBM852
-: 68:
-: 69:/* THIS IS A GENERATED TABLE, see tools/expand_table.pl */
-: 70:static const unsigned char BOXVERT_KEYBCS2[] = {
-: 71: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 72: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 73: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 74: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 75: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 76: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 77: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 78: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 79: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 80: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 81: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 82: 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-: 83: 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1,
-: 84: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
-: 85: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 86: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 87:};
-: 88:
-: 89:/* These are identical */
-: 90:#define BOXVERT_IBM866 BOXVERT_KEYBCS2
-: 91:#define BOXVERT_CP1125 BOXVERT_KEYBCS2
-: 92:
-: 93:/* THIS IS A GENERATED TABLE, see tools/expand_table.pl */
-: 94:static const unsigned char BOXVERT_KOI8R[] = {
-: 95: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 96: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 97: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 98: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 99: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 100: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 101: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 102: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 103: 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
-: 104: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 105: 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-: 106: 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
-: 107: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 108: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 109: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 110: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 111:};
-: 112:
-: 113:#if 0
-: 114:/* UNUSED */
-: 115:/* THIS IS A GENERATED TABLE, see tools/expand_table.pl */
-: 116:static const unsigned char BOXVERT_KOI8RU[] = {
-: 117: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 118: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 119: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 120: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 121: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 122: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 123: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 124: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 125: 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
-: 126: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 127: 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1,
-: 128: 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0,
-: 129: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 130: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 131: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 132: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 133:};
-: 134:#endif
-: 135:
-: 136:/* THIS IS A GENERATED TABLE, see tools/expand_table.pl */
-: 137:static const unsigned char BOXVERT_KOI8U[] = {
-: 138: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 139: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 140: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 141: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 142: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 143: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 144: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 145: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 146: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
-: 147: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 148: 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1,
-: 149: 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0,
-: 150: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 151: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 152: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 153: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 154:};
-: 155:
-: 156:/* THIS IS A GENERATED TABLE, see tools/expand_table.pl */
-: 157:static const unsigned char BOXVERT_KOI8UNI[] = {
-: 158: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 159: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 160: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 161: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 162: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 163: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 164: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 165: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 166: 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
-: 167: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 168: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 169: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 170: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 171: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 172: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 173: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 174:};
-: 175:
-: 176:static const EncaBoxDraw BOXDRAW[] = {
-: 177: { "cp1125", BOXVERT_CP1125, 196, 205 },
-: 178: { "ibm775", BOXVERT_IBM775, 196, 205 },
-: 179: { "ibm852", BOXVERT_IBM852, 196, 205 },
-: 180: { "ibm866", BOXVERT_IBM866, 196, 205 },
-: 181: { "keybcs2", BOXVERT_KEYBCS2, 196, 205 },
-: 182: { "koi8r", BOXVERT_KOI8R, 128, 160 },
-: 183: { "koi8u", BOXVERT_KOI8U, 128, 160 },
-: 184: { "koi8uni", BOXVERT_KOI8UNI, 128, 128 }, /* there's only one */
-: 185:#if 0
-: 186: { "koi8ru", BOXVERT_KOI8RU, 128, 160 },
-: 187:#endif
-: 188:};
-: 189:
-: 190:/* Local prototypes. */
-: 191:static size_t filter_boxdraw_out(int charset,
-: 192: unsigned char *buffer,
-: 193: size_t size,
-: 194: unsigned char fill_char);
-: 195:
-: 196:/**
-: 197: * enca_filter_boxdraw:
-: 198: * @analyser: Analyser whose charsets should be considered for filtration.
-: 199: * @fill_char: Replacement character for filtered bytes.
-: 200: *
-: 201: * Runs boxdrawing characters filter on @buffer for each charset in @language.
-: 202: *
-: 203: * Returns: Number of characters filtered out.
-: 204: **/
-: 205:size_t
26: 206:enca_filter_boxdraw(EncaAnalyserState *analyser,
-: 207: unsigned char fill_char)
-: 208:{
-: 209: size_t i;
26: 210: size_t filtered = 0;
-: 211:
182: 212: for (i = 0; i < analyser->ncharsets; i++) {
156: 213: filtered += filter_boxdraw_out(analyser->charsets[i],
-: 214: analyser->buffer, analyser->size,
-: 215: fill_char);
-: 216: }
-: 217:
26: 218: return filtered;
-: 219:}
-: 220:
-: 221:/**
-: 222: * filter_boxdraw_out:
-: 223: * @charset: Charset whose associated filter should be applied.
-: 224: * @buffer: Buffer to be filtered.
-: 225: * @size: Size of @buffer.
-: 226: * @fill_char: Replacement character for filtered bytes.
-: 227: *
-: 228: * Replaces box-drawing characters in @buffer with @fill_char.
-: 229: *
-: 230: * Not all possibly box-drawing characters are replaced, only those meeting
-: 231: * certain conditions to reduce false filtering. It's assumed
-: 232: * isspace(@fill_char) is true (it aborts when it isn't).
-: 233: *
-: 234: * It's OK to call with @charset which has no filter associated, it just
-: 235: * returns zero then.
-: 236: *
-: 237: * Returns: The number of characters filtered.
-: 238: **/
-: 239:static size_t
156: 240:filter_boxdraw_out(int charset,
-: 241: unsigned char *buffer,
-: 242: size_t size,
-: 243: unsigned char fill_char)
-: 244:{
-: 245: static int charset_id[ELEMENTS(BOXDRAW)];
-: 246: static int charset_id_initialized = 0;
-: 247: const EncaBoxDraw *bd;
-: 248: size_t i, n, xout;
-: 249:
156: 250: assert(enca_isspace(fill_char));
-: 251:
156: 252: if (!charset_id_initialized) {
208: 253: for (i = 0; i < ELEMENTS(BOXDRAW); i++) {
208: 254: charset_id[i] = enca_name_to_charset(BOXDRAW[i].csname);
208: 255: assert(charset_id[i] != ENCA_CS_UNKNOWN);
-: 256: }
26: 257: charset_id_initialized = 1;
-: 258: }
-: 259:
-: 260: /* Find whether we have any filter associated with this charset. */
156: 261: bd = NULL;
1222: 262: for (i = 0; i < ELEMENTS(BOXDRAW); i++) {
1102: 263: if (charset_id[i] == charset) {
36: 264: bd = BOXDRAW + i;
36: 265: break;
-: 266: }
-: 267: }
156: 268: if (bd == NULL)
-: 269: return 0;
-: 270:
-: 271: xout = 0;
-: 272: /* First stage:
-: 273: * Horizontal lines, they must occur at least two in a row. */
-: 274: i = 0;
2359296: 275: while (i < size-1) {
2359260: 276: if (buffer[i] == bd->h1 || buffer[i] == bd->h2) {
19354: 277: for (n = i+1; n < size && buffer[n] == buffer[i]; n++)
-: 278: ;
-: 279:
19354: 280: if (n > i+1) {
#####: 281: memset(buffer + i, fill_char, n - i);
#####: 282: xout += n - i;
-: 283: }
-: 284: i = n;
-: 285: }
2339906: 286: else i++;
-: 287: }
-: 288:
-: 289: /* Second stage:
-: 290: * Vertical/mixed, they must occur separated by whitespace.
-: 291: * We assume isspace(fill_char) is true. */
36: 292: if (size > 1
36: 293: && bd->isvbox[buffer[0]]
#####: 294: && enca_isspace(buffer[1])) {
#####: 295: buffer[0] = fill_char;
#####: 296: xout++;
-: 297: }
-: 298:
2359224: 299: for (i = 1; i < size-1; i++) {
2359224: 300: if (bd->isvbox[buffer[i]]
227784: 301: && enca_isspace(buffer[i-1])
36544: 302: && enca_isspace(buffer[i+1])) {
#####: 303: buffer[i] = fill_char;
#####: 304: xout++;
-: 305: }
-: 306: }
-: 307:
36: 308: if (size > 1
36: 309: && bd->isvbox[buffer[size-1]]
4: 310: && enca_isspace(buffer[size-2])) {
2: 311: buffer[size-1] = fill_char;
2: 312: xout++;
-: 313: }
-: 314:
-: 315: return xout;
-: 316:}
-: 317:
-: 318:/**
-: 319: * enca_language_hook_ncs:
-: 320: * @analyser: Analyser whose charset ratings are to be modified.
-: 321: * @ncs: The number of charsets.
-: 322: * @hookdata: What characters of which charsets should be given the extra
-: 323: * weight.
-: 324: *
-: 325: * Decide between two charsets differing only in a few characters.
-: 326: *
-: 327: * If the two most probable charsets correspond to @hookdata charsets,
-: 328: * give the characters they differ half the weight of all other characters
-: 329: * together, thus allowing to decide between the two very similar charsets.
-: 330: *
-: 331: * It also recomputes @order when something changes.
-: 332: *
-: 333: * Returns: Nonzero when @ratings were actually modified, nonzero otherwise.
-: 334: **/
-: 335:int
296: 336:enca_language_hook_ncs(EncaAnalyserState *analyser,
-: 337: size_t ncs,
-: 338: EncaLanguageHookData1CS *hookdata)
-: 339:{
296: 340: const int *const ids = analyser->charsets;
296: 341: const size_t ncharsets = analyser->ncharsets;
296: 342: const size_t *counts = analyser->counts;
296: 343: const size_t *const order = analyser->order;
296: 344: double *const ratings = analyser->ratings;
-: 345: size_t maxcnt, j, k, m;
-: 346: double q;
-: 347:
296: 348: assert(ncharsets > 0);
296: 349: assert(ncs <= ncharsets);
296: 350: if (ncs < 2)
-: 351: return 0;
-: 352:
-: 353: /*
-: 354: for (j = 0; j < ncharsets; j++) {
-: 355: fprintf(stderr, "%s:\t%g\n", enca_csname(ids[order[j]]), ratings[order[j]]);
-: 356: }
-: 357: */
-: 358:
-: 359: /* Find id's and check whether they are the first */
412: 360: for (j = 0; j < ncs; j++) {
559: 361: EncaLanguageHookData1CS *h = hookdata + j;
-: 362:
-: 363: /* Find charset if unknown */
559: 364: if (h->cs == (size_t)-1) {
-: 365: int id;
-: 366:
319: 367: id = enca_name_to_charset(h->name);
319: 368: assert(id != ENCA_CS_UNKNOWN);
-: 369: k = 0;
829: 370: while (k < ncharsets && id != ids[k])
510: 371: k++;
319: 372: assert(k < ncharsets);
319: 373: h->cs = k;
-: 374: }
-: 375:
-: 376: /* If any charset is not between the first ncs ones, do nothing. */
559: 377: k = 0;
1831: 378: while (k < ncs && order[k] != h->cs)
713: 379: k++;
559: 380: if (k == ncs)
-: 381: return 0;
-: 382: }
-: 383:
-: 384: /* Sum the extra-important characters and find maximum. */
-: 385: maxcnt = 0;
364: 386: for (j = 0; j < ncs; j++) {
364: 387: EncaLanguageHookData1CS const *h = hookdata + j;
-: 388:
2199: 389: for (m = k = 0; k < h->size; k++)
1835: 390: m += counts[h->list[k]];
364: 391: if (m > maxcnt)
155: 392: maxcnt = m;
-: 393: }
149: 394: if (maxcnt == 0)
-: 395: return 0;
-: 396:
-: 397: /* Substract something from charsets that have less than maximum. */
146: 398: q = 0.5 * ratings[order[0]]/(maxcnt + EPSILON);
504: 399: for (j = 0; j < ncs; j++) {
358: 400: EncaLanguageHookData1CS const *h = hookdata + j;
-: 401:
358: 402: m = maxcnt;
2163: 403: for (k = 0; k < h->size; k++)
1805: 404: m -= counts[h->list[k]];
358: 405: ratings[h->cs] -= q*m;
-: 406: }
-: 407:
146: 408: enca_find_max_sec(analyser);
-: 409:
146: 410: return 1;
-: 411:}
-: 412:
-: 413:/**
-: 414: * enca_language_hook_eol:
-: 415: * @analyser: Analyser whose charset ratings are to be modified.
-: 416: * @ncs: The number of charsets.
-: 417: * @hookdata: What characters of which charsets should be decided with based
-: 418: * on the EOL type.
-: 419: *
-: 420: * Decide between two charsets differing only in EOL type or other surface.
-: 421: *
-: 422: * The (surface mask, charset) pairs are scanned in order. If a matching
-: 423: * surface is found, ratings of all other charsets in the list are zeroed.
-: 424: * So you can place a surface mask of all 1s at the end to match when nothing
-: 425: * else matches.
-: 426: *
-: 427: * All the charsets have to have the same rating, or nothing happens.
-: 428: *
-: 429: * It also recomputes @order when something changes.
-: 430: *
-: 431: * Returns: Nonzero when @ratings were actually modified, nonzero otherwise.
-: 432: **/
-: 433:int
93: 434:enca_language_hook_eol(EncaAnalyserState *analyser,
-: 435: size_t ncs,
-: 436: EncaLanguageHookDataEOL *hookdata)
-: 437:{
93: 438: const int *const ids = analyser->charsets;
93: 439: const size_t ncharsets = analyser->ncharsets;
93: 440: const size_t *const order = analyser->order;
93: 441: double *const ratings = analyser->ratings;
-: 442: size_t j, k;
-: 443:
93: 444: assert(ncharsets > 0);
93: 445: assert(ncs <= ncharsets);
93: 446: if (ncs < 2)
-: 447: return 0;
-: 448:
-: 449: /* Rating equality check. */
36: 450: for (j = 1; j < ncs; j++) {
93: 451: if (fabs(ratings[order[j-1]] - ratings[order[j]]) > EPSILON)
-: 452: return 0;
-: 453: }
-: 454:
-: 455: /* Find id's and check whether they are the first */
72: 456: for (j = 0; j < ncs; j++) {
72: 457: EncaLanguageHookDataEOL *h = hookdata + j;
-: 458:
-: 459: /* Find charset if unknown */
72: 460: if (h->cs == (size_t)-1) {
-: 461: int id;
-: 462:
52: 463: id = enca_name_to_charset(h->name);
52: 464: assert(id != ENCA_CS_UNKNOWN);
-: 465: k = 0;
117: 466: while (k < ncharsets && id != ids[k])
65: 467: k++;
52: 468: assert(k < ncharsets);
52: 469: h->cs = k;
-: 470: }
-: 471:
-: 472: /* If any charset is not between the first ncs ones, do nothing. */
72: 473: k = 0;
180: 474: while (k < ncs && order[k] != h->cs)
36: 475: k++;
72: 476: if (k == ncs)
-: 477: return 0;
-: 478: }
-: 479:
-: 480: /* Find first matching EOL type. */
12: 481: for (j = 0; j < ncs; j++) {
48: 482: EncaLanguageHookDataEOL const *h = hookdata + j;
-: 483:
48: 484: if (h->eol & analyser->result.surface) {
-: 485: int chg = 0;
-: 486:
72: 487: for (k = 0; k < ncs; k++) {
72: 488: h = hookdata + k;
-: 489:
72: 490: if (k != j && ratings[h->cs] > 0.0) {
36: 491: ratings[h->cs] = 0.0;
36: 492: chg = 1;
-: 493: }
-: 494: }
36: 495: if (chg)
36: 496: enca_find_max_sec(analyser);
-: 497:
-: 498: return chg;
-: 499: }
-: 500: }
-: 501:
-: 502: return 0;
-: 503:}
-: 504:
-: 505:/* vim: ts=2
-: 506: */
-: 507:
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lib/.libs/encnames.c.gcov
-: 0:Source:encnames.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/encnames.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/encnames.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*
-: 2: convert charset and surface names to internal representation and back
-: 3:
-: 4: Copyright (C) 2000-2003 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#ifdef HAVE_CONFIG_H
-: 20:# include "config.h"
-: 21:#endif /* HAVE_CONFIG_H */
-: 22:
-: 23:#include "enca.h"
-: 24:#include "internal.h"
-: 25:#include "tools/encodings.h"
-: 26:
-: 27:#define NCHARSETS (ELEMENTS(CHARSET_INFO))
-: 28:#define NALIASES (ELEMENTS(ALIAS_LIST))
-: 29:#define NSURFACES (ELEMENTS(SURFACE_INFO))
-: 30:
-: 31:#define ENCODING_UNKNOWN { ENCA_CS_UNKNOWN, 0 }
-: 32:
-: 33:/* tolower() and toupper() which never fail. */
-: 34:#define enca_tolower(c) (enca_isupper(c) ? (c) + ('a' - 'A') : (c))
-: 35:#define enca_toupper(c) (enca_islower(c) ? (c) - ('a' - 'A') : (c))
-: 36:
-: 37:static const char *UNKNOWN_CHARSET_NAME = "unknown";
-: 38:static const char *UNKNOWN_CHARSET_HUMAN = "Unrecognized encoding";
-: 39:static const char *UNKNOWN_CHARSET_SYM = "???";
-: 40:
-: 41:/* Surface separator (sometimes we need a character, sometimes a string). */
-: 42:#define SURF_SEPARATOR '/'
-: 43:#define SURF_SEPARATOR_STR "/"
-: 44:
-: 45:/**
-: 46: * EncaSurfaceInfo:
-: 47: * @enca: Canonical identifier (#NULL when not applicable).
-: 48: * @human: Human readable name.
-: 49: * @bit: Appropriate ENCA_SURFACE_.
-: 50: *
-: 51: * Surface information.
-: 52: **/
-: 53:struct _EncaSurfaceInfo {
-: 54: const char *enca;
-: 55: const char *human;
-: 56: EncaSurface bit;
-: 57:};
-: 58:
-: 59:typedef struct _EncaSurfaceInfo EncaSurfaceInfo;
-: 60:
-: 61:/* Local prototypes. */
-: 62:static int squeeze_compare(const char *x,
-: 63: const char *y);
-: 64:static int alias_search(const char *const *alist,
-: 65: int n,
-: 66: const char *s);
-: 67:static int check_surface_consistency(EncaSurface surface);
-: 68:static int count_bits(unsigned long int x);
-: 69:static int check_encoding_name(const char *name);
-: 70:
-: 71:/* Surface information. */
-: 72:static const EncaSurfaceInfo SURFACE_INFO[] = {
-: 73: {
-: 74: "CR",
-: 75: "CR line terminators",
-: 76: ENCA_SURFACE_EOL_CR
-: 77: },
-: 78: {
-: 79: "LF",
-: 80: "LF line terminators",
-: 81: ENCA_SURFACE_EOL_LF
-: 82: },
-: 83: {
-: 84: "CRLF",
-: 85: "CRLF line terminators",
-: 86: ENCA_SURFACE_EOL_CRLF
-: 87: },
-: 88: {
-: 89: NULL,
-: 90: "Mixed line terminators",
-: 91: ENCA_SURFACE_EOL_MIX
-: 92: },
-: 93: {
-: 94: NULL,
-: 95: "Surrounded by/intermixed with non-text data",
-: 96: ENCA_SURFACE_EOL_BIN
-: 97: },
-: 98: {
-: 99: "21",
-: 100: "Byte order reversed in pairs (1,2 -> 2,1)",
-: 101: ENCA_SURFACE_PERM_21
-: 102: },
-: 103: {
-: 104: "4321",
-: 105: "Byte order reversed in quadruples (1,2,3,4 -> 4,3,2,1)",
-: 106: ENCA_SURFACE_PERM_4321
-: 107: },
-: 108: {
-: 109: NULL,
-: 110: "Both little and big endian chunks, concatenated",
-: 111: ENCA_SURFACE_PERM_MIX
-: 112: },
-: 113: {
-: 114: "qp",
-: 115: "Quoted-printable encoded",
-: 116: ENCA_SURFACE_QP
-: 117: },
-: 118: {
-: 119: "",
-: 120: "",
-: 121: ENCA_SURFACE_REMOVE
-: 122: },
-: 123:};
-: 124:
-: 125:/**
-: 126: * enca_charset_name:
-: 127: * @charset: A charset id.
-: 128: * @whatname: Teh type of name you request.
-: 129: *
-: 130: * Translates numeric charset id @charset to some kind of name.
-: 131: *
-: 132: * Returns: The requested charset name; #NULL for invalid @whatname or
-: 133: * @charset, or when @whatname name doesn't exist for charset @charset
-: 134: * (#ENCA_CS_UNKNOWN is OK).
-: 135: **/
-: 136:const char*
668: 137:enca_charset_name(int charset,
-: 138: EncaNameStyle whatname)
-: 139:{
-: 140: const EncaCharsetInfo *cs;
-: 141:
668: 142: if (charset == ENCA_CS_UNKNOWN) {
-: 143: switch (whatname) {
-: 144: case ENCA_NAME_STYLE_RFC1345:
-: 145: case ENCA_NAME_STYLE_ENCA:
-: 146: case ENCA_NAME_STYLE_MIME:
2: 147: return UNKNOWN_CHARSET_NAME;
-: 148:
-: 149: case ENCA_NAME_STYLE_HUMAN:
1: 150: return UNKNOWN_CHARSET_HUMAN;
-: 151:
-: 152: case ENCA_NAME_STYLE_CSTOCS:
-: 153: case ENCA_NAME_STYLE_ICONV:
#####: 154: return UNKNOWN_CHARSET_SYM;
-: 155:
-: 156: default:
-: 157: return NULL;
-: 158: }
-: 159: }
665: 160: if ((size_t)charset >= NCHARSETS)
-: 161: return NULL;
-: 162:
665: 163: cs = CHARSET_INFO + charset;
665: 164: switch (whatname) {
-: 165: case ENCA_NAME_STYLE_RFC1345:
#####: 166: return ALIAS_LIST[cs->rfc1345];
-: 167:
-: 168: case ENCA_NAME_STYLE_HUMAN:
106: 169: return cs->human;
-: 170:
-: 171: case ENCA_NAME_STYLE_ENCA:
537: 172: return ALIAS_LIST[cs->enca];
-: 173:
-: 174: case ENCA_NAME_STYLE_CSTOCS:
#####: 175: return cs->cstocs < 0 ? NULL : ALIAS_LIST[cs->cstocs];
-: 176:
-: 177: case ENCA_NAME_STYLE_ICONV:
22: 178: return cs->iconv < 0 ? NULL : ALIAS_LIST[cs->iconv];
-: 179:
-: 180: case ENCA_NAME_STYLE_MIME:
#####: 181: return cs->mime < 0 ? NULL : ALIAS_LIST[cs->mime];
-: 182:
-: 183: default:
-: 184: return NULL;
-: 185: }
-: 186:
-: 187: /* just to placate gcc */
-: 188: return NULL;
-: 189:}
-: 190:
-: 191:/**
-: 192: * enca_get_charset_aliases:
-: 193: * @charset: A charset id.
-: 194: * @n: The number of aliases will be stored here.
-: 195: *
-: 196: * Returns list of accepted aliases for charset @charset.
-: 197: *
-: 198: * The list of aliases has to be freed by caller; the strings themselves
-: 199: * must be considered constant and must NOT be freed.
-: 200: *
-: 201: * Returns: The list of aliases, storing their number into *@n; #NULL for
-: 202: * invalid @charset (*@n is zero then).
-: 203: **/
-: 204:const char**
32: 205:enca_get_charset_aliases(int charset,
-: 206: size_t *n)
-: 207:{
-: 208: const char **aliases;
-: 209: size_t i, j;
-: 210:
-: 211: /* Compute total length.
-: 212: * FIXME: The list is known at compile time. */
6752: 213: for (i = *n = 0; i < NALIASES; i++)
6720: 214: if (INDEX_LIST[i] == charset) (*n)++;
-: 215:
-: 216: /* Create the list. */
32: 217: aliases = NEW(const char*, *n);
6752: 218: for (i = j = 0; i < NALIASES; i++)
6720: 219: if (INDEX_LIST[i] == charset)
210: 220: aliases[j++] = ALIAS_LIST[i];
-: 221:
32: 222: return aliases;
-: 223:}
-: 224:
-: 225:/**
-: 226: * enca_get_surface_name:
-: 227: * @surface: A surface.
-: 228: * @whatname: The type of name you request.
-: 229: *
-: 230: * Constructs surface name from surface flags @surface.
-: 231: *
-: 232: * Returns: The requested surface name; #NULL for invalid @whatname; empty
-: 233: * string for naming style not supporting surfaces. In all cases, the
-: 234: * returned string must be freed by caller when no longer used.
-: 235: **/
-: 236:char*
204: 237:enca_get_surface_name(EncaSurface surface,
-: 238: EncaNameStyle whatname)
-: 239:{
-: 240: char *s;
-: 241: size_t i;
-: 242:
204: 243: switch (whatname) {
-: 244: /* these don't know/define surfaces so forget it */
-: 245: case ENCA_NAME_STYLE_CSTOCS:
-: 246: case ENCA_NAME_STYLE_RFC1345:
-: 247: case ENCA_NAME_STYLE_ICONV:
-: 248: case ENCA_NAME_STYLE_MIME:
#####: 249: s = enca_strdup("");
#####: 250: break;
-: 251:
-: 252: /* human readable name (each on separate line) */
-: 253: case ENCA_NAME_STYLE_HUMAN:
52: 254: s = enca_strdup("");
572: 255: for (i = 0; i < NSURFACES; i++) {
520: 256: if (SURFACE_INFO[i].bit & surface) {
30: 257: s = enca_strappend(s, SURFACE_INFO[i].human, "\n", NULL);
-: 258: }
-: 259: }
-: 260: break;
-: 261:
-: 262: /* canonical name (/recode style) */
-: 263: case ENCA_NAME_STYLE_ENCA:
152: 264: s = enca_strdup("");
1672: 265: for (i = 0; i < NSURFACES; i++) {
1520: 266: if ((SURFACE_INFO[i].bit & surface) && SURFACE_INFO[i].enca != NULL) {
159: 267: s = enca_strappend(s, SURF_SEPARATOR_STR, SURFACE_INFO[i].enca, NULL);
-: 268: }
-: 269: }
-: 270: break;
-: 271:
-: 272: default:
-: 273: s = NULL;
-: 274: break;
-: 275: }
-: 276:
204: 277: return s;
-: 278:}
-: 279:
-: 280:/**
-: 281: * enca_charset_properties:
-: 282: * @charset: A charset.
-: 283: *
-: 284: * Returns charset properties.
-: 285: *
-: 286: * Returns: The requested charset properties; zero for invalid @charset.
-: 287: **/
-: 288:EncaCharsetFlags
#####: 289:enca_charset_properties(int charset)
-: 290:{
#####: 291: if ((size_t)charset >= NCHARSETS)
-: 292: return 0;
#####: 293: return CHARSET_INFO[charset].flags;
-: 294:}
-: 295:
-: 296:/**
-: 297: * enca_charset_natural_surface:
-: 298: * @charset: A charset.
-: 299: *
-: 300: * Returns natural surface of a charset.
-: 301: *
-: 302: * Returns: The requested charset natural surface (called `implied' in recode),
-: 303: * zero for invalid @charset or for charsets with no natural surface.
-: 304: *
-: 305: * Natrual surface is the surface one expects for a given charset --
-: 306: * e.g. CRLF EOLs for IBM/Microsoft charsets, CR EOLs for Macintosh
-: 307: * charsets and LF EOLs for ISO/Unix charsets.
-: 308: **/
-: 309:EncaSurface
459: 310:enca_charset_natural_surface(int charset)
-: 311:{
459: 312: if ((size_t)charset >= NCHARSETS)
-: 313: return 0;
-: 314: else
455: 315: return CHARSET_INFO[charset].nsurface;
-: 316:}
-: 317:
-: 318:/**
-: 319: * enca_number_of_charsets:
-: 320: *
-: 321: * Returns number of known charsets.
-: 322: *
-: 323: * Charsets idetifiers are assigned successively starting from zero, so last
-: 324: * charset has identifier enca_number_of_charsets() - 1.
-: 325: *
-: 326: * Returns: The number of charsets.
-: 327: **/
-: 328:size_t
3: 329:enca_number_of_charsets(void)
-: 330:{
3: 331: return NCHARSETS;
-: 332:}
-: 333:
-: 334:/**
-: 335: * enca_parse_encoding_name:
-: 336: * @name: An encoding specification.
-: 337: *
-: 338: * Transofrms encoding specification charset/surface into numeric #EncaEncoding.
-: 339: *
-: 340: * When the charset name is not recognized, surfaces are not parsed at all and
-: 341: * #ENCA_CS_UNKNOWN is returned as charset. However, unrecognized surfaces are
-: 342: * considered only a minor problem causing %ENCA_SURFACE_UNKNOWN flag to be
-: 343: * set in the result, beside recognized surface flags.
-: 344: *
-: 345: * Returns: The charset/surface pair.
-: 346: **/
-: 347:EncaEncoding
64: 348:enca_parse_encoding_name(const char *name)
-: 349:{
64: 350: EncaEncoding enc = ENCODING_UNKNOWN;
-: 351: char *p, *q;
-: 352:
64: 353: if (name == NULL)
#####: 354: return enc;
-: 355:
64: 356: p = enca_strdup(name);
-: 357: /* separate pure charset name into p */
64: 358: q = strchr(p, SURF_SEPARATOR);
64: 359: if (q != NULL)
#####: 360: *q++ = '\0';
64: 361: enc.charset = enca_name_to_charset(p);
-: 362: /* surfaces, ony by one */
128: 363: while (q != NULL && enc.charset != ENCA_CS_UNKNOWN) {
-: 364: unsigned int surface;
#####: 365: char *r = strchr(p, SURF_SEPARATOR);
-: 366:
#####: 367: if (r != NULL)
#####: 368: *r++ = '\0';
#####: 369: enc.surface |= surface = enca_name_to_surface(q);
#####: 370: q = r;
-: 371: }
64: 372: if (!check_surface_consistency(enc.surface))
#####: 373: enc.surface |= ENCA_SURFACE_UNKNOWN;
64: 374: free(p);
-: 375:
64: 376: return enc;
-: 377:}
-: 378:
-: 379:/**
-: 380: * squeeze_compare:
-: 381: * @x: A string.
-: 382: * @y: Another string.
-: 383: *
-: 384: * Compares two strings taking into account only alphanumeric characters.
-: 385: *
-: 386: * Returns: Less than zero, more than zero, or zero, when the first string is
-: 387: * squeeze-alphabeticaly before, after, or equal to second string.
-: 388: **/
-: 389:static int
36277: 390:squeeze_compare(const char *x,
-: 391: const char *y)
-: 392:{
36277: 393: if (x == NULL || y == NULL) {
#####: 394: if (x == NULL && y == NULL)
-: 395: return 0;
-: 396:
#####: 397: if (x == NULL)
-: 398: return -1;
-: 399: else
#####: 400: return 1;
-: 401: }
-: 402:
93102: 403: while (*x != '\0' || *y != '\0') {
88855: 404: while (*x != '\0' && !enca_isalnum(*x))
477: 405: x++;
94923: 406: while (*y != '\0' && !enca_isalnum(*y))
6545: 407: y++;
-: 408:
88378: 409: if (enca_tolower(*x) != enca_tolower(*y))
31553: 410: return (int)enca_tolower(*x) - (int)enca_tolower(*y);
-: 411:
56825: 412: if (*x != '\0')
56825: 413: x++;
56825: 414: if (*y != '\0')
56825: 415: y++;
-: 416: }
-: 417: return 0;
-: 418:}
-: 419:
-: 420:#if 0
-: 421:/**
-: 422: * stable_compare:
-: 423: * @x: A string.
-: 424: * @y: Another string.
-: 425: *
-: 426: * Compares two strings taking into account only alphanumeric characters first.
-: 427: *
-: 428: * When the strings are equal, compares them normally, too. Zero is thus
-: 429: * returned for really identical strings only.
-: 430: *
-: 431: * Returns: Less than zero, more than zero, or zero, when the first string is
-: 432: * squeeze-alphabeticaly before, after, or equal to second string.
-: 433: **/
-: 434:static int
-: 435:stable_compare(const char *x,
-: 436: const char *y)
-: 437:{
-: 438: int i;
-: 439:
-: 440: i = squeeze_compare(x, y);
-: 441: /* to stabilize the sort */
-: 442: if (i == 0)
-: 443: return strcmp(x, y);
-: 444:
-: 445: return i;
-: 446:}
-: 447:#endif
-: 448:
-: 449:/**
-: 450: * alias_search:
-: 451: * @alist: Sorted array of strings.
-: 452: * @n: Size of @alist.
-: 453: * @s: String to find.
-: 454: *
-: 455: * Finds string @s in stable-sorted array of strings.
-: 456: *
-: 457: * Returns: Index of @s in @alist; -1 if not found.
-: 458: **/
-: 459:static int
4727: 460:alias_search(const char *const *alist,
-: 461: int n,
-: 462: const char *s)
-: 463:{
4727: 464: int i1 = 0;
4727: 465: int i2 = n-1;
-: 466: int i;
-: 467:
4727: 468: i = squeeze_compare(s, alist[i1]);
4727: 469: if (i < 0)
-: 470: return -1;
4727: 471: if (i == 0)
-: 472: return i1;
-: 473:
4727: 474: i = squeeze_compare(s, alist[i2]);
4727: 475: if (i > 0)
-: 476: return -1;
4727: 477: if (i == 0)
-: 478: return i2;
-: 479:
26823: 480: while (i1+1 < i2) {
26820: 481: int im = (i1 + i2)/2;
-: 482:
26820: 483: i = squeeze_compare(s, alist[im]);
26820: 484: if (i == 0)
-: 485: return im;
-: 486:
22096: 487: if (i > 0)
-: 488: i1 = im;
-: 489: else
-: 490: i2 = im;
-: 491: }
3: 492: if (squeeze_compare(s, alist[i1+1]) == 0)
#####: 493: return i1+1;
-: 494:
-: 495: return -1;
-: 496:}
-: 497:
-: 498:/**
-: 499: * enca_name_to_charset:
-: 500: * @csname: The charset name.
-: 501: *
-: 502: * Transforms charset name to numeric charset id.
-: 503: *
-: 504: * Returns: The charset id; #ENCA_CS_UNKNOWN when the name is not recognized.
-: 505: **/
-: 506:int
4727: 507:enca_name_to_charset(const char *csname)
-: 508:{
-: 509: int i;
-: 510:
4727: 511: if (check_encoding_name(csname) <= 0)
-: 512: return ENCA_CS_UNKNOWN;
-: 513:
4727: 514: i = alias_search(ALIAS_LIST, NALIASES, csname);
4727: 515: return i < 0 ? ENCA_CS_UNKNOWN : INDEX_LIST[i];
-: 516:}
-: 517:
-: 518:/**
-: 519: * enca_name_to_surface:
-: 520: * @sname: The surface name.
-: 521: *
-: 522: * Transforms surface name to numeric surface id.
-: 523: *
-: 524: * Returns: The surface id; %ENCA_SURFACE_UNKNOWN when the name is not
-: 525: * recognized.
-: 526: **/
-: 527:EncaSurface
#####: 528:enca_name_to_surface(const char *sname)
-: 529:{
-: 530: size_t i;
-: 531:
#####: 532: if (sname == NULL)
-: 533: return ENCA_SURFACE_UNKNOWN;
-: 534:
#####: 535: for (i = 0; i < NSURFACES; i++) {
#####: 536: if (SURFACE_INFO[i].enca == NULL || *(SURFACE_INFO[i].enca) == '\0')
#####: 537: continue;
#####: 538: if (squeeze_compare(SURFACE_INFO[i].enca, sname))
#####: 539: return SURFACE_INFO[i].bit;
-: 540: }
-: 541: return ENCA_SURFACE_UNKNOWN;
-: 542:}
-: 543:
-: 544:/**
-: 545: * check_surface_consistency:
-: 546: * @surface: The surface.
-: 547: *
-: 548: * Checks whether the specified surface makes sense. Unlike recode we don't
-: 549: * consider /cr/cr/crlf/cr/lf/lf/crlf a reasonable surface.
-: 550: *
-: 551: * Returns: Nonzero when the surface is OK, zero othewise.
-: 552: **/
-: 553:static int
64: 554:check_surface_consistency(EncaSurface surface)
-: 555:{
192: 556: return count_bits((unsigned long int)surface & ENCA_SURFACE_MASK_EOL) <= 1
128: 557: && count_bits((unsigned long int)surface & ENCA_SURFACE_MASK_PERM) <= 1
-: 558: && (surface & ENCA_SURFACE_REMOVE) == 0
128: 559: && (surface & ENCA_SURFACE_UNKNOWN) == 0;
-: 560:}
-: 561:
-: 562:/**
-: 563: * count_bits:
-: 564: * @x: A flag field.
-: 565: *
-: 566: * Returns: The number of bits set in @x.
-: 567: **/
-: 568:static int
-: 569:count_bits(unsigned long int x)
-: 570:{
128: 571: int i = 0;
-: 572:
128: 573: while (x != 0) {
#####: 574: if (x & 1UL)
#####: 575: i++;
-: 576:
#####: 577: x >>= 1;
-: 578: }
-: 579:
-: 580: return i;
-: 581:}
-: 582:
-: 583:/**
-: 584: * check_encoding_name:
-: 585: * @name: A charset/surface/encoding name.
-: 586: *
-: 587: * Checks whether @name contains only allowed characters and counts the
-: 588: * number of alphanumeric characters in @name.
-: 589: *
-: 590: * Returns: The number of alphanumeric characters in @name; -1 when @name
-: 591: * is invalid.
-: 592: **/
-: 593:static int
-: 594:check_encoding_name(const char *name)
-: 595:{
-: 596: size_t i, n;
-: 597:
4727: 598: if (name == NULL)
-: 599: return -1;
-: 600:
28420: 601: for (i = n = 0; name[i] != '\0'; i++) {
28420: 602: if (!enca_isname(name[i]))
-: 603: return -1;
-: 604:
28420: 605: if (enca_isalnum(name[i]))
27974: 606: n++;
-: 607: }
-: 608:
4727: 609: return n;
-: 610:}
-: 611:
-: 612:/***** Documentation *********************************************************/
-: 613:
-: 614:/**
-: 615: * EncaSurface:
-: 616: * @ENCA_SURFACE_EOL_CR: End-of-lines are represented with CR's.
-: 617: * @ENCA_SURFACE_EOL_LF: End-of-lines are represented with LF's.
-: 618: * @ENCA_SURFACE_EOL_CRLF: End-of-lines are represented with CRLF's.
-: 619: * @ENCA_SURFACE_EOL_MIX: Several end-of-line types, mixed.
-: 620: * @ENCA_SURFACE_EOL_BIN: End-of-line concept not applicable (binary data).
-: 621: * @ENCA_SURFACE_MASK_EOL: Mask for end-of-line surfaces.
-: 622: * @ENCA_SURFACE_PERM_21: Odd and even bytes swapped.
-: 623: * @ENCA_SURFACE_PERM_4321: Reversed byte sequence in 4byte words.
-: 624: * @ENCA_SURFACE_PERM_MIX: Chunks with both endianess, concatenated.
-: 625: * @ENCA_SURFACE_MASK_PERM: Mask for permutation surfaces.
-: 626: * @ENCA_SURFACE_QP: Quoted printables.
-: 627: * @ENCA_SURFACE_HZ: HZ encoded.
-: 628: * @ENCA_SURFACE_REMOVE: Recode `remove' surface.
-: 629: * @ENCA_SURFACE_UNKNOWN: Unknown surface.
-: 630: * @ENCA_SURFACE_MASK_ALL: Mask for all bits, withnout #ENCA_SURFACE_UNKNOWN.
-: 631: *
-: 632: * Surface flags.
-: 633: **/
-: 634:
-: 635:/**
-: 636: * EncaNameStyle:
-: 637: * @ENCA_NAME_STYLE_ENCA: Default, implicit charset name in Enca.
-: 638: * @ENCA_NAME_STYLE_RFC1345: RFC 1345 or otherwise canonical charset name.
-: 639: * @ENCA_NAME_STYLE_CSTOCS: Cstocs charset name (may not exist).
-: 640: * @ENCA_NAME_STYLE_ICONV: Iconv charset name (may not exist).
-: 641: * @ENCA_NAME_STYLE_HUMAN: Human comprehensible description.
-: 642: * @ENCA_NAME_STYLE_MIME: Preferred MIME name (may not exist).
-: 643: *
-: 644: * Charset naming styles and conventions.
-: 645: **/
-: 646:
-: 647:/**
-: 648: * EncaCharsetFlags:
-: 649: * @ENCA_CHARSET_7BIT: Characters are represented with 7bit characters.
-: 650: * @ENCA_CHARSET_8BIT: Characters are represented with bytes.
-: 651: * @ENCA_CHARSET_16BIT: Characters are represented with 2byte words.
-: 652: * @ENCA_CHARSET_32BIT: Characters are represented with 4byte words.
-: 653: * @ENCA_CHARSET_FIXED: One characters consists of one fundamental piece.
-: 654: * @ENCA_CHARSET_VARIABLE: One character consists of variable number of
-: 655: * fundamental pieces.
-: 656: * @ENCA_CHARSET_BINARY: Charset is binary from ASCII viewpoint.
-: 657: * @ENCA_CHARSET_REGULAR: Language dependent (8bit) charset.
-: 658: * @ENCA_CHARSET_MULTIBYTE: Multibyte charset.
-: 659: *
-: 660: * Charset properties.
-: 661: *
-: 662: * Flags %ENCA_CHARSET_7BIT, %ENCA_CHARSET_8BIT, %ENCA_CHARSET_16BIT,
-: 663: * %ENCA_CHARSET_32BIT tell how many bits a `fundamental piece' consists of.
-: 664: * This is different from bits per character; r.g. UTF-8 consists of 8bit
-: 665: * pieces (bytes), but character can be composed from 1 to 6 of them.
-: 666: **/
-: 667:
-: 668:/**
-: 669: * ENCA_CS_UNKNOWN:
-: 670: *
-: 671: * Unknown character set id.
-: 672: *
-: 673: * Use enca_charset_is_known() to check for unknown charset instead of direct
-: 674: * comparsion.
-: 675: **/
-: 676:
-: 677:/**
-: 678: * EncaEncoding:
-: 679: * @charset: Numeric charset identifier.
-: 680: * @surface: Surface flags.
-: 681: *
-: 682: * Encoding, i.e. charset and surface.
-: 683: *
-: 684: * This is what enca_analyse() and enca_analyse_const() return.
-: 685: *
-: 686: * The @charset field is an opaque numerical charset identifier, which has no
-: 687: * meaning outside Enca library.
-: 688: * You will probably want to use it only as enca_charset_name() argument.
-: 689: * It is only guaranteed not to change meaning
-: 690: * during program execution time; change of its interpretation (e.g. due to
-: 691: * addition of new charsets) is not considered API change.
-: 692: *
-: 693: * The @surface field is a combination of #EncaSurface flags. You may want
-: 694: * to ignore it completely; you should use enca_set_interpreted_surfaces()
-: 695: * to disable weird surfaces then.
-: 696: **/
-: 697:
-: 698:/**
-: 699: * enca_charset_is_known:
-: 700: * @cs: Charset id.
-: 701: *
-: 702: * Expands to nonzero when the charset is known (i.e. it's not
-: 703: * ENCA_CS_UNKNOWN).
-: 704: **/
-: 705:
-: 706:/**
-: 707: * enca_charset_is_7bit:
-: 708: * @cs: Charset id.
-: 709: *
-: 710: * Expands to nonzero when characters are represented with 7bit characters.
-: 711: **/
-: 712:
-: 713:/**
-: 714: * enca_charset_is_8bit:
-: 715: * @cs: Charset id.
-: 716: *
-: 717: * Expands to nonzero when characters are represented with bytes.
-: 718: **/
-: 719:
-: 720:/**
-: 721: * enca_charset_is_16bit:
-: 722: * @cs: Charset id.
-: 723: *
-: 724: * Expands to nonzero when characters are represented with 2byte words.
-: 725: **/
-: 726:
-: 727:/**
-: 728: * enca_charset_is_32bit:
-: 729: * @cs: Charset id.
-: 730: *
-: 731: * Expands to nonzero when characters are represented with 4byte words.
-: 732: **/
-: 733:
-: 734:/**
-: 735: * enca_charset_is_fixed:
-: 736: * @cs: Charset id.
-: 737: *
-: 738: * Expands to nonzero when one characters consists of one fundamental piece.
-: 739: **/
-: 740:
-: 741:/**
-: 742: * enca_charset_is_variable:
-: 743: * @cs: Charset id.
-: 744: *
-: 745: * Expands to nonzero when one character consists of variable number of
-: 746: * fundamental pieces.
-: 747: **/
-: 748:
-: 749:/**
-: 750: * enca_charset_is_binary:
-: 751: * @cs: Charset id.
-: 752: *
-: 753: * Expands to nonzero when charset is binary from ASCII viewpoint.
-: 754: **/
-: 755:
-: 756:/**
-: 757: * enca_charset_is_regular:
-: 758: * @cs: Charset id.
-: 759: *
-: 760: * Expands to nonzero when charset is language dependent (8bit) charset.
-: 761: **/
-: 762:
-: 763:/**
-: 764: * enca_charset_is_multibyte:
-: 765: * @cs: Charset id.
-: 766: *
-: 767: * Expands to nonzero when charset is multibyte.
-: 768: **/
-: 769:
-: 770:/* vim: ts=2 sw=2 et
-: 771: */
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lib/.libs/lang_hr.c.gcov
-: 0:Source:lang_hr.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_hr.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_hr.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*
-: 2: encoding data and routines dependent on language; croatian
-: 3:
-: 4: Copyright (C) 2003 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#ifdef HAVE_CONFIG_H
-: 20:# include "config.h"
-: 21:#endif /* HAVE_CONFIG_H */
-: 22:
-: 23:#include "enca.h"
-: 24:#include "internal.h"
-: 25:#include "data/croatian/croatian.h"
-: 26:
-: 27:/* Local prototypes. */
-: 28:static int hook(EncaAnalyserState *analyser);
-: 29:static int eol_hook(EncaAnalyserState *analyser);
-: 30:static int hook_iso1250(EncaAnalyserState *analyser);
-: 31:static int hook_isowin(EncaAnalyserState *analyser);
-: 32:
-: 33:/**
-: 34: * ENCA_LANGUAGE_HR:
-: 35: *
-: 36: * Croatian language.
-: 37: *
-: 38: * Everything the world out there needs to know about this language.
-: 39: **/
-: 40:const EncaLanguageInfo ENCA_LANGUAGE_HR = {
-: 41: "hr",
-: 42: "croatian",
-: 43: NCHARSETS,
-: 44: CHARSET_NAMES,
-: 45: CHARSET_WEIGHTS,
-: 46: SIGNIFICANT,
-: 47: CHARSET_LETTERS,
-: 48: CHARSET_PAIRS,
-: 49: WEIGHT_SUM,
-: 50: &hook,
-: 51: &eol_hook,
-: 52: NULL,
-: 53: NULL
-: 54:};
-: 55:
-: 56:/**
-: 57: * hook:
-: 58: * @analyser: Analyser state whose charset ratings are to be modified.
-: 59: *
-: 60: * Launches language specific hooks for language "hr".
-: 61: *
-: 62: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 63: * otherwise.
-: 64: **/
-: 65:static int
21: 66:hook(EncaAnalyserState *analyser)
-: 67:{
21: 68: return hook_iso1250(analyser);
-: 69:}
-: 70:
-: 71:/**
-: 72: * eol_hook:
-: 73: * @analyser: Analyser state whose charset ratings are to be modified.
-: 74: *
-: 75: * Launches language specific EOL hooks for language "hr".
-: 76: *
-: 77: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 78: * otherwise.
-: 79: **/
-: 80:static int
#####: 81:eol_hook(EncaAnalyserState *analyser)
-: 82:{
#####: 83: return hook_isowin(analyser);
-: 84:}
-: 85:
-: 86:/**
-: 87: * hook_isowin:
-: 88: * @analyser: Analyser state whose charset ratings are to be modified.
-: 89: *
-: 90: * Decides between iso8859-2 and cp1250 charsets for language "hr".
-: 91: *
-: 92: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 93: * otherwise.
-: 94: **/
-: 95:static int
-: 96:hook_isowin(EncaAnalyserState *analyser)
-: 97:{
-: 98: static EncaLanguageHookDataEOL hookdata[] = {
-: 99: { "cp1250", ENCA_SURFACE_EOL_CRLF, (size_t)-1 },
-: 100: { "iso88592", ENCA_SURFACE_MASK_EOL, (size_t)-1 },
-: 101: };
-: 102:
#####: 103: return enca_language_hook_eol(analyser, ELEMENTS(hookdata), hookdata);
-: 104:}
-: 105:
-: 106:/**
-: 107: * hook_iso1250:
-: 108: * @analyser: Analyser state whose charset ratings are to be modified.
-: 109: *
-: 110: * Decides between iso8859-2 and cp1250 charsets for language "hr".
-: 111: *
-: 112: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 113: * otherwise.
-: 114: **/
-: 115:static int
-: 116:hook_iso1250(EncaAnalyserState *analyser)
-: 117:{
-: 118: static const unsigned char list_iso88592[] = {
-: 119: 0xb9, 0xbe, 0xa9, 0xae
-: 120: };
-: 121: static const unsigned char list_cp1250[] = {
-: 122: 0x9a, 0x9e, 0x8a, 0x8e
-: 123: };
-: 124: static EncaLanguageHookData1CS hookdata[] = {
-: 125: MAKE_HOOK_LINE(iso88592),
-: 126: MAKE_HOOK_LINE(cp1250),
-: 127: };
-: 128:
21: 129: return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata);
-: 130:}
-: 131:
-: 132:/* vim: ts=2
-: 133: */
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lib/.libs/unicodemap.c.gcov
-: 0:Source:unicodemap.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/unicodemap.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/unicodemap.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*
-: 2: unicode (i.e. ucs-2) data and conversion table managment
-: 3:
-: 4: Copyright (C) 2000-2003 David Necas (Yeti)
-: 5: Unicode data in this module come from various free on-line resources.
-: 6:
-: 7: This program is free software; you can redistribute it and/or modify it
-: 8: under the terms of version 2 of the GNU General Public License as published
-: 9: by the Free Software Foundation.
-: 10:
-: 11: This program is distributed in the hope that it will be useful, but WITHOUT
-: 12: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 13: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 14: more details.
-: 15:
-: 16: You should have received a copy of the GNU General Public License along
-: 17: with this program; if not, write to the Free Software Foundation, Inc.,
-: 18: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 19:*/
-: 20:#ifdef HAVE_CONFIG_H
-: 21:# include "config.h"
-: 22:#endif /* HAVE_CONFIG_H */
-: 23:
-: 24:#include "enca.h"
-: 25:#include "internal.h"
-: 26:
-: 27:/**
-: 28: * NO_CHR:
-: 29: *
-: 30: * Alias for ENCA_NOT_A_CHAR, which lines up with 0xabcd.
-: 31: **/
-: 32:#define NO_CHR ENCA_NOT_A_CHAR
-: 33:
-: 34:/**
-: 35: * EncaUnicodeMap:
-: 36: * @name: Charset name (any, Enca's is best).
-: 37: * @tstart: Table start, character codes less than tstart maps to themselves.
-: 38: * @map: The map itself.
-: 39: *
-: 40: * 8bit charset -> Unicode mapping.
-: 41: **/
-: 42:struct _EncaUnicodeMap {
-: 43: const char *name;
-: 44: size_t tstart;
-: 45: const unsigned short int *map;
-: 46:};
-: 47:
-: 48:typedef struct _EncaUnicodeMap EncaUnicodeMap;
-: 49:
-: 50:/* Local prototypes. */
-: 51:static const EncaUnicodeMap* find_charset_map(int charset);
-: 52:
-: 53:/* ISO-8859-2 */
-: 54:static const unsigned short int unicode_map_iso88592[] = {
-: 55: 0x00a0, 0x0104, 0x02d8, 0x0141, 0x00a4, 0x013d, 0x015a, 0x00a7, /* 0xa0 */
-: 56: 0x00a8, 0x0160, 0x015e, 0x0164, 0x0179, 0x00ad, 0x017d, 0x017b, /* 0xa8 */
-: 57: 0x00b0, 0x0105, 0x02db, 0x0142, 0x00b4, 0x013e, 0x015b, 0x02c7, /* 0xb0 */
-: 58: 0x00b8, 0x0161, 0x015f, 0x0165, 0x017a, 0x02dd, 0x017e, 0x017c, /* 0xb8 */
-: 59: 0x0154, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0139, 0x0106, 0x00c7, /* 0xc0 */
-: 60: 0x010c, 0x00c9, 0x0118, 0x00cb, 0x011a, 0x00cd, 0x00ce, 0x010e, /* 0xc8 */
-: 61: 0x0110, 0x0143, 0x0147, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x00d7, /* 0xd0 */
-: 62: 0x0158, 0x016e, 0x00da, 0x0170, 0x00dc, 0x00dd, 0x0162, 0x00df, /* 0xd8 */
-: 63: 0x0155, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x013a, 0x0107, 0x00e7, /* 0xe0 */
-: 64: 0x010d, 0x00e9, 0x0119, 0x00eb, 0x011b, 0x00ed, 0x00ee, 0x010f, /* 0xe8 */
-: 65: 0x0111, 0x0144, 0x0148, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x00f7, /* 0xf0 */
-: 66: 0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9 /* 0xf8 */
-: 67:};
-: 68:
-: 69:/* ISO-8859-4 */
-: 70:static const unsigned short int unicode_map_iso88594[] = {
-: 71: 0x00a0, 0x0104, 0x0138, 0x0156, 0x00a4, 0x0128, 0x013b, 0x00a7, /* 0xa0 */
-: 72: 0x00a8, 0x0160, 0x0112, 0x0122, 0x0166, 0x00ad, 0x017d, 0x00af, /* 0xa8 */
-: 73: 0x00b0, 0x0105, 0x02db, 0x0157, 0x00b4, 0x0129, 0x013c, 0x02c7, /* 0xb0 */
-: 74: 0x00b8, 0x0161, 0x0113, 0x0123, 0x0167, 0x014a, 0x017e, 0x014b, /* 0xb8 */
-: 75: 0x0100, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x012e, /* 0xc0 */
-: 76: 0x010c, 0x00c9, 0x0118, 0x00cb, 0x0116, 0x00cd, 0x00ce, 0x012a, /* 0xc8 */
-: 77: 0x0110, 0x0145, 0x014c, 0x0136, 0x00d4, 0x00d5, 0x00d6, 0x00d7, /* 0xd0 */
-: 78: 0x00d8, 0x0172, 0x00da, 0x00db, 0x00dc, 0x0168, 0x016a, 0x00df, /* 0xd8 */
-: 79: 0x0101, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x012f, /* 0xe0 */
-: 80: 0x010d, 0x00e9, 0x0119, 0x00eb, 0x0117, 0x00ed, 0x00ee, 0x012b, /* 0xe8 */
-: 81: 0x0111, 0x0146, 0x014d, 0x0137, 0x00f4, 0x00f5, 0x00f6, 0x00f7, /* 0xf0 */
-: 82: 0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x0169, 0x016b, 0x02d9, /* 0xf8 */
-: 83:};
-: 84:
-: 85:/* ISO-8859-5 */
-: 86:static const unsigned short int unicode_map_iso88595[] = {
-: 87: 0x00a0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, /* 0xa0 */
-: 88: 0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x00ad, 0x040e, 0x040f, /* 0xa8 */
-: 89: 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, /* 0xb0 */
-: 90: 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, /* 0xb8 */
-: 91: 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, /* 0xc0 */
-: 92: 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, /* 0xc8 */
-: 93: 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, /* 0xd0 */
-: 94: 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, /* 0xd8 */
-: 95: 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, /* 0xe0 */
-: 96: 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f, /* 0xe8 */
-: 97: 0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, /* 0xf0 */
-: 98: 0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x00a7, 0x045e, 0x045f, /* 0xf8 */
-: 99:};
-: 100:
-: 101:/* ISO-8859-13 */
-: 102:static const unsigned short int unicode_map_iso885913[] = {
-: 103: 0x00a0, 0x201d, 0x00a2, 0x00a3, 0x00a4, 0x201e, 0x00a6, 0x00a7, /* 0xa0 */
-: 104: 0x00d8, 0x00a9, 0x0156, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00c6, /* 0xa8 */
-: 105: 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x201c, 0x00b5, 0x00b6, 0x00b7, /* 0xb0 */
-: 106: 0x00f8, 0x00b9, 0x0157, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00e6, /* 0xb8 */
-: 107: 0x0104, 0x012e, 0x0100, 0x0106, 0x00c4, 0x00c5, 0x0118, 0x0112, /* 0xc0 */
-: 108: 0x010c, 0x00c9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012a, 0x013b, /* 0xc8 */
-: 109: 0x0160, 0x0143, 0x0145, 0x00d3, 0x014c, 0x00d5, 0x00d6, 0x00d7, /* 0xd0 */
-: 110: 0x0172, 0x0141, 0x015a, 0x016a, 0x00dc, 0x017b, 0x017d, 0x00df, /* 0xd8 */
-: 111: 0x0105, 0x012f, 0x0101, 0x0107, 0x00e4, 0x00e5, 0x0119, 0x0113, /* 0xe0 */
-: 112: 0x010d, 0x00e9, 0x017a, 0x0117, 0x0123, 0x0137, 0x012b, 0x013c, /* 0xe8 */
-: 113: 0x0161, 0x0144, 0x0146, 0x00f3, 0x014d, 0x00f5, 0x00f6, 0x00f7, /* 0xf0 */
-: 114: 0x0173, 0x0142, 0x015b, 0x016b, 0x00fc, 0x017c, 0x017e, 0x2019, /* 0xf8 */
-: 115:};
-: 116:
-: 117:/* ISO-8859-16 */
-: 118:static const unsigned short int unicode_map_iso885916[] = {
-: 119: 0x00a0, 0x0104, 0x0105, 0x0141, 0x20ac, 0x00ab, 0x0160, 0x00a7, /* 0xa0 */
-: 120: 0x0161, 0x00a9, 0x0218, 0x201e, 0x0179, 0x00ad, 0x017a, 0x017b, /* 0xa8 */
-: 121: 0x00b0, 0x00b1, 0x010c, 0x0142, 0x017d, 0x201d, 0x00b6, 0x00b7, /* 0xb0 */
-: 122: 0x017e, 0x010d, 0x0219, 0x00bb, 0x0152, 0x0153, 0x0178, 0x017c, /* 0xb8 */
-: 123: 0x00c0, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0106, 0x00c6, 0x00c7, /* 0xc0 */
-: 124: 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, /* 0xc8 */
-: 125: 0x0110, 0x0143, 0x00d2, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x015a, /* 0xd0 */
-: 126: 0x0170, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0118, 0x021a, 0x00df, /* 0xd8 */
-: 127: 0x00e0, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x0107, 0x00e6, 0x00e7, /* 0xe0 */
-: 128: 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, /* 0xe8 */
-: 129: 0x0111, 0x0144, 0x00f2, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x015b, /* 0xf0 */
-: 130: 0x0171, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0119, 0x021b, 0x00ff, /* 0xf8 */
-: 131:};
-: 132:
-: 133:/* Windows 1125 */
-: 134:static const unsigned short int unicode_map_cp1125[] = {
-: 135: 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, /* 0x80 */
-: 136: 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, /* 0x88 */
-: 137: 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, /* 0x90 */
-: 138: 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, /* 0x98 */
-: 139: 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, /* 0xa0 */
-: 140: 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, /* 0xa8 */
-: 141: 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, /* 0xb0 */
-: 142: 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, /* 0xb8 */
-: 143: 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, /* 0xc0 */
-: 144: 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, /* 0xc8 */
-: 145: 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, /* 0xd0 */
-: 146: 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, /* 0xd8 */
-: 147: 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, /* 0xe0 */
-: 148: 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f, /* 0xe8 */
-: 149: 0x0401, 0x0451, 0x0490, 0x0491, 0x0404, 0x0454, 0x0406, 0x0456, /* 0xf0 */
-: 150: 0x0407, 0x0457, 0x00b7, 0x221a, 0x2116, 0x00a4, 0x25a0, 0x00a0, /* 0xf8 */
-: 151:};
-: 152:
-: 153:/* Windows 1250 */
-: 154:static const unsigned short int unicode_map_cp1250[] = {
-: 155: NO_CHR, NO_CHR, 0x201a, NO_CHR, 0x201e, 0x2026, 0x2020, 0x2021, /* 0x80 */
-: 156: NO_CHR, 0x2030, 0x0160, 0x2039, 0x015a, 0x0164, 0x017d, 0x0179, /* 0x88 */
-: 157: NO_CHR, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, /* 0x90 */
-: 158: NO_CHR, 0x2122, 0x0161, 0x203a, 0x015b, 0x0165, 0x017e, 0x017a, /* 0x98 */
-: 159: 0x00a0, 0x02c7, 0x02d8, 0x0141, 0x00a4, 0x0104, 0x00a6, 0x00a7, /* 0xa0 */
-: 160: 0x00a8, 0x00a9, 0x015e, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x017b, /* 0xa8 */
-: 161: 0x00b0, 0x00b1, 0x02db, 0x0142, 0x00b4, 0x00b5, 0x00b6, 0x00b7, /* 0xb0 */
-: 162: 0x00b8, 0x0105, 0x015f, 0x00bb, 0x013d, 0x02dd, 0x013e, 0x017c, /* 0xb8 */
-: 163: 0x0154, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0139, 0x0106, 0x00c7, /* 0xc0 */
-: 164: 0x010c, 0x00c9, 0x0118, 0x00cb, 0x011a, 0x00cd, 0x00ce, 0x010e, /* 0xc8 */
-: 165: 0x0110, 0x0143, 0x0147, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x00d7, /* 0xd0 */
-: 166: 0x0158, 0x016e, 0x00da, 0x0170, 0x00dc, 0x00dd, 0x0162, 0x00df, /* 0xd8 */
-: 167: 0x0155, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x013a, 0x0107, 0x00e7, /* 0xe0 */
-: 168: 0x010d, 0x00e9, 0x0119, 0x00eb, 0x011b, 0x00ed, 0x00ee, 0x010f, /* 0xe8 */
-: 169: 0x0111, 0x0144, 0x0148, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x00f7, /* 0xf0 */
-: 170: 0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9, /* 0xf8 */
-: 171:};
-: 172:
-: 173:/* Windows 1251 */
-: 174:static const unsigned short int unicode_map_cp1251[] = {
-: 175: 0x0402, 0x0403, 0x201a, 0x0453, 0x201e, 0x2026, 0x2020, 0x2021, /* 0x80 */
-: 176: 0x20ac, 0x2030, 0x0409, 0x2039, 0x040a, 0x040c, 0x040b, 0x040f, /* 0x88 */
-: 177: 0x0452, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, /* 0x90 */
-: 178: NO_CHR, 0x2122, 0x0459, 0x203a, 0x045a, 0x045c, 0x045b, 0x045f, /* 0x98 */
-: 179: 0x00a0, 0x040e, 0x045e, 0x0408, 0x00a4, 0x0490, 0x00a6, 0x00a7, /* 0xa0 */
-: 180: 0x0401, 0x00a9, 0x0404, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x0407, /* 0xa8 */
-: 181: 0x00b0, 0x00b1, 0x0406, 0x0456, 0x0491, 0x00b5, 0x00b6, 0x00b7, /* 0xb0 */
-: 182: 0x0451, 0x2116, 0x0454, 0x00bb, 0x0458, 0x0405, 0x0455, 0x0457, /* 0xb8 */
-: 183: 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, /* 0xc0 */
-: 184: 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, /* 0xc8 */
-: 185: 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, /* 0xd0 */
-: 186: 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, /* 0xd8 */
-: 187: 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, /* 0xe0 */
-: 188: 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, /* 0xe8 */
-: 189: 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, /* 0xf0 */
-: 190: 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f, /* 0xf8 */
-: 191:};
-: 192:
-: 193:/* Windows 1257 */
-: 194:static const unsigned short int unicode_map_cp1257[] = {
-: 195: 0x20ac, NO_CHR, 0x201a, NO_CHR, 0x201e, 0x2026, 0x2020, 0x2021, /* 0x80 */
-: 196: NO_CHR, 0x2030, NO_CHR, 0x2039, NO_CHR, NO_CHR, NO_CHR, NO_CHR, /* 0x88 */
-: 197: NO_CHR, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, /* 0x90 */
-: 198: NO_CHR, 0x2122, NO_CHR, 0x203a, NO_CHR, NO_CHR, NO_CHR, NO_CHR, /* 0x98 */
-: 199: 0x00a0, NO_CHR, 0x00a2, 0x00a3, 0x00a4, NO_CHR, 0x00a6, 0x00a7, /* 0xa0 */
-: 200: 0x00d8, 0x00a9, 0x0156, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00c6, /* 0xa8 */
-: 201: 0x00b0, 0x00b1, 0x00b2, 0x00b3, NO_CHR, 0x00b5, 0x00b6, 0x00b7, /* 0xb0 */
-: 202: 0x00f8, 0x00b9, 0x0157, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00e6, /* 0xb8 */
-: 203: 0x0104, 0x012e, 0x0100, 0x0106, 0x00c4, 0x00c5, 0x0118, 0x0112, /* 0xc0 */
-: 204: 0x010c, 0x00c9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012a, 0x013b, /* 0xc8 */
-: 205: 0x0160, 0x0143, 0x0145, 0x00d3, 0x014c, 0x00d5, 0x00d6, 0x00d7, /* 0xd0 */
-: 206: 0x0172, 0x0141, 0x015a, 0x016a, 0x00dc, 0x017b, 0x017d, 0x00df, /* 0xd8 */
-: 207: 0x0105, 0x012f, 0x0101, 0x0107, 0x00e4, 0x00e5, 0x0119, 0x0113, /* 0xe0 */
-: 208: 0x010d, 0x00e9, 0x017a, 0x0117, 0x0123, 0x0137, 0x012b, 0x013c, /* 0xe8 */
-: 209: 0x0161, 0x0144, 0x0146, 0x00f3, 0x014d, 0x00f5, 0x00f6, 0x00f7, /* 0xf0 */
-: 210: 0x0173, 0x0142, 0x015b, 0x016b, 0x00fc, 0x017c, 0x017e, NO_CHR, /* 0xf8 */
-: 211:};
-: 212:
-: 213:/* IBM 852 */
-: 214:static const unsigned short int unicode_map_ibm852[] = {
-: 215: 0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x016f, 0x0107, 0x00e7, /* 0x80 */
-: 216: 0x0142, 0x00eb, 0x0150, 0x0151, 0x00ee, 0x0179, 0x00c4, 0x0106, /* 0x88 */
-: 217: 0x00c9, 0x0139, 0x013a, 0x00f4, 0x00f6, 0x013d, 0x013e, 0x015a, /* 0x90 */
-: 218: 0x015b, 0x00d6, 0x00dc, 0x0164, 0x0165, 0x0141, 0x00d7, 0x010d, /* 0x98 */
-: 219: 0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x0104, 0x0105, 0x017d, 0x017e, /* 0xa0 */
-: 220: 0x0118, 0x0119, 0x00ac, 0x017a, 0x010c, 0x015f, 0x00ab, 0x00bb, /* 0xa8 */
-: 221: 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00c1, 0x00c2, 0x011a, /* 0xb0 */
-: 222: 0x015e, 0x2563, 0x2551, 0x2557, 0x255d, 0x017b, 0x017c, 0x2510, /* 0xb8 */
-: 223: 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x0102, 0x0103, /* 0xc0 */
-: 224: 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x00a4, /* 0xc8 */
-: 225: 0x0111, 0x0110, 0x010e, 0x00cb, 0x010f, 0x0147, 0x00cd, 0x00ce, /* 0xd0 */
-: 226: 0x011b, 0x2518, 0x250c, 0x2588, 0x2584, 0x0162, 0x016e, 0x2580, /* 0xd8 */
-: 227: 0x00d3, 0x00df, 0x00d4, 0x0143, 0x0144, 0x0148, 0x0160, 0x0161, /* 0xe0 */
-: 228: 0x0154, 0x00da, 0x0155, 0x0170, 0x00fd, 0x00dd, 0x0163, 0x00b4, /* 0xe8 */
-: 229: 0x00ad, 0x02dd, 0x02db, 0x02c7, 0x02d8, 0x00a7, 0x00f7, 0x00b8, /* 0xf0 */
-: 230: 0x00b0, 0x00a8, 0x02d9, 0x0171, 0x0158, 0x0159, 0x25a0, 0x00a0, /* 0xf8 */
-: 231:};
-: 232:
-: 233:/* IBM 855 */
-: 234:static const unsigned short int unicode_map_ibm855[] = {
-: 235: 0x0452, 0x0402, 0x0453, 0x0403, 0x0451, 0x0401, 0x0454, 0x0404, /* 0x80 */
-: 236: 0x0455, 0x0405, 0x0456, 0x0406, 0x0457, 0x0407, 0x0458, 0x0408, /* 0x88 */
-: 237: 0x0459, 0x0409, 0x045a, 0x040a, 0x045b, 0x0093, 0x045c, 0x040c, /* 0x90 */
-: 238: 0x045e, 0x040e, 0x045f, 0x040f, 0x044e, 0x042e, 0x044a, 0x042a, /* 0x98 */
-: 239: 0x0430, 0x0410, 0x0431, 0x0411, 0x0446, 0x0426, 0x0434, 0x0414, /* 0xa0 */
-: 240: 0x0435, 0x0415, 0x0444, 0x0424, 0x0433, 0x0413, 0x00ab, 0x00bb, /* 0xa8 */
-: 241: 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x0445, 0x0425, 0x0438, /* 0xb0 */
-: 242: 0x0418, 0x2563, 0x2551, 0x2557, 0x255d, 0x0439, 0x0419, 0x2510, /* 0xb8 */
-: 243: 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x043a, 0x041a, /* 0xc0 */
-: 244: 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x00a4, /* 0xc8 */
-: 245: 0x043b, 0x041b, 0x043c, 0x041c, 0x043d, 0x041d, 0x043e, 0x041e, /* 0xd0 */
-: 246: 0x043f, 0x2518, 0x250c, 0x2588, 0x2584, 0x041f, 0x044f, 0x2580, /* 0xd8 */
-: 247: 0x042f, 0x0440, 0x0420, 0x0441, 0x0421, 0x0442, 0x0422, 0x0443, /* 0xe0 */
-: 248: 0x0423, 0x0436, 0x0416, 0x0432, 0x0412, 0x044c, 0x042c, 0x00b4, /* 0xe8 */
-: 249: 0x00ad, 0x044b, 0x042b, 0x0437, 0x0417, 0x0448, 0x0428, 0x044d, /* 0xf0 */
-: 250: 0x042d, 0x0449, 0x0429, 0x0447, 0x0427, NO_CHR, 0x25a0, 0x00a0, /* 0xf8 */
-: 251:};
-: 252:
-: 253:/* IBM 775 */
-: 254:static const unsigned short int unicode_map_ibm775[] = {
-: 255: 0x0106, 0x00fc, 0x00e9, 0x0101, 0x00e4, 0x0123, 0x00e5, 0x0107, /* 0x80 */
-: 256: 0x0142, 0x0113, 0x0156, 0x0157, 0x012b, 0x0179, 0x00c4, 0x00c5, /* 0x88 */
-: 257: 0x00c9, 0x00e6, 0x00c6, 0x014d, 0x00f6, 0x0122, 0x00a2, 0x015a, /* 0x90 */
-: 258: 0x015b, 0x00d6, 0x00dc, 0x00f8, 0x00a3, 0x00d8, 0x00d7, 0x00a4, /* 0x98 */
-: 259: 0x0100, 0x012a, 0x00f3, 0x017b, 0x017c, 0x017a, 0x201d, 0x00a6, /* 0xa0 */
-: 260: 0x00a9, 0x00ae, 0x00ac, 0x00bd, 0x00bc, 0x0141, 0x00ab, 0x00bb, /* 0xa8 */
-: 261: 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x0104, 0x010c, 0x0118, /* 0xb0 */
-: 262: 0x0116, 0x2563, 0x2551, 0x2557, 0x255d, 0x012e, 0x0160, 0x2510, /* 0xb8 */
-: 263: 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x0172, 0x016a, /* 0xc0 */
-: 264: 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x017d, /* 0xc8 */
-: 265: 0x0105, 0x010d, 0x0119, 0x0117, 0x012f, 0x0161, 0x0173, 0x016b, /* 0xd0 */
-: 266: 0x017e, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, /* 0xd8 */
-: 267: 0x00d3, 0x00df, 0x014c, 0x0143, 0x00f5, 0x00d5, 0x00b5, 0x0144, /* 0xe0 */
-: 268: 0x0136, 0x0137, 0x013b, 0x013c, 0x0146, 0x0112, 0x0145, 0x2019, /* 0xe8 */
-: 269: 0x00ad, 0x00b1, 0x201c, 0x00be, 0x00b6, 0x00a7, 0x00f7, 0x201e, /* 0xf0 */
-: 270: 0x00b0, 0x2219, 0x00b7, 0x00b9, 0x00b3, 0x00b2, 0x25a0, 0x00a0, /* 0xf8 */
-: 271:};
-: 272:
-: 273:/* IBM 866 */
-: 274:static const unsigned short int unicode_map_ibm866[] = {
-: 275: 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, /* 0x80 */
-: 276: 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, /* 0x88 */
-: 277: 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, /* 0x90 */
-: 278: 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, /* 0x98 */
-: 279: 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, /* 0xa0 */
-: 280: 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, /* 0xa8 */
-: 281: 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, /* 0xb0 */
-: 282: 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, /* 0xb8 */
-: 283: 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, /* 0xc0 */
-: 284: 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, /* 0xc8 */
-: 285: 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, /* 0xd0 */
-: 286: 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, /* 0xd8 */
-: 287: 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, /* 0xe0 */
-: 288: 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f, /* 0xe8 */
-: 289: 0x0401, 0x0451, 0x0404, 0x0454, 0x0407, 0x0457, 0x040e, 0x045e, /* 0xf0 */
-: 290: 0x00b0, 0x2219, 0x00b7, 0x221a, 0x2116, 0x00a4, 0x25a0, 0x00a0, /* 0xf8 */
-: 291:};
-: 292:
-: 293:/* Baltic */
-: 294:static const unsigned short int unicode_map_baltic[] = {
-: 295: 0x00a0, 0x201d, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, /* 0xa0 */
-: 296: 0x00d8, 0x00a9, 0x201e, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00c6, /* 0xa8 */
-: 297: 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, /* 0xb0 */
-: 298: 0x00f8, 0x00b9, 0x201c, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00e6, /* 0xb8 */
-: 299: 0x012e, 0x0116, 0x0100, 0x0106, 0x00c4, 0x00c5, 0x0104, 0x010c, /* 0xc0 */
-: 300: 0x0122, 0x00c9, 0x017d, 0x0118, 0x0112, 0x0136, 0x012a, 0x013b, /* 0xc8 */
-: 301: 0x0141, 0x0145, 0x0143, 0x00d3, 0x014c, 0x00d5, 0x00d6, 0x00d7, /* 0xd0 */
-: 302: 0x0172, 0x0160, 0x015a, 0x016a, 0x00dc, 0x017b, 0x0179, 0x00df, /* 0xd8 */
-: 303: 0x012f, 0x0117, 0x0101, 0x0107, 0x00e4, 0x00e5, 0x0105, 0x010d, /* 0xe0 */
-: 304: 0x0123, 0x00e9, 0x017e, 0x0119, 0x0113, 0x0137, 0x012b, 0x013c, /* 0xe8 */
-: 305: 0x0142, 0x0146, 0x0144, 0x00f3, 0x014d, 0x00f5, 0x00f6, 0x00f7, /* 0xf0 */
-: 306: 0x0173, 0x0161, 0x015b, 0x016b, 0x00fc, 0x017c, 0x017a, 0x0138, /* 0xf8 */
-: 307:};
-: 308:
-: 309:/* Kamenicky */
-: 310:static const unsigned short int unicode_map_keybcs2[] = {
-: 311: 0x010c, 0x00fc, 0x00e9, 0x010f, 0x00e4, 0x010e, 0x0164, 0x010d, /* 0x80 */
-: 312: 0x011b, 0x011a, 0x0139, 0x00cd, 0x013e, 0x013a, 0x00c4, 0x00c1, /* 0x88 */
-: 313: 0x00c9, 0x017e, 0x017d, 0x00f4, 0x00f6, 0x00d3, 0x016f, 0x00da, /* 0x90 */
-: 314: 0x00fd, 0x00d6, 0x00dc, 0x0160, 0x013d, 0x00dd, 0x0158, 0x0165, /* 0x98 */
-: 315: 0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x0148, 0x0147, 0x016e, 0x00d4, /* 0xa0 */
-: 316: 0x0161, 0x0159, 0x0155, 0x0154, 0x00bc, 0x00a7, 0x00ab, 0x00bb, /* 0xa8 */
-: 317: 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, /* 0xb0 */
-: 318: 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, /* 0xb8 */
-: 319: 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, /* 0xc0 */
-: 320: 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, /* 0xc8 */
-: 321: 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, /* 0xd0 */
-: 322: 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, /* 0xd8 */
-: 323: 0x03b1, 0x03b2, 0x0393, 0x03c0, 0x03a3, 0x03c3, 0x03bc, 0x03c4, /* 0xe0 */
-: 324: 0x03a6, 0x0398, 0x03a9, 0x03b4, 0x221e, 0x2205, 0x03b5, 0x2229, /* 0xe8 */
-: 325: 0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248, /* 0xf0 */
-: 326: 0x00b0, 0x00b7, 0x02d9, 0x221a, 0x207f, 0x00b2, 0x25a0, 0x00a0, /* 0xf8 */
-: 327:};
-: 328:
-: 329:/* Macintosh CE */
-: 330:static const unsigned short int unicode_map_macce[] = {
-: 331: 0x00c4, 0x0100, 0x0101, 0x00c9, 0x0104, 0x00d6, 0x00dc, 0x00e1, /* 0x80 */
-: 332: 0x0105, 0x010c, 0x00e4, 0x010d, 0x0106, 0x0107, 0x00e9, 0x0179, /* 0x88 */
-: 333: 0x017a, 0x010e, 0x00ed, 0x010f, 0x0112, 0x0113, 0x0116, 0x00f3, /* 0x90 */
-: 334: 0x0117, 0x00f4, 0x00f6, 0x00f5, 0x00fa, 0x011a, 0x011b, 0x00fc, /* 0x98 */
-: 335: 0x2020, 0x00b0, 0x0118, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x00df, /* 0xa0 */
-: 336: 0x00ae, 0x00a9, 0x2122, 0x0119, 0x00a8, 0x2260, 0x0123, 0x012e, /* 0xa8 */
-: 337: 0x012f, 0x012a, 0x2264, 0x2265, 0x012b, 0x0136, 0x2202, 0x2211, /* 0xb0 */
-: 338: 0x0142, 0x013b, 0x013c, 0x013d, 0x013e, 0x0139, 0x013a, 0x0145, /* 0xb8 */
-: 339: 0x0146, 0x0143, 0x00ac, 0x221a, 0x0144, 0x0147, 0x2206, 0x00ab, /* 0xc0 */
-: 340: 0x00bb, 0x2026, 0x00a0, 0x0148, 0x0150, 0x00d5, 0x0151, 0x014c, /* 0xc8 */
-: 341: 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x25ca, /* 0xd0 */
-: 342: 0x014d, 0x0154, 0x0155, 0x0158, 0x2039, 0x203a, 0x0159, 0x0156, /* 0xd8 */
-: 343: 0x0157, 0x0160, 0x201a, 0x201e, 0x0161, 0x015a, 0x015b, 0x00c1, /* 0xe0 */
-: 344: 0x0164, 0x0165, 0x00cd, 0x017d, 0x017e, 0x016a, 0x00d3, 0x00d4, /* 0xe8 */
-: 345: 0x016b, 0x016e, 0x00da, 0x016f, 0x0170, 0x0171, 0x0172, 0x0173, /* 0xf0 */
-: 346: 0x00dd, 0x00fd, 0x0137, 0x017b, 0x0141, 0x017c, 0x0122, 0x02c7, /* 0xf8 */
-: 347:};
-: 348:
-: 349:/* Macintosh Cyrillic */
-: 350:static const unsigned short int unicode_map_maccyr[] = {
-: 351: 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, /* 0x80 */
-: 352: 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, /* 0x88 */
-: 353: 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, /* 0x90 */
-: 354: 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, /* 0x98 */
-: 355: 0x2020, 0x00b0, 0x0490, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x0406, /* 0xa0 */
-: 356: 0x00ae, 0x00a9, 0x2122, 0x0402, 0x0452, 0x2260, 0x0403, 0x0453, /* 0xa8 */
-: 357: 0x221e, 0x00b1, 0x2264, 0x2265, 0x0456, 0x00b5, 0x0491, 0x0408, /* 0xb0 */
-: 358: 0x0404, 0x0454, 0x0407, 0x0457, 0x0409, 0x0459, 0x040a, 0x045a, /* 0xb8 */
-: 359: 0x0458, 0x0405, 0x00ac, 0x221a, 0x0192, 0x2248, 0x2206, 0x00ab, /* 0xc0 */
-: 360: 0x00bb, 0x2026, 0x00a0, 0x040b, 0x045b, 0x040c, 0x045c, 0x0455, /* 0xc8 */
-: 361: 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x201e, /* 0xd0 */
-: 362: 0x040e, 0x045e, 0x040f, 0x045f, 0x2116, 0x0401, 0x0451, 0x044f, /* 0xd8 */
-: 363: 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, /* 0xe0 */
-: 364: 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, /* 0xe8 */
-: 365: 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, /* 0xf0 */
-: 366: 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x20ac, /* 0xf8 */
-: 367:};
-: 368:
-: 369:/* ECMA Cyrillic */
-: 370:static const unsigned short int unicode_map_ecma113[] = {
-: 371: 0x00a0, 0x0452, 0x0453, 0x0451, 0x0454, 0x0455, 0x0456, 0x0457, /* 0xa0 */
-: 372: 0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x00ad, 0x045e, 0x045f, /* 0xa8 */
-: 373: 0x2116, 0x0402, 0x0403, 0x0401, 0x0404, 0x0405, 0x0406, 0x0407, /* 0xb0 */
-: 374: 0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x00a4, 0x040e, 0x040f, /* 0xb8 */
-: 375: 0x044e, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, /* 0xc0 */
-: 376: 0x0445, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, /* 0xc8 */
-: 377: 0x043f, 0x044f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, /* 0xd0 */
-: 378: 0x044c, 0x044b, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044a, /* 0xd8 */
-: 379: 0x042e, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, /* 0xe0 */
-: 380: 0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, /* 0xe8 */
-: 381: 0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, /* 0xf0 */
-: 382: 0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a, /* 0xf8 */
-: 383:};
-: 384:
-: 385:/* KOI8-CS2 */
-: 386:static const unsigned short int unicode_map_koi8cs2[] = {
-: 387: 0x00a0, NO_CHR, 0x00b4, NO_CHR, 0x007e, NO_CHR, 0x02d8, 0x02d9, /* 0xa0 */
-: 388: 0x00a8, NO_CHR, 0x02da, 0x00b8, NO_CHR, 0x02dd, 0x02db, 0x02c7, /* 0xa8 */
-: 389: 0x00a9, 0x00ae, 0x250c, 0x2510, 0x2514, 0x2518, 0x2500, 0x2193, /* 0xb0 */
-: 390: 0x03a9, 0x00a7, 0x03b1, 0x03b3, 0x03b5, 0x03bc, 0x03c0, 0x03c9, /* 0xb8 */
-: 391: 0x00e0, 0x00e1, 0x01ce, 0x010d, 0x010f, 0x011b, 0x0155, NO_CHR, /* 0xc0 */
-: 392: 0x00fc, 0x00ed, 0x016f, 0x013a, 0x013e, 0x00f6, 0x0148, 0x00f3, /* 0xc8 */
-: 393: 0x00f4, 0x00e4, 0x0159, 0x0161, 0x0165, 0x00fa, 0x00eb, 0x00e9, /* 0xd0 */
-: 394: 0x0171, 0x00fd, 0x017e, NO_CHR, NO_CHR, 0x0151, 0x0117, 0x00df, /* 0xd8 */
-: 395: 0x00c0, 0x00c1, 0x01cd, 0x010c, 0x010e, 0x011a, 0x0154, NO_CHR, /* 0xe0 */
-: 396: 0x00dc, 0x00cd, 0x016e, 0x0139, 0x013d, 0x00d6, 0x0147, 0x00d3, /* 0xe8 */
-: 397: 0x00d4, 0x00c4, 0x0158, 0x0160, 0x0164, 0x00da, 0x00cb, 0x00c9, /* 0xf0 */
-: 398: 0x0170, 0x00dd, 0x017d, NO_CHR, NO_CHR, 0x0150, 0x0116, NO_CHR, /* 0xf8 */
-: 399:};
-: 400:
-: 401:/* KOI8-R */
-: 402:static const unsigned short int unicode_map_koi8r[] = {
-: 403: 0x2500, 0x2502, 0x250c, 0x2510, 0x2514, 0x2518, 0x251c, 0x2524, /* 0x80 */
-: 404: 0x252c, 0x2534, 0x253c, 0x2580, 0x2584, 0x2588, 0x258c, 0x2590, /* 0x88 */
-: 405: 0x2591, 0x2592, 0x2593, 0x2320, 0x25a0, 0x2022, 0x221a, 0x2248, /* 0x90 */
-: 406: 0x2264, 0x2265, 0x00a0, 0x2321, 0x00b0, 0x00b2, 0x00b7, 0x00f7, /* 0x98 */
-: 407: 0x2550, 0x2551, 0x2552, 0x0451, 0x2553, 0x2554, 0x2555, 0x2556, /* 0xa0 */
-: 408: 0x2557, 0x2558, 0x2559, 0x255a, 0x255b, 0x255c, 0x255d, 0x255e, /* 0xa8 */
-: 409: 0x255f, 0x2560, 0x2561, 0x0401, 0x2562, 0x2563, 0x2564, 0x2565, /* 0xb0 */
-: 410: 0x2566, 0x2567, 0x2568, 0x2569, 0x256a, 0x256b, 0x256c, 0x00a9, /* 0xb8 */
-: 411: 0x044e, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, /* 0xc0 */
-: 412: 0x0445, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, /* 0xc8 */
-: 413: 0x043f, 0x044f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, /* 0xd0 */
-: 414: 0x044c, 0x044b, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044a, /* 0xd8 */
-: 415: 0x042e, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, /* 0xe0 */
-: 416: 0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, /* 0xe8 */
-: 417: 0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, /* 0xf0 */
-: 418: 0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a, /* 0xf8 */
-: 419:};
-: 420:
-: 421:/* KOI8-U */
-: 422:static const unsigned short int unicode_map_koi8u[] = {
-: 423: 0x2500, 0x2502, 0x250c, 0x2510, 0x2514, 0x2518, 0x251c, 0x2524, /* 0x80 */
-: 424: 0x252c, 0x2534, 0x253c, 0x2580, 0x2584, 0x2588, 0x258c, 0x2590, /* 0x88 */
-: 425: 0x2591, 0x2592, 0x2593, 0x2320, 0x25a0, 0x2219, 0x221a, 0x2248, /* 0x90 */
-: 426: 0x2264, 0x2265, 0x00a0, 0x2321, 0x00b0, 0x00b2, 0x00b7, 0x00f7, /* 0x98 */
-: 427: 0x2550, 0x2551, 0x2552, 0x0451, 0x0454, 0x2554, 0x0456, 0x0457, /* 0xa0 */
-: 428: 0x2557, 0x2558, 0x2559, 0x255a, 0x255b, 0x0491, 0x255d, 0x255e, /* 0xa8 */
-: 429: 0x255f, 0x2560, 0x2561, 0x0401, 0x0404, 0x2563, 0x0406, 0x0407, /* 0xb0 */
-: 430: 0x2566, 0x2567, 0x2568, 0x2569, 0x256a, 0x0490, 0x256c, 0x00a9, /* 0xb8 */
-: 431: 0x044e, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, /* 0xc0 */
-: 432: 0x0445, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, /* 0xc8 */
-: 433: 0x043f, 0x044f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, /* 0xd0 */
-: 434: 0x044c, 0x044b, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044a, /* 0xd8 */
-: 435: 0x042e, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, /* 0xe0 */
-: 436: 0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, /* 0xe8 */
-: 437: 0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, /* 0xf0 */
-: 438: 0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a, /* 0xf8 */
-: 439:};
-: 440:
-: 441:/* KOI8-UNI */
-: 442:static const unsigned short int unicode_map_koi8uni[] = {
-: 443: 0x2500, 0x2502, 0x250c, 0x2510, 0x2514, 0x2518, 0x251c, 0x2524, /* 0x80 */
-: 444: 0x252c, 0x2534, 0x253c, 0x2580, 0x2584, 0x2588, 0x258c, 0x2590, /* 0x88 */
-: 445: 0x2591, 0x2018, 0x2019, 0x201c, 0x201d, 0x2219, 0x2013, 0x2014, /* 0x90 */
-: 446: 0x00a9, 0x2122, 0x00a0, 0x00bb, 0x00ae, 0x00ab, 0x00b7, 0x00a4, /* 0x98 */
-: 447: 0x00a0, 0x0452, 0x0453, 0x0451, 0x0454, 0x0455, 0x0456, 0x0457, /* 0xa0 */
-: 448: 0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x0491, 0x045e, 0x045f, /* 0xa8 */
-: 449: 0x2116, 0x0402, 0x0403, 0x0401, 0x0404, 0x0405, 0x0406, 0x0407, /* 0xb0 */
-: 450: 0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x0490, 0x040e, 0x040f, /* 0xb8 */
-: 451: 0x044e, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, /* 0xc0 */
-: 452: 0x0445, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, /* 0xc8 */
-: 453: 0x043f, 0x044f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, /* 0xd0 */
-: 454: 0x044c, 0x044b, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044a, /* 0xd8 */
-: 455: 0x042e, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, /* 0xe0 */
-: 456: 0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, /* 0xe8 */
-: 457: 0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, /* 0xf0 */
-: 458: 0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a, /* 0xf8 */
-: 459:};
-: 460:
-: 461:/* Cork */
-: 462:static const unsigned short int unicode_map_cork[] = {
-: 463: 0x0060, 0x00b4, 0x005e, 0x007e, 0x00a8, 0x02dd, 0x02da, 0x02c7, /* 0x00 */
-: 464: 0x02d8, 0x0009, 0x000a, 0x00b8, 0x02db, 0x000d, 0x2039, 0x203a, /* 0x08 */
-: 465: 0x201c, 0x201d, 0x201e, 0x00ab, 0x00bb, 0x2013, 0x2014, 0x2080, /* 0x10 */
-: 466: 0x0131, 0x002e, 0xfb00, 0xfb01, 0xfb02, 0xfb00, 0x0069, 0xfb00, /* 0x18 */
-: 467: 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, /* 0x20 */
-: 468: 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, /* 0x28 */
-: 469: 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, /* 0x30 */
-: 470: 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, /* 0x38 */
-: 471: 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, /* 0x40 */
-: 472: 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, /* 0x48 */
-: 473: 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, /* 0x50 */
-: 474: 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, /* 0x58 */
-: 475: 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, /* 0x60 */
-: 476: 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, /* 0x68 */
-: 477: 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, /* 0x70 */
-: 478: 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x2010, /* 0x78 */
-: 479: 0x0102, 0x0104, 0x0106, 0x010c, 0x010e, 0x011a, 0x0118, 0x011e, /* 0x80 */
-: 480: 0x0139, 0x013d, 0x0141, 0x0143, 0x0147, 0x014a, 0x0150, 0x0154, /* 0x88 */
-: 481: 0x0158, 0x015a, 0x0160, 0x015e, 0x0164, 0x0162, 0x0170, 0x016e, /* 0x90 */
-: 482: 0x0178, 0x0179, 0x017d, 0x017b, 0x0132, 0x0130, 0x0111, 0x00a7, /* 0x98 */
-: 483: 0x0103, 0x0105, 0x0107, 0x010d, 0x010f, 0x011b, 0x0119, 0x011f, /* 0xa0 */
-: 484: 0x013a, 0x013e, 0x0142, 0x0144, 0x0148, 0x014b, 0x0151, 0x0155, /* 0xa8 */
-: 485: 0x0159, 0x015b, 0x0161, 0x015f, 0x0165, 0x0163, 0x0171, 0x016f, /* 0xb0 */
-: 486: 0x00ff, 0x017a, 0x017e, 0x017c, 0x0133, 0x00a1, 0x00bf, 0x00a3, /* 0xb8 */
-: 487: 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, /* 0xc0 */
-: 488: 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, /* 0xc8 */
-: 489: 0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x0152, /* 0xd0 */
-: 490: 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x0053, /* 0xd8 */
-: 491: 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, /* 0xe0 */
-: 492: 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, /* 0xe8 */
-: 493: 0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x0153, /* 0xf0 */
-: 494: 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00df, /* 0xf8 */
-: 495:};
-: 496:
-: 497:#define MAKE_CS_LINE(name) \
-: 498: { #name, \
-: 499: 0x0100 - sizeof(unicode_map_##name)/sizeof(unsigned short int), \
-: 500: unicode_map_##name }
-: 501:
-: 502:/*
-: 503: * Charset maps with names assigned.
-: 504: * Since we don't know the id's at compile time, find_charset_map() finds
-: 505: * them when first needed.
-: 506: */
-: 507:static const EncaUnicodeMap UNICODE_MAP[] = {
-: 508: MAKE_CS_LINE(iso88592),
-: 509: MAKE_CS_LINE(iso88594),
-: 510: MAKE_CS_LINE(iso88595),
-: 511: MAKE_CS_LINE(iso885913),
-: 512: MAKE_CS_LINE(iso885916),
-: 513: MAKE_CS_LINE(cp1125),
-: 514: MAKE_CS_LINE(cp1250),
-: 515: MAKE_CS_LINE(cp1251),
-: 516: MAKE_CS_LINE(cp1257),
-: 517: MAKE_CS_LINE(ibm852),
-: 518: MAKE_CS_LINE(ibm855),
-: 519: MAKE_CS_LINE(ibm775),
-: 520: MAKE_CS_LINE(ibm866),
-: 521: MAKE_CS_LINE(baltic),
-: 522: MAKE_CS_LINE(keybcs2),
-: 523: MAKE_CS_LINE(macce),
-: 524: MAKE_CS_LINE(maccyr),
-: 525: MAKE_CS_LINE(ecma113),
-: 526: MAKE_CS_LINE(koi8cs2),
-: 527: MAKE_CS_LINE(koi8r),
-: 528: MAKE_CS_LINE(koi8u),
-: 529: MAKE_CS_LINE(koi8uni),
-: 530: MAKE_CS_LINE(cork),
-: 531:};
-: 532:
-: 533:/**
-: 534: * enca_charset_has_ucs2_map:
-: 535: * @charset: An 8bit charset.
-: 536: *
-: 537: * Find whether we have charset -> UCS-2 map.
-: 538: *
-: 539: * Returns: Nonzero when the map is available, zero otherwise.
-: 540: **/
-: 541:int
192: 542:enca_charset_has_ucs2_map(int charset)
-: 543:{
192: 544: return find_charset_map(charset) != NULL;
-: 545:}
-: 546:
-: 547:/**
-: 548: * enca_charset_ucs2_map:
-: 549: * @charset: An 8bit charset.
-: 550: * @buffer: Buffer to store the map to.
-: 551: *
-: 552: * Creates map from an 8bit charset to UCS-2.
-: 553: *
-: 554: * The buffer must be at least 256*sizeof(unsigned int) long to hold the map.
-: 555: *
-: 556: * Returns: Nonzero when the map was successfully created, zero otherwise.
-: 557: **/
-: 558:int
158: 559:enca_charset_ucs2_map(int charset,
-: 560: unsigned int *buffer)
-: 561:{
-: 562: unsigned int i;
158: 563: const EncaUnicodeMap *umap = find_charset_map(charset);
-: 564:
158: 565: if (umap == NULL)
-: 566: return 0;
-: 567:
20960: 568: for (i = 0; i < umap->tstart; i++)
20960: 569: buffer[i] = i;
-: 570:
19646: 571: for (i = umap->tstart; i < 0x0100; i++)
19488: 572: buffer[i] = umap->map[i - umap->tstart];
-: 573:
-: 574: return 1;
-: 575:}
-: 576:
-: 577:/**
-: 578: * find_charset_map:
-: 579: * @charset: An 8bit charset.
-: 580: *
-: 581: * Find charset -> UCS-2 map.
-: 582: *
-: 583: * Returns: Pointer to the map, #NULL when not found.
-: 584: **/
-: 585:static const EncaUnicodeMap*
362: 586:find_charset_map(int charset)
-: 587:{
-: 588: static int charset_id[ELEMENTS(UNICODE_MAP)];
-: 589: static int charset_id_initialized = 0;
-: 590: size_t i;
-: 591:
362: 592: if (charset < 0)
-: 593: return NULL;
-: 594:
362: 595: if (!charset_id_initialized) {
1357: 596: for (i = 0; i < ELEMENTS(UNICODE_MAP); i++) {
1357: 597: charset_id[i] = enca_name_to_charset(UNICODE_MAP[i].name);
1357: 598: assert(charset_id[i] != ENCA_CS_UNKNOWN);
-: 599: }
59: 600: charset_id_initialized = 1;
-: 601: }
-: 602:
4098: 603: for (i = 0; i < ELEMENTS(UNICODE_MAP); i++) {
4087: 604: if (charset_id[i] == charset)
351: 605: return UNICODE_MAP + i;
-: 606: }
-: 607:
-: 608: return NULL;
-: 609:}
-: 610:
-: 611:/**
-: 612: * enca_charsets_subset_identical:
-: 613: * @charset1: A charset.
-: 614: * @charset2: Another charset.
-: 615: * @counts: An array of size 0x100 containing character counts.
-: 616: *
-: 617: * Checks whether all characters with nonzero count have the same meaning
-: 618: * in both charsets.
-: 619: *
-: 620: * In other words, it checks whether conversion of sample containing only
-: 621: * these characters from @charset1 to @charset2 would be identity.
-: 622: *
-: 623: * Returns: Nonzero if charsets are identical on the subset, zero otherwise.
-: 624: **/
-: 625:int
6: 626:enca_charsets_subset_identical(int charset1,
-: 627: int charset2,
-: 628: const size_t *counts)
-: 629:{
6: 630: const EncaUnicodeMap *umap1 = find_charset_map(charset1);
6: 631: const EncaUnicodeMap *umap2 = find_charset_map(charset2);
-: 632: size_t ts1, ts2;
-: 633: const unsigned short int *m1, *m2;
-: 634: size_t i;
-: 635:
6: 636: assert(umap1 != NULL);
6: 637: assert(umap2 != NULL);
-: 638:
6: 639: m1 = umap1->map;
6: 640: m2 = umap2->map;
6: 641: ts1 = umap1->tstart;
6: 642: ts2 = umap2->tstart;
-: 643:
1542: 644: for (i = 0; i < 0x100; i++) {
1536: 645: unsigned short int u1 = i < ts1 ? i : m1[i - ts1];
1536: 646: unsigned short int u2 = i < ts2 ? i : m2[i - ts2];
-: 647:
1536: 648: if (counts[i] > 0
108: 649: && u1 != u2
108: 650: && u1 != ENCA_NOT_A_CHAR
#####: 651: && u2 != ENCA_NOT_A_CHAR)
-: 652: return 0;
-: 653: }
-: 654:
-: 655: return 1;
-: 656:}
-: 657:
-: 658:/***** Documentation *********************************************************/
-: 659:
-: 660:/**
-: 661: * ENCA_NOT_A_CHAR:
-: 662: *
-: 663: * Not-a-character in unicode tables.
-: 664: **/
-: 665:
-: 666:/* vim: ts=2 sw=2 et
-: 667: */
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lib/.libs/lang_be.c.gcov
-: 0:Source:lang_be.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_be.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_be.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*
-: 2: encoding data and routines dependent on language; belarusian
-: 3:
-: 4: Copyright (C) 2000-2003 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#ifdef HAVE_CONFIG_H
-: 20:# include "config.h"
-: 21:#endif /* HAVE_CONFIG_H */
-: 22:
-: 23:#include "enca.h"
-: 24:#include "internal.h"
-: 25:#include "data/belarusian/belarusian.h"
-: 26:
-: 27:/* Local prototypes. */
-: 28:static int hook(EncaAnalyserState *analyser);
-: 29:static int hook_macwin(EncaAnalyserState *analyser);
-: 30:static int hook_isokoi(EncaAnalyserState *analyser);
-: 31:static int hook_855866(EncaAnalyserState *analyser);
-: 32:
-: 33:/**
-: 34: * ENCA_LANGUAGE_BE:
-: 35: *
-: 36: * Belarusian language.
-: 37: *
-: 38: * Everything the world out there needs to know about this language.
-: 39: **/
-: 40:const EncaLanguageInfo ENCA_LANGUAGE_BE = {
-: 41: "be",
-: 42: "belarusian",
-: 43: NCHARSETS,
-: 44: CHARSET_NAMES,
-: 45: CHARSET_WEIGHTS,
-: 46: SIGNIFICANT,
-: 47: CHARSET_LETTERS,
-: 48: CHARSET_PAIRS,
-: 49: WEIGHT_SUM,
-: 50: &hook,
-: 51: NULL,
-: 52: NULL,
-: 53: NULL,
-: 54:};
-: 55:
-: 56:/**
-: 57: * hook:
-: 58: * @analyser: Analyser state whose charset ratings are to be modified.
-: 59: *
-: 60: * Launches language specific hooks for language "be".
-: 61: *
-: 62: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 63: * otherwise.
-: 64: **/
-: 65:static int
#####: 66:hook(EncaAnalyserState *analyser)
-: 67:{
#####: 68: return hook_macwin(analyser)
#####: 69: || hook_isokoi(analyser)
#####: 70: || hook_855866(analyser);
-: 71:}
-: 72:
-: 73:/**
-: 74: * hook_macwin:
-: 75: * @analyser: Analyser state whose charset ratings are to be modified.
-: 76: *
-: 77: * Decides between maccyr and cp1251 charsets for language "be".
-: 78: *
-: 79: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 80: * otherwise.
-: 81: **/
-: 82:static int
-: 83:hook_macwin(EncaAnalyserState *analyser)
-: 84:{
-: 85: static const unsigned char list_maccyr[] = {
-: 86: 0xb4, 0xdf, 0xd9, 0xde, 0x80, 0x8d, 0x91, 0x8f, 0x81
-: 87: };
-: 88: static const unsigned char list_cp1251[] = {
-: 89: 0xb3, 0xff, 0xa2, 0xb8, 0xc0, 0xcd, 0xd1, 0xcf, 0xc1
-: 90: };
-: 91: static EncaLanguageHookData1CS hookdata[] = {
-: 92: MAKE_HOOK_LINE(maccyr),
-: 93: MAKE_HOOK_LINE(cp1251),
-: 94: };
-: 95:
#####: 96: return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata);
-: 97:}
-: 98:
-: 99:/**
-: 100: * hook_isokoi:
-: 101: * @analyser: Analyser state whose charset ratings are to be modified.
-: 102: *
-: 103: * Decides between iso8859-5 and koi8u charsets for language "be".
-: 104: *
-: 105: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 106: * otherwise.
-: 107: **/
-: 108:static int
-: 109:hook_isokoi(EncaAnalyserState *analyser)
-: 110:{
-: 111: static const unsigned char list_iso88595[] = {
-: 112: 0xdd, 0xd0, 0xe0, 0xf6, 0xeb, 0xef, 0xe3, 0xe2, 0xe1, 0xdf
-: 113: };
-: 114: static const unsigned char list_koi8u[] = {
-: 115: 0xc1, 0xce, 0xc5, 0xcc, 0xcb, 0xcf, 0xa6, 0xc4, 0xcd, 0xae
-: 116: };
-: 117: static EncaLanguageHookData1CS hookdata[] = {
-: 118: MAKE_HOOK_LINE(iso88595),
-: 119: MAKE_HOOK_LINE(koi8u),
-: 120: };
-: 121:
#####: 122: return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata);
-: 123:}
-: 124:
-: 125:/**
-: 126: * hook_855866:
-: 127: * @analyser: Analyser state whose charset ratings are to be modified.
-: 128: *
-: 129: * Decides between cp866 and ibm855 charsets for language "be".
-: 130: *
-: 131: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 132: * otherwise.
-: 133: **/
-: 134:static int
-: 135:hook_855866(EncaAnalyserState *analyser)
-: 136:{
-: 137: static const unsigned char list_ibm855[] = {
-: 138: 0xd4, 0xd0, 0xd6, 0x8a, 0xc6, 0xde, 0xd2, 0xf3, 0xd8, 0x98, 0xf1
-: 139: };
-: 140: static const unsigned char list_ibm866[] = {
-: 141: 0xad, 0xe0, 0xa5, 0xab, 0xae, 0xaa, 0xe2, 0xef, 0xa7, 0xaf, 0xe6
-: 142: };
-: 143: static EncaLanguageHookData1CS hookdata[] = {
-: 144: MAKE_HOOK_LINE(ibm855),
-: 145: MAKE_HOOK_LINE(ibm866),
-: 146: };
-: 147:
#####: 148: return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata);
-: 149:}
-: 150:
-: 151:/* vim: ts=2
-: 152: */
-: 153:
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lib/.libs/lang_hu.c.gcov
-: 0:Source:lang_hu.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_hu.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_hu.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*
-: 2: encoding data and routines dependent on language; hungarian
-: 3:
-: 4: Copyright (C) 2003 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#ifdef HAVE_CONFIG_H
-: 20:# include "config.h"
-: 21:#endif /* HAVE_CONFIG_H */
-: 22:
-: 23:#include "enca.h"
-: 24:#include "internal.h"
-: 25:#include "data/hungarian/hungarian.h"
-: 26:
-: 27:/* Local prototypes. */
-: 28:static int hook(EncaAnalyserState *analyser);
-: 29:static int hook_iso1250(EncaAnalyserState *analyser);
-: 30:static int hook_isocork(EncaAnalyserState *analyser);
-: 31:
-: 32:/**
-: 33: * ENCA_LANGUAGE_HU:
-: 34: *
-: 35: * Hungarian language.
-: 36: *
-: 37: * Everything the world out there needs to know about this language.
-: 38: **/
-: 39:const EncaLanguageInfo ENCA_LANGUAGE_HU = {
-: 40: "hu",
-: 41: "hungarian",
-: 42: NCHARSETS,
-: 43: CHARSET_NAMES,
-: 44: CHARSET_WEIGHTS,
-: 45: SIGNIFICANT,
-: 46: CHARSET_LETTERS,
-: 47: CHARSET_PAIRS,
-: 48: WEIGHT_SUM,
-: 49: &hook,
-: 50: NULL,
-: 51: NULL,
-: 52: NULL
-: 53:};
-: 54:
-: 55:/**
-: 56: * hook:
-: 57: * @analyser: Analyser state whose charset ratings are to be modified.
-: 58: *
-: 59: * Launches language specific hooks for language "hu".
-: 60: *
-: 61: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 62: * otherwise.
-: 63: **/
-: 64:static int
21: 65:hook(EncaAnalyserState *analyser)
-: 66:{
21: 67: int chg = 0;
-: 68:
-: 69: /* we may want to run both, and in this order */
21: 70: chg += hook_isocork(analyser);
21: 71: chg += hook_iso1250(analyser);
21: 72: return chg;
-: 73:}
-: 74:
-: 75:/**
-: 76: * hook_iso1250:
-: 77: * @analyser: Analyser state whose charset ratings are to be modified.
-: 78: *
-: 79: * Decides between iso8859-2 and cp1250 charsets for language "hu".
-: 80: *
-: 81: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 82: * otherwise.
-: 83: **/
-: 84:static int
-: 85:hook_iso1250(EncaAnalyserState *analyser)
-: 86:{
-: 87: static EncaLanguageHookDataEOL hookdata[] = {
-: 88: { "cp1250", ENCA_SURFACE_EOL_CRLF, (size_t)-1 },
-: 89: { "iso88592", ENCA_SURFACE_MASK_EOL, (size_t)-1 },
-: 90: };
-: 91:
21: 92: return enca_language_hook_eol(analyser, ELEMENTS(hookdata), hookdata);
-: 93:}
-: 94:
-: 95:/**
-: 96: * hook_isocork:
-: 97: * @analyser: Analyser state whose charset ratings are to be modified.
-: 98: *
-: 99: * Decides between iso8859-2, cp1250 and cork charsets for language "hu".
-: 100: *
-: 101: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 102: * otherwise.
-: 103: **/
-: 104:static int
-: 105:hook_isocork(EncaAnalyserState *analyser)
-: 106:{
-: 107: static const unsigned char list_iso88592[] = {
-: 108: 0xf5, 0xfb, 0xd5
-: 109: };
-: 110: static const unsigned char list_cp1250[] = {
-: 111: 0xf5, 0xfb, 0xd5
-: 112: };
-: 113: static const unsigned char list_cork[] = {
-: 114: 0xae, 0xb6, 0x8e
-: 115: };
-: 116: static EncaLanguageHookData1CS hookdata[] = {
-: 117: MAKE_HOOK_LINE(iso88592),
-: 118: MAKE_HOOK_LINE(cp1250),
-: 119: MAKE_HOOK_LINE(cork),
-: 120: };
-: 121:
21: 122: return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata);
-: 123:}
-: 124:
-: 125:/* vim: ts=2
-: 126: */
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lib/.libs/zh_weight_big5.h.gcov
-: 0:Source:../data/chinese/zh_weight_big5.h
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_zh.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_zh.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/* This header file is in the public domain.
-: 2: Most of its content is generated by gperf, with modifications
-: 3: Chinese frequency table courtesy of Dept. of CS, Tsinghua Univeristy, Beijing
-: 4: See http://fhpi.yingkou.net.cn/bbs/1951/messages/2903.html
-: 5:*/
-: 6:
-: 7:/* ANSI-C code produced by gperf version 3.0.1 */
-: 8:/* Command-line: gperf -L ANSI-C -I -C -E -n -o -c -D -t zh_weight_big5.txt */
-: 9:/* Computed positions: -k'1-2' */
-: 10:
-: 11:#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
-: 12: && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
-: 13: && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
-: 14: && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
-: 15: && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
-: 16: && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
-: 17: && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
-: 18: && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
-: 19: && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
-: 20: && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
-: 21: && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
-: 22: && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
-: 23: && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
-: 24: && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
-: 25: && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
-: 26: && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
-: 27: && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
-: 28: && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
-: 29: && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
-: 30: && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
-: 31: && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
-: 32: && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
-: 33: && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
-: 34:/* The character set is not based on ISO-646. */
-: 35:#error "gperf generated tables don't work with this execution character set. Please report a bug to ."
-: 36:#endif
-: 37:
-: 38:/* maximum key range = 987, duplicates = 0 */
-: 39:
-: 40:#ifdef __GNUC__
-: 41:__inline
-: 42:#else
-: 43:#ifdef __cplusplus
-: 44:inline
-: 45:#endif
-: 46:#endif
-: 47:/*ARGSUSED*/
-: 48:static unsigned int
-: 49:hash_big5 (register const unsigned char *str)
-: 50:{
-: 51: static const unsigned short asso_values[] =
-: 52: {
-: 53: 987, 987, 987, 987, 987, 987, 987, 987, 987, 987,
-: 54: 987, 987, 987, 987, 987, 987, 987, 987, 987, 987,
-: 55: 987, 987, 987, 987, 987, 987, 987, 987, 987, 987,
-: 56: 987, 987, 987, 987, 987, 987, 987, 987, 987, 987,
-: 57: 987, 987, 987, 987, 987, 987, 987, 987, 987, 987,
-: 58: 987, 987, 987, 987, 987, 987, 987, 987, 987, 987,
-: 59: 987, 987, 987, 987, 333, 104, 109, 139, 400, 987,
-: 60: 98, 224, 306, 468, 214, 987, 381, 233, 93, 240,
-: 61: 56, 286, 987, 119, 251, 59, 214, 221, 4, 245,
-: 62: 987, 204, 199, 228, 10, 84, 278, 356, 0, 105,
-: 63: 366, 371, 174, 381, 79, 98, 19, 169, 356, 450,
-: 64: 216, 508, 298, 290, 987, 58, 96, 48, 38, 176,
-: 65: 184, 10, 205, 146, 118, 440, 193, 987, 987, 987,
-: 66: 987, 987, 987, 987, 987, 987, 987, 987, 987, 987,
-: 67: 987, 987, 987, 987, 987, 987, 987, 987, 987, 987,
-: 68: 987, 987, 987, 987, 987, 987, 987, 987, 987, 987,
-: 69: 987, 305, 987, 238, 10, 5, 0, 85, 25, 285,
-: 70: 115, 30, 180, 75, 415, 238, 15, 260, 3, 160,
-: 71: 68, 60, 270, 18, 265, 90, 130, 360, 245, 485,
-: 72: 495, 345, 385, 133, 480, 365, 435, 110, 445, 473,
-: 73: 505, 455, 166, 410, 448, 153, 28, 39, 455, 110,
-: 74: 500, 215, 340, 343, 164, 243, 96, 470, 325, 91,
-: 75: 378, 391, 29, 14, 385, 4, 3, 171, 56, 506,
-: 76: 168, 448, 26, 144, 441, 351, 360, 458, 5, 241,
-: 77: 225, 311, 303, 46, 11, 493, 418, 285, 255, 438,
-: 78: 398, 301, 453, 1, 136, 987
-: 79: };
684: 80: return asso_values[(unsigned char)str[1]] + asso_values[(unsigned char)str[0]];
-: 81:}
-: 82:
684: 83:static const struct zh_weight *in_big5 (register const unsigned char *str)
-: 84:{
-: 85: enum
-: 86: {
-: 87: TOTAL_KEYWORDS = 500,
-: 88: MIN_WORD_LENGTH = 2,
-: 89: MAX_WORD_LENGTH = 2,
-: 90: MIN_HASH_VALUE = 0,
-: 91: MAX_HASH_VALUE = 986
-: 92: };
-: 93:
-: 94: static const struct zh_weight wordlist[] =
-: 95: {
-: 96: {"\246b",0.0082045},
-: 97: {"\246\375",0.0010253},
-: 98: {"\246\342",0.0005973},
-: 99: {"\246X",0.0023691},
-: 100: {"\245\246",0.0005788},
-: 101: {"\245\375",0.0010976},
-: 102: {"\245\262",0.0006812},
-: 103: {"\245X",0.0042527},
-: 104: {"\246^",0.0006653},
-: 105: {"\244\375",0.0006086},
-: 106: {"\244\342",0.0009187},
-: 107: {"\244\341",0.0005598},
-: 108: {"\245\364",0.0012122},
-: 109: {"\260\342",0.0004988},
-: 110: {"\245\337",0.0015778},
-: 111: {"\244\244",0.0076843},
-: 112: {"\244\364",0.0016446},
-: 113: {"\267\245",0.0006288},
-: 114: {"\244\337",0.0014967},
-: 115: {"\246\250",0.0037219},
-: 116: {"\246\350",0.0012152},
-: 117: {"\250\342",0.0013376},
-: 118: {"\244j",0.0066078},
-: 119: {"\250\356",0.0026895},
-: 120: {"\262\316",0.0011475},
-: 121: {"\245\316",0.002668},
-: 122: {"\253\341",0.0021836},
-: 123: {"\245\253",0.0046659},
-: 124: {"\244\350",0.002853},
-: 125: {"\244\316",0.0012255},
-: 126: {"\244\336",0.0006632},
-: 127: {"\260\250",0.0005587},
-: 128: {"\262v",0.0005754},
-: 129: {"\245v",0.0004954},
-: 130: {"\253\337",0.0005375},
-: 131: {"\253\260",0.0010251},
-: 132: {"\246\363",0.0005162},
-: 133: {"\244v",0.0006239},
-: 134: {"\244\317",0.0006176},
-: 135: {"\245\363",0.0009711},
-: 136: {"\245u",0.0008284},
-: 137: {"\260\317",0.0022413},
-: 138: {"\250\253",0.0006468},
-: 139: {"\246P",0.0026107},
-: 140: {"\244u",0.0050114},
-: 141: {"\246U",0.001779},
-: 142: {"\265\246",0.0006082},
-: 143: {"\265\375",0.0007621},
-: 144: {"\265\262",0.0011242},
-: 145: {"\250\317",0.001449},
-: 146: {"\265\245",0.0021605},
-: 147: {"\244\344",0.0007224},
-: 148: {"\244s",0.0011044},
-: 149: {"\244U",0.0021357},
-: 150: {"\244\265",0.0013712},
-: 151: {"\250\363",0.0007439},
-: 152: {"\264X",0.0008733},
-: 153: {"\245\264",0.0005953},
-: 154: {"\267P",0.0005274},
-: 155: {"\260\265",0.0007036},
-: 156: {"\267s",0.002897},
-: 157: {"\255\262",0.0012506},
-: 158: {"\246h",0.0032382},
-: 159: {"\245\255",0.0016647},
-: 160: {"\250\344",0.0017313},
-: 161: {"\250s",0.0007264},
-: 162: {"\245h",0.0013444},
-: 163: {"\244\255",0.0007467},
-: 164: {"\253\344",0.0006569},
-: 165: {"\247\342",0.0010343},
-: 166: {"\245_",0.0015279},
-: 167: {"\246\271",0.0011388},
-: 168: {"\246\333",0.0022824},
-: 169: {"\255\267",0.0007326},
-: 170: {"\244_",0.0026086},
-: 171: {"\244\247",0.001919},
-: 172: {"\245\333",0.0004908},
-: 173: {"\245N",0.0016641},
-: 174: {"\260_",0.0015911},
-: 175: {"\250\255",0.0006168},
-: 176: {"\245\330",0.0015919},
-: 177: {"\245i",0.0018478},
-: 178: {"\246A",0.0005426},
-: 179: {"\255\253",0.0023459},
-: 180: {"\244F",0.0079237},
-: 181: {"\253h",0.0005586},
-: 182: {"\246\321",0.0008237},
-: 183: {"\267N",0.0011669},
-: 184: {"\247\316",0.0009425},
-: 185: {"\247\336",0.0016091},
-: 186: {"\245\321",0.0013801},
-: 187: {"\267F",0.0009596},
-: 188: {"\271\316",0.0009523},
-: 189: {"\252\341",0.0005451},
-: 190: {"\244\321",0.0016483},
-: 191: {"\250t",0.0013262},
-: 192: {"\245|",0.0009759},
-: 193: {"\264\344",0.0005587},
-: 194: {"\260\321",0.0006661},
-: 195: {"\253\330",0.0032052},
-: 196: {"\264\265",0.0006023},
-: 197: {"\244S",0.0009509},
-: 198: {"\260\252",0.0025748},
-: 199: {"\247\363",0.0008908},
-: 200: {"\260|",0.0010515},
-: 201: {"\250B",0.0010507},
-: 202: {"\250\321",0.000632},
-: 203: {"\267|",0.0051579},
-: 204: {"\245\301",0.0035945},
-: 205: {"\246C",0.0005658},
-: 206: {"\244\272",0.0016149},
-: 207: {"\245\376",0.0032345},
-: 208: {"\250|",0.0009705},
-: 209: {"\250S",0.0008714},
-: 210: {"\252\253",0.0010483},
-: 211: {"\246{",0.000633},
-: 212: {"\305v",0.0009164},
-: 213: {"\262{",0.0025147},
-: 214: {"\265\271",0.0007847},
-: 215: {"\265\333",0.0014365},
-: 216: {"\252v",0.0009927},
-: 217: {"\244\351",0.0036327},
-: 218: {"\250\272",0.0007224},
-: 219: {"\265\330",0.0012136},
-: 220: {"\245\315",0.0039844},
-: 221: {"\272\336",0.001622},
-: 222: {"\246\263",0.0077624},
-: 223: {"\264N",0.0021619},
-: 224: {"\262\263",0.0006362},
-: 225: {"\250C",0.000715},
-: 226: {"\255\271",0.0004878},
-: 227: {"\246\312",0.0006978},
-: 228: {"\246\346",0.0041784},
-: 229: {"\253C",0.0005662},
-: 230: {"\263y",0.0009483},
-: 231: {"\255t",0.0005072},
-: 232: {"\245\346",0.0011534},
-: 233: {"\244\326",0.0009361},
-: 234: {"\247\271",0.0006563},
-: 235: {"\246w",0.00114},
-: 236: {"\265|",0.0007012},
-: 237: {"\244k",0.0006045},
-: 238: {"\246\254",0.0012488},
-: 239: {"\260\312",0.0023694},
-: 240: {"\247i",0.0005829},
-: 241: {"\244f",0.0012146},
-: 242: {"\245\254",0.0005445},
-: 243: {"\244w",0.0015716},
-: 244: {"\271F",0.0012618},
-: 245: {"\245x",0.0008597},
-: 246: {"\254y",0.0008055},
-: 247: {"\250\312",0.0012137},
-: 248: {"\246~",0.0071346},
-: 249: {"\271A",0.001983},
-: 250: {"\254\260",0.0054216},
-: 251: {"\250\343",0.0006981},
-: 252: {"\245~",0.0022498},
-: 253: {"\271B",0.0009758},
-: 254: {"\252\247",0.0007016},
-: 255: {"\264\301",0.0012406},
-: 256: {"\244~",0.0006942},
-: 257: {"\245\\",0.0005073},
-: 258: {"\255\272",0.0006626},
-: 259: {"\265{",0.0012378},
-: 260: {"\262z",0.0029849},
-: 261: {"\245[",0.0023829},
-: 262: {"\253\254",0.0006771},
-: 263: {"\267~",0.0065423},
-: 264: {"\252F",0.0011892},
-: 265: {"\246V",0.0014073},
-: 266: {"\246\323",0.0018881},
-: 267: {"\246n",0.0017451},
-: 268: {"\263s",0.0004976},
-: 269: {"\252A",0.0008639},
-: 270: {"\271\272",0.0007059},
-: 271: {"\246W",0.0014078},
-: 272: {"\253~",0.0023513},
-: 273: {"\244J",0.0015621},
-: 274: {"\252\321",0.0005495},
-: 275: {"\272\330",0.0018411},
-: 276: {"\246]",0.0010577},
-: 277: {"\260\323",0.0016298},
-: 278: {"\244W",0.0048331},
-: 279: {"\245]",0.0006314},
-: 280: {"\244G",0.001247},
-: 281: {"\272c",0.0007005},
-: 282: {"\262M",0.0005405},
-: 283: {"\244]",0.001974},
-: 284: {"\250\323",0.0034731},
-: 285: {"\262\243",0.0043545},
-: 286: {"\260]",0.0005022},
-: 287: {"\252\272",0.0341277},
-: 288: {"\253n",0.00114},
-: 289: {"\244\243",0.0063303},
-: 290: {"\247\326",0.0006737},
-: 291: {"\244O",0.0022943},
-: 292: {"\301|",0.0006836},
-: 293: {"\263N",0.0014501},
-: 294: {"\305\351",0.0021551},
-: 295: {"\260O",0.0013592},
-: 296: {"\263t",0.0005376},
-: 297: {"\250M",0.0011549},
-: 298: {"\255x",0.0009727},
-: 299: {"\245\370",0.0027556},
-: 300: {"\244T",0.0017945},
-: 301: {"\250\243",0.0007272},
-: 302: {"\246\270",0.0014362},
-: 303: {"\260T",0.000496},
-: 304: {"\257\253",0.0005762},
-: 305: {"\263B",0.0009814},
-: 306: {"\253O",0.0014976},
-: 307: {"\254\333",0.0010087},
-: 308: {"\253\327",0.0015281},
-: 309: {"\244\270",0.002067},
-: 310: {"\270\364",0.001188},
-: 311: {"\254F",0.002679},
-: 312: {"\261j",0.0013442},
-: 313: {"\266\244",0.0009591},
-: 314: {"\262`",0.0008945},
-: 315: {"\274v",0.000514},
-: 316: {"\252k",0.0025935},
-: 317: {"\266\260",0.0010417},
-: 318: {"\257u",0.0006076},
-: 319: {"\251\262",0.0009796},
-: 320: {"\255\323",0.0043881},
-: 321: {"\255n",0.0045003},
-: 322: {"\265M",0.001088},
-: 323: {"\245q",0.0017401},
-: 324: {"\244Q",0.0016297},
-: 325: {"\246p",0.0012367},
-: 326: {"\247J",0.0005433},
-: 327: {"\247\323",0.0008129},
-: 328: {"\246\373",0.0005246},
-: 329: {"\274s",0.0011772},
-: 330: {"\267Q",0.0008423},
-: 331: {"\246\241",0.0008493},
-: 332: {"\264\243",0.0016334},
-: 333: {"\244p",0.0016135},
-: 334: {"\245\241",0.0004698},
-: 335: {"\245H",0.0038364},
-: 336: {"\251\316",0.0006972},
-: 337: {"\265\370",0.000674},
-: 338: {"\244H",0.0080773},
-: 339: {"\260\362",0.0014197},
-: 340: {"\261\265",0.0007936},
-: 341: {"\244\361",0.001161},
-: 342: {"\270s",0.0005419},
-: 343: {"\270U",0.0020929},
-: 344: {"\247O",0.0007577},
-: 345: {"\247\357",0.0018059},
-: 346: {"\263\346",0.0008341},
-: 347: {"\266\265",0.0011181},
-: 348: {"\271\357",0.0032427},
-: 349: {"\246@",0.0010536},
-: 350: {"\263f",0.0005011},
-: 351: {"\255\261",0.0020167},
-: 352: {"\253H",0.000977},
-: 353: {"\245@",0.0010821},
-: 354: {"\252G",0.0008799},
-: 355: {"\247\370",0.0009976},
-: 356: {"\274t",0.0012368},
-: 357: {"\244@",0.0112731},
-: 358: {"\246\277",0.0009106},
-: 359: {"\262\325",0.0011894},
-: 360: {"\257\305",0.0009423},
-: 361: {"\245\277",0.0013077},
-: 362: {"\254\343",0.0009783},
-: 363: {"\261N",0.0014281},
-: 364: {"\277\244",0.0009752},
-: 365: {"\246a",0.0047688},
-: 366: {"\257S",0.0012592},
-: 367: {"\261i",0.0007204},
-: 368: {"\263\\",0.0005616},
-: 369: {"\246\354",0.0016007},
-: 370: {"\244\353",0.0024389},
-: 371: {"\273\342",0.0011289},
-: 372: {"\245\273",0.0024993},
-: 373: {"\244l",0.0015414},
-: 374: {"\266i",0.0032419},
-: 375: {"\252\370",0.0025652},
-: 376: {"\247Q",0.0018856},
-: 377: {"\255p",0.00135},
-: 378: {"\270\321",0.0011085},
-: 379: {"\255\373",0.0018995},
-: 380: {"\246\334",0.0007778},
-: 381: {"\271q",0.001873},
-: 382: {"\263W",0.0013724},
-: 383: {"\245\334",0.0004949},
-: 384: {"\250\354",0.0036926},
-: 385: {"\245L",0.0031435},
-: 386: {"\263]",0.0022181},
-: 387: {"\250\303",0.0012383},
-: 388: {"\244g",0.0005437},
-: 389: {"\264\332",0.0005576},
-: 390: {"\244\300",0.002317},
-: 391: {"\300\364",0.0006218},
-: 392: {"\263\243",0.0014503},
-: 393: {"\252\367",0.001743},
-: 394: {"\253e",0.0020531},
-: 395: {"\245\372",0.0005461},
-: 396: {"\245D",0.0027957},
-: 397: {"\260\335",0.0015404},
-: 398: {"\253\334",0.000797},
-: 399: {"\247\332",0.0034646},
-: 400: {"\301`",0.0018397},
-: 401: {"\252p",0.0005979},
-: 402: {"\263\370",0.0027135},
-: 403: {"\273P",0.0019506},
-: 404: {"\247@",0.0040521},
-: 405: {"\254O",0.0076122},
-: 406: {"\274w",0.0005846},
-: 407: {"\250\372",0.0009919},
-: 408: {"\250D",0.0009944},
-: 409: {"\252\361",0.0009063},
-: 410: {"\261\346",0.0005027},
-: 411: {"\253D",0.000531},
-: 412: {"\301p",0.0009379},
-: 413: {"\300u",0.0008197},
-: 414: {"\255\354",0.0009897},
-: 415: {"\247\353",0.0011592},
-: 416: {"\262\304",0.0017413},
-: 417: {"\250\256",0.0010894},
-: 418: {"\265L",0.0010303},
-: 419: {"\305@",0.0005659},
-: 420: {"\247\354",0.0004875},
-: 421: {"\263Q",0.000825},
-: 422: {"\253\366",0.0004965},
-: 423: {"\263q",0.0015692},
-: 424: {"\251\312",0.0011996},
-: 425: {"\256v",0.00052},
-: 426: {"\244\306",0.0023838},
-: 427: {"\260\352",0.0106651},
-: 428: {"\246\355",0.000485},
-: 429: {"\260\306",0.0006302},
-: 430: {"\251w",0.0024269},
-: 431: {"\256u",0.0004695},
-: 432: {"\263\241",0.0033026},
-: 433: {"\274W",0.0014225},
-: 434: {"\253\371",0.0010342},
-: 435: {"\250\306",0.0018604},
-: 436: {"\271L",0.0020606},
-: 437: {"\260\355",0.0004694},
-: 438: {"\303\321",0.0005749},
-: 439: {"\267\355",0.001657},
-: 440: {"\250\374",0.0008222},
-: 441: {"\270\323",0.0006501},
-: 442: {"\272\353",0.0007159},
-: 443: {"\253\374",0.0007731},
-: 444: {"\266V",0.0004797},
-: 445: {"\254\241",0.0011783},
-: 446: {"\252e",0.0005451},
-: 447: {"\305\334",0.0007406},
-: 448: {"\271D",0.0012275},
-: 449: {"\267\307",0.0007058},
-: 450: {"\261M",0.0009373},
-: 451: {"\244\275",0.0031331},
-: 452: {"\252L",0.0007135},
-: 453: {"\250\307",0.0013308},
-: 454: {"\252\300",0.0020607},
-: 455: {"\303\376",0.0005014},
-: 456: {"\267\275",0.0005666},
-: 457: {"\277\263",0.0005636},
-: 458: {"\273{",0.0008819},
-: 459: {"\246o",0.0005373},
-: 460: {"\266O",0.0009271},
-: 461: {"\275\350",0.0009775},
-: 462: {"\256i",0.0030534},
-: 463: {"\261\370",0.0012831},
-: 464: {"\244\345",0.0018717},
-: 465: {"\251M",0.0067636},
-: 466: {"\260\310",0.0018869},
-: 467: {"\266T",0.0006242},
-: 468: {"\255\314",0.0030767},
-: 469: {"\256\321",0.001001},
-: 470: {"\263d",0.0006355},
-: 471: {"\257q",0.0008483},
-: 472: {"\250\310",0.0006162},
-: 473: {"\271\352",0.002744},
-: 474: {"\275u",0.0005442},
-: 475: {"\253\310",0.0004833},
-: 476: {"\264I",0.0004872},
-: 477: {"\261`",0.0008196},
-: 478: {"\254\354",0.0014751},
-: 479: {"\270`",0.000558},
-: 480: {"\300\263",0.0014049},
-: 481: {"\254d",0.000721},
-: 482: {"\302\264",0.0007599},
-: 483: {"\261q",0.001703},
-: 484: {"\276P",0.0008187},
-: 485: {"\252\371",0.0014059},
-: 486: {"\270q",0.0011046},
-: 487: {"\305\347",0.0005062},
-: 488: {"\266q",0.0015425},
-: 489: {"\277n",0.0006935},
-: 490: {"\252\314",0.0022472},
-: 491: {"\261\241",0.0011166},
-: 492: {"\270\373",0.0005458},
-: 493: {"\265o",0.0053412},
-: 494: {"\247\275",0.0009665},
-: 495: {"\254\335",0.0008716},
-: 496: {"\252\355",0.0013294},
-: 497: {"\266\241",0.0010701},
-: 498: {"\266H",0.0004946},
-: 499: {"\247\365",0.0006669},
-: 500: {"\255\310",0.0006514},
-: 501: {"\256\346",0.0008735},
-: 502: {"\261\332",0.0005358},
-: 503: {"\277\357",0.0006163},
-: 504: {"\301\311",0.0004837},
-: 505: {"\271\322",0.0005699},
-: 506: {"\247\345",0.0007277},
-: 507: {"\276i",0.0004942},
-: 508: {"\304\263",0.0011071},
-: 509: {"\251\361",0.0010846},
-: 510: {"\254\366",0.0004974},
-: 511: {"\252\275",0.0005522},
-: 512: {"\301\331",0.0014906},
-: 513: {"\263\306",0.0006344},
-: 514: {"\263\314",0.0012694},
-: 515: {"\252\276",0.0006257},
-: 516: {"\266\325",0.0006866},
-: 517: {"\263\320",0.0007723},
-: 518: {"\261a",0.0006134},
-: 519: {"\254\371",0.000501},
-: 520: {"\303\370",0.0007756},
-: 521: {"\257\340",0.0022237},
-: 522: {"\251\324",0.0005527},
-: 523: {"\300Y",0.0007873},
-: 524: {"\254\374",0.0013899},
-: 525: {"\254\311",0.0010474},
-: 526: {"\275\315",0.0006043},
-: 527: {"\256\360",0.0005779},
-: 528: {"\251l",0.0004855},
-: 529: {"\270\334",0.000621},
-: 530: {"\261\300",0.0006574},
-: 531: {"\270g",0.0049223},
-: 532: {"\254I",0.0009187},
-: 533: {"\306[",0.0007736},
-: 534: {"\254\331",0.0016366},
-: 535: {"\263\365",0.0030636},
-: 536: {"\274\313",0.0008296},
-: 537: {"\251e",0.001456},
-: 538: {"\256\327",0.0005503},
-: 539: {"\263\322",0.0005726},
-: 540: {"\273\362",0.0006158},
-: 541: {"\273\241",0.0019478},
-: 542: {"\276\343",0.0006271},
-: 543: {"\263o",0.0043446},
-: 544: {"\256\370",0.0006543},
-: 545: {"\270\313",0.000643},
-: 546: {"\304Y",0.0006039},
-: 547: {"\251\372",0.0014369},
-: 548: {"\273\332",0.0012275},
-: 549: {"\300\362",0.0004915},
-: 550: {"\274\306",0.0008388},
-: 551: {"\261\304",0.0006097},
-: 552: {"\274\320",0.0009393},
-: 553: {"\251\366",0.0006749},
-: 554: {"\277\354",0.0013224},
-: 555: {"\270\352",0.0027448},
-: 556: {"\266}",0.0031058},
-: 557: {"\270\314",0.0014032},
-: 558: {"\261\320",0.0013183},
-: 559: {"\266m",0.0007924},
-: 560: {"\275\327",0.0007584},
-: 561: {"\275T",0.0006259},
-: 562: {"\304\362",0.0005217},
-: 563: {"\256\332",0.000545},
-: 564: {"\266\307",0.0007021},
-: 565: {"\274\322",0.0004864},
-: 566: {"\303\300",0.0004998},
-: 567: {"\273\335",0.0007022},
-: 568: {"\273D",0.0004727},
-: 569: {"\303D",0.0013688},
-: 570: {"\261o",0.0019729},
-: 571: {"\256a",0.0039648},
-: 572: {"\266\310",0.0005794},
-: 573: {"\276\367",0.0023189},
-: 574: {"\303\366",0.0023261},
-: 575: {"\251\322",0.0015791},
-: 576: {"\273\371",0.0010855},
-: 577: {"\276\332",0.0009205},
-: 578: {"\275\325",0.0012018},
-: 579: {"\300\347",0.0011203},
-: 580: {"\276\324",0.0008112},
-: 581: {"\256\304",0.0009217},
-: 582: {"\273\365",0.000824},
-: 583: {"\300\331",0.0026701},
-: 584: {"\256\306",0.0005776},
-: 585: {"\302\340",0.0007108},
-: 586: {"\256\374",0.0015815},
-: 587: {"\256\311",0.0030057},
-: 588: {"\276\372",0.0005352},
-: 589: {"\304\322",0.0011413},
-: 590: {"\302\355",0.000663},
-: 591: {"\302I",0.0013538},
-: 592: {"\276\311",0.0011932},
-: 593: {"\276\307",0.0027139},
-: 594: {"\302\276",0.000867},
-: 595: {"\302\345",0.0005415}
-: 596: };
-: 597:
-: 598: static const short lookup[] =
-: 599: {
-: 600: 0, 1, -1, 2, 3, 4, 5, -1, 6, 7,
-: 601: 8, 9, -1, 10, 11, -1, 12, -1, 13, 14,
-: 602: 15, 16, -1, 17, 18, 19, 20, -1, 21, 22,
-: 603: 23, 24, -1, 25, 26, 27, 28, -1, 29, 30,
-: 604: 31, 32, -1, 33, 34, 35, 36, -1, 37, 38,
-: 605: -1, 39, -1, 40, 41, 42, 43, -1, 44, 45,
-: 606: 46, 47, -1, 48, 49, 50, 51, -1, 52, 53,
-: 607: 54, 55, 56, 57, 58, 59, 60, -1, 61, 62,
-: 608: 63, 64, -1, 65, 66, 67, 68, -1, 69, 70,
-: 609: 71, 72, -1, 73, 74, 75, 76, -1, 77, 78,
-: 610: 79, 80, -1, 81, 82, 83, -1, -1, 84, 85,
-: 611: 86, 87, -1, 88, 89, 90, 91, -1, 92, 93,
-: 612: 94, 95, -1, 96, 97, 98, 99, -1, 100, 101,
-: 613: 102, 103, -1, 104, 105, 106, 107, -1, 108, 109,
-: 614: 110, 111, -1, 112, 113, 114, 115, -1, 116, 117,
-: 615: 118, 119, -1, 120, 121, 122, 123, -1, 124, 125,
-: 616: 126, 127, -1, 128, 129, 130, 131, -1, 132, 133,
-: 617: 134, 135, -1, 136, 137, 138, 139, -1, 140, 141,
-: 618: 142, 143, -1, 144, 145, 146, 147, -1, 148, 149,
-: 619: 150, 151, -1, 152, 153, 154, 155, -1, 156, 157,
-: 620: 158, 159, -1, 160, 161, 162, 163, -1, 164, 165,
-: 621: 166, 167, -1, 168, 169, 170, 171, -1, 172, 173,
-: 622: 174, 175, -1, 176, 177, 178, 179, -1, 180, -1,
-: 623: 181, 182, -1, 183, 184, 185, 186, -1, 187, -1,
-: 624: 188, 189, -1, 190, -1, 191, 192, -1, 193, 194,
-: 625: 195, 196, -1, 197, 198, 199, 200, -1, 201, 202,
-: 626: 203, 204, -1, 205, -1, 206, 207, -1, 208, 209,
-: 627: 210, 211, -1, 212, -1, 213, 214, -1, 215, 216,
-: 628: 217, 218, -1, 219, 220, 221, 222, -1, 223, -1,
-: 629: 224, 225, -1, 226, -1, 227, 228, -1, 229, 230,
-: 630: 231, 232, -1, 233, 234, 235, 236, -1, 237, -1,
-: 631: 238, 239, -1, 240, -1, 241, 242, -1, 243, -1,
-: 632: 244, 245, -1, 246, 247, 248, 249, -1, 250, -1,
-: 633: 251, 252, -1, 253, 254, 255, 256, -1, 257, 258,
-: 634: 259, 260, -1, 261, -1, 262, 263, -1, 264, -1,
-: 635: 265, 266, -1, 267, -1, 268, 269, 270, 271, 272,
-: 636: 273, 274, -1, 275, -1, 276, 277, -1, 278, -1,
-: 637: 279, 280, -1, 281, -1, 282, 283, -1, 284, -1,
-: 638: 285, 286, -1, 287, -1, 288, 289, -1, 290, -1,
-: 639: 291, 292, -1, 293, -1, 294, 295, -1, 296, -1,
-: 640: 297, 298, -1, 299, -1, 300, 301, -1, 302, -1,
-: 641: 303, 304, -1, 305, -1, 306, 307, -1, 308, -1,
-: 642: 309, 310, -1, 311, -1, 312, 313, -1, 314, -1,
-: 643: 315, 316, -1, 317, -1, 318, 319, -1, 320, -1,
-: 644: 321, 322, -1, 323, -1, 324, 325, -1, 326, -1,
-: 645: 327, 328, -1, 329, -1, 330, 331, -1, 332, -1,
-: 646: 333, 334, -1, 335, -1, 336, 337, -1, 338, -1,
-: 647: 339, 340, -1, 341, -1, 342, 343, -1, 344, -1,
-: 648: 345, 346, -1, 347, 348, 349, 350, -1, 351, -1,
-: 649: 352, 353, -1, 354, -1, 355, 356, -1, 357, -1,
-: 650: 358, 359, -1, 360, -1, 361, 362, -1, 363, -1,
-: 651: 364, 365, -1, 366, -1, 367, 368, -1, 369, -1,
-: 652: 370, 371, -1, 372, -1, 373, 374, -1, 375, -1,
-: 653: 376, 377, -1, 378, -1, 379, 380, -1, 381, -1,
-: 654: 382, -1, -1, 383, -1, 384, 385, -1, 386, -1,
-: 655: 387, 388, -1, 389, -1, 390, -1, -1, 391, -1,
-: 656: 392, 393, -1, 394, -1, 395, 396, -1, 397, -1,
-: 657: 398, 399, -1, 400, -1, 401, 402, -1, 403, -1,
-: 658: 404, -1, -1, 405, -1, 406, 407, -1, 408, -1,
-: 659: 409, 410, -1, 411, -1, 412, 413, -1, 414, -1,
-: 660: 415, -1, -1, 416, -1, 417, -1, -1, 418, -1,
-: 661: 419, -1, -1, 420, -1, 421, 422, -1, 423, -1,
-: 662: 424, -1, -1, 425, -1, 426, -1, -1, -1, -1,
-: 663: 427, -1, -1, 428, -1, 429, -1, -1, 430, -1,
-: 664: 431, 432, -1, 433, -1, 434, 435, -1, 436, 437,
-: 665: 438, -1, -1, 439, -1, 440, 441, -1, 442, -1,
-: 666: 443, -1, -1, 444, -1, 445, 446, -1, 447, -1,
-: 667: 448, -1, -1, -1, -1, 449, -1, -1, -1, -1,
-: 668: 450, -1, -1, 451, -1, 452, -1, -1, 453, -1,
-: 669: 454, -1, -1, -1, -1, 455, -1, -1, -1, -1,
-: 670: 456, -1, -1, 457, -1, 458, 459, -1, -1, -1,
-: 671: 460, -1, -1, 461, -1, 462, -1, -1, -1, -1,
-: 672: 463, -1, -1, -1, -1, -1, -1, -1, 464, -1,
-: 673: -1, -1, -1, -1, -1, -1, 465, -1, 466, -1,
-: 674: 467, -1, -1, 468, -1, 469, -1, -1, -1, -1,
-: 675: 470, 471, -1, -1, -1, -1, -1, -1, -1, -1,
-: 676: 472, -1, -1, -1, -1, 473, -1, -1, 474, -1,
-: 677: -1, 475, -1, -1, -1, 476, -1, -1, -1, -1,
-: 678: 477, -1, -1, 478, -1, 479, -1, -1, -1, -1,
-: 679: -1, -1, -1, -1, -1, -1, -1, -1, 480, -1,
-: 680: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-: 681: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-: 682: 481, -1, -1, -1, -1, -1, -1, -1, 482, -1,
-: 683: -1, -1, -1, 483, -1, 484, -1, -1, -1, -1,
-: 684: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-: 685: 485, -1, -1, 486, -1, 487, -1, -1, -1, -1,
-: 686: 488, -1, -1, -1, -1, 489, -1, -1, 490, -1,
-: 687: 491, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-: 688: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-: 689: -1, -1, -1, 492, -1, -1, -1, -1, -1, -1,
-: 690: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-: 691: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-: 692: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-: 693: -1, -1, -1, -1, -1, 493, -1, -1, 494, -1,
-: 694: -1, -1, -1, -1, -1, -1, -1, -1, 495, -1,
-: 695: 496, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-: 696: -1, -1, -1, -1, -1, -1, -1, -1, 497, -1,
-: 697: -1, -1, -1, -1, -1, 498, -1, -1, -1, -1,
-: 698: -1, -1, -1, -1, -1, -1, 499
-: 699: };
-: 700:
684: 701: register int key = hash_big5 (str);
-: 702:
684: 703: if (key <= MAX_HASH_VALUE && key >= 0) {
678: 704: register int index = lookup[key];
-: 705:
678: 706: if (index >= 0) {
531: 707: register const unsigned char *s = wordlist[index].name;
-: 708:
531: 709: if (*str == *s && str[1] == s[1])
177: 710: return &wordlist[index];
-: 711: }
-: 712: }
-: 713: return 0;
-: 714:}
-: 715:
-: 716:/**
-: 717: * is_big5:
-: 718: * @str: Pointer to a 16-bit wide character.
-: 719: *
-: 720: * Returns: One if the wide character is within Big5 charset range, zero otherwise
-: 721: **/
-: 722:
684: 723:static int is_big5(const unsigned char *str)
-: 724:{
684: 725: unsigned char high = str[0];
684: 726: unsigned char low = str[1];
-: 727:
1368: 728: return high >=0xa1 && high <= 0xf9
1368: 729: && ((low >= 0x40 && low <= 0x7e)
684: 730: || (low >= 0xa1 && low <= 0xfe));
-: 731:}
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lib/.libs/guess.c.gcov
-: 0:Source:guess.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/guess.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/guess.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*
-: 2: encoding-guesing engine
-: 3:
-: 4: Copyright (C) 2000-2002 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#ifdef HAVE_CONFIG_H
-: 20:# include "config.h"
-: 21:#endif /* HAVE_CONFIG_H */
-: 22:
-: 23:#include
-: 24:
-: 25:#include "enca.h"
-: 26:#include "internal.h"
-: 27:
-: 28:/* Number of text character needed to switch to text mode in binary filter. */
-: 29:#define BIN_TEXT_CHAR_MIN 5
-: 30:
-: 31:/**
-: 32: * FILL_CHARACTER:
-: 33: *
-: 34: * Replacement character for binary, box-drawing, etc.filters.
-: 35: * Note: enca_isspace(#FILL_CHARACTER) must be true.
-: 36: **/
-: 37:#define FILL_CHARACTER ' '
-: 38:
-: 39:static const EncaAnalyserOptions DEFAULTS = {
-: 40: 1, /* const_buffer (always set per call) */
-: 41: 10, /* min_chars */
-: 42: 1.4142, /* threshold */
-: 43: 1, /* multibyte_enabled */
-: 44: 1, /* interpreted_surfaces */
-: 45: 0, /* ambiguous_mode */
-: 46: 1, /* filtering */
-: 47: 1, /* test_garbageness */
-: 48: 1, /* termination_strictness */
-: 49:};
-: 50:
-: 51:static const EncaEncoding ENCODING_UNKNOWN = { ENCA_CS_UNKNOWN, 0 };
-: 52:
-: 53:/* local prototypes */
-: 54:static EncaEncoding analyse (EncaAnalyserState *analyser,
-: 55: unsigned char *buffer,
-: 56: size_t size);
-: 57:static EncaErrno make_guess (EncaAnalyserState *analyser);
-: 58:static int try_test_list (EncaAnalyserState *analyser,
-: 59: EncaGuessFunc *tests);
-: 60:static size_t filter_binary (unsigned char *buffer,
-: 61: size_t size,
-: 62: unsigned char fill_char);
-: 63:static int looks_like_qp (EncaAnalyserState *analyser);
-: 64:static EncaErrno ambiguous_hook (EncaAnalyserState *analyser);
-: 65:static void count_characters (EncaAnalyserState *analyser);
-: 66:static int test_garbage (EncaAnalyserState *analyser);
-: 67:static size_t check_significant (EncaAnalyserState *analyser);
-: 68:
-: 69:/**
-: 70: * enca_guess_init:
-: 71: * @analyser: Analyser to initialize.
-: 72: *
-: 73: * Allocates and initializes analyser state, sets options to defaults.
-: 74: *
-: 75: * Assumes @analyser is unitinialized, calling with an initialized @analyser
-: 76: * leads to memory leak, but @analyser->lang must be already initialized.
-: 77: **/
-: 78:void
247: 79:enca_guess_init(EncaAnalyserState *analyser)
-: 80:{
247: 81: assert(analyser->lang != NULL);
-: 82:
247: 83: analyser->counts = NEW(size_t, 0x100);
247: 84: if (analyser->ncharsets == 0) {
25: 85: analyser->ratings = NULL;
25: 86: analyser->order = NULL;
-: 87: }
-: 88: else {
222: 89: analyser->ratings = NEW(double, analyser->ncharsets);
222: 90: analyser->order = NEW(size_t, analyser->ncharsets);
-: 91: }
-: 92:
247: 93: analyser->options = DEFAULTS;
247: 94: analyser->gerrno = 0;
247: 95:}
-: 96:
-: 97:/**
-: 98: * enca_guess_destroy:
-: 99: * @analyser: Analyser to destroy.
-: 100: *
-: 101: * Frees memory owned by analyser state.
-: 102: **/
-: 103:void
246: 104:enca_guess_destroy(EncaAnalyserState *analyser)
-: 105:{
246: 106: enca_free(analyser->counts);
246: 107: enca_free(analyser->ratings);
246: 108: enca_free(analyser->order);
246: 109:}
-: 110:
-: 111:/**
-: 112: * enca_analyse:
-: 113: * @analyser: An analyser initialized for some language.
-: 114: * @buffer: Buffer to be analysed.
-: 115: * @size: Size of @buffer.
-: 116: *
-: 117: * Analyses @buffer and finds its encoding.
-: 118: *
-: 119: * The @buffer is checked for 8bit encodings of language for which @analyser
-: 120: * was initialized and for multibyte encodings, mostly independent on language
-: 121: * (unless disabled with enca_set_multibyte()).
-: 122: *
-: 123: * The contents of @buffer may be (and probably will be) modified during the
-: 124: * analyse. Use enca_analyse_const() instead if this discomforts you.
-: 125: *
-: 126: * Returns: Encoding of @buffer. When charset part of return value is
-: 127: * #ENCA_CS_UNKNOWN, encoding was not determined. Check
-: 128: * enca_errno() for reason.
-: 129: **/
-: 130:EncaEncoding
420: 131:enca_analyse(EncaAnalyser analyser,
-: 132: unsigned char *buffer,
-: 133: size_t size)
-: 134:{
420: 135: assert(analyser != NULL);
420: 136: analyser->options.const_buffer = 0;
420: 137: return analyse(analyser, buffer, size);
-: 138:}
-: 139:
-: 140:/**
-: 141: * enca_analyse_const:
-: 142: * @analyser: An analyser initialized for some language.
-: 143: * @buffer: Buffer to be analysed.
-: 144: * @size: Size of @buffer.
-: 145: *
-: 146: * Analyses @buffer and finds its encoding.
-: 147: *
-: 148: * The @buffer is checked for 8bit encodings of language for which @analyser
-: 149: * was initialized and for multibyte encodings, mostly independent on language
-: 150: * (unless disabled with enca_set_multibyte()).
-: 151: *
-: 152: * This function never modifies @buffer (can be even used with string literal
-: 153: * @buffer) at the expense it's generally slower than enca_analyse().
-: 154: *
-: 155: * Returns: Encoding of @buffer. When charset part of return value is
-: 156: * #ENCA_CS_UNKNOWN, encoding was not determined. Check
-: 157: * enca_errno() for reason.
-: 158: **/
-: 159:EncaEncoding
64: 160:enca_analyse_const(EncaAnalyserState *analyser,
-: 161: const unsigned char *buffer,
-: 162: size_t size)
-: 163:{
64: 164: assert(analyser != NULL);
64: 165: analyser->options.const_buffer = 1;
64: 166: return analyse(analyser, (unsigned char *)buffer, size);
-: 167:}
-: 168:
-: 169:/**
-: 170: * analyse:
-: 171: * @analyser: An analyser initialized for some language.
-: 172: * @buffer: Buffer to be analysed.
-: 173: * @size: Size of @buffer.
-: 174: *
-: 175: * Analyses @buffer and finds its encoding.
-: 176: *
-: 177: * Returns: Encoding of @buffer.
-: 178: **/
-: 179:static EncaEncoding
484: 180:analyse(EncaAnalyserState *analyser,
-: 181: unsigned char *buffer,
-: 182: size_t size)
-: 183:{
484: 184: analyser->result = ENCODING_UNKNOWN;
-: 185:
-: 186: /* Empty buffer? */
484: 187: if (size == 0) {
3: 188: analyser->gerrno = ENCA_EEMPTY;
3: 189: return analyser->result;
-: 190: }
481: 191: assert(buffer != NULL);
-: 192:
-: 193: /* Initialize stuff. */
481: 194: analyser->gerrno = 0;
-: 195:
481: 196: analyser->buffer = buffer;
481: 197: analyser->size = size;
-: 198:
481: 199: analyser->buffer2 = NULL;
481: 200: analyser->size2 = 0;
-: 201:
481: 202: analyser->gerrno = make_guess(analyser);
481: 203: if (analyser->gerrno)
2: 204: analyser->result = ENCODING_UNKNOWN;
-: 205:
-: 206: /* When buffer2 is not NULL, then it holds the original buffer, so we must
-: 207: * free the copy (i.e. buffer, not buffer2!). */
481: 208: if (analyser->buffer2 != NULL)
26: 209: enca_free(analyser->buffer);
-: 210:
481: 211: return analyser->result;
-: 212:}
-: 213:
-: 214:/**
-: 215: * make_guess:
-: 216: * @analyser: An analyser whose buffer is to be analysed.
-: 217: *
-: 218: * Finds encoding of @buffer and stores it in @analyser->result.
-: 219: *
-: 220: * Returns: Zero on success, nonzero error code when the encoding was not
-: 221: * determined.
-: 222: **/
-: 223:static EncaErrno
481: 224:make_guess(EncaAnalyserState *analyser)
-: 225:{
481: 226: const unsigned short int *const *const weights = analyser->lang->weights;
481: 227: const unsigned short int *const significant = analyser->lang->significant;
481: 228: size_t *const counts = analyser->counts;
481: 229: size_t *const order = analyser->order;
481: 230: double *const ratings = analyser->ratings;
481: 231: const EncaAnalyserOptions *const options = &(analyser->options);
481: 232: unsigned char *buffer = analyser->buffer;
481: 233: size_t size = analyser->size;
-: 234:
-: 235: static int ascii = ENCA_CS_UNKNOWN; /* ASCII charset id */
-: 236:
-: 237: size_t fchars; /* characters filtered out */
-: 238: size_t i, cs;
-: 239:
-: 240: /* Initialize when we are called the first time. */
481: 241: if (ascii == ENCA_CS_UNKNOWN) {
242: 242: ascii = enca_name_to_charset("ascii");
242: 243: assert(ascii != ENCA_CS_UNKNOWN);
-: 244: }
-: 245:
-: 246: /* Count characters. */
481: 247: count_characters(analyser);
-: 248:
-: 249: /* Pure ascii file (but may be qp-encoded!). */
481: 250: if (!analyser->bin && !analyser->up) {
43: 251: if (options->multibyte_enabled) {
43: 252: if (try_test_list(analyser, ENCA_MULTIBYTE_TESTS_ASCII))
-: 253: return 0;
-: 254: }
-: 255:
33: 256: if (options->interpreted_surfaces && looks_like_qp(analyser)) {
-: 257: /* Quoted printables => recompute aliases and recount characters. */
33: 258: buffer = analyser->buffer;
33: 259: size = analyser->size;
33: 260: count_characters(analyser);
-: 261: }
-: 262:
33: 263: if (!analyser->bin && !analyser->up) {
-: 264: /* Plain ascii. */
#####: 265: analyser->result.charset = ascii;
#####: 266: analyser->result.surface |= enca_eol_surface(buffer, size,
#####: 267: analyser->counts);
#####: 268: return 0;
-: 269: }
-: 270: }
-: 271:
-: 272: /* Binary encodings (binary noise is handled later). */
471: 273: if (analyser->bin && options->multibyte_enabled) {
32: 274: if (try_test_list(analyser, ENCA_MULTIBYTE_TESTS_BINARY))
-: 275: return 0;
-: 276: }
-: 277: /* When interpreted surfaces are not allowed and sample contains binary data,
-: 278: * we can give it up right here. */
444: 279: if (!options->interpreted_surfaces && analyser->bin)
-: 280: return ENCA_EGARBAGE;
-: 281:
-: 282: /* Multibyte 8bit sample (utf-8), this has to be tested before
-: 283: * filtering too -- no language independent multibyte encoding can be
-: 284: * assumed to survive it. */
444: 285: if (!analyser->bin && analyser->up && options->multibyte_enabled) {
439: 286: if (try_test_list(analyser, ENCA_MULTIBYTE_TESTS_8BIT))
-: 287: return 0;
-: 288: }
-: 289:
-: 290: /* Now it can still be a regular 8bit charset (w/ or w/o noise), language
-: 291: * dependent MBCS (w/ or w/o noise), ascii w/ noise or just garbage. */
-: 292:
-: 293: /* When the buffer must be treated as const and filters are enabled
-: 294: * (and we didn't created a copy earlier), create a copy and store
-: 295: * original into buffer2 */
343: 296: if (options->const_buffer
52: 297: && options->filtering
26: 298: && analyser->buffer2 == NULL) {
26: 299: analyser->buffer2 = buffer;
26: 300: analyser->size2 = size;
52: 301: analyser->buffer = memcpy(enca_malloc(size), buffer, size);
26: 302: buffer = analyser->buffer;
-: 303: }
-: 304:
-: 305: /* Filter out blocks of binary data and box-drawing characters. */
343: 306: fchars = 0;
343: 307: if (options->filtering) {
26: 308: if (analyser->bin) {
#####: 309: fchars = filter_binary(buffer, size, FILL_CHARACTER);
#####: 310: if (fchars)
#####: 311: analyser->result.surface |= ENCA_SURFACE_EOL_BIN;
-: 312: }
26: 313: fchars += enca_filter_boxdraw(analyser, FILL_CHARACTER);
-: 314: }
-: 315:
-: 316: /* At least something should remain after filtering. */
343: 317: if (size - fchars < sqrt((double)size))
-: 318: return ENCA_EFILTERED;
-: 319:
-: 320: /* Detect surface. */
343: 321: analyser->result.surface |= enca_eol_surface(buffer, size, counts);
-: 322:
-: 323: /* When sample has been damaged by filters, recount characters. */
343: 324: if (fchars) {
2: 325: count_characters(analyser);
-: 326:
2: 327: if (!analyser->up) {
#####: 328: analyser->result.charset = ascii;
-: 329: /* FIXME: What if it's ASCII + box-drawing characters? */
#####: 330: analyser->result.surface |= ENCA_SURFACE_EOL_BIN;
#####: 331: return 0;
-: 332: }
-: 333: }
-: 334:
-: 335: /* Check multibyte 8bit sample (utf-8) again.
-: 336: * Chances are filtering helped it, even if it most probably destroyed it. */
343: 337: if (analyser->up && options->multibyte_enabled) {
343: 338: if (try_test_list(analyser, ENCA_MULTIBYTE_TESTS_8BIT_TOLERANT))
-: 339: return 0;
-: 340: }
-: 341:
-: 342: /* When no regular charsets are present (i.e. language is `none')
-: 343: * nothing of the following procedure has sense so just quit. */
337: 344: if (analyser->ncharsets == 0)
-: 345: return ENCA_ENOCS8;
-: 346:
-: 347: /* How many significant characters we caught? */
335: 348: if (!check_significant(analyser))
-: 349: return ENCA_ESIGNIF;
-: 350:
-: 351: /* Try pair analysis first. */
335: 352: if (enca_pair_analyse(analyser))
-: 353: return 0;
-: 354:
-: 355: /* Regular, language dependent 8bit charsets.
-: 356: *
-: 357: * When w_rs is relative occurence of character s in charset r we multiply
-: 358: * count[s] with factor (the sum in denominator is so-called significancy)
-: 359: *
-: 360: * w
-: 361: * rs
-: 362: * ----------------
-: 363: * ___
-: 364: * \
-: 365: * eps + > w
-: 366: * /___ rs
-: 367: * r
-: 368: */
251: 369: if (weights) {
1547: 370: for (cs = 0; cs < analyser->ncharsets; cs++) {
1547: 371: ratings[cs] = 0.0;
397579: 372: for (i = 0; i < 0x100; i++) {
396032: 373: ratings[cs] += weights[cs][i]/(significant[i] + EPSILON)*counts[i];
-: 374: }
-: 375: }
-: 376: } else {
6: 377: assert(analyser->lang->ratinghook);
6: 378: analyser->lang->ratinghook(analyser);
-: 379: }
-: 380:
-: 381: /* Find winner and second best. */
251: 382: enca_find_max_sec(analyser);
-: 383:
-: 384: /* Run langauge specific hooks. */
251: 385: if (analyser->ncharsets > 1 && analyser->lang->hook)
230: 386: analyser->lang->hook(analyser);
-: 387:
-: 388: /* Now we have found charset with the best relative ratings
-: 389: but we need an absolute test to detect total garbage. */
251: 390: if (options->test_garbageness && weights
245: 391: && test_garbage(analyser))
-: 392: return ENCA_EGARBAGE;
-: 393:
-: 394: /* Do we have a winner? */
251: 395: if (analyser->ncharsets == 1) {
#####: 396: analyser->result.charset = analyser->charsets[order[0]];
#####: 397: return 0;
-: 398: }
-: 399:
502: 400: if (ratings[order[0]]/(ratings[order[1]] + EPSILON)
251: 401: < options->threshold + EPSILON) {
-: 402: /* Unfortunately no, but in ambiguous mode have the last chance. */
3: 403: if (options->ambiguous_mode && weights)
3: 404: return ambiguous_hook(analyser);
-: 405:
-: 406: return ENCA_EWINNER;
-: 407: }
248: 408: analyser->result.charset = analyser->charsets[order[0]];
-: 409:
248: 410: return 0;
-: 411:}
-: 412:
-: 413:/**
-: 414: * filter_binary:
-: 415: * @buffer: Buffer to be filtered.
-: 416: * @size: Size of @buffer.
-: 417: * @fill_char: Replacement character.
-: 418: *
-: 419: * Replace blocks of binary characters in @buffer with @fill_char.
-: 420: *
-: 421: * Returns: Number of characters filtered out.
-: 422: **/
-: 423:static size_t
#####: 424:filter_binary(unsigned char *buffer,
-: 425: size_t size,
-: 426: unsigned char fill_char)
-: 427:{
-: 428: int mode; /* Mode 0 == text; mode > 0 binary, contains number of character
-: 429: remaining to switch to text mode. */
-: 430: size_t i, xout;
-: 431: unsigned char old[BIN_TEXT_CHAR_MIN - 1]; /* saved maybe-text characters */
-: 432:
#####: 433: mode = 0;
#####: 434: xout = 0;
#####: 435: for (i = 0; i < size; i++) {
#####: 436: if (enca_isbinary(buffer[i]))
-: 437: mode = BIN_TEXT_CHAR_MIN;
-: 438: else {
#####: 439: if (mode > 0) {
#####: 440: if (enca_istext(buffer[i])) {
#####: 441: mode--;
#####: 442: if (mode == 0) {
-: 443: /* Restore saved characters. */
#####: 444: unsigned char *b = buffer + i+1 - BIN_TEXT_CHAR_MIN;
-: 445: size_t j;
-: 446:
#####: 447: for (j = 0; j < BIN_TEXT_CHAR_MIN-1; j++)
#####: 448: b[j] = old[j];
#####: 449: xout -= BIN_TEXT_CHAR_MIN-1;
-: 450: }
-: 451: else
-: 452: /* Save this text character. */
#####: 453: old[BIN_TEXT_CHAR_MIN - mode - 1] = buffer[i];
-: 454: }
-: 455: else mode = BIN_TEXT_CHAR_MIN;
-: 456: }
-: 457: }
-: 458: /* Fill binary characters with FILL_CHARACTER */
#####: 459: if (mode > 0) {
#####: 460: buffer[i] = fill_char;
#####: 461: xout++;
-: 462: }
-: 463: }
-: 464:
-: 465: /* Return number of characters filled with fill_char. */
#####: 466: return xout;
-: 467:}
-: 468:
-: 469:/**
-: 470: * ambiguous_hook:
-: 471: * @analyser: An analyser.
-: 472: *
-: 473: * Checks whether we can determine the charset, allowing the result to be
-: 474: * ambiguous.
-: 475: *
-: 476: * I.e. checks wheter meaning of all present characters is the same in all
-: 477: * charsets under threshold, and if so, set @analyser->result accordingly.
-: 478: *
-: 479: * Returns: Zero on success, #ENCA_EWINNER when result cannot be determined.
-: 480: **/
-: 481:static EncaErrno
3: 482:ambiguous_hook(EncaAnalyserState *analyser)
-: 483:{
3: 484: const double *const ratings = analyser->ratings;
3: 485: const size_t max = analyser->order[0];
3: 486: const int csmax = analyser->charsets[max];
3: 487: const double t = analyser->options.threshold;
-: 488: size_t i;
-: 489:
24: 490: for (i = 0; i < analyser->ncharsets; i++) {
21: 491: if (i != max
18: 492: && ratings[max]/(ratings[i] + EPSILON) < t + EPSILON) {
6: 493: if (!enca_charsets_subset_identical(csmax, analyser->charsets[i],
6: 494: analyser->counts))
-: 495: return ENCA_EWINNER;
-: 496: }
-: 497: }
-: 498:
3: 499: if (analyser->lang->eolhook)
3: 500: analyser->lang->eolhook(analyser);
-: 501:
3: 502: analyser->result.charset = analyser->charsets[analyser->order[0]];
3: 503: return 0;
-: 504:}
-: 505:
-: 506:/**
-: 507: * try_test_list:
-: 508: * @analyser: An analyser.
-: 509: * @tests: List of test functions, NULL-terminated.
-: 510: *
-: 511: * Sequentially try @tests until some succeed or the list is exhausted.
-: 512: *
-: 513: * Returns: Nonzero when some test succeeded (@analyser->result is then set
-: 514: * accordingly), zero otherwise.
-: 515: **/
-: 516:static int
-: 517:try_test_list(EncaAnalyserState *analyser,
-: 518: EncaGuessFunc *tests)
-: 519:{
-: 520: int i;
-: 521:
815: 522: for (i = 0; tests[i] != NULL; i++) {
959: 523: if (tests[i](analyser))
-: 524: return 1;
-: 525: }
-: 526:
-: 527: return 0;
-: 528:}
-: 529:
-: 530:/**
-: 531: * looks_like_qp:
-: 532: * @analyser: An analyser.
-: 533: *
-: 534: * Checks whether @analyser buffer is QP-encoded.
-: 535: *
-: 536: * If so, it sets ENCA_SURFACE_QP in result and removes this surface, saving
-: 537: * original buffer in @analyser->buffer2 (if not saved yet).
-: 538: *
-: 539: * Must be called with buffer containing only 7bit characters!
-: 540: *
-: 541: * Returns: Nonzero when @analyser buffer is QP-encoded.
-: 542: **/
-: 543:static int
33: 544:looks_like_qp(EncaAnalyserState *analyser)
-: 545:{
-: 546: /* QP escape character. */
-: 547: static const unsigned char QP_ESCAPE = '=';
-: 548:
-: 549: /* THIS IS A GENERATED TABLE, see tools/expand_table.pl */
-: 550: static const short int HEXDIGITS[] = {
-: 551: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 552: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 553: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 554: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 0, 0, 0, 0, 0,
-: 555: 0, 11, 12, 13, 14, 15, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 556: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 557: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 558: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 559: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 560: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 561: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 562: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 563: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 564: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 565: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 566: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-: 567: };
-: 568:
33: 569: unsigned char *buffer = analyser->buffer;
33: 570: size_t size = analyser->size;
-: 571:
33: 572: size_t qpcount = 0; /* number of qp encoded characters */
33: 573: size_t reduce = 0; /* how shorter will be the buffer after removing /qp */
-: 574: unsigned char *buffer2;
-: 575: unsigned char *p, *p2, *p0;
-: 576:
-: 577: /* When the file doesn't contain enough escape characters,
-: 578: don't waste time scanning it. */
33: 579: if (analyser->counts[(int)QP_ESCAPE] < analyser->options.min_chars)
-: 580: return 0;
-: 581:
-: 582: /* Count qp encoded characters. */
33: 583: p = memchr(buffer, QP_ESCAPE, size);
1503: 584: while (p != NULL && (size_t)(p-buffer) + 2 < size) {
1437: 585: if (*p == QP_ESCAPE) {
846: 586: reduce++;
846: 587: p++;
846: 588: if (*p == CR || *p == LF) {
66: 589: while ((size_t)(p-buffer) < size
66: 590: && (*p == CR || *p == LF)) {
33: 591: reduce++;
33: 592: p++;
-: 593: }
33: 594: continue;
-: 595: }
-: 596:
813: 597: if (HEXDIGITS[*p] && HEXDIGITS[*(p+1)]) {
813: 598: qpcount++;
813: 599: reduce++;
-: 600: }
-: 601: else
-: 602: return 0;
-: 603:
813: 604: p += 2;
813: 605: continue;
-: 606: }
591: 607: p = memchr(p, QP_ESCAPE, size - (p - buffer));
-: 608: }
-: 609:
-: 610: /* When we decide it is qp encoded text, extract the 8bit characters right
-: 611: now. */
33: 612: if (qpcount < analyser->options.min_chars)
-: 613: return 0;
-: 614:
33: 615: analyser->result.surface |= ENCA_SURFACE_QP;
-: 616: /* When the buffer must be treated as const (and we didn't created a copy
-: 617: * earlier), create a copy and store original into buffer2 */
33: 618: analyser->size -= reduce;
33: 619: if (analyser->options.const_buffer
#####: 620: && analyser->buffer2 == NULL) {
#####: 621: analyser->buffer2 = buffer;
#####: 622: analyser->size2 = size;
#####: 623: analyser->buffer = enca_malloc(analyser->size);
#####: 624: buffer = analyser->buffer;
#####: 625: buffer2 = analyser->buffer2;
-: 626: }
-: 627: else
-: 628: buffer2 = analyser->buffer;
-: 629:
-: 630: /* Don't mess with too much queer stuff, OTOH try to create something
-: 631: strict UTF-8 parser can accept. */
33: 632: p2 = buffer2;
33: 633: p0 = buffer;
33: 634: p = memchr(buffer2, QP_ESCAPE, size);
912: 635: while (p != NULL && (size_t)(p-buffer2) + 2 < size) {
1692: 636: memmove(p0, p2, p-p2);
846: 637: p0 += p - p2;
846: 638: p++;
846: 639: if (*p == CR || *p == LF) {
66: 640: while ((size_t)(p-buffer2) < size
66: 641: && (*p == CR || *p == LF))
33: 642: p++;
-: 643: }
-: 644: else {
813: 645: *p0++ = ((HEXDIGITS[*p]-1) << 4) + HEXDIGITS[*(p+1)]-1;
813: 646: p += 2;
-: 647: }
846: 648: p2 = p;
846: 649: p = memchr(p, QP_ESCAPE, size - (p - buffer2));
-: 650: }
66: 651: memmove(p0, p2, size - (p2 - buffer2));
-: 652:
33: 653: return 1;
-: 654:}
-: 655:
-: 656:/**
-: 657: * enca_eol_surface:
-: 658: * @buffer: A buffer whose EOL type is to be detected.
-: 659: * @size: Size of @buffer.
-: 660: * @counts: Character counts.
-: 661: *
-: 662: * Find EOL type of sample in @buffer.
-: 663: *
-: 664: * Returns: The EOL surface flags.
-: 665: **/
-: 666:EncaSurface
460: 667:enca_eol_surface(const unsigned char *buffer,
-: 668: size_t size,
-: 669: const size_t *counts)
-: 670:{
-: 671: unsigned char *p;
-: 672: size_t i;
-: 673:
-: 674: /* Return BINARY when the sample contains some strange characters.
-: 675: * Note this can happen only with filtering off. */
14860: 676: for (i = 0; i < 0x20; i++) {
14410: 677: if (counts[i] && enca_isbinary(i))
-: 678: return ENCA_SURFACE_EOL_BIN;
-: 679: }
-: 680: /* Return LF (Unix) also when the sample doesn't contain any EOLs at all. */
450: 681: if (counts[CR] == 0)
-: 682: return ENCA_SURFACE_EOL_LF;
-: 683: /* But when it contain no LF's then it's Mac. */
240: 684: if (counts[LF] == 0)
-: 685: return ENCA_SURFACE_EOL_CR;
-: 686: /* Otherwise it's MS-DOG or garbage. */
199: 687: if (counts[CR] != counts[LF])
-: 688: return ENCA_SURFACE_EOL_MIX;
-: 689:
-: 690: /* MS-DOS */
199: 691: p = memchr(buffer+1, LF, size-1);
24070: 692: while (p != NULL) {
23672: 693: if (*(p-1) != CR)
-: 694: return ENCA_SURFACE_EOL_MIX;
23672: 695: p++;
23672: 696: p = memchr(p, LF, size - (p - buffer));
-: 697: }
-: 698:
-: 699: return ENCA_SURFACE_EOL_CRLF;
-: 700:}
-: 701:
-: 702:/**
-: 703: * enca_find_max_sec:
-: 704: * @analyser: An analyser.
-: 705: *
-: 706: * Updates @analyser->order according to charset @ratings.
-: 707: *
-: 708: * XXX: This should be stable sort. The ordering is defined by
-: 709: * data//.h header file which is in turn defined by odering in
-: 710: * the appropriate script (doit.sh). Silly.
-: 711: *
-: 712: * Must not be called with @analyser with no regular charsets.
-: 713: **/
-: 714:void
433: 715:enca_find_max_sec(EncaAnalyserState *analyser)
-: 716:{
433: 717: double *const ratings = analyser->ratings;
433: 718: size_t *const order = analyser->order;
-: 719: size_t i, j;
-: 720:
433: 721: assert(analyser->ncharsets >= 1);
-: 722:
-: 723: /* Always start from 0, 1, 2, 3, ... */
2731: 724: for (i = 0; i < analyser->ncharsets; i++)
2731: 725: order[i] = i;
-: 726:
-: 727: /* Sort it with stable sort */
2731: 728: for (i = 0; i+1 < analyser->ncharsets; i++) {
2298: 729: double m = ratings[order[i]];
-: 730:
9765: 731: for (j = i+1; j < analyser->ncharsets; j++) {
7467: 732: if (m < ratings[order[j]]) {
2599: 733: size_t z = order[j];
-: 734:
2599: 735: order[j] = order[i];
2599: 736: order[i] = z;
2599: 737: m = ratings[z];
-: 738: }
-: 739: }
-: 740: }
433: 741:}
-: 742:
-: 743:/**
-: 744: * count_characters:
-: 745: * @analyser: An analyser.
-: 746: *
-: 747: * Recomputes occurence tables in @analyser, updating @analyser->bin and
-: 748: * @analyser->up counts too.
-: 749: **/
-: 750:static void
516: 751:count_characters(EncaAnalyserState *analyser)
-: 752:{
516: 753: const size_t size = analyser->size;
516: 754: const unsigned char *const buffer = analyser->buffer;
516: 755: size_t *const counts = analyser->counts;
-: 756: size_t i;
-: 757:
516: 758: analyser->bin = 0;
516: 759: analyser->up = 0;
-: 760:
132612: 761: for (i = 0; i < 0x100; i++)
132096: 762: counts[i] = 0;
-: 763:
1883028: 764: for (i = 0; i < size; i++)
1883028: 765: counts[buffer[i]]++;
-: 766:
132096: 767: for (i = 0; i < 0x100; i++) {
132096: 768: if (enca_isbinary(i))
14964: 769: analyser->bin += counts[i];
-: 770: }
-: 771:
66048: 772: for (i = 0x080; i < 0x100; i++)
66048: 773: analyser->up += counts[i];
516: 774:}
-: 775:
-: 776:/**
-: 777: * check_significant:
-: 778: * @analyser: An analyser.
-: 779: *
-: 780: * Counts significant characters in sample.
-: 781: * Currenly disabled for language depedent multibyte charsets.
-: 782: *
-: 783: * Returns: Nonzero when there are at least options.min_chars significant
-: 784: * characters, zero otherwise.
-: 785: **/
-: 786:static size_t
335: 787:check_significant(EncaAnalyserState *analyser)
-: 788:{
335: 789: const unsigned short int *const significant = analyser->lang->significant;
335: 790: size_t *const counts = analyser->counts;
-: 791: size_t i;
335: 792: size_t sgnf = 0;
-: 793:
335: 794: if (!significant)
-: 795: return 1;
-: 796:
84224: 797: for (i = 0; i < 0x100; i++) {
84224: 798: if (significant[i])
22353: 799: sgnf += counts[i];
-: 800: }
-: 801:
329: 802: return sgnf >= analyser->options.min_chars;
-: 803:}
-: 804:
-: 805:/**
-: 806: * test_garbage:
-: 807: * @analyser: An analyser.
-: 808: *
-: 809: * Checks whether sample is just garbage (near white noise) or not.
-: 810: *
-: 811: * The theory behind this test is shomewhat speculative.
-: 812: *
-: 813: * Returns: Nonzero when sample is garbage, zero otherwise.
-: 814: **/
-: 815:static int
245: 816:test_garbage(EncaAnalyserState *analyser)
-: 817:{
245: 818: const unsigned short int *const *const weights = analyser->lang->weights;
245: 819: const unsigned short int *const w = weights[analyser->order[0]];
245: 820: size_t *const counts = analyser->counts;
-: 821: double garbage, r;
-: 822: size_t i;
-: 823:
-: 824: /* 8bit white noise. */
245: 825: r = analyser->lang->weight_sum/128.0*analyser->options.threshold;
245: 826: garbage = 0.0;
31605: 827: for (i = 0x080; i < 0x100; i++)
31360: 828: garbage += (r - w[i])*counts[i];
-: 829:
245: 830: garbage /= analyser->lang->weight_sum;
245: 831: return garbage > 0.0;
-: 832:}
-: 833:
-: 834:/**
-: 835: * enca_set_multibyte:
-: 836: * @analyser: An analyser.
-: 837: * @multibyte: Whether multibyte encoding tests should be enabled (nonzero to
-: 838: * enable, zero to disable).
-: 839: *
-: 840: * Enables or disables multibyte encoding tests for @analyser.
-: 841: *
-: 842: * This option is enabled by default.
-: 843: *
-: 844: * When multibyte encodings are disabled, only 8bit charsets are checked.
-: 845: * Disabling them for language with no 8bit charsets leaves only one thing
-: 846: * enca_analyse() could test: whether the sample is purely 7bit ASCII or not
-: 847: * (the latter leading to analyser failure, of course).
-: 848: *
-: 849: * Multibyte encoding detection is also affected by
-: 850: * enca_set_termination_strictness().
-: 851: **/
-: 852:void
247: 853:enca_set_multibyte(EncaAnalyser analyser,
-: 854: int multibyte)
-: 855:{
247: 856: assert(analyser != NULL);
247: 857: analyser->options.multibyte_enabled = (multibyte != 0);
247: 858:}
-: 859:
-: 860:/**
-: 861: * enca_get_multibyte:
-: 862: * @analyser: An analyser.
-: 863: *
-: 864: * Returns whether @analyser can return multibyte encodings.
-: 865: *
-: 866: * See enca_set_multibyte() for more detailed description of multibyte
-: 867: * encoding checking.
-: 868: *
-: 869: * Returns: Nonzero when multibyte encoding are possible, zero otherwise.
-: 870: *
-: 871: * Since: 1.3.
-: 872: **/
-: 873:int
#####: 874:enca_get_multibyte(EncaAnalyser analyser)
-: 875:{
#####: 876: assert(analyser != NULL);
#####: 877: return analyser->options.multibyte_enabled;
-: 878:}
-: 879:
-: 880:/**
-: 881: * enca_set_interpreted_surfaces:
-: 882: * @analyser: An analyser.
-: 883: * @interpreted_surfaces: Whether interpreted surfaces tests should be enabled
-: 884: * (nonzero to allow, zero to disallow).
-: 885: *
-: 886: * Enables or disables interpeted surfaces tests for @analyser.
-: 887: *
-: 888: * This option is enabled by default.
-: 889: *
-: 890: * To allow simple applications which care about charset only and don't want
-: 891: * to wrestle with surfaces, neglecting surface information should not have
-: 892: * serious consequences. While ignoring EOL type surface is feasible, and
-: 893: * ignoring UCS byteorders may be acceptable in endian-homogenous environment;
-: 894: * ignoring the fact file is Quoted-Printable encoded can have disasterous
-: 895: * consequences. By disabling this option you can disable surfaces requiring
-: 896: * fundamental reinterpretation of the content, namely %ENCA_SURFACE_QP
-: 897: * and %ENCA_SURFACE_EOL_BIN (thus probably making enca_analyse() to fail on
-: 898: * such samples).
-: 899: **/
-: 900:void
#####: 901:enca_set_interpreted_surfaces(EncaAnalyser analyser,
-: 902: int interpreted_surfaces)
-: 903:{
#####: 904: assert(analyser != NULL);
#####: 905: analyser->options.interpreted_surfaces = (interpreted_surfaces != 0);
#####: 906:}
-: 907:
-: 908:/**
-: 909: * enca_get_interpreted_surfaces:
-: 910: * @analyser: An analyser.
-: 911: *
-: 912: * Returns whether @analyser allows interpreted surfaces.
-: 913: *
-: 914: * See enca_set_interpreted_surfaces() for more detailed description of
-: 915: * interpreted surfaces.
-: 916: *
-: 917: * Returns: Nonzero when interpreted surfaces are possible, zero otherwise.
-: 918: *
-: 919: * Since: 1.3.
-: 920: **/
-: 921:int
#####: 922:enca_get_interpreted_surfaces(EncaAnalyser analyser)
-: 923:{
#####: 924: assert(analyser != NULL);
#####: 925: return analyser->options.interpreted_surfaces;
-: 926:}
-: 927:
-: 928:/**
-: 929: * enca_set_ambiguity:
-: 930: * @analyser: An analyser.
-: 931: * @ambiguity: Whether result can be ambiguous (nonzero to allow, zero to
-: 932: * disallow).
-: 933: *
-: 934: * Enables or disables ambiguous mode for @analyser.
-: 935: *
-: 936: * This option is disabled by default.
-: 937: *
-: 938: * In ambiguous mode some result is returned even when the charset cannot be
-: 939: * determined uniquely, provided that sample contains only characters which
-: 940: * have the same meaning in all charsets under consideration.
-: 941: **/
-: 942:void
247: 943:enca_set_ambiguity(EncaAnalyser analyser,
-: 944: int ambiguity)
-: 945:{
247: 946: assert(analyser != NULL);
247: 947: analyser->options.ambiguous_mode = (ambiguity != 0);
247: 948:}
-: 949:
-: 950:/**
-: 951: * enca_get_ambiguity:
-: 952: * @analyser: An analyser.
-: 953: *
-: 954: * Returns whether @analyser can return ambiguous results.
-: 955: *
-: 956: * See enca_set_ambiguity() for more detailed description of ambiguous results.
-: 957: *
-: 958: * Returns: Nonzero when ambiguous results are allowed, zero otherwise.
-: 959: *
-: 960: * Since: 1.3.
-: 961: **/
-: 962:int
#####: 963:enca_get_ambiguity(EncaAnalyser analyser)
-: 964:{
#####: 965: assert(analyser != NULL);
#####: 966: return analyser->options.ambiguous_mode;
-: 967:}
-: 968:
-: 969:/**
-: 970: * enca_set_filtering:
-: 971: * @analyser: An analyser.
-: 972: * @filtering: Whether filters should be enabled (nonzero to enable, zero to
-: 973: * disable).
-: 974: *
-: 975: * Enables or disables filters for @analyser.
-: 976: *
-: 977: * This option is enabled by default.
-: 978: *
-: 979: * Various filters are used to filter out block of binary noise and box-drawing
-: 980: * characters that could otherwise confuse enca. In cases this is unwanted,
-: 981: * you can disable them by setting this option to zero.
-: 982: **/
-: 983:void
484: 984:enca_set_filtering(EncaAnalyser analyser,
-: 985: int filtering)
-: 986:{
484: 987: assert(analyser != NULL);
484: 988: analyser->options.filtering = (filtering != 0);
484: 989:}
-: 990:
-: 991:/**
-: 992: * enca_get_filtering:
-: 993: * @analyser: An analyser.
-: 994: *
-: 995: * Returns whether @analyser has filtering enabled.
-: 996: *
-: 997: * See enca_set_filtering() for more detailed description of filtering.
-: 998: *
-: 999: * Returns: Nonzero when filtering is enabled, zero otherwise.
-: 1000: *
-: 1001: * Since: 1.3.
-: 1002: **/
-: 1003:int
#####: 1004:enca_get_filtering(EncaAnalyser analyser)
-: 1005:{
#####: 1006: assert(analyser != NULL);
#####: 1007: return analyser->options.filtering;
-: 1008:}
-: 1009:
-: 1010:/**
-: 1011: * enca_set_garbage_test:
-: 1012: * @analyser: An analyser.
-: 1013: * @garabage_test: Whether garbage test should be allowed (nonzero to enable,
-: 1014: * nzero to disable).
-: 1015: *
-: 1016: * Enables or disables garbage test for @analyser.
-: 1017: *
-: 1018: * This option is enabled by default.
-: 1019: *
-: 1020: * To prevent white noise (and almost-white noise) from being accidentally
-: 1021: * detected as some charset, a garbage test is used. In cases this is
-: 1022: * unwanted, you can disable is by setting this option to zero.
-: 1023: **/
-: 1024:void
247: 1025:enca_set_garbage_test(EncaAnalyser analyser,
-: 1026: int garabage_test)
-: 1027:{
247: 1028: assert(analyser != NULL);
247: 1029: analyser->options.test_garbageness = (garabage_test != 0);
247: 1030:}
-: 1031:
-: 1032:/**
-: 1033: * enca_get_garbage_test:
-: 1034: * @analyser: An analyser.
-: 1035: *
-: 1036: * Returns whether @analyser has garbage test enabled.
-: 1037: *
-: 1038: * See enca_set_garbage_test() for more detailed description of garbage test.
-: 1039: *
-: 1040: * Returns: Nonzero when garbage test is enabled, zero otherwise.
-: 1041: *
-: 1042: * Since: 1.3.
-: 1043: **/
-: 1044:int
#####: 1045:enca_get_garbage_test(EncaAnalyser analyser)
-: 1046:{
#####: 1047: assert(analyser != NULL);
#####: 1048: return analyser->options.test_garbageness;
-: 1049:}
-: 1050:
-: 1051:/**
-: 1052: * enca_set_termination_strictness:
-: 1053: * @analyser: An analyser.
-: 1054: * @termination_strictness: Whether multibyte sequences are required to be
-: 1055: * terminated correctly at the end of sample
-: 1056: * (nonzero to require, zero to relax).
-: 1057: *
-: 1058: * Enables or disables requiring multibyte sequences to be terminated correctly
-: 1059: * at the end of sample.
-: 1060: *
-: 1061: * This option is enabled by default.
-: 1062: *
-: 1063: * The sample given to enca_analyse() generally may not be a complete text
-: 1064: * (e.g. for efficiency reasons). As a result, it may end in the middle of a
-: 1065: * multibyte sequence. In this case, you should disable this option to
-: 1066: * prevent rejecting some charset just because the sample don't terminate
-: 1067: * correctly. On the other hand, when given sample contains whole text, you
-: 1068: * should always enable this option to assure correctness of the result.
-: 1069: *
-: 1070: * Note this option does NOT affect fixed character size encodings, like UCS-2
-: 1071: * and UCS-4; sample is never assumed to contain UCS-2 text when its size is
-: 1072: * not even (and similarly for UCS-4).
-: 1073: **/
-: 1074:void
484: 1075:enca_set_termination_strictness(EncaAnalyser analyser,
-: 1076: int termination_strictness)
-: 1077:{
484: 1078: assert(analyser != NULL);
484: 1079: analyser->options.termination_strictness = (termination_strictness != 0);
484: 1080:}
-: 1081:
-: 1082:/**
-: 1083: * enca_get_termination_strictness:
-: 1084: * @analyser: An analyser.
-: 1085: *
-: 1086: * Returns whether @analyser requires strict termination.
-: 1087: *
-: 1088: * See enca_set_termination_strictness() for more detailed description of
-: 1089: * termination strictness.
-: 1090: *
-: 1091: * Returns: Nonzero when strict termination is required, zero otherwise.
-: 1092: *
-: 1093: * Since: 1.3.
-: 1094: **/
-: 1095:int
#####: 1096:enca_get_termination_strictness(EncaAnalyser analyser)
-: 1097:{
#####: 1098: assert(analyser != NULL);
#####: 1099: return analyser->options.termination_strictness;
-: 1100:}
-: 1101:
-: 1102:/**
-: 1103: * enca_set_significant:
-: 1104: * @analyser: An analyser.
-: 1105: * @significant: Minimal number of required significant characters.
-: 1106: *
-: 1107: * Sets the minimal number of required significant characters.
-: 1108: *
-: 1109: * The default value of this option is 10.
-: 1110: *
-: 1111: * enca_analyse() refuses to make a decision unles at least this number
-: 1112: * of significant characters is found in sample. You may want to lower this
-: 1113: * number for very short texts.
-: 1114: *
-: 1115: * Returns: Zero on success, nonzero on failure, i.e. when you passed zero
-: 1116: * as @significant. It sets analyser errno to ENCA_EINVALUE on
-: 1117: * failure.
-: 1118: **/
-: 1119:int
484: 1120:enca_set_significant(EncaAnalyser analyser,
-: 1121: size_t significant)
-: 1122:{
484: 1123: assert(analyser != NULL);
484: 1124: if (significant == 0)
#####: 1125: return analyser->gerrno = ENCA_EINVALUE;
-: 1126:
484: 1127: analyser->options.min_chars = significant;
484: 1128: return 0;
-: 1129:}
-: 1130:
-: 1131:/**
-: 1132: * enca_get_significant:
-: 1133: * @analyser: An analyser.
-: 1134: *
-: 1135: * Returns the minimum number of significant characters required by @analyser.
-: 1136: *
-: 1137: * See enca_set_significant() for more detailed description of required
-: 1138: * significant characters.
-: 1139: *
-: 1140: * Returns: The minimum number of significant characters.
-: 1141: *
-: 1142: * Since: 1.3.
-: 1143: **/
-: 1144:size_t
#####: 1145:enca_get_significant(EncaAnalyser analyser)
-: 1146:{
#####: 1147: assert(analyser != NULL);
#####: 1148: return analyser->options.min_chars;
-: 1149:}
-: 1150:
-: 1151:/**
-: 1152: * enca_set_threshold:
-: 1153: * @analyser: An analyser.
-: 1154: * @threshold: Minimal ratio between winner and second best guess.
-: 1155: *
-: 1156: * Sets the minimal ratio between the most probable and the second most
-: 1157: * probable charsets.
-: 1158: *
-: 1159: * The default value of this option is 1.4142.
-: 1160: *
-: 1161: * enca_analyse() consideres the result known only when there's a clear gap
-: 1162: * between the most probable and the second most probable charset
-: 1163: * proababilities. Lower @threshold values mean larger probability of a
-: 1164: * mistake and smaller probability of not recognizing a charset; higher
-: 1165: * @threshold values the contrary. Threshold value of 2 is almost infinity.
-: 1166: *
-: 1167: * Returns: Zero on success, nonzero on failure, i.e. when you passed value
-: 1168: * smaller than 1.0 as @threshold. It sets analyser errno to
-: 1169: * ENCA_EINVALUE on failure.
-: 1170: **/
-: 1171:int
247: 1172:enca_set_threshold(EncaAnalyser analyser,
-: 1173: double threshold)
-: 1174:{
247: 1175: assert(analyser != NULL);
247: 1176: if (threshold < 1.0)
#####: 1177: return analyser->gerrno = ENCA_EINVALUE;
-: 1178:
247: 1179: analyser->options.threshold = threshold;
247: 1180: return 0;
-: 1181:}
-: 1182:
-: 1183:/**
-: 1184: * enca_get_threshold:
-: 1185: * @analyser: An analyser.
-: 1186: *
-: 1187: * Returns the threshold value used by @analyser.
-: 1188: *
-: 1189: * See enca_set_threshold() for more detailed threshold description.
-: 1190: *
-: 1191: * Returns: The threshold value.
-: 1192: *
-: 1193: * Since: 1.3.
-: 1194: **/
-: 1195:double
#####: 1196:enca_get_threshold(EncaAnalyser analyser)
-: 1197:{
#####: 1198: assert(analyser != NULL);
#####: 1199: return analyser->options.threshold;
-: 1200:}
-: 1201:
-: 1202:/* vim: ts=2 sw=2 et
-: 1203: */
-: 1204:
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lib/.libs/enca.c.gcov
-: 0:Source:enca.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/enca.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/enca.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*
-: 2: encoding-guessing libary; the high-level analyser interface
-: 3:
-: 4: Copyright (C) 2000-2003 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#ifdef HAVE_CONFIG_H
-: 20:# include "config.h"
-: 21:#endif /* HAVE_CONFIG_H */
-: 22:
-: 23:#include "enca.h"
-: 24:#include "internal.h"
-: 25:
-: 26:/**
-: 27: * enca_analyser_alloc:
-: 28: * @langname: Language for which the analyser should be initialized.
-: 29: *
-: 30: * Allocates an analyser and initializes it for language @language.
-: 31: *
-: 32: * The analyser, once crerated, can be used only for language for which it
-: 33: * was initialized. If you need to detect encodings of texts in more than one
-: 34: * language, you must allocate an analyser for each one. Note however, an
-: 35: * analyser may occupy a considerable amount of memory (a few hundreds of kB),
-: 36: * so it's generally not a good idea to have several hundreds of them floating
-: 37: * around.
-: 38: *
-: 39: * @langname is two-letter ISO 639:1989 language code. Locale names in form
-: 40: * language_territory and ISO-639 English language names also may be accepted
-: 41: * in the future. To be on the safe side, use only names returned by
-: 42: * enca_get_languages().
-: 43: *
-: 44: * Returns: The newly created #EncaAnalyser on success, #NULL on failure
-: 45: * (namely when @langname is unknown or otherwise invalid).
-: 46: **/
-: 47:EncaAnalyser
247: 48:enca_analyser_alloc(const char *langname)
-: 49:{
-: 50: EncaAnalyserState *analyser;
-: 51:
247: 52: if (langname == NULL)
-: 53: return NULL;
-: 54:
247: 55: analyser = NEW(EncaAnalyserState, 1);
247: 56: if (!enca_language_init(analyser, langname)) {
#####: 57: enca_free(analyser);
-: 58: return NULL;
-: 59: }
-: 60:
247: 61: enca_guess_init(analyser);
247: 62: enca_double_utf8_init(analyser);
247: 63: enca_pair_init(analyser);
-: 64:
247: 65: return analyser;
-: 66:}
-: 67:
-: 68:/**
-: 69: * enca_analyser_free:
-: 70: * @analyser: An analyser to be destroyed.
-: 71: *
-: 72: * Frees memory used by #EncaAnalyser @analyser.
-: 73: **/
-: 74:void
246: 75:enca_analyser_free(EncaAnalyser analyser)
-: 76:{
246: 77: assert(analyser != NULL);
-: 78:
246: 79: enca_pair_destroy(analyser);
246: 80: enca_double_utf8_destroy(analyser);
246: 81: enca_guess_destroy(analyser);
246: 82: enca_language_destroy(analyser);
246: 83: enca_free(analyser);
246: 84:}
-: 85:
-: 86:/**
-: 87: * enca_errno:
-: 88: * @analyser: An analyser.
-: 89: *
-: 90: * Returns analyser error code.
-: 91: *
-: 92: * The error code is not modified. However, any other analyser call i.e.
-: 93: * call to a function taking @analyser as parameter can change the error code.
-: 94: *
-: 95: * Returns: Error code of reason why last analyser call failed.
-: 96: **/
-: 97:int
424: 98:enca_errno(EncaAnalyser analyser)
-: 99:{
424: 100: assert(analyser != NULL);
-: 101:
424: 102: return analyser->gerrno;
-: 103:}
-: 104:
-: 105:/**
-: 106: * enca_strerror:
-: 107: * @analyser: An analyser.
-: 108: * @errnum: An analyser error code.
-: 109: *
-: 110: * Returns string describing the error code.
-: 111: *
-: 112: * The returned string must be considered constant and must NOT be freed.
-: 113: * It is however gauranteed not to be modified on invalidated by subsequent
-: 114: * calls to any libenca functions, including enca_strerror().
-: 115: *
-: 116: * The analyser error code is not changed for a successful call, and it set
-: 117: * to #ENCA_EINVALUE upon error.
-: 118: *
-: 119: * Returns: String describing the error code.
-: 120: **/
-: 121:const char*
#####: 122:enca_strerror(EncaAnalyser analyser,
-: 123: int errnum)
-: 124:{
-: 125: static const char *const DESCRIPTION_LIST[] = {
-: 126: "OK",
-: 127: "Invalid value",
-: 128: "Sample is empty",
-: 129: "After filtering, (almost) nothing remained",
-: 130: "Multibyte tests failed, language contains no 8bit charsets",
-: 131: "Not enough significant characters",
-: 132: "No clear winner",
-: 133: "Sample is just garbage"
-: 134: };
-: 135:
#####: 136: if ((size_t)errnum >= ELEMENTS(DESCRIPTION_LIST)) {
#####: 137: analyser->gerrno = ENCA_EINVALUE;
#####: 138: return "Unknown error! (FIXME!)";
-: 139: }
-: 140:
#####: 141: return DESCRIPTION_LIST[errnum];
-: 142:}
-: 143:
-: 144:/***** Documentation *********************************************************/
-: 145:
-: 146:/**
-: 147: * EncaErrno:
-: 148: * @ENCA_EOK: OK.
-: 149: * @ENCA_EINVALUE: Invalid value (usually of an option).
-: 150: * @ENCA_EEMPTY: Sample is empty.
-: 151: * @ENCA_EFILTERED: After filtering, (almost) nothing remained.
-: 152: * @ENCA_ENOCS8: Mulitibyte tests failed and language contains no 8bit charsets.
-: 153: * @ENCA_ESIGNIF: Too few significant characters.
-: 154: * @ENCA_EWINNER: No clear winner.
-: 155: * @ENCA_EGARBAGE: Sample is garbage.
-: 156: *
-: 157: * Error codes.
-: 158: **/
-: 159:
-: 160:/* vim: ts=2 sw=2 et
-: 161: */
-: 162:
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lib/.libs/lang_bg.c.gcov
-: 0:Source:lang_bg.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_bg.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_bg.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*
-: 2: encoding data and routines dependent on language; bulgarian
-: 3:
-: 4: Copyright (C) 2003 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#ifdef HAVE_CONFIG_H
-: 20:# include "config.h"
-: 21:#endif /* HAVE_CONFIG_H */
-: 22:
-: 23:#include "enca.h"
-: 24:#include "internal.h"
-: 25:#include "data/bulgarian/bulgarian.h"
-: 26:
-: 27:/* Local prototypes. */
-: 28:static int hook(EncaAnalyserState *analyser);
-: 29:static int hook_1251mac(EncaAnalyserState *analyser);
-: 30:static int hook_winmac(EncaAnalyserState *analyser);
-: 31:
-: 32:/**
-: 33: * ENCA_LANGUAGE_BG:
-: 34: *
-: 35: * Bulgarian language.
-: 36: *
-: 37: * Everything the world out there needs to know about this language.
-: 38: **/
-: 39:const EncaLanguageInfo ENCA_LANGUAGE_BG = {
-: 40: "bg",
-: 41: "bulgarian",
-: 42: NCHARSETS,
-: 43: CHARSET_NAMES,
-: 44: CHARSET_WEIGHTS,
-: 45: SIGNIFICANT,
-: 46: CHARSET_LETTERS,
-: 47: CHARSET_PAIRS,
-: 48: WEIGHT_SUM,
-: 49: &hook,
-: 50: &hook_winmac,
-: 51: NULL,
-: 52: NULL
-: 53:};
-: 54:
-: 55:/**
-: 56: * hook:
-: 57: * @analyser: Analyser state whose charset ratings are to be modified.
-: 58: *
-: 59: * Launches language specific hooks for language "bg".
-: 60: *
-: 61: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 62: * otherwise.
-: 63: **/
-: 64:static int
#####: 65:hook(EncaAnalyserState *analyser)
-: 66:{
#####: 67: return hook_1251mac(analyser);
-: 68:}
-: 69:
-: 70:/**
-: 71: * hook_winmac:
-: 72: * @analyser: Analyser state whose charset ratings are to be modified.
-: 73: *
-: 74: * Decides between cp1251 and maccyr charsets for language "bg".
-: 75: *
-: 76: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 77: * otherwise.
-: 78: **/
-: 79:static int
#####: 80:hook_winmac(EncaAnalyserState *analyser)
-: 81:{
-: 82: static EncaLanguageHookDataEOL hookdata[] = {
-: 83: { "maccyr", ENCA_SURFACE_EOL_CR, (size_t)-1 },
-: 84: { "cp1251", ENCA_SURFACE_MASK_EOL, (size_t)-1 },
-: 85: };
-: 86:
#####: 87: return enca_language_hook_eol(analyser, ELEMENTS(hookdata), hookdata);
-: 88:}
-: 89:
-: 90:/**
-: 91: * hook_1251mac:
-: 92: * @analyser: Analyser state whose charset ratings are to be modified.
-: 93: *
-: 94: * Decides between cp1251 and maccyr charsets for language "bg".
-: 95: *
-: 96: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 97: * otherwise.
-: 98: **/
-: 99:static int
-: 100:hook_1251mac(EncaAnalyserState *analyser)
-: 101:{
-: 102: /* The characters. */
-: 103: static const unsigned char list_cp1251[] = {
-: 104: 0xff, 0xcd, 0xd2, 0xc0, 0xd1, 0xc8, 0xcf, 0xc2
-: 105: };
-: 106: static const unsigned char list_maccyr[] = {
-: 107: 0xdf, 0x8d, 0x92, 0x80, 0x91, 0x88, 0x8f, 0x82
-: 108: };
-: 109: static EncaLanguageHookData1CS hookdata[] = {
-: 110: MAKE_HOOK_LINE(cp1251),
-: 111: MAKE_HOOK_LINE(maccyr),
-: 112: };
-: 113:
#####: 114: return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata);
-: 115:}
-: 116:
-: 117:/* vim: ts=2
-: 118: */
-: 119:
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lib/.libs/lang_ru.c.gcov
-: 0:Source:lang_ru.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_ru.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_ru.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*
-: 2: encoding data and routines dependent on language; russian
-: 3:
-: 4: Copyright (C) 2000-2002 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#ifdef HAVE_CONFIG_H
-: 20:# include "config.h"
-: 21:#endif /* HAVE_CONFIG_H */
-: 22:
-: 23:#include "enca.h"
-: 24:#include "internal.h"
-: 25:#include "data/russian/russian.h"
-: 26:
-: 27:/* Local prototypes. */
-: 28:static int hook(EncaAnalyserState *analyser);
-: 29:static int eol_hook(EncaAnalyserState *analyser);
-: 30:static int hook_mac1251(EncaAnalyserState *analyser);
-: 31:static int hook_macwin(EncaAnalyserState *analyser);
-: 32:
-: 33:/**
-: 34: * ENCA_LANGUAGE_RU:
-: 35: *
-: 36: * Russian language.
-: 37: *
-: 38: * Everything the world out there needs to know about this language.
-: 39: **/
-: 40:const EncaLanguageInfo ENCA_LANGUAGE_RU = {
-: 41: "ru",
-: 42: "russian",
-: 43: NCHARSETS,
-: 44: CHARSET_NAMES,
-: 45: CHARSET_WEIGHTS,
-: 46: SIGNIFICANT,
-: 47: CHARSET_LETTERS,
-: 48: CHARSET_PAIRS,
-: 49: WEIGHT_SUM,
-: 50: &hook,
-: 51: &eol_hook,
-: 52: NULL,
-: 53: NULL
-: 54:};
-: 55:
-: 56:/**
-: 57: * hook:
-: 58: * @analyser: Analyser state whose charset ratings are to be modified.
-: 59: *
-: 60: * Launches language specific hooks for language "ru".
-: 61: *
-: 62: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 63: * otherwise.
-: 64: **/
-: 65:static int
#####: 66:hook(EncaAnalyserState *analyser)
-: 67:{
#####: 68: return hook_mac1251(analyser);
-: 69:}
-: 70:
-: 71:/**
-: 72: * eol_hook:
-: 73: * @analyser: Analyser state whose charset ratings are to be modified.
-: 74: *
-: 75: * Launches language specific EOL hooks for language "ru".
-: 76: *
-: 77: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 78: * otherwise.
-: 79: **/
-: 80:static int
#####: 81:eol_hook(EncaAnalyserState *analyser)
-: 82:{
#####: 83: return hook_macwin(analyser);
-: 84:}
-: 85:
-: 86:/**
-: 87: * hook_macwin:
-: 88: * @analyser: Analyser state whose charset ratings are to be modified.
-: 89: *
-: 90: * Decides between maccyr and cp1251 charsets for language "ru".
-: 91: *
-: 92: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 93: * otherwise.
-: 94: **/
-: 95:static int
-: 96:hook_macwin(EncaAnalyserState *analyser)
-: 97:{
-: 98: static EncaLanguageHookDataEOL hookdata[] = {
-: 99: { "maccyr", ENCA_SURFACE_EOL_CR, (size_t)-1 },
-: 100: { "cp1251", ENCA_SURFACE_MASK_EOL, (size_t)-1 },
-: 101: };
-: 102:
#####: 103: return enca_language_hook_eol(analyser, ELEMENTS(hookdata), hookdata);
-: 104:}
-: 105:
-: 106:/**
-: 107: * hook_mac1251:
-: 108: * @analyser: Analyser state whose charset ratings are to be modified.
-: 109: *
-: 110: * Decides between maccyr and cp1251 charsets for language "ru".
-: 111: *
-: 112: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 113: * otherwise.
-: 114: **/
-: 115:static int
-: 116:hook_mac1251(EncaAnalyserState *analyser)
-: 117:{
-: 118: static const unsigned char list_maccyr[] = {
-: 119: 0xdf, 0x82, 0x8f, 0x8d, 0x80, 0x91, 0x88
-: 120: };
-: 121: static const unsigned char list_cp1251[] = {
-: 122: 0xff, 0xc2, 0xcf, 0xcd, 0xc0, 0xd1, 0xc8
-: 123: };
-: 124: static EncaLanguageHookData1CS hookdata[] = {
-: 125: MAKE_HOOK_LINE(maccyr),
-: 126: MAKE_HOOK_LINE(cp1251),
-: 127: };
-: 128:
#####: 129: return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata);
-: 130:}
-: 131:
-: 132:/* vim: ts=2
-: 133: */
<<<<<< EOF
# path=/home/travis/build/nijel/enca/lib/.libs/lang_sl.c.gcov
-: 0:Source:lang_sl.c
-: 0:Graph:/home/travis/build/nijel/enca/lib/.libs/lang_sl.gcno
-: 0:Data:/home/travis/build/nijel/enca/lib/.libs/lang_sl.gcda
-: 0:Runs:276
-: 0:Programs:1
-: 1:/*
-: 2: encoding data and routines dependent on language; slovene
-: 3:
-: 4: Copyright (C) 2000-2003 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#ifdef HAVE_CONFIG_H
-: 20:# include "config.h"
-: 21:#endif /* HAVE_CONFIG_H */
-: 22:
-: 23:#include "enca.h"
-: 24:#include "internal.h"
-: 25:#include "data/slovene/slovene.h"
-: 26:
-: 27:/* Local prototypes. */
-: 28:static int eol_hook(EncaAnalyserState *analyser);
-: 29:static int hook_isowin(EncaAnalyserState *analyser);
-: 30:
-: 31:/**
-: 32: * ENCA_LANGUAGE_SL:
-: 33: *
-: 34: * Slovene language.
-: 35: *
-: 36: * Everything the world out there needs to know about this language.
-: 37: **/
-: 38:const EncaLanguageInfo ENCA_LANGUAGE_SL = {
-: 39: "sl",
-: 40: "slovene",
-: 41: NCHARSETS,
-: 42: CHARSET_NAMES,
-: 43: CHARSET_WEIGHTS,
-: 44: SIGNIFICANT,
-: 45: CHARSET_LETTERS,
-: 46: CHARSET_PAIRS,
-: 47: WEIGHT_SUM,
-: 48: NULL,
-: 49: &eol_hook,
-: 50: NULL,
-: 51: NULL
-: 52:};
-: 53:
-: 54:/**
-: 55: * eol_hook:
-: 56: * @analyser: Analyser state whose charset ratings are to be modified.
-: 57: *
-: 58: * Launches language specific EOL hooks for language "sl".
-: 59: *
-: 60: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 61: * otherwise.
-: 62: **/
-: 63:static int
#####: 64:eol_hook(EncaAnalyserState *analyser)
-: 65:{
#####: 66: return hook_isowin(analyser);
-: 67:}
-: 68:
-: 69:/**
-: 70: * hook_isowin:
-: 71: * @analyser: Analyser state whose charset ratings are to be modified.
-: 72: *
-: 73: * Decides between iso8859-2 and cp1250 charsets for language "sl".
-: 74: *
-: 75: * Returns: Nonzero if charset ratigns have been actually modified, zero
-: 76: * otherwise.
-: 77: **/
-: 78:static int
-: 79:hook_isowin(EncaAnalyserState *analyser)
-: 80:{
-: 81: static EncaLanguageHookDataEOL hookdata[] = {
-: 82: { "cp1250", ENCA_SURFACE_EOL_CRLF, (size_t)-1 },
-: 83: { "iso88592", ENCA_SURFACE_MASK_EOL, (size_t)-1 },
-: 84: };
-: 85:
#####: 86: return enca_language_hook_eol(analyser, ELEMENTS(hookdata), hookdata);
-: 87:}
-: 88:
-: 89:/* vim: ts=2
-: 90: */
<<<<<< EOF
# path=/home/travis/build/nijel/enca/src/convert_recode.c.gcov
-: 0:Source:convert_recode.c
-: 0:Graph:enca-convert_recode.gcno
-: 0:Data:enca-convert_recode.gcda
-: 0:Runs:275
-: 0:Programs:1
-: 1:/*
-: 2: interface to GNU recode library (`librecode')
-: 3:
-: 4: Copyright (C) 2000-2003 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#include "common.h"
-: 20:#ifdef HAVE_LIBRECODE
-: 21:
-: 22:#if HAVE_STDBOOL_H
-: 23:# include
-: 24:#else /* HAVE_STDBOOL_H */
-: 25:# if ! HAVE__BOOL
-: 26:typedef unsigned char _Bool;
-: 27:# endif /* HAVE__BOOL */
-: 28:# define bool _Bool
-: 29:# define false 0
-: 30:# define true 1
-: 31:# define __bool_true_false_are_defined 1
-: 32:#endif /* HAVE_STDBOOL_H */
-: 33:
-: 34:#include
-: 35:
-: 36:#define enca_recode_fail_level RECODE_NOT_CANONICAL
-: 37:
-: 38:/* request list struct
-: 39: (they are cached between convert_recode() calls)
-: 40: auto-deallocated at exit */
-: 41:typedef struct _RecRequest RecRequest;
-: 42:
-: 43:struct _RecRequest {
-: 44: RECODE_REQUEST request; /* the recode request itself */
-: 45: char *request_string; /* request string */
-: 46: unsigned long int count; /* count, for caching optimization */
-: 47: RecRequest *next;
-: 48:};
-: 49:
-: 50:/* recode outer (allocated only once, auto-deallocated at exit) */
-: 51:static RECODE_OUTER outer = NULL;
-: 52:
-: 53:/* Local prototypes */
-: 54:static RECODE_REQUEST get_recode_request(const char *encreq);
-: 55:static void print_recode_warning(enum recode_error err,
-: 56: const char *fname);
-: 57:
-: 58:/* convert file using GNU recode library
-: 59: returns 0 on success, nonzero error code otherwise */
-: 60:int
11: 61:convert_recode(File *file,
-: 62: EncaEncoding from_enc)
-: 63:{
-: 64: RECODE_REQUEST request;
-: 65: RECODE_TASK task;
11: 66: File *tempfile = NULL;
-: 67: bool success;
-: 68: const char *encreq;
-: 69:
-: 70: /* Allocate librecode outer if we are called first time. */
11: 71: if (outer == NULL) {
8: 72: if ((outer = recode_new_outer(false)) == NULL) {
#####: 73: fprintf(stderr, "%s: recode library doesn't like us\n",
-: 74: program_name);
#####: 75: return ERR_LIBCOM;
-: 76: }
-: 77: }
-: 78:
-: 79: /* Construct recode request string,
-: 80: try to mimic surfaceless converter now. */
-: 81: {
-: 82: EncaEncoding enc;
-: 83:
11: 84: enc.charset = from_enc.charset;
11: 85: enc.surface = from_enc.surface | ENCA_SURFACE_REMOVE;
11: 86: encreq = format_request_string(enc, options.target_enc,
-: 87: ENCA_SURFACE_EOL_LF);
-: 88: }
-: 89: /* Create a recode request from it. */
11: 90: request = get_recode_request(encreq);
11: 91: if (request == NULL)
-: 92: return ERR_CANNOT;
-: 93:
-: 94: /* Now we have to distinguish between file and stdin, namely because
-: 95: * in case of stdin, it's first part is already loaded in the buffer. */
10: 96: if (file->name != NULL) {
-: 97: /* File is a regular file.
-: 98: Since recode doesn't recode files in place, we make a temporary file
-: 99: and copy contents of file fname to it. */
8: 100: if (file_seek(file, 0, SEEK_SET) != 0)
-: 101: return ERR_IOFAIL;
8: 102: file->buffer->pos = 0;
-: 103:
8: 104: if ((tempfile = file_temporary(file->buffer, 1)) == NULL
8: 105: || file_seek(file, 0, SEEK_SET) != 0) {
#####: 106: file_free(tempfile);
#####: 107: return ERR_IOFAIL;
-: 108: }
-: 109:
-: 110: /* Create a task from the request. */
8: 111: task = recode_new_task(request);
8: 112: task->fail_level = enca_recode_fail_level;
8: 113: task->abort_level = RECODE_SYSTEM_ERROR;
8: 114: task->input.name = NULL;
8: 115: task->input.file = file->stream;
8: 116: task->output.name = NULL;
8: 117: task->output.file = tempfile->stream;
-: 118:
-: 119: /* Now run conversion original -> temporary file. */
8: 120: success = recode_perform_task(task);
-: 121:
-: 122: /* If conversion wasn't successfull, original file is probably damaged
-: 123: (damned librecode!) try to restore it from the temporary copy. */
8: 124: if (!success) {
#####: 125: print_recode_warning(task->error_so_far, file->name);
-: 126: } else {
8: 127: if (file_seek(file, 0, SEEK_SET) != 0
8: 128: || file_seek(tempfile, 0, SEEK_SET) != 0
8: 129: || file_truncate(file, 0) != 0
8: 130: || copy_and_convert(tempfile, file, NULL) != 0) {
#####: 131: fprintf(stderr, "failed to rename temporary file back\n");
#####: 132: file_free(tempfile);
#####: 133: return ERR_IOFAIL;
-: 134: }
-: 135: }
-: 136:
8: 137: recode_delete_task(task);
8: 138: file_free(tempfile);
-: 139: }
-: 140: else {
-: 141: /* File is stdin.
-: 142: First recode begining saved in io_buffer, then append rest of stdin. */
2: 143: enum recode_error errmax = RECODE_NO_ERROR;
-: 144:
-: 145: /* Create a task from the request.
-: 146: * Set it up for buffer -> stdout conversion */
2: 147: task = recode_new_task(request);
2: 148: task->fail_level = enca_recode_fail_level;
2: 149: task->abort_level = RECODE_SYSTEM_ERROR;
2: 150: task->input.name = NULL;
2: 151: task->input.file = NULL;
2: 152: task->input.buffer = (char*)file->buffer->data;
2: 153: task->input.cursor = (char*)file->buffer->data;
2: 154: task->input.limit = (char*)file->buffer->data + file->buffer->pos;
2: 155: task->output.name = NULL;
2: 156: task->output.file = stdout;
-: 157:
2: 158: success = recode_perform_task(task);
2: 159: if (!success) {
#####: 160: if (task->error_so_far >= RECODE_SYSTEM_ERROR) {
#####: 161: fprintf(stderr, "%s: librecode probably damaged `%s'. "
-: 162: "No way to recover in a pipe.\n",
-: 163: program_name,
-: 164: ffname_r(NULL));
#####: 165: recode_delete_task(task);
#####: 166: return ERR_IOFAIL;
-: 167: }
-: 168: else
#####: 169: errmax = task->error_so_far;
-: 170: }
2: 171: recode_delete_task(task);
-: 172:
-: 173: /* Create a task from the request.
-: 174: * Set it up for stdin -> stdout conversion */
2: 175: task = recode_new_task(request);
2: 176: task->fail_level = enca_recode_fail_level;
2: 177: task->abort_level = RECODE_SYSTEM_ERROR;
2: 178: task->input.name = NULL;
2: 179: task->input.file = stdin;
2: 180: task->output.name = NULL;
2: 181: task->output.file = stdout;
-: 182:
2: 183: success = recode_perform_task(task);
2: 184: if (!success) {
#####: 185: if (task->error_so_far >= RECODE_SYSTEM_ERROR) {
#####: 186: fprintf(stderr, "%s: librecode probably damaged `%s'. "
-: 187: "No way to recover in a pipe.\n",
-: 188: program_name,
-: 189: ffname_r(NULL));
#####: 190: recode_delete_task(task);
#####: 191: return ERR_IOFAIL;
-: 192: }
-: 193: else {
#####: 194: if (errmax < task->error_so_far)
#####: 195: errmax = task->error_so_far;
-: 196: }
-: 197: }
2: 198: if (errmax >= enca_recode_fail_level)
#####: 199: print_recode_warning(errmax, ffname_r(NULL));
-: 200:
2: 201: recode_delete_task(task);
-: 202: }
-: 203:
-: 204: /* return ERR_IOFAIL on failure since it means file-related problems */
10: 205: return success ? ERR_OK : ERR_IOFAIL;
-: 206:}
-: 207:
-: 208:/* caching request creator
-: 209: returns recode request either found in cache or, if not found, a newly
-: 210: created (and immediately put into the cache)
-: 211: returns NULL on failure */
-: 212:static RECODE_REQUEST
11: 213:get_recode_request(const char *encreq)
-: 214:{
-: 215: static RecRequest *request_cache = NULL; /* recode request cache */
-: 216:
-: 217: RECODE_REQUEST request;
-: 218: RecRequest *req;
-: 219:
-: 220: /* try to find the request in cache (bubble sorting it meanwhile) */
22: 221: for (req = request_cache; req != NULL; req = req->next) {
3: 222: if (strcmp(req->request_string, encreq) == 0)
-: 223: break;
-: 224:
#####: 225: if (req->next != NULL && req->count < req->next->count) {
-: 226: RecRequest tmpreq;
-: 227: /* it's easier to exchange contents instead of pointers here */
#####: 228: tmpreq.request = req->request;
#####: 229: tmpreq.count = req->count;
#####: 230: tmpreq.request_string = req->request_string;
-: 231:
#####: 232: req->request = req->next->request;
#####: 233: req->count = req->next->count;
#####: 234: req->request_string = req->next->request_string;
-: 235:
#####: 236: req->next->request = tmpreq.request;
#####: 237: req->next->count = tmpreq.count;
#####: 238: req->next->request_string = tmpreq.request_string;
-: 239: }
-: 240: }
-: 241: /* found, increment usage count and return it */
11: 242: if (req != NULL) {
3: 243: req->count++;
3: 244: return req->request;
-: 245: }
-: 246: /* request not found, ask for a new one */
8: 247: if ((request = recode_new_request(outer)) == NULL) {
#####: 248: fprintf(stderr, "%s: recode library doesn't accept new requests\n",
-: 249: program_name);
#####: 250: return NULL; /* maybe we could simply abort */
-: 251: }
-: 252: /* Set some options. */
8: 253: request->diacritics_only = request->ascii_graphics = true;
-: 254: /* create request from request string */
8: 255: if (!recode_scan_request(request, encreq)) {
1: 256: if (options.verbosity_level) {
#####: 257: fprintf(stderr, "%s: errorneous recoding request `%s'\n",
-: 258: program_name,encreq);
-: 259: }
1: 260: recode_delete_request(request);
1: 261: return NULL;
-: 262: }
-: 263: /* add it to end of cache */
7: 264: if ((req = request_cache) != NULL) {
#####: 265: while (req->next != NULL) req = req->next;
#####: 266: req->next = NEW(RecRequest, 1);
#####: 267: req = req->next;
-: 268: }
-: 269: else {
7: 270: req = NEW(RecRequest, 1);
7: 271: request_cache = req;
-: 272: }
7: 273: req->request = request;
7: 274: req->request_string = enca_strdup(encreq);
7: 275: req->count = 1;
7: 276: req->next = NULL;
-: 277:
7: 278: return request;
-: 279:}
-: 280:
-: 281:static void
#####: 282:print_recode_warning(enum recode_error err,
-: 283: const char *fname)
-: 284:{
-: 285: const char *msg;
-: 286:
#####: 287: if (options.verbosity_level < 1)
-: 288: return;
-: 289:
-: 290: switch (err) {
-: 291: case RECODE_NOT_CANONICAL:
-: 292: msg = "Input is not canonical";
-: 293: break;
-: 294:
-: 295: case RECODE_AMBIGUOUS_OUTPUT:
-: 296: msg = "Conversion leads to ambiguous output";
-: 297: break;
-: 298:
-: 299: case RECODE_UNTRANSLATABLE:
-: 300: msg = "Untranslatable input";
-: 301: break;
-: 302:
-: 303: case RECODE_INVALID_INPUT:
-: 304: msg = "Invalid input";
-: 305: break;
-: 306:
-: 307: default:
-: 308: msg = "Unknown error";
-: 309: break;
-: 310: }
-: 311:
#####: 312: fprintf(stderr, "%s: librecode warning: %s in `%s'\n",
-: 313: program_name,
-: 314: msg,
-: 315: fname);
-: 316:}
-: 317:#endif /* HAVE_LIBRECODE */
-: 318:
-: 319:/* vim: ts=2
-: 320: */
<<<<<< EOF
# path=/home/travis/build/nijel/enca/src/options.c.gcov
-: 0:Source:options.c
-: 0:Graph:enca-options.gcno
-: 0:Data:enca-options.gcda
-: 0:Runs:275
-: 0:Programs:1
-: 1:/*
-: 2: command line option processing
-: 3:
-: 4: Copyright (C) 2000-2003 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#include "common.h"
-: 20:
-: 21:#ifdef HAVE_GETOPT_H
-: 22:# include
-: 23:#else /* HAVE_GETOPT_H */
-: 24:# include "getopt.h"
-: 25:#endif /* HAVE_GETOPT_H */
-: 26:
-: 27:#ifdef HAVE_WORDEXP
-: 28:# ifdef HAVE_WORDEXP_H
-: 29:# include
-: 30:# else /* HAVE_WORDEXP_H */
-: 31:/* don't declare all the stuff from wordexp.h when not present, it would
-: 32: probably not work anyway---just don't use it */
-: 33:# undef HAVE_WORDEXP
-: 34:# endif /* HAVE_WORDEXP_H */
-: 35:#endif /* HAVE_WORDEXP */
-: 36:
-: 37:typedef void (* ReportFunc)(void);
-: 38:
-: 39:/* Program behaviour: enca or enconv. */
-: 40:typedef enum {
-: 41: BEHAVE_ENCA,
-: 42: BEHAVE_ENCONV
-: 43:} ProgramBehaviour;
-: 44:
-: 45:/* Settings. */
-: 46:char *program_name = NULL;
-: 47:static ProgramBehaviour behaviour = BEHAVE_ENCA;
-: 48:Options options;
-: 49:
-: 50:/* Environment variable containing default options. */
-: 51:static const char *ENCA_ENV_VAR = "ENCAOPT";
-: 52:
-: 53:/* Environment variable containing default target charset (think recode). */
-: 54:static const char *RECODE_CHARSET_VAR = "DEFAULT_CHARSET";
-: 55:
-: 56:/* Default option values. */
-: 57:static const Options DEFAULTS = {
-: 58: 0, /* verbosity_level */
-: 59: NULL, /* language */
-: 60: OTYPE_HUMAN, /* output_type */
-: 61: { ENCA_CS_UNKNOWN, 0 }, /* target_enc */
-: 62: NULL, /* target_enc_str */
-: 63: -1, /* prefix_filename */
-: 64:};
-: 65:
-: 66:extern const char *const COPYING_text[];
-: 67:extern const char *const HELP_text[];
-: 68:
-: 69:/* Version/copyright text. */
-: 70:static const char *VERSION_TEXT = /* {{{ */
-: 71:"Features: "
-: 72:#ifdef HAVE_LIBRECODE
-: 73:"+"
-: 74:#else /* HAVE_LIBRECODE */
-: 75:"-"
-: 76:#endif /* HAVE_LIBRECODE */
-: 77:"librecode-interface "
-: 78:
-: 79:#ifdef HAVE_GOOD_ICONV
-: 80:"+"
-: 81:#else /* HAVE_GOOD_ICONV */
-: 82:"-"
-: 83:#endif /* HAVE_GOOD_ICONV */
-: 84:"iconv-interface "
-: 85:
-: 86:#ifdef ENABLE_EXTERNAL
-: 87:"+"
-: 88:#else /* ENABLE_EXTERNAL */
-: 89:"-"
-: 90:#endif /* ENABLE_EXTERNAL */
-: 91:"external-converter "
-: 92:
-: 93:#ifdef HAVE_SETLOCALE
-: 94:"+"
-: 95:#else /* HAVE_SETLOCALE */
-: 96:"-"
-: 97:#endif /* HAVE_SETLOCALE */
-: 98:"language-detection "
-: 99:
-: 100:#ifdef HAVE_LOCALE_ALIAS
-: 101:"+"
-: 102:#else /* HAVE_LOCALE_ALIAS */
-: 103:"-"
-: 104:#endif /* HAVE_LOCALE_ALIAS */
-: 105:"locale-alias "
-: 106:
-: 107:#ifdef HAVE_NL_LANGINFO
-: 108:"+"
-: 109:#else /* HAVE_NL_LANGINFO */
-: 110:"-"
-: 111:#endif /* HAVE_NL_LANGINFO */
-: 112:"target-charset-auto "
-: 113:
-: 114:#ifdef HAVE_WORDEXP
-: 115:"+"
-: 116:#else /* HAVE_WORDEXP */
-: 117:"-"
-: 118:#endif /* HAVE_WORDEXP */
-: 119:"ENCAOPT ";
-: 120:/* }}} */
-: 121:
-: 122:static const char *COPYRIGHT_TEXT = /* {{{ */
-: 123:"Copyright (C) 2000-2005 David Necas (Yeti) (),\n"
-: 124:" 2005 Zuxy Meng ().\n"
-: 125:"\n"
-: 126:PACKAGE_NAME
-: 127:" is free software; it can be copied and/or modified under the terms of\n"
-: 128:"version 2 of GNU General Public License, run `enca --license' to see the full\n"
-: 129:"license text. There is NO WARRANTY; not even for MERCHANTABILITY or FITNESS\n"
-: 130:"FOR A PARTICULAR PURPOSE.";
-: 131:/* }}} */
-: 132:
-: 133:/* Local prototypes. */
-: 134:static char** interpret_opt (int argc,
-: 135: char *argv[],
-: 136: int cmdl_argc);
-: 137:static int prepend_env (int argc,
-: 138: char *argv[],
-: 139: int *newargc,
-: 140: char *(*newargv[]));
-: 141:static OutputType optchar_to_otype (const char c);
-: 142:static void set_otype_from_name (const char *otname);
-: 143:static void set_program_behaviour (void);
-: 144:static int parse_arg_x (const char *s);
-: 145:static int add_parsed_converters (const char *list);
-: 146:static void print_some_list (const char *listname);
-: 147:static char** make_filelist (const int n,
-: 148: char *argvrest[]);
-: 149:static int prefix_filename (int pfx);
-: 150:#ifndef HAVE_PROGRAM_INVOCATION_SHORT_NAME
-: 151:# define program_invocation_short_name strip_path(argv[0])
-: 152:static char* strip_path (const char *fullpath);
-: 153:#endif /* not HAVE_PROGRAM_INVOCATION_SHORT_NAME */
-: 154:static void print_version (void);
-: 155:static void print_all_charsets (void);
-: 156:static void print_builtin_charsets (void);
-: 157:static void print_surfaces (void);
-: 158:static void print_languages (void);
-: 159:static void print_lists (void);
-: 160:static void print_names (void);
-: 161:static void print_charsets (int only_builtin);
-: 162:static void print_text_and_exit (const char *const *text,
-: 163: int exitcode);
-: 164:
-: 165:/* merge all sources of options (ENCAOPT and command line arguments) and
-: 166: process them
-: 167: returns list of file to process (or NULL for stdin) */
-: 168:char**
275: 169:process_opt(const int argc, char *argv[])
-: 170:{
-: 171: int newargc;
-: 172: char **newargv;
-: 173: char **flist;
-: 174:
-: 175: /* Assign defaults. */
275: 176: options = DEFAULTS;
-: 177:
275: 178: program_name = program_invocation_short_name;
275: 179: set_program_behaviour();
-: 180:
-: 181:#ifdef ENABLE_EXTERNAL
275: 182: set_external_converter(DEFAULT_EXTERNAL_CONVERTER);
-: 183:#endif /* ENABLE_EXTERNAL */
-: 184:
-: 185: /* Prepend options in $ENCAOPT. */
275: 186: prepend_env(argc, argv, &newargc, &newargv);
-: 187:
-: 188: /* Interpret them. */
275: 189: flist = interpret_opt(newargc, newargv, argc);
-: 190:
-: 191: /* prefix result with file name iff we are about to process stdin or the
-: 192: file list contains only one file and we don't print result */
247: 193: if (prefix_filename(-1) == -1) {
76: 194: if ((flist == NULL || flist[1] == NULL)
74: 195: && options.output_type != OTYPE_DETAILS)
-: 196: prefix_filename(0);
-: 197: else
-: 198: prefix_filename(1);
-: 199: }
-: 200:
247: 201: return flist;
-: 202:}
-: 203:
-: 204:/* process options, return file list (i.e. all remaining arguments)
-: 205:
-: 206: FIXME: this function is infinitely ugly */
-: 207:static char**
275: 208:interpret_opt(int argc, char *argv[], int cmdl_argc)
-: 209:{
-: 210: /* Short command line options. */
-: 211: static const char *short_options =
-: 212: "cC:deE:fgGhil:L:mn:pPrsvVx:";
-: 213:
-: 214: /* Long `GNU style' command line options {{{. */
-: 215: static const struct option long_options[] = {
-: 216: { "auto-convert", no_argument, NULL, 'c' },
-: 217: { "convert-to", required_argument, NULL, 'x' },
-: 218: { "cstocs-name", no_argument, NULL, 's' },
-: 219: { "details", no_argument, NULL, 'd' },
-: 220: { "enca-name", no_argument, NULL, 'e' },
-: 221: { "external-converter-program", required_argument, NULL, 'E' },
-: 222: { "guess", no_argument, NULL, 'g' },
-: 223: { "help", no_argument, NULL, 'h' },
-: 224: { "human-readable", no_argument, NULL, 'f' },
-: 225: { "iconv-name", no_argument, NULL, 'i' },
-: 226: { "language", required_argument, NULL, 'L' },
-: 227: { "license", no_argument, NULL, 'G' },
-: 228: { "list", required_argument, NULL, 'l' },
-: 229: { "mime-name", no_argument, NULL, 'm' },
-: 230: { "name", required_argument, NULL, 'n' },
-: 231: { "no-filename", no_argument, NULL, 'P' },
-: 232: { "rfc1345-name", no_argument, NULL, 'r' },
-: 233: { "try-converters", required_argument, NULL, 'C' },
-: 234: { "verbose", no_argument, NULL, 'V' },
-: 235: { "version", no_argument, NULL, 'v' },
-: 236: { "with-filename", no_argument, NULL, 'p' },
-: 237: { NULL, 0, NULL, 0 }
-: 238: };
-: 239: /* }}} */
-: 240:
-: 241: int c;
-: 242: char **filelist;
275: 243: int otype_set = 0; /* Whether output type was explicitely set. */
-: 244:
-: 245: /* Process options. */
275: 246: opterr = 0; /* Getopt() shouldn't print errors, we do it ourself. */
1242: 247: while ((c = getopt_long(argc, argv, short_options,
-: 248: long_options, NULL)) != -1) {
716: 249: switch (c) {
-: 250: case '?': /* Unknown option. */
#####: 251: fprintf(stderr, "%s: Unknown option -%c%s.\n"
-: 252: "Run `%s --help' to get brief help.\n",
-: 253: program_name, optopt,
#####: 254: optopt == '\0' ? " or misspelt/ambiguous long option"
-: 255: : "",
-: 256: program_name);
#####: 257: exit(EXIT_TROUBLE);
-: 258: break;
-: 259:
-: 260: case ':': /* Missing paramter. */
#####: 261: fprintf(stderr, "%s: Option -%c requires an argument.\n"
-: 262: "Run `%s --help' to get brief help.\n",
-: 263: program_name, optopt, program_name);
#####: 264: exit(EXIT_TROUBLE);
-: 265: break;
-: 266:
-: 267: case 'h': /* Help (and exit). */
1: 268: print_text_and_exit(HELP_text, EXIT_SUCCESS);
-: 269: break;
-: 270:
-: 271: case 'v': /* Version (and exit). */
5: 272: print_version();
5: 273: exit(EXIT_SUCCESS);
-: 274: break;
-: 275:
-: 276: case 'G': /* License (and exit). */
1: 277: print_text_and_exit(COPYING_text, EXIT_SUCCESS);
-: 278: break;
-: 279:
-: 280: case 'l': /* Print required list (and exit). */
17: 281: print_some_list(optarg);
17: 282: exit(EXIT_SUCCESS);
-: 283: break;
-: 284:
-: 285: case 'd': /* Detailed output. */
-: 286: case 'e': /* Canonical name. */
-: 287: case 'f': /* Full (descriptive) output. */
-: 288: case 'i': /* Iconv name. */
-: 289: case 'm': /* MIME name. */
-: 290: case 'r': /* RFC 1345 name as output. */
-: 291: case 's': /* Cstocs name as output. */
175: 292: options.output_type = optchar_to_otype(c);
175: 293: otype_set = 1;
175: 294: break;
-: 295:
-: 296: case 'n': /* Output type by name. */
2: 297: set_otype_from_name(optarg);
2: 298: otype_set = 1;
2: 299: break;
-: 300:
-: 301: case 'p': /* Prefix filename on. */
-: 302: case 'P': /* Prefix filename off. */
171: 303: prefix_filename(islower(c));
-: 304: break;
-: 305:
-: 306: case 'g': /* Behave enca. */
#####: 307: behaviour = BEHAVE_ENCA;
#####: 308: break;
-: 309:
-: 310: case 'c': /* Behave enconv. */
13: 311: behaviour = BEHAVE_ENCONV;
13: 312: break;
-: 313:
-: 314: case 'V': /* Increase verbosity level. */
#####: 315: options.verbosity_level++;
#####: 316: break;
-: 317:
-: 318: case 'x': /* Convert to. */
51: 319: options.output_type = OTYPE_CONVERT;
51: 320: parse_arg_x(optarg);
51: 321: otype_set = 1;
51: 322: break;
-: 323:
-: 324: case 'L': /* Language. */
250: 325: options.language = optarg;
250: 326: break;
-: 327:
-: 328: case 'C': /* Add converters to converter list. */
23: 329: add_parsed_converters(optarg);
23: 330: break;
-: 331:
-: 332: case 'E': /* Converter name. */
-: 333:#ifdef ENABLE_EXTERNAL
7: 334: set_external_converter(optarg);
-: 335:#else /* ENABLE_EXTERNAL */
-: 336: fprintf(stderr, "%s: Cannot set external converter.\n"
-: 337: "Enca was built without support "
-: 338: "for external converters.\n",
-: 339: program_name);
-: 340:#endif /* ENABLE_EXTERNAL */
7: 341: break;
-: 342:
-: 343: default:
#####: 344: abort();
-: 345: break;
-: 346: }
-: 347: }
-: 348:
-: 349: /* Set and initialize language. */
251: 350: options.language = detect_lang(options.language);
251: 351: if (options.language == NULL) {
4: 352: fprintf(stderr, "%s: Cannot determine (or understand) "
-: 353: "your language preferences.\n"
-: 354: "Please use `-L language', or `-L none' if your language is not supported\n"
-: 355: "(only a few multibyte encodings can be recognized then).\n"
-: 356: "Run `%s --list languages' to get a list of supported languages.\n",
-: 357: program_name, program_name);
2: 358: exit(EXIT_TROUBLE);
-: 359: }
-: 360:
-: 361: /* Behaviour. */
-: 362: /* With an explicit output type doesn't matter how we were called. */
249: 363: if (otype_set) {
226: 364: behaviour = BEHAVE_ENCA;
226: 365: if (options.output_type == OTYPE_CONVERT
50: 366: && options.verbosity_level > 2)
#####: 367: fprintf(stderr, "Explicitly specified target charset: %s\n",
-: 368: options.target_enc_str);
-: 369: }
-: 370:
249: 371: switch (behaviour) {
-: 372: case BEHAVE_ENCA:
-: 373: /* Nothing special here. */
-: 374: break;
-: 375:
-: 376: case BEHAVE_ENCONV:
-: 377: {
-: 378: const char *charset;
-: 379:
-: 380: /* Try recode's default target charset. */
13: 381: charset = getenv(RECODE_CHARSET_VAR);
13: 382: if (charset != NULL) {
13: 383: if (options.verbosity_level > 2)
#####: 384: fprintf(stderr, "Inherited recode's %s target charset: %s\n",
-: 385: RECODE_CHARSET_VAR, charset);
-: 386: }
-: 387: else {
-: 388: /* Then locale native charset. */
#####: 389: charset = get_lang_codeset();
#####: 390: assert(charset != NULL);
-: 391: }
-: 392:
13: 393: parse_arg_x(charset);
-: 394: }
13: 395: if (options.target_enc_str[0] == '\0') {
#####: 396: fprintf(stderr, "%s: Cannot detect native charset for locale %s.\n"
-: 397: "You have to use the `-x' option "
-: 398: "or the %s environment variable "
-: 399: "to set the target encoding manually.\n",
-: 400: program_name,
-: 401: options.language,
-: 402: RECODE_CHARSET_VAR);
#####: 403: exit(EXIT_TROUBLE);
-: 404: }
13: 405: options.output_type = OTYPE_CONVERT;
13: 406: break;
-: 407:
-: 408: default:
#####: 409: abort();
-: 410: break;
-: 411: }
-: 412:
-: 413: /* Set up default list of converters. */
249: 414: if (add_parsed_converters(NULL) == 0)
229: 415: add_parsed_converters(DEFAULT_CONVERTER_LIST);
-: 416:
-: 417: /* Create file list from remaining options. */
249: 418: filelist = make_filelist(argc-optind, argv+optind);
-: 419: /* When run without any arguments and input is a tty, print help. */
249: 420: if (filelist == NULL && enca_isatty(STDIN_FILENO) && cmdl_argc == 1)
#####: 421: print_text_and_exit(HELP_text, EXIT_SUCCESS);
-: 422:
-: 423:#ifdef ENABLE_EXTERNAL
249: 424: if (options.output_type == OTYPE_CONVERT
63: 425: && external_converter_listed()
6: 426: && !check_external_converter())
2: 427: exit(EXIT_TROUBLE);
-: 428:#endif
-: 429:
247: 430: return filelist;
-: 431:}
-: 432:
-: 433:/* prepend parsed contents of environment variable containing default options
-: 434: (ENCAOPT) before command line arguments (but after argv[0]) and return the
-: 435: new list of arguments in newargv (its length is newargc) */
-: 436:static int
275: 437:prepend_env(int argc,
-: 438: char *argv[],
-: 439: int *newargc,
-: 440: char *(*newargv[]))
-: 441:#ifdef HAVE_WORDEXP
-: 442:{
-: 443: char *msg;
-: 444: char *encaenv;
-: 445: wordexp_t encaenv_parsed;
-: 446: size_t i;
-: 447:
275: 448: *newargc = argc;
275: 449: *newargv = argv;
-: 450: /* Fetch value of ENCA_ENV_VAR, if set. */
275: 451: encaenv = getenv(ENCA_ENV_VAR);
275: 452: if (encaenv == NULL)
-: 453: return 0;
-: 454:
-: 455: /* Parse encaenv. */
16: 456: if ((i = wordexp(encaenv, &encaenv_parsed, WRDE_NOCMD)) != 0) {
1: 457: switch (i) {
-: 458: case WRDE_NOSPACE:
#####: 459: wordfree(&encaenv_parsed);
#####: 460: fprintf(stderr, "%s: Cannot allocate memory.\n",
-: 461: program_name);
#####: 462: exit(EXIT_TROUBLE);
-: 463: break;
-: 464:
-: 465: case WRDE_BADCHAR:
-: 466: msg = "invalid characters";
-: 467: break;
-: 468:
-: 469: case WRDE_CMDSUB:
#####: 470: msg = "command substitution is disabled";
#####: 471: break;
-: 472:
-: 473: case WRDE_SYNTAX:
#####: 474: msg = "syntax error";
#####: 475: break;
-: 476:
-: 477: default:
#####: 478: msg = NULL;
#####: 479: break;
-: 480: }
2: 481: fprintf(stderr, "%s: Cannot parse value of %s (",
-: 482: program_name, ENCA_ENV_VAR);
1: 483: if (msg == NULL)
#####: 484: fprintf(stderr, "error %zd", i);
-: 485: else
1: 486: fprintf(stderr, "%s", msg);
-: 487:
1: 488: fputs("), ignoring it\n", stderr);
-: 489:
1: 490: return 1;
-: 491: }
-: 492:
-: 493: /* create newargv starting from argv[0], then encaenv_parsed, and last rest
-: 494: of argv; note we copy addresses, not strings themselves from argv */
15: 495: *newargc = argc + encaenv_parsed.we_wordc;
15: 496: *newargv = (char**)enca_malloc((*newargc)*sizeof(char*));
15: 497: (*newargv)[0] = argv[0];
-: 498:
75: 499: for (i = 0; i < encaenv_parsed.we_wordc; i++)
60: 500: (*newargv)[i+1] = enca_strdup(encaenv_parsed.we_wordv[i]);
-: 501:
117: 502: for (i = 1; i < (size_t)argc; i++)
117: 503: (*newargv)[i + encaenv_parsed.we_wordc] = argv[i];
-: 504:
-: 505: /* Free memory. */
15: 506: wordfree(&encaenv_parsed);
-: 507:
15: 508: return 0;
-: 509:}
-: 510:#else /* HAVE_WORDEXP */
-: 511:{
-: 512: char *encaenv;
-: 513: size_t nitems;
-: 514: size_t i, state;
-: 515: const char *p;
-: 516:
-: 517: *newargc = argc;
-: 518: *newargv = argv;
-: 519: /* Fetch value of ENCA_ENV_VAR, if set. */
-: 520: encaenv = getenv(ENCA_ENV_VAR);
-: 521: if (encaenv == NULL)
-: 522: return 0;
-: 523:
-: 524: /* Count the number of tokens in ENCA_ENV_VAR. */
-: 525: encaenv = enca_strdup(encaenv);
-: 526: nitems = 0;
-: 527: state = 0;
-: 528: for (i = 0; encaenv[i] != '\0'; i++) {
-: 529: if (state == 0) {
-: 530: if (!isspace(encaenv[i]))
-: 531: nitems += ++state;
-: 532: }
-: 533: else {
-: 534: if (isspace(encaenv[i])) {
-: 535: encaenv[i] = '\0';
-: 536: state = 0;
-: 537: }
-: 538: }
-: 539: }
-: 540:
-: 541: /* Extend argv[]. (see above) */
-: 542: *newargc = argc + nitems;
-: 543: *newargv = (char**)enca_malloc((*newargc)*sizeof(char*));
-: 544: (*newargv)[0] = argv[0];
-: 545:
-: 546: p = encaenv;
-: 547: for (i = 0; i < nitems; i++) {
-: 548: while (isspace(*p))
-: 549: p++;
-: 550:
-: 551: (*newargv)[i+1] = enca_strdup(p);
-: 552:
-: 553: while (*p != '\0')
-: 554: p++;
-: 555: p++;
-: 556: }
-: 557: enca_free(encaenv);
-: 558:
-: 559: for (i = 1; i < argc; i++)
-: 560: (*newargv)[i + nitems] = argv[i];
-: 561:
-: 562: return 0;
-: 563:}
-: 564:#endif /* HAVE_WORDEXP */
-: 565:
-: 566:/* Return output type appropriate for given option character. */
-: 567:static OutputType
175: 568:optchar_to_otype(const char c)
-: 569:{
175: 570: switch (c) {
-: 571: case 'd': return OTYPE_DETAILS; /* Detailed output. */
161: 572: case 'e': return OTYPE_CANON; /* Enca's name. */
14: 573: case 'f': return OTYPE_HUMAN; /* Full (descriptive) output. */
#####: 574: case 'i': return OTYPE_ICONV; /* Iconv name. */
#####: 575: case 'r': return OTYPE_RFC1345; /* RFC 1345 name as output */
#####: 576: case 's': return OTYPE_CS2CS; /* Cstocs name as output. */
#####: 577: case 'm': return OTYPE_MIME; /* Preferred MIME name as output. */
-: 578: }
-: 579:
#####: 580: abort();
-: 581: return 0;
-: 582:}
-: 583:
-: 584:/* if otname represents a valid output type name, assign it to *otype,
-: 585: otherwise do nothing
-: 586: when gets NULL as the name, prints list of valid names instead */
-: 587:static void
3: 588:set_otype_from_name(const char *otname)
-: 589:{
-: 590: /* Abbreviations table stores pointers, we need something to point to. */
-: 591: static const OutputType OTS[] = {
-: 592: OTYPE_DETAILS,
-: 593: OTYPE_CANON,
-: 594: OTYPE_HUMAN,
-: 595: OTYPE_RFC1345,
-: 596: OTYPE_ICONV,
-: 597: OTYPE_CS2CS,
-: 598: OTYPE_MIME,
-: 599: OTYPE_ALIASES
-: 600: };
-: 601:
-: 602: /* Output type names. */
-: 603: static const Abbreviation OTNAMES[] =
-: 604: {
-: 605: { "aliases", OTS+7 },
-: 606: { "cstocs", OTS+4 },
-: 607: { "details", OTS },
-: 608: { "enca", OTS+1 },
-: 609: { "human-readable", OTS+2 },
-: 610: { "iconv", OTS+5 },
-: 611: { "mime", OTS+6 },
-: 612: { "rfc1345", OTS+3 },
-: 613: };
-: 614:
-: 615: const Abbreviation *p;
-: 616:
3: 617: p = expand_abbreviation(otname, OTNAMES,
-: 618: sizeof(OTNAMES)/sizeof(Abbreviation),
-: 619: "output type");
3: 620: if (p != NULL)
1: 621: options.output_type = *(OutputType*)p->data;
3: 622:}
-: 623:
-: 624:/* parse -x argument, assign output encoding */
-: 625:static int
64: 626:parse_arg_x(const char *s)
-: 627:{
-: 628: /* Encoding separator for -x argument. */
-: 629: static const char XENC_SEPARATOR[] = "..";
-: 630: static const size_t XENC_SEPARATOR_LEN = sizeof(XENC_SEPARATOR);
-: 631:
-: 632: /* Strip leading `..' if present. */
64: 633: if (strncmp(s, XENC_SEPARATOR, XENC_SEPARATOR_LEN) == 0)
#####: 634: s += XENC_SEPARATOR_LEN;
-: 635:
-: 636: /* Assign target encoding. */
64: 637: enca_free(options.target_enc_str);
64: 638: options.target_enc_str = enca_strdup(s);
-: 639:
-: 640: /* We have to check for `..CHARSET/SURFACE..CHARSET2/SURFACE2' which would
-: 641: * enca_parse_encoding_name() split as
-: 642: * charset = CHARSET
-: 643: * surfaces = SURFACE..CHARSET2, SURFACE2
-: 644: * which is aboviously not what we want. */
64: 645: if (enca_strstr(s, XENC_SEPARATOR) == NULL)
64: 646: options.target_enc = enca_parse_encoding_name(s);
-: 647: else {
#####: 648: options.target_enc.charset = ENCA_CS_UNKNOWN;
#####: 649: options.target_enc.surface = 0;
-: 650: }
-: 651:
64: 652: return 0;
-: 653:}
-: 654:
-: 655:/* add comma separated list of converters to list of converters
-: 656: returns zero on success, nonzero otherwise
-: 657: when list is NULL return number of successfully added converters instead */
-: 658:static int
252: 659:add_parsed_converters(const char *list)
-: 660:{
-: 661: /* Converter list separator for -E argument. */
-: 662: static const char CONVERTER_SEPARATOR = ',';
-: 663:
-: 664: char *s;
-: 665: char *p_c,*p_c1;
-: 666: static int nc = 0;
-: 667:
252: 668: if (list == NULL)
249: 669: return nc;
-: 670:
252: 671: s = enca_strdup(list);
-: 672: /* Add converter names one by one. */
252: 673: p_c = s;
733: 674: while ((p_c1 = strchr(p_c, CONVERTER_SEPARATOR)) != NULL) {
229: 675: *p_c1++ = '\0';
229: 676: if (add_converter(p_c) == 0) nc++;
-: 677: p_c = p_c1;
-: 678: }
252: 679: if (add_converter(p_c) == 0) nc++;
252: 680: enca_free(s);
-: 681:
-: 682: return 0;
-: 683:}
-: 684:
-: 685:/* create NULL-terminated file list from remaining fields in argv[]
-: 686: and return it */
-: 687:static char**
249: 688:make_filelist(const int n, char *argvrest[])
-: 689:{
-: 690: int i;
249: 691: char **flist = NULL;
-: 692:
-: 693: /* Accept `-' as stdin. */
249: 694: if (n == 0
101: 695: || (n == 1 && strcmp(argvrest[0], "-") == 0))
-: 696: return NULL;
-: 697:
98: 698: flist = (char**)enca_malloc((n+1)*sizeof(char*));
98: 699: for (i = 0; i < n; i++) flist[i] = enca_strdup(argvrest[i]);
98: 700: flist[n] = NULL;
-: 701:
98: 702: return flist;
-: 703:}
-: 704:
-: 705:static int
-: 706:prefix_filename(int pfx) {
-: 707: if (pfx != -1)
245: 708: options.prefix_filename = pfx;
247: 709: return options.prefix_filename;
-: 710:}
-: 711:
-: 712:/* prints some list user asked for (--list) -- just calls appropriate
-: 713: * functions from appropriate module (with funny abbreviation expansion)
-: 714: * when listname is NULL prints list of available lists instead */
-: 715:static void
20: 716:print_some_list(const char *listname)
-: 717:{
-: 718: /* ISO C forbids initialization between function pointers and void*
-: 719: so we use one more level of indirection to comply (and hope gracious
-: 720: complier will forgive us our sins, amen) */
-: 721: static const ReportFunc printer_bics = print_builtin_charsets;
-: 722: static const ReportFunc printer_conv = print_converter_list;
-: 723: static const ReportFunc printer_char = print_all_charsets;
-: 724: static const ReportFunc printer_lang = print_languages;
-: 725: static const ReportFunc printer_list = print_lists;
-: 726: static const ReportFunc printer_name = print_names;
-: 727: static const ReportFunc printer_surf = print_surfaces;
-: 728:
-: 729: /* List names and pointers to pointers to list-printers. */
-: 730: static const Abbreviation LISTS[] = {
-: 731: { "built-in-charsets", &printer_bics },
-: 732: { "converters", &printer_conv },
-: 733: { "charsets", &printer_char },
-: 734: { "languages", &printer_lang },
-: 735: { "lists", &printer_list },
-: 736: { "names", &printer_name },
-: 737: { "surfaces", &printer_surf },
-: 738: };
-: 739:
20: 740: const Abbreviation *p = NULL;
-: 741: ReportFunc list_printer; /* Pointer to list printing functions. */
-: 742:
-: 743: /* Get the abbreviation data. */
20: 744: p = expand_abbreviation(listname, LISTS,
-: 745: sizeof(LISTS)/sizeof(Abbreviation),
-: 746: "list");
-: 747:
-: 748: /* p can be NULL in weird situations, e.g. when print_some_list() was
-: 749: * called recursively by itself through print_lists.
-: 750: * In all cases, return. */
20: 751: if (p == NULL)
-: 752: return;
-: 753:
17: 754: list_printer = *(ReportFunc*)p->data;
17: 755: list_printer();
-: 756:}
-: 757:
-: 758:#ifndef HAVE_PROGRAM_INVOCATION_SHORT_NAME
-: 759:/* Create and return string containing only last component of path fullpath. */
-: 760:static char*
-: 761:strip_path(const char *fullpath)
-: 762:{
-: 763: char *p;
-: 764:
-: 765: p = strrchr(fullpath, '/');
-: 766: if (p == NULL)
-: 767: p = (char*)fullpath;
-: 768: else
-: 769: p++;
-: 770:
-: 771: return enca_strdup(p);
-: 772:}
-: 773:#endif
-: 774:
-: 775:/* Print version information. */
-: 776:static void
5: 777:print_version(void)
-: 778:{
10: 779: printf("%s %s\n\n%s\n\n%s\n", PACKAGE_TARNAME, PACKAGE_VERSION, VERSION_TEXT, COPYRIGHT_TEXT);
5: 780:}
-: 781:
-: 782:/**
-: 783: * Prints builtin charsets.
-: 784: * Must be of type ReportFunc.
-: 785: **/
-: 786:static void
1: 787:print_builtin_charsets(void)
-: 788:{
1: 789: print_charsets(1);
1: 790:}
-: 791:
-: 792:/**
-: 793: * Prints all charsets.
-: 794: * Must be of type ReportFunc.
-: 795: **/
-: 796:static void
2: 797:print_all_charsets(void)
-: 798:{
2: 799: print_charsets(0);
2: 800:}
-: 801:
-: 802:/**
-: 803: * Prints list of charsets using name style from options.output_type.
-: 804: *
-: 805: * It prints all charsets, except:
-: 806: * - charsets without given name, and
-: 807: * - charsets without UCS-2 map when only_builtin is set.
-: 808: **/
-: 809:static void
3: 810:print_charsets(int only_builtin)
-: 811:{
-: 812: size_t ncharsets, i;
-: 813:
3: 814: ncharsets = enca_number_of_charsets();
99: 815: for (i = 0; i < ncharsets; i++) {
96: 816: if (only_builtin && !enca_charset_has_ucs2_map(i))
9: 817: continue;
-: 818:
87: 819: switch (options.output_type) {
-: 820: case OTYPE_ALIASES:
32: 821: print_aliases(i);
32: 822: break;
-: 823:
-: 824: case OTYPE_CANON:
-: 825: case OTYPE_CONVERT:
#####: 826: puts(enca_charset_name(i, ENCA_NAME_STYLE_ENCA));
#####: 827: break;
-: 828:
-: 829: case OTYPE_HUMAN:
-: 830: case OTYPE_DETAILS:
55: 831: puts(enca_charset_name(i, ENCA_NAME_STYLE_HUMAN));
55: 832: break;
-: 833:
-: 834: case OTYPE_RFC1345:
#####: 835: puts(enca_charset_name(i, ENCA_NAME_STYLE_RFC1345));
#####: 836: break;
-: 837:
-: 838: case OTYPE_CS2CS:
#####: 839: if (enca_charset_name(i, ENCA_NAME_STYLE_CSTOCS) != NULL)
#####: 840: puts(enca_charset_name(i, ENCA_NAME_STYLE_CSTOCS));
-: 841: break;
-: 842:
-: 843: case OTYPE_ICONV:
#####: 844: if (enca_charset_name(i, ENCA_NAME_STYLE_ICONV) != NULL)
#####: 845: puts(enca_charset_name(i, ENCA_NAME_STYLE_ICONV));
-: 846: break;
-: 847:
-: 848: case OTYPE_MIME:
#####: 849: if (enca_charset_name(i, ENCA_NAME_STYLE_MIME) != NULL)
#####: 850: puts(enca_charset_name(i, ENCA_NAME_STYLE_MIME));
-: 851: break;
-: 852:
-: 853: default:
#####: 854: abort();
-: 855: break;
-: 856: }
-: 857: }
3: 858:}
-: 859:
-: 860:/**
-: 861: * Prints all aliases of given charset.
-: 862: **/
-: 863:void
32: 864:print_aliases(size_t cs)
-: 865:{
-: 866: size_t i, na;
32: 867: const char **aliases = enca_get_charset_aliases(cs, &na);
-: 868:
242: 869: for (i = 0; i < na; i++)
420: 870: printf("%s ", aliases[i]);
-: 871:
32: 872: putchar('\n');
32: 873: enca_free(aliases);
32: 874:}
-: 875:
-: 876:/**
-: 877: * Prints all [public] surfaces.
-: 878: * Must be of type ReportFunc.
-: 879: **/
-: 880:static void
1: 881:print_surfaces(void)
-: 882:{
-: 883: EncaNameStyle ns;
-: 884: char *s;
-: 885: unsigned int i;
-: 886:
-: 887: /* Only these two know surfaces. */
1: 888: if (options.output_type == OTYPE_HUMAN)
-: 889: ns = ENCA_NAME_STYLE_HUMAN;
-: 890: else
#####: 891: ns = ENCA_NAME_STYLE_ENCA;
-: 892:
33: 893: for (i = 1; i != 0; i <<= 1) {
32: 894: s = enca_get_surface_name(i, ns);
32: 895: if (s != NULL && s[0] != '\0') {
10: 896: fputs(s, stdout);
10: 897: if (ns == ENCA_NAME_STYLE_ENCA)
-: 898: putchar('\n');
10: 899: enca_free(s);
-: 900: }
-: 901: }
1: 902:}
-: 903:
-: 904:/* Magically print the list of lists. */
-: 905:static void
3: 906:print_lists(void)
-: 907:{
3: 908: print_some_list(NULL);
3: 909:}
-: 910:
-: 911:/**
-: 912: * Prints all languages list of charsets of each.
-: 913: * Must be of type ReportFunc.
-: 914: * Quite illogically affected by options.output_type: it changes *language*
-: 915: * name style, instead of charset name style.
-: 916: **/
-: 917:static void
1: 918:print_languages(void)
-: 919:{
-: 920: size_t nl, nc, i, j, maxlen;
-: 921: const char **l;
-: 922: int *c;
-: 923: int english;
-: 924:
1: 925: l = enca_get_languages(&nl);
-: 926:
2: 927: english = options.output_type == OTYPE_HUMAN
1: 928: || options.output_type == OTYPE_DETAILS;
-: 929: /* Find max. language name length for English. */
1: 930: maxlen = 0;
1: 931: if (english) {
15: 932: for (i = 0; i < nl; i++) {
15: 933: j = strlen(enca_language_english_name(l[i]));
15: 934: if (j > maxlen)
1: 935: maxlen = j;
-: 936: }
-: 937: }
-: 938:
-: 939: /* Print the names. */
16: 940: for (i = 0; i < nl; i++) {
15: 941: if (english)
15: 942: printf("%*s:", (int)maxlen, enca_language_english_name(l[i]));
-: 943: else
#####: 944: printf("%s:", l[i]);
15: 945: c = enca_get_language_charsets(l[i], &nc);
96: 946: for (j = 0; j < nc; j++)
162: 947: printf(" %s", enca_charset_name(c[j], ENCA_NAME_STYLE_ENCA));
-: 948:
15: 949: putchar('\n');
15: 950: enca_free(c);
-: 951: }
1: 952: enca_free(l);
1: 953:}
-: 954:
-: 955:/**
-: 956: * Prints list of all encoding name styles.
-: 957: * Must be of type ReportFunc.
-: 958: **/
-: 959:static void
1: 960:print_names(void)
-: 961:{
1: 962: set_otype_from_name(NULL);
1: 963:}
-: 964:
-: 965:/**
-: 966: * Print some text (help, copying, ...) and exit with given code.
-: 967: **/
-: 968:static void
2: 969:print_text_and_exit(const char *const *text, int exitcode)
-: 970:{
2: 971: assert(text);
-: 972:
390: 973: for (; *text; text++)
390: 974: puts(*text);
-: 975:
2: 976: exit(exitcode);
-: 977:}
-: 978:
-: 979:/**
-: 980: * set_program_behaviour:
-: 981: *
-: 982: * Sets behaviour according to name we were called.
-: 983: **/
-: 984:static void
275: 985:set_program_behaviour(void)
-: 986:{
-: 987: static const char enca_name[] = "enca";
-: 988: static const char enconv_name[] = "enconv";
-: 989: static const size_t nenca = sizeof(enca_name) - 1;
-: 990: static const size_t nenconv = sizeof(enconv_name) - 1;
-: 991:
275: 992: if (strncmp(program_name, enca_name, nenca) == 0
#####: 993: && !isalpha(program_name[nenca])) {
#####: 994: behaviour = BEHAVE_ENCA;
#####: 995: return;
-: 996: }
-: 997:
275: 998: if (strncmp(program_name, enconv_name, nenconv) == 0
#####: 999: && !isalpha(program_name[nenconv])) {
#####: 1000: behaviour = BEHAVE_ENCONV;
#####: 1001: return;
-: 1002: }
-: 1003:}
-: 1004:
-: 1005:/* vim: ts=2
-: 1006: */
<<<<<< EOF
# path=/home/travis/build/nijel/enca/src/string3.h.gcov
-: 0:Source:/usr/include/x86_64-linux-gnu/bits/string3.h
-: 0:Graph:enca-convert_iconv.gcno
-: 0:Data:enca-convert_iconv.gcda
-: 0:Runs:275
-: 0:Programs:1
-: 1:/* Copyright (C) 2004-2016 Free Software Foundation, Inc.
-: 2: This file is part of the GNU C Library.
-: 3:
-: 4: The GNU C Library is free software; you can redistribute it and/or
-: 5: modify it under the terms of the GNU Lesser General Public
-: 6: License as published by the Free Software Foundation; either
-: 7: version 2.1 of the License, or (at your option) any later version.
-: 8:
-: 9: The GNU C Library is distributed in the hope that it will be useful,
-: 10: but WITHOUT ANY WARRANTY; without even the implied warranty of
-: 11: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-: 12: Lesser General Public License for more details.
-: 13:
-: 14: You should have received a copy of the GNU Lesser General Public
-: 15: License along with the GNU C Library; if not, see
-: 16: . */
-: 17:
-: 18:#ifndef _STRING_H
-: 19:# error "Never use directly; include instead."
-: 20:#endif
-: 21:
-: 22:#if !__GNUC_PREREQ (5,0)
-: 23:__warndecl (__warn_memset_zero_len,
-: 24: "memset used with constant zero length parameter; this could be due to transposed parameters");
-: 25:#endif
-: 26:
-: 27:#ifndef __cplusplus
-: 28:/* XXX This is temporarily. We should not redefine any of the symbols
-: 29: and instead integrate the error checking into the original
-: 30: definitions. */
-: 31:# undef memcpy
-: 32:# undef memmove
-: 33:# undef memset
-: 34:# undef strcat
-: 35:# undef strcpy
-: 36:# undef strncat
-: 37:# undef strncpy
-: 38:# ifdef __USE_GNU
-: 39:# undef mempcpy
-: 40:# undef stpcpy
-: 41:# endif
-: 42:# ifdef __USE_MISC
-: 43:# undef bcopy
-: 44:# undef bzero
-: 45:# endif
-: 46:#endif
-: 47:
-: 48:
-: 49:__fortify_function void *
-: 50:__NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
-: 51: size_t __len))
-: 52:{
-: 53: return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
-: 54:}
-: 55:
-: 56:__fortify_function void *
-: 57:__NTH (memmove (void *__dest, const void *__src, size_t __len))
-: 58:{
#####: 59: return __builtin___memmove_chk (__dest, __src, __len, __bos0 (__dest));
-: 60:}
-: 61:
-: 62:#ifdef __USE_GNU
-: 63:__fortify_function void *
-: 64:__NTH (mempcpy (void *__restrict __dest, const void *__restrict __src,
-: 65: size_t __len))
-: 66:{
-: 67: return __builtin___mempcpy_chk (__dest, __src, __len, __bos0 (__dest));
-: 68:}
-: 69:#endif
-: 70:
-: 71:
-: 72:/* The first two tests here help to catch a somewhat common problem
-: 73: where the second and third parameter are transposed. This is
-: 74: especially problematic if the intended fill value is zero. In this
-: 75: case no work is done at all. We detect these problems by referring
-: 76: non-existing functions. */
-: 77:__fortify_function void *
-: 78:__NTH (memset (void *__dest, int __ch, size_t __len))
-: 79:{
-: 80: /* GCC-5.0 and newer implements these checks in the compiler, so we don't
-: 81: need them here. */
-: 82:#if !__GNUC_PREREQ (5,0)
-: 83: if (__builtin_constant_p (__len) && __len == 0
-: 84: && (!__builtin_constant_p (__ch) || __ch != 0))
-: 85: {
-: 86: __warn_memset_zero_len ();
-: 87: return __dest;
-: 88: }
-: 89:#endif
-: 90: return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
-: 91:}
-: 92:
-: 93:#ifdef __USE_MISC
-: 94:__fortify_function void
-: 95:__NTH (bcopy (const void *__src, void *__dest, size_t __len))
-: 96:{
-: 97: (void) __builtin___memmove_chk (__dest, __src, __len, __bos0 (__dest));
-: 98:}
-: 99:
-: 100:__fortify_function void
-: 101:__NTH (bzero (void *__dest, size_t __len))
-: 102:{
-: 103: (void) __builtin___memset_chk (__dest, '\0', __len, __bos0 (__dest));
-: 104:}
-: 105:#endif
-: 106:
-: 107:__fortify_function char *
-: 108:__NTH (strcpy (char *__restrict __dest, const char *__restrict __src))
-: 109:{
-: 110: return __builtin___strcpy_chk (__dest, __src, __bos (__dest));
-: 111:}
-: 112:
-: 113:#ifdef __USE_GNU
-: 114:__fortify_function char *
-: 115:__NTH (stpcpy (char *__restrict __dest, const char *__restrict __src))
-: 116:{
-: 117: return __builtin___stpcpy_chk (__dest, __src, __bos (__dest));
-: 118:}
-: 119:#endif
-: 120:
-: 121:
-: 122:__fortify_function char *
-: 123:__NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
-: 124: size_t __len))
-: 125:{
-: 126: return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
-: 127:}
-: 128:
-: 129:// XXX We have no corresponding builtin yet.
-: 130:extern char *__stpncpy_chk (char *__dest, const char *__src, size_t __n,
-: 131: size_t __destlen) __THROW;
-: 132:extern char *__REDIRECT_NTH (__stpncpy_alias, (char *__dest, const char *__src,
-: 133: size_t __n), stpncpy);
-: 134:
-: 135:__fortify_function char *
-: 136:__NTH (stpncpy (char *__dest, const char *__src, size_t __n))
-: 137:{
-: 138: if (__bos (__dest) != (size_t) -1
-: 139: && (!__builtin_constant_p (__n) || __n > __bos (__dest)))
-: 140: return __stpncpy_chk (__dest, __src, __n, __bos (__dest));
-: 141: return __stpncpy_alias (__dest, __src, __n);
-: 142:}
-: 143:
-: 144:
-: 145:__fortify_function char *
-: 146:__NTH (strcat (char *__restrict __dest, const char *__restrict __src))
-: 147:{
-: 148: return __builtin___strcat_chk (__dest, __src, __bos (__dest));
-: 149:}
-: 150:
-: 151:
-: 152:__fortify_function char *
-: 153:__NTH (strncat (char *__restrict __dest, const char *__restrict __src,
-: 154: size_t __len))
-: 155:{
-: 156: return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest));
-: 157:}
<<<<<< EOF
# path=/home/travis/build/nijel/enca/src/convert_iconv.c.gcov
-: 0:Source:convert_iconv.c
-: 0:Graph:enca-convert_iconv.gcno
-: 0:Data:enca-convert_iconv.gcda
-: 0:Runs:275
-: 0:Programs:1
-: 1:/*
-: 2: interface to UNIX98 iconv conversion functions
-: 3:
-: 4: Copyright (C) 2000-2003 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#include "common.h"
-: 20:#ifdef HAVE_GOOD_ICONV
-: 21:
-: 22:#include
-: 23:#include "iconvenc.h"
-: 24:
-: 25:/* Local prototypes. */
-: 26:static int iconv_one_step (File *file_from,
-: 27: File *file_to,
-: 28: iconv_t icd);
-: 29:static int do_iconv_open (EncaEncoding from_enc,
-: 30: EncaEncoding to_enc,
-: 31: iconv_t *icd);
-: 32:static void do_iconv_close (iconv_t icd);
-: 33:static int acceptable_surface (EncaEncoding enc);
-: 34:
-: 35:/* Second buffer needed for iconv(). */
-: 36:static Buffer *buffer_iconv = NULL;
-: 37:
-: 38:/* convert file using UNIX98 iconv functions
-: 39: returns 0 on success, nonzero error code otherwise
-: 40: when iconv implementation is not transitive (ICONV_TRANSITIVE is not
-: 41: defined), it may help to perform conversion via Unicode, so we try it too
-: 42: (probably UCS-2/ISO-10646, but maybe UTF-8---whatever has been detected
-: 43: at configure time) */
-: 44:int
6: 45:convert_iconv(File *file,
-: 46: EncaEncoding from_enc)
-: 47:{
-: 48: static int ascii = ENCA_CS_UNKNOWN;
6: 49: File *tempfile = NULL;
-: 50: int err;
-: 51: iconv_t icd;
-: 52:
6: 53: if (!enca_charset_is_known(ascii)) {
6: 54: ascii = enca_name_to_charset("ascii");
6: 55: assert(enca_charset_is_known(ascii));
-: 56: }
-: 57:
-: 58: /* When iconv doesn't know the encodings, it can't convert between them.
-: 59: * We also don't try conversion to ASCII, it can only damage the files and
-: 60: * upset users, nothing else.
-: 61: * And fail early on really silly surfaces. */
6: 62: if (!enca_charset_name(from_enc.charset, ENCA_NAME_STYLE_ICONV)
6: 63: || (enca_charset_is_known(options.target_enc.charset)
5: 64: && !enca_charset_name(options.target_enc.charset,
-: 65: ENCA_NAME_STYLE_ICONV))
6: 66: || options.target_enc.charset == ascii
6: 67: || !acceptable_surface(from_enc)
6: 68: || !acceptable_surface(options.target_enc))
-: 69: return ERR_CANNOT;
-: 70:
-: 71: /* Is the conversion possible? */
6: 72: if (do_iconv_open(from_enc, options.target_enc, &icd) != 0)
-: 73: return ERR_CANNOT;
-: 74:
-: 75: /* Since iconv doesn't recode files in place, we make a temporary file
-: 76: and copy contents of file fname to it.
-: 77: save the current content first, then copy the rest.
-: 78: When the file is stdin, fake-reopen it to stdout. */
5: 79: err = ERR_IOFAIL;
5: 80: if ((tempfile = file_temporary(file->buffer, 1))
5: 81: && file_write(tempfile) != -1
5: 82: && copy_and_convert(file, tempfile, NULL) == 0
5: 83: && (!file->name || file_seek(file, 0, SEEK_SET) == 0)
5: 84: && file_seek(tempfile, 0, SEEK_SET) == 0
5: 85: && (!file->name || file_truncate(file, 0) == 0)
5: 86: && (file->name || (file_close(file) == 0
2: 87: && file_open(file, "wb") == 0))) {
-: 88: /* Create the second buffer when we don't have any yet
-: 89: but don't make it unnecessarily large, system default suffices */
5: 90: if (!buffer_iconv)
5: 91: buffer_iconv = buffer_new(0);
5: 92: tempfile->buffer = buffer_iconv;
-: 93:
5: 94: err = iconv_one_step(tempfile, file, icd);
-: 95: }
-: 96:
5: 97: file_free(tempfile);
5: 98: do_iconv_close(icd);
5: 99: return err;
-: 100:}
-: 101:
-: 102:/* perform one conversion step using conversion descriptor icd
-: 103: reading for file_from and putting result to file_to */
-: 104:static int
5: 105:iconv_one_step(File *file_from,
-: 106: File *file_to,
-: 107: iconv_t icd)
-: 108:{
-: 109: size_t size_from, size_to, n;
-: 110: char *p_from, *p_to;
-: 111: int hit_eof;
-: 112:
-: 113: /* convert */
-: 114: do {
-: 115: /* read to io_buffer */
5: 116: if (file_read(file_from) == -1)
-: 117: return ERR_IOFAIL;
-: 118:
5: 119: p_from = (char*)file_from->buffer->data;
5: 120: size_from = file_from->buffer->pos;
5: 121: hit_eof = (ssize_t)file_from->buffer->size > file_from->buffer->pos;
-: 122: /* convert without reading more data until io_buffer is exhausted or some
-: 123: error occurs */
-: 124: do {
5: 125: p_to = (char*)file_to->buffer->data;
5: 126: size_to = file_to->buffer->size;
5: 127: n = iconv(icd,
-: 128: (ICONV_CONST char**)&p_from, &size_from,
-: 129: &p_to, &size_to);
5: 130: file_to->buffer->pos = file_to->buffer->size - size_to;
5: 131: if (n != (size_t)-1 || errno != E2BIG)
-: 132: break;
-: 133:
#####: 134: if (file_write(file_to) == -1)
-: 135: return ERR_IOFAIL;
-: 136:
-: 137: } while (1);
-: 138:
5: 139: if (n == (size_t)-1) {
-: 140: /* EINVAL means some multibyte sequence has been splitted---that's ok,
-: 141: move it to the begining and go on */
1: 142: if (errno == EINVAL && !hit_eof) {
#####: 143: memmove(file_from->buffer->data, p_from, size_from);
#####: 144: file_from->buffer->pos = size_from;
-: 145: }
-: 146: else {
-: 147: /* but other errors are critical, conversion and try to recover */
3: 148: fprintf(stderr, "%s: Iconv conversion error on `%s': %s\n",
-: 149: program_name,
1: 150: ffname_r(file_from->name),
-: 151: strerror(errno));
1: 152: if (file_from->name && file_to->name) {
-: 153: Buffer *buf;
-: 154: int err;
-: 155:
-: 156: /* regular file */
2: 157: fprintf(stderr, "Trying to recover... ");
1: 158: if (file_seek(file_from, 0, SEEK_SET) != 0
1: 159: || file_seek(file_to, 0, SEEK_SET) != 0
1: 160: || file_truncate(file_to, file_to->size) != 0) {
#####: 161: fprintf(stderr, "failed\n");
#####: 162: return ERR_IOFAIL;
-: 163: }
1: 164: file_from->buffer->pos = 0;
1: 165: buf = file_to->buffer;
1: 166: file_to->buffer = file_from->buffer;
1: 167: err = copy_and_convert(file_from, file_to, NULL);
1: 168: file_to->buffer = buf;
-: 169:
1: 170: if (err != 0) {
#####: 171: fprintf(stderr, "failed\n");
#####: 172: return ERR_IOFAIL;
-: 173: }
2: 174: fprintf(stderr, "succeeded.\n");
-: 175: }
-: 176: else {
#####: 177: fprintf(stderr, "No way to recover in a pipe.\n");
#####: 178: return ERR_IOFAIL;
-: 179: }
-: 180:
1: 181: return ERR_MALFORM;
-: 182: }
-: 183: }
4: 184: else file_from->buffer->pos = 0;
-: 185:
-: 186: /* write the remainder */
4: 187: if (file_write(file_to) == -1)
-: 188: return ERR_IOFAIL;
-: 189:
4: 190: } while (!hit_eof);
-: 191:
-: 192: /* file might end with an unfinished multibyte sequence */
4: 193: if (size_from > 0) {
#####: 194: fprintf(stderr, "%s: File `%s' seems to be truncated, "
-: 195: "the trailing incomplete multibyte sequence "
-: 196: "has been lost\n",
-: 197: program_name,
#####: 198: ffname_r(file_from->name));
#####: 199: return ERR_MALFORM;
-: 200: }
-: 201:
-: 202: return ERR_OK;
-: 203:}
-: 204:
-: 205:/* try to ask for conversion from from_enc to to_enc
-: 206: returns 0 on success, nonzero on failure
-: 207: on fatal error simply aborts program */
-: 208:static int
6: 209:do_iconv_open(EncaEncoding from_enc,
-: 210: EncaEncoding to_enc,
-: 211: iconv_t *icd)
-: 212:{
-: 213: const char *to_name, *from_name;
-: 214:
6: 215: if (!enca_charset_is_known(to_enc.charset))
1: 216: to_name = options.target_enc_str;
-: 217: else
5: 218: to_name = enca_charset_name(to_enc.charset, ENCA_NAME_STYLE_ICONV);
6: 219: from_name = enca_charset_name(from_enc.charset, ENCA_NAME_STYLE_ICONV);
6: 220: assert(from_name != NULL);
6: 221: assert(to_name != NULL);
-: 222:
-: 223: /* Iconv_open() paramters has reverse order than we use. */
6: 224: *icd = iconv_open(to_name, from_name);
6: 225: if (*icd != (iconv_t)-1)
-: 226: return 0;
-: 227:
-: 228: /* Failure, EINVAL means this conversion is not possible. */
1: 229: if (errno == EINVAL)
-: 230: return ERR_CANNOT;
-: 231:
-: 232: /* But otherwise we are in deep trouble, we've got out of memory or file
-: 233: descriptors. */
#####: 234: fprintf(stderr, "%s: Aborting: %s\n",
-: 235: program_name,
-: 236: strerror(errno));
#####: 237: exit(EXIT_TROUBLE);
-: 238:
-: 239: return 0;
-: 240:}
-: 241:
-: 242:/* close iconv descriptor icd
-: 243: abort if it is not possible */
-: 244:static void
5: 245:do_iconv_close(iconv_t icd)
-: 246:{
5: 247: if (iconv_close(icd) != 0) {
#####: 248: fprintf(stderr, "%s: Cannot close iconv descriptor (memory leak): %s\n",
-: 249: program_name,
#####: 250: strerror(errno));
#####: 251: exit(EXIT_TROUBLE);
-: 252: }
5: 253:}
-: 254:
-: 255:/**
-: 256: * Do we think iconv will accept given encoding as a source or target?
-: 257: *
-: 258: * This is a somewhat less strict condition than natural surface requirement.
-: 259: **/
-: 260:static int
-: 261:acceptable_surface(EncaEncoding enc)
-: 262:{
-: 263: EncaSurface mask;
-: 264:
12: 265: mask = enca_charset_natural_surface(enc.charset) | ENCA_SURFACE_MASK_EOL;
-: 266:
12: 267: return (enc.surface & ~mask) == 0;
-: 268:}
-: 269:
-: 270:#endif /* HAVE_GOOD_ICONV */
-: 271:
-: 272:/* vim: ts=2
-: 273: */
<<<<<< EOF
# path=/home/travis/build/nijel/enca/src/locale_detect.c.gcov
-: 0:Source:locale_detect.c
-: 0:Graph:enca-locale_detect.gcno
-: 0:Data:enca-locale_detect.gcda
-: 0:Runs:275
-: 0:Programs:1
-: 1:/*
-: 2: try to guess user's native language from locale
-: 3:
-: 4: Copyright (C) 2000-2003 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#include "common.h"
-: 20:
-: 21:#ifdef HAVE_SETLOCALE
-: 22:# ifdef HAVE_LOCALE_H
-: 23:# include
-: 24:# else /* HAVE_LOCALE_H */
-: 25:char* setlocale(int category, const char *locale);
-: 26:# endif /* HAVE_LOCALE_H */
-: 27:#endif /* HAVE_SETLOCALE */
-: 28:
-: 29:#ifdef HAVE_NL_LANGINFO
-: 30:# ifdef HAVE_LANGINFO_H
-: 31:# include
-: 32:# else /* HAVE_LANGINFO_H */
-: 33:char *nl_langinfo(nl_item *item);
-: 34:# endif /* HAVE_LANGINFO_H */
-: 35:#endif /* HAVE_NL_LANGINFO */
-: 36:
-: 37:static char *codeset = NULL;
-: 38:
-: 39:/* Local prototypes. */
-: 40:static char* locale_alias_convert(const char *locname);
-: 41:static char* strip_locale_name(const char *locname);
-: 42:static char* static_iso639_alias_convert(const char *locname);
-: 43:#ifdef HAVE_SETLOCALE
-: 44:static char* detect_target_charset(const char *locname);
-: 45:static char* detect_user_language(void);
-: 46:#endif /* HAVE_SETLOCALE */
-: 47:static void codeset_free(void);
-: 48:
-: 49:/*
-: 50: * when lang is not NULL converts it to two-character language code
-: 51: * othwerise, tries to guess what language user wants from locale settings.
-: 52: * returns string of length 2 containig language code (to be freed by caller)
-: 53: * or NULL if not detected or unable to convert.
-: 54: */
-: 55:char*
251: 56:detect_lang(const char *lang)
-: 57:{
-: 58: char *locname, *result, *cvt;
-: 59:
251: 60: atexit(codeset_free);
-: 61:#ifdef HAVE_SETLOCALE
-: 62: /* No lang, detect locale, then CODESET, then try to transform it */
251: 63: if (!lang) {
1: 64: locname = detect_user_language();
-: 65: /* HERE: locname is (a) newly allocated (b) NULL */
1: 66: codeset = detect_target_charset(locname);
-: 67: /* HERE: codeset is (a) newly allocated, different from locname (b) NULL */
1: 68: cvt = locale_alias_convert(locname);
1: 69: result = strip_locale_name(cvt);
1: 70: enca_free(cvt);
1: 71: enca_free(locname);
-: 72: return result;
-: 73: }
-: 74:
-: 75: /* We have lang, try it first untransformed, then transformed for CODESET */
250: 76: codeset = detect_target_charset(lang);
250: 77: locname = locale_alias_convert(lang);
250: 78: if (!codeset)
250: 79: codeset = detect_target_charset(locname);
250: 80: result = strip_locale_name(locname);
250: 81: enca_free(locname);
-: 82: return result;
-: 83:
-: 84:#else /* HAVE_SETLOCALE */
-: 85: cvt = locale_alias_convert(lang);
-: 86: result = strip_locale_name(cvt);
-: 87: enca_free(cvt);
-: 88: return result;
-: 89:#endif /* HAVE_SETLOCALE */
-: 90:}
-: 91:
-: 92:#ifdef HAVE_SETLOCALE
-: 93:/**
-: 94: * detect_target_charset:
-: 95: *
-: 96: * Detect target charset from LC_CTYPE for user's language.
-: 97: *
-: 98: * Returns: A string (to be freed) with charset name or NULL on failure.
-: 99: **/
-: 100:static char*
501: 101:detect_target_charset(const char *locname)
-: 102:{
501: 103: char *s = NULL;
-: 104:
-: 105:#ifdef HAVE_NL_LANGINFO
501: 106: if (!locname)
-: 107: return NULL;
-: 108:
500: 109: if ((s = setlocale(LC_CTYPE, locname)) == NULL)
-: 110: return NULL;
-: 111:
#####: 112: s = enca_strdup(nl_langinfo(CODESET));
-: 113:
#####: 114: if (setlocale(LC_CTYPE, "C") == NULL) {
#####: 115: fprintf(stderr, "%s: Cannot set LC_CTYPE to the portable \"C\" locale\n",
-: 116: program_name);
#####: 117: exit(EXIT_TROUBLE);
-: 118: }
#####: 119: if (options.verbosity_level > 2)
#####: 120: fprintf(stderr, "Detected locale native charset: %s\n", s);
-: 121:#endif /* HAVE_NL_LANGINFO */
-: 122:
-: 123: return s;
-: 124:}
-: 125:
-: 126:/**
-: 127: * detect_user_language:
-: 128: *
-: 129: * Detect user's locale by querying several LC categories.
-: 130: *
-: 131: * NB: this is conceptually wrong, the string returned by setlocale should
-: 132: * be taken as opaque -- but then we would be in deep shit^Wtrouble. This
-: 133: * seems to actually happen on Win32.
-: 134: *
-: 135: * Returns: A string (to be freed) with locale name or NULL on failure.
-: 136: **/
-: 137:static char*
1: 138:detect_user_language(void)
-: 139:{
-: 140: static const int test_categories[] = {
-: 141: LC_CTYPE, LC_COLLATE,
-: 142:#if HAVE_LC_MESSAGES
-: 143: LC_MESSAGES,
-: 144:#endif
-: 145: };
1: 146: char *s = NULL;
-: 147: size_t i;
-: 148:
3: 149: for (i = 0; i < ELEMENTS(test_categories); i++) {
2: 150: enca_free(s);
2: 151: if ((s = setlocale(test_categories[i], "")) == NULL)
#####: 152: continue;
2: 153: s = enca_strdup(s);
2: 154: if (setlocale(test_categories[i], "C") == NULL) {
#####: 155: fprintf(stderr, "%s: Cannot set locale to the portable \"C\" locale\n",
-: 156: program_name);
#####: 157: exit(EXIT_TROUBLE);
-: 158: }
-: 159:
2: 160: if (strcmp(s, "") == 0
2: 161: || strcmp(s, "C") == 0
2: 162: || strcmp(s, "POSIX") == 0
2: 163: || (strncmp(s, "en", 2) == 0 && !isalpha(s[2])))
2: 164: continue;
-: 165:
#####: 166: if (options.verbosity_level > 2)
#####: 167: fprintf(stderr, "Locale inherited from environment: %s\n", s);
-: 168:
-: 169: return s;
-: 170: }
-: 171:
1: 172: free(s);
1: 173: return NULL;
-: 174:}
-: 175:#endif /* HAVE_SETLOCALE */
-: 176:
-: 177:/* convert locale alias to canonical name using LOCALE_ALIAS_FILE (presumably
-: 178: /usr/share/locale/locale.alias) and return it
-: 179:
-: 180: Returned string should be freed by caller.
-: 181:
-: 182: FIXME: this function can get easily confused by lines longer than BUFSIZE
-: 183: (but the worst thing that can happen is we return wrong locale name)
-: 184: the locale.alias format is nowhere described, so we assume every line
-: 185: consists of alias (row 1), some whitespace and canonical name */
-: 186:static char*
251: 187:locale_alias_convert(const char *locname)
-: 188:{
-: 189:#ifdef HAVE_LOCALE_ALIAS
-: 190: File *fla; /* locale.alias file */
-: 191: Buffer *buf;
-: 192: char *s,*p,*q;
-: 193: size_t n;
-: 194:#endif /* HAVE_LOCALE_ALIAS */
-: 195:
251: 196: if (!locname)
-: 197: return NULL;
-: 198:
-: 199: /* Catch the special language name `none' */
250: 200: if (strcmp(locname, "none") == 0)
25: 201: return enca_strdup("__");
-: 202:
-: 203:#ifdef HAVE_LOCALE_ALIAS
-: 204: /* try to read locale.alias */
225: 205: buf = buffer_new(0);
225: 206: fla = file_new(LOCALE_ALIAS_PATH, buf);
225: 207: if (file_open(fla, "r") != 0) {
#####: 208: if (options.verbosity_level) {
#####: 209: fprintf(stderr, "Cannot find locale.alias file.\n"
-: 210: "This build of enca probably has been configured for "
-: 211: "quite a different system\n");
-: 212: }
#####: 213: file_free(fla);
#####: 214: buffer_free(buf);
#####: 215: return enca_strdup(locname);
-: 216: }
-: 217:
-: 218: /* scan locale.alias
-: 219: somewhat crude now */
225: 220: n = strlen(locname);
225: 221: p = NULL;
225: 222: s = (char*)buf->data; /* alias */
18900: 223: while (file_getline(fla) != NULL) {
18529: 224: if (strncmp(s, locname, n) == 0 &&
158: 225: (isspace(s[n]) || (s[n] == ':' && isspace(s[n+1])))) {
-: 226: p = s + n;
-: 227: /* skip any amount of whitespace */
#####: 228: while (isspace(*p)) p++;
-: 229: q = p;
-: 230: /* anything up to next whitespace is the canonical locale name */
#####: 231: while (*q != '\0' && !isspace(*q)) q++;
#####: 232: *q = '\0';
#####: 233: p = enca_strdup(p);
#####: 234: break;
-: 235: }
-: 236: }
225: 237: file_close(fla);
225: 238: file_free(fla);
-: 239:
225: 240: buffer_free(buf);
225: 241: return p != NULL ? p : static_iso639_alias_convert(locname);
-: 242:#else /* HAVE_LOCALE_ALIAS */
-: 243: return static_iso639_alias_convert(locname);
-: 244:#endif /* HAVE_LOCALE_ALIAS */
-: 245:}
-: 246:
-: 247:/**
-: 248: * get_lang_codeset:
-: 249: *
-: 250: * Returns locale native charset.
-: 251: *
-: 252: * MUST be called after detect_lang.
-: 253: *
-: 254: * Returns: the codeset name.
-: 255: **/
-: 256:const char*
#####: 257:get_lang_codeset(void)
-: 258:{
#####: 259: if (!codeset)
#####: 260: codeset = enca_strdup("");
-: 261:
#####: 262: return codeset;
-: 263:}
-: 264:
-: 265:/**
-: 266: * Returns `language' component of locale name locname (if successfully
-: 267: * parsed), NULL otherwise
-: 268: *
-: 269: * Returned string should be freed by caller.
-: 270: **/
-: 271:static char*
251: 272:strip_locale_name(const char *locname)
-: 273:{
-: 274: /* Some supported languages can also appear as dialects of some other
-: 275: * language */
-: 276: struct {
-: 277: const char *dialect;
-: 278: const char *iso639;
-: 279: }
251: 280: const DIALECTS[] = {
-: 281: { "cs_SK", "sk" },
-: 282: { "ru_UA", "uk" },
-: 283: };
-: 284:
-: 285: size_t n;
-: 286: char *s;
-: 287:
251: 288: if (!locname)
-: 289: return NULL;
-: 290:
250: 291: s = enca_strdup(locname);
250: 292: n = strlen(s);
-: 293: /* Just language: en, de, fr, cs, sk, ru, etc. */
250: 294: if (n == 2)
-: 295: return s;
-: 296:
-: 297: /* Some long specification (either X/Open or CEN). */
1: 298: if (n >= 5 && s[2] == '_'
#####: 299: && (s[5] == '\0' || s[5] == '.' || s[5] == '+')) {
-: 300: size_t i;
-: 301:
-: 302: /* Convert dialects. */
#####: 303: for (i = 0; i < ELEMENTS(DIALECTS); i++) {
#####: 304: if (strncmp(DIALECTS[i].dialect, s, 5) == 0) {
#####: 305: s[0] = DIALECTS[i].iso639[0];
#####: 306: s[1] = DIALECTS[i].iso639[1];
#####: 307: break;
-: 308: }
-: 309: }
-: 310:
#####: 311: s[2] = '\0';
-: 312: }
-: 313: else {
-: 314: /* Just garbage or some unresolved locale alias. */
1: 315: enca_free(s);
-: 316: }
-: 317:
-: 318: return s;
-: 319:}
-: 320:
-: 321:/**
-: 322: * Tries to translate language names statically.
-: 323: *
-: 324: * Also catches some bad and alternative spellings.
-: 325: *
-: 326: * Returned string should be freed by caller.
-: 327: **/
-: 328:static char*
225: 329:static_iso639_alias_convert(const char *locname)
-: 330:{
-: 331: struct {
-: 332: const char *alias;
-: 333: const char *iso639;
-: 334: }
225: 335: const ALIASES[] = {
-: 336: { "byelarussian", "be" },
-: 337: { "byelarusian", "be" },
-: 338: { "belarussian", "be" },
-: 339: { "belarusian", "be" },
-: 340: { "byelorussian", "be" },
-: 341: { "belorussian", "be" },
-: 342: { "byelorusian", "be" },
-: 343: { "belorusian", "be" },
-: 344: { "bosnian", "hr" },
-: 345: { "bulgarian", "bg" },
-: 346: { "chinese", "zh" },
-: 347: { "croatian", "hr" },
-: 348: { "czech", "cs" },
-: 349: { "estonian", "et" },
-: 350: { "hungarian", "hu" },
-: 351: { "lativan", "lt" },
-: 352: { "lettic", "lv" },
-: 353: { "lettish", "lv" },
-: 354: { "lithuanian", "lt" },
-: 355: { "macedonian", "bg"},
-: 356: { "magyar", "hu" },
-: 357: { "montenegrin-cyrilic", "bg"},
-: 358: { "montenegrin-latin", "hr" },
-: 359: { "polish", "pl" },
-: 360: { "russian", "ru" },
-: 361: { "serbian-cyrilic", "bg"},
-: 362: { "serbian-latin", "hr"},
-: 363: { "slovak", "sk" },
-: 364: { "slovene", "sl" },
-: 365: { "slovenian", "sl" },
-: 366: { "ukrainian", "uk" }
-: 367: };
-: 368:
-: 369: size_t i;
-: 370:
225: 371: if (!locname)
-: 372: return NULL;
-: 373:
6975: 374: for (i = 0; i < ELEMENTS(ALIASES); i++) {
6975: 375: if (strcmp(ALIASES[i].alias, locname) == 0) {
#####: 376: if (options.verbosity_level > 2)
#####: 377: fprintf(stderr, "Decrypted locale alias using built-in table: %s\n",
-: 378: ALIASES[i].iso639);
-: 379:
#####: 380: return enca_strdup(ALIASES[i].iso639);
-: 381: }
-: 382: }
-: 383:
225: 384: return enca_strdup(locname);
-: 385:}
-: 386:
-: 387:static void
251: 388:codeset_free(void)
-: 389:{
251: 390: enca_free(codeset);
251: 391:}
-: 392:
-: 393:/* vim: ts=2
-: 394: */
<<<<<< EOF
# path=/home/travis/build/nijel/enca/src/convert.c.gcov
-: 0:Source:convert.c
-: 0:Graph:enca-convert.gcno
-: 0:Data:enca-convert.gcda
-: 0:Runs:275
-: 0:Programs:1
-: 1:/*
-: 2: conversion to other encodings
-: 3:
-: 4: Copyright (C) 2000-2003 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#include "common.h"
-: 20:
-: 21:#ifdef HAVE_SYS_WAIT_H
-: 22:# include
-: 23:#else
-: 24:pid_t waitpid(pid_t pid, int *status, int options);
-: 25:#endif
-: 26:
-: 27:/* We can't go on w/o this, defining struct stat manually is braindamaged. */
-: 28:#include
-: 29:#include
-: 30:
-: 31:/* converter flags */
-: 32:#define CONV_EXTERN 0x0001
-: 33:
-: 34:/* converter-type (filename, input encoding, output encoding) */
-: 35:typedef int (* ConverterFunc)(File*, EncaEncoding);
-: 36:
-: 37:/* struct converter data */
-: 38:typedef struct _ConverterData ConverterData;
-: 39:
-: 40:struct _ConverterData {
-: 41: unsigned long int flags; /* flags */
-: 42: ConverterFunc convfunc; /* pointer to converter function */
-: 43:};
-: 44:
-: 45:/* struct converter list */
-: 46:typedef struct _Converter Converter;
-: 47:
-: 48:struct _Converter {
-: 49: const Abbreviation *conv; /* the converter (an abbreviation table entry) */
-: 50: Converter *next; /* next in the list */
-: 51:};
-: 52:
-: 53:/* converter list */
-: 54:static Converter *converters = NULL;
-: 55:
-: 56:/* data for xtable */
-: 57:static struct {
-: 58: size_t ncharsets; /* number of charsets */
-: 59: int *charsets; /* charset id's for active language [ncharsets] */
-: 60: byte *tables; /* tables from charsets to target_charset [ncharsets * 0x100] */
-: 61: int *have_table; /* whether particular table is already cached [ncharsets] */
-: 62: unsigned int *ucs2_map; /* temporary space for map computation [0x10000] */
-: 63: unsigned int target_map[0x100];
-: 64:}
-: 65:xdata = { 0, NULL, NULL, NULL, NULL, { 0 } };
-: 66:
-: 67:/* Local prototypes. */
-: 68:static int convert_builtin (File *file,
-: 69: EncaEncoding from_enc);
-: 70:static const byte* xtable (int from_charset);
-: 71:static void xdata_free (void);
-: 72:
-: 73:static const ConverterData cdata_builtin = { 0, &convert_builtin };
-: 74:#ifdef HAVE_LIBRECODE
-: 75:static const ConverterData cdata_librecode = { 0, &convert_recode };
-: 76:#endif /* HAVE_LIBRECODE */
-: 77:#ifdef HAVE_GOOD_ICONV
-: 78:static const ConverterData cdata_iconv = { 0, &convert_iconv };
-: 79:#endif /* HAVE_GOOD_ICONV */
-: 80:#ifdef ENABLE_EXTERNAL
-: 81:static const ConverterData cdata_extern = { CONV_EXTERN, &convert_external };
-: 82:#endif /* ENABLE_EXTERNAL */
-: 83:
-: 84:static const Abbreviation CONVERTERS[] = {
-: 85: { "built-in", &cdata_builtin },
-: 86:#ifdef HAVE_LIBRECODE
-: 87: { "librecode", &cdata_librecode },
-: 88:#endif /* HAVE_LIBRECODE */
-: 89:#ifdef HAVE_GOOD_ICONV
-: 90: { "iconv", &cdata_iconv },
-: 91:#endif /* HAVE_GOOD_ICONV */
-: 92:#ifdef ENABLE_EXTERNAL
-: 93: { "extern", &cdata_extern }
-: 94:#endif /* ENABLE_EXTERNAL */
-: 95:};
-: 96:
-: 97:/* decide which converter should be run and do common checks
-: 98: from_enc, to_enc are current and requested encoding
-: 99: returns error code
-: 100:
-: 101: it doesn't open the file (guess() did it) and doesn't close it (caller does
-: 102: it) */
-: 103:int
62: 104:convert(File *file,
-: 105: EncaEncoding from_enc)
-: 106:{
-: 107: Converter *conv;
-: 108: int err;
-: 109:
62: 110: if (options.verbosity_level) {
#####: 111: fprintf(stderr, "%s: converting `%s': %s\n",
#####: 112: program_name, ffname_r(file->name),
-: 113: format_request_string(from_enc, options.target_enc, 0));
-: 114: }
-: 115:
-: 116: /* do nothing when requested encoding is current encoding
-: 117: (`nothing' may include copying stdin to stdout) */
62: 118: if (from_enc.charset == options.target_enc.charset
4: 119: && from_enc.surface == options.target_enc.surface) {
#####: 120: if (file->name != NULL)
-: 121: return ERR_OK;
-: 122: else
#####: 123: return copy_and_convert(file, file, NULL);
-: 124: }
-: 125:
-: 126: /* try sequentially all allowed converters until we find some that can
-: 127: perform the conversion or exahust the list */
62: 128: conv = converters;
129: 129: while (conv != NULL) {
63: 130: if (options.verbosity_level > 1) {
#####: 131: fprintf(stderr, " trying to convert `%s' using %s\n",
#####: 132: ffname_r(file->name), conv->conv->name);
-: 133: }
63: 134: err = ((ConverterData *)conv->conv->data)->convfunc(file, from_enc);
62: 135: if (err == ERR_OK)
-: 136: return ERR_OK;
-: 137:
6: 138: if ((((ConverterData *)conv->conv->data)->flags & CONV_EXTERN) != 0) {
1: 139: fprintf(stderr, "%s: external converter failed on `%s', "
-: 140: "probably destroying it\n",
1: 141: program_name, ffname_w(file->name));
-: 142: }
-: 143: /* don't tempt fate in case of i/o or other serious problems */
6: 144: if (err != ERR_CANNOT)
-: 145: return ERR_IOFAIL;
-: 146:
5: 147: conv = conv->next;
-: 148: }
-: 149:
-: 150: /* no converter able/allowed to perform given conversion, that's bad */
8: 151: fprintf(stderr, "%s: no converter is able/allowed to perform "
-: 152: "conversion %s on file `%s'\n",
-: 153: program_name,
-: 154: format_request_string(from_enc, options.target_enc, 0),
4: 155: ffname_r(file->name));
-: 156:
-: 157: /* nevertheless stdin should be copied to stdout anyway it cannot make
-: 158: more mess */
4: 159: if (file->name == NULL)
1: 160: copy_and_convert(file, file, NULL);
-: 161:
-: 162: return ERR_CANNOT;
-: 163:}
-: 164:
-: 165:/* built-in converter
-: 166: performs conversion by in place modification of file named fname
-: 167: or by calling copy_and_convert() for stdin -> stdout conversion
-: 168: returns zero on success, error code otherwise */
-: 169:static int
42: 170:convert_builtin(File *file,
-: 171: EncaEncoding from_enc)
-: 172:{
-: 173: static int ascii = ENCA_CS_UNKNOWN;
-: 174:
-: 175: Buffer *buf; /* file->buffer alias */
-: 176: const byte *xlat; /* conversion table */
-: 177:
42: 178: if (!enca_charset_is_known(ascii)) {
42: 179: ascii = enca_name_to_charset("ascii");
42: 180: assert(enca_charset_is_known(ascii));
-: 181: }
-: 182:
-: 183: /* surfaces can cause fail iff user specificaly requested some
-: 184: * or when they are other type than EOLs */
-: 185: {
42: 186: EncaSurface srf = options.target_enc.surface ^ from_enc.surface;
-: 187:
42: 188: if ((options.target_enc.surface
#####: 189: && from_enc.surface != options.target_enc.surface)
42: 190: || srf != (srf & ENCA_SURFACE_MASK_EOL)) {
#####: 191: if (options.verbosity_level > 2)
#####: 192: fprintf(stderr, "%s: built-in: cannot convert between "
-: 193: "different surfaces\n",
-: 194: program_name);
-: 195: return ERR_CANNOT;
-: 196: }
-: 197: }
-: 198:
-: 199: /* catch trivial conversions */
-: 200: {
42: 201: int identity = 0;
-: 202:
42: 203: if (from_enc.charset == options.target_enc.charset)
#####: 204: identity = 1;
-: 205:
42: 206: if (from_enc.charset == ascii
#####: 207: && enca_charset_is_8bit(options.target_enc.charset)
#####: 208: && !enca_charset_is_binary(options.target_enc.charset))
#####: 209: identity = 1;
-: 210:
42: 211: if (identity) {
#####: 212: if (file->name == NULL)
#####: 213: return copy_and_convert(file, file, NULL);
-: 214: else
-: 215: return ERR_OK;
-: 216: }
-: 217: }
-: 218:
42: 219: xlat = xtable(from_enc.charset);
42: 220: if (xlat == NULL)
-: 221: return ERR_CANNOT;
-: 222:
40: 223: if (file->name == NULL)
14: 224: return copy_and_convert(file, file, xlat);
-: 225:
-: 226: /* read buffer_size bytes, convert, write back, etc. to death (or eof,
-: 227: whichever come first) */
26: 228: buf = file->buffer;
26: 229: buf->pos = 0;
26: 230: if (file_seek(file, 0, SEEK_SET) == -1)
-: 231: return ERR_IOFAIL;
-: 232:
-: 233: do {
108: 234: if (file_read(file) == -1)
-: 235: return ERR_IOFAIL;
-: 236:
108: 237: if (buf->pos == 0)
-: 238: break;
-: 239:
-: 240: {
82: 241: size_t len = buf->pos;
82: 242: byte *p = buf->data;
-: 243: do {
4133873: 244: *p = xlat[*p];
4133873: 245: p++;
4133873: 246: } while (--len);
-: 247: }
-: 248:
82: 249: if (file_seek(file, -(buf->pos), SEEK_CUR) == -1)
-: 250: return ERR_IOFAIL;
-: 251:
82: 252: if (file_write(file) == -1)
-: 253: return ERR_IOFAIL;
-: 254:
-: 255: /* XXX: apparent no-op
-: 256: but ISO C requires fseek() or ftell() between subsequent fwrite() and
-: 257: fread(), or else the latter _may_ read nonsense -- and it actually does
-: 258: read nonsense with glibc-2.2 (at least); see fopen(3) */
82: 259: if (file_seek(file, 0, SEEK_CUR) == -1)
-: 260: return ERR_IOFAIL;
-: 261:
-: 262: } while (1);
-: 263:
-: 264: return ERR_OK;
-: 265:}
-: 266:
-: 267:/* copy file file_from to file file_to, optionally performing xlat conversion
-: 268: (if not NULL)
-: 269: file_from has to be already opened for reading,
-: 270: file_to has to be already opened for writing
-: 271: they have to share common buffer
-: 272: returns 0 on success, nonzero on failure */
-: 273:int
32: 274:copy_and_convert(File *file_from, File *file_to, const byte *xlat)
-: 275:{
-: 276: Buffer *buf; /* file_from->buffer alias */
-: 277:
32: 278: if (xlat == NULL && options.verbosity_level > 3)
#####: 279: fprintf(stderr, " copying `%s' to `%s'\n",
#####: 280: ffname_r(file_from->name),
#####: 281: ffname_w(file_to->name));
-: 282:
32: 283: assert(file_from->buffer == file_to->buffer);
32: 284: buf = file_from->buffer;
-: 285: /* If there's something in the buffer, process it first. */
32: 286: if (file_from->buffer->pos != 0) {
16: 287: if (xlat != NULL) {
14: 288: size_t len = buf->pos;
14: 289: byte *p = buf->data;
-: 290: do {
852026: 291: *p = xlat[*p];
852026: 292: p++;
852026: 293: } while (--len);
-: 294: }
16: 295: if (file_write(file_to) == -1)
-: 296: return ERR_IOFAIL;
-: 297: }
-: 298: /* Then copy the rest. */
-: 299: do {
97: 300: if (file_read(file_from) == -1)
-: 301: return ERR_IOFAIL;
-: 302:
97: 303: if (buf->pos == 0)
-: 304: break;
-: 305:
65: 306: if (xlat != NULL) {
56: 307: size_t len = buf->pos;
56: 308: byte *p = buf->data;
-: 309: do {
3280896: 310: *p = xlat[*p];
3280896: 311: p++;
3280896: 312: } while (--len);
-: 313: }
-: 314:
65: 315: if (file_write(file_to) == -1)
-: 316: return ERR_IOFAIL;
-: 317: } while (1);
32: 318: fflush(file_to->stream);
-: 319:
32: 320: return ERR_OK;
-: 321:}
-: 322:
-: 323:/* add converter to list of converters
-: 324: (note `none' adds nothing and causes removing of all converters instead)
-: 325: returns zero if everything went ok, nonzero otherwise */
-: 326:int
481: 327:add_converter(const char *cname)
-: 328:{
-: 329: /* no converters symbolic name */
-: 330: static const char *CONVERTER_NAME_NONE = "none";
-: 331:
-: 332: const Abbreviation *data;
481: 333: Converter *conv = NULL, *conv1;
-: 334:
-: 335: /* remove everything when we got `none' */
481: 336: if (strcmp(CONVERTER_NAME_NONE, cname) == 0) {
1: 337: if (options.verbosity_level > 3)
#####: 338: fprintf(stderr, "Removing all converters\n");
1: 339: while (converters != NULL) {
#####: 340: conv = converters->next;
#####: 341: enca_free(converters);
#####: 342: converters = conv;
-: 343: }
-: 344: return 0;
-: 345: }
-: 346:
-: 347: /* find converter data */
480: 348: data = expand_abbreviation(cname, CONVERTERS, ELEMENTS(CONVERTERS),
-: 349: "converter");
480: 350: if (data == NULL)
-: 351: return 1;
-: 352:
-: 353: /* add it to the end of converter list */
477: 354: if (options.verbosity_level > 3)
#####: 355: fprintf(stderr, "Adding converter `%s'\n", data->name);
477: 356: if (converters == NULL)
248: 357: converters = conv = NEW(Converter, 1);
-: 358: else {
229: 359: for (conv1 = converters; conv1 != NULL; conv1 = conv1->next) {
-: 360: /* reject duplicities */
229: 361: if (data == conv1->conv->data) {
#####: 362: fprintf(stderr, "%s: converter %s specified more than once\n",
-: 363: program_name,
-: 364: conv1->conv->name);
#####: 365: return 1;
-: 366: }
229: 367: conv = conv1;
-: 368: }
-: 369:
229: 370: conv->next = NEW(Converter, 1);
229: 371: conv = conv->next;
-: 372: }
477: 373: conv->next = NULL;
477: 374: conv->conv = data;
-: 375:
477: 376: return 0;
-: 377:}
-: 378:
-: 379:/* return nonzero if the list contains external converter */
-: 380:int
63: 381:external_converter_listed(void)
-: 382:{
-: 383: Converter *conv;
-: 384:
162: 385: for (conv = converters; conv; conv = conv->next) {
105: 386: if (((ConverterData*)conv->conv->data)->flags & CONV_EXTERN)
-: 387: return 1;
-: 388: }
-: 389:
-: 390: return 0;
-: 391:}
-: 392:
-: 393:/* print white separated list of all valid converter names */
-: 394:void
8: 395:print_converter_list(void)
-: 396:{
-: 397: size_t i;
-: 398:
40: 399: for (i = 0; i < sizeof(CONVERTERS)/sizeof(Abbreviation); i++)
64: 400: printf("%s\n", CONVERTERS[i].name);
8: 401:}
-: 402:
-: 403:/* create and return request string for conversion from e1 to e2
-: 404: filters out natrual surfaces || mask
-: 405: is NOT thread-safe
-: 406: returned string must NOT be freed and must be cosidered volatile */
-: 407:const char*
15: 408:format_request_string(EncaEncoding e1,
-: 409: EncaEncoding e2,
-: 410: EncaSurface mask)
-: 411:{
-: 412: static char *s = NULL;
-: 413: char *p, *q;
-: 414: const char *e2_name, *e1_name;
-: 415:
15: 416: enca_free(s);
-: 417: /* build s sequentially since value returned by surface_name() is lost
-: 418: by the second call */
15: 419: e1_name = enca_charset_name(e1.charset, ENCA_NAME_STYLE_ENCA);
30: 420: p = enca_get_surface_name(e1.surface
30: 421: & ~(enca_charset_natural_surface(e1.charset)
15: 422: | mask),
-: 423: ENCA_NAME_STYLE_ENCA);
15: 424: if (!enca_charset_is_known(e2.charset)) {
3: 425: q = enca_strdup("");
3: 426: e2_name = options.target_enc_str;
-: 427: }
-: 428: else {
24: 429: q = enca_get_surface_name(e2.surface
24: 430: & ~(enca_charset_natural_surface(e2.charset)
12: 431: | mask),
-: 432: ENCA_NAME_STYLE_ENCA);
12: 433: e2_name = enca_charset_name(e2.charset, ENCA_NAME_STYLE_ENCA);
-: 434: }
-: 435:
15: 436: s = enca_strconcat(e1_name, p, "..", e2_name, q, NULL);
-: 437:
15: 438: enca_free(p);
15: 439: enca_free(q);
-: 440:
15: 441: return s;
-: 442:}
-: 443:
-: 444:/**
-: 445: * xtable:
-: 446: * @from_charset: Charset id for which the conversion table should be returned.
-: 447: *
-: 448: * Returns translation table from charset @from to (global) target charset.
-: 449: *
-: 450: * The returned table must be considered constant and must NOT be freed.
-: 451: *
-: 452: * Only conversion between charsets of one language is supported. We assume
-: 453: * a language contains all known charsets usable for represenation of texts,
-: 454: * so other charsets are taken as incompatible.
-: 455: *
-: 456: * Globals used: options.target_enc.charset, options.language.
-: 457: *
-: 458: * Returns: The conversion table [0x100]; #NULL on failure.
-: 459: **/
-: 460:static const byte*
42: 461:xtable(int from_charset)
-: 462:{
-: 463: static int xtable_initialized = 0;
-: 464:
-: 465: unsigned int from_map[0x100];
-: 466: size_t i;
-: 467: ssize_t fidx;
-: 468:
42: 469: if (!enca_charset_has_ucs2_map(options.target_enc.charset)
40: 470: || !enca_charset_has_ucs2_map(from_charset))
-: 471: return NULL;
-: 472:
-: 473: /* Initialize when we are called the first time. */
40: 474: if (!xtable_initialized) {
-: 475: /* Allocate various tables. Never freed. */
40: 476: xdata.charsets = enca_get_language_charsets(options.language,
-: 477: &xdata.ncharsets);
40: 478: assert(xdata.ncharsets > 1);
40: 479: xdata.have_table = NEW(int, xdata.ncharsets);
40: 480: xdata.tables = NEW(byte, 0x100*xdata.ncharsets);
40: 481: xdata.ucs2_map = NEW(unsigned int, 0x10000);
-: 482:
281: 483: for (i = 0; i < xdata.ncharsets; i++)
241: 484: xdata.have_table[i] = 0;
-: 485:
-: 486: /* Initialize tables to identity */
10240: 487: for (i = 0; i < 0x100; i++)
10240: 488: xdata.tables[i] = (byte)i;
201: 489: for (i = 1; i < xdata.ncharsets; i++)
402: 490: memcpy(xdata.tables + 0x100*i, xdata.tables, 0x100);
-: 491:
-: 492: /* Check whether target_charset belongs to given language */
-: 493: fidx = -1;
97: 494: for (i = 0; i < xdata.ncharsets; i++) {
137: 495: if (xdata.charsets[i] == options.target_enc.charset) {
40: 496: fidx = i;
40: 497: break;
-: 498: }
-: 499: }
40: 500: if (fidx < 0)
-: 501: return NULL;
-: 502:
-: 503: {
-: 504: int map_created;
40: 505: map_created = enca_charset_ucs2_map(options.target_enc.charset,
-: 506: xdata.target_map);
40: 507: assert(map_created);
-: 508: }
40: 509: atexit(xdata_free);
-: 510: }
-: 511:
-: 512: /* Check whether from_charset belongs to given language */
40: 513: fidx = -1;
115: 514: for (i = 0; i < xdata.ncharsets; i++) {
115: 515: if (xdata.charsets[i] == from_charset) {
40: 516: fidx = i;
40: 517: break;
-: 518: }
-: 519: }
40: 520: if (fidx < 0)
-: 521: return NULL;
-: 522:
-: 523: /* Return table if cached. */
40: 524: if (xdata.have_table[fidx])
#####: 525: return xdata.tables + 0x100*fidx;
-: 526:
-: 527: /* Otherwise it must be generated */
-: 528: {
-: 529: int map_created;
40: 530: map_created = enca_charset_ucs2_map(from_charset, from_map);
40: 531: assert(map_created);
-: 532: }
-: 533:
2621440: 534: for (i = 0; i < 0x10000; i++)
2621440: 535: xdata.ucs2_map[i] = ENCA_NOT_A_CHAR;
-: 536:
10240: 537: for (i = 0; i < 0x100; i++) {
10240: 538: size_t j = 0xff - i;
-: 539:
10240: 540: if (xdata.target_map[j] != ENCA_NOT_A_CHAR)
10117: 541: xdata.ucs2_map[xdata.target_map[j]] = (unsigned int)j;
-: 542: }
-: 543:
-: 544: /* XXX XXX XXX XXX XXX Warning: Extreme brain damage! XXX XXX XXX XXX XXX
-: 545: * When converting to ibm866 we have to replace Belarusian/Ukrainian i/I
-: 546: * with Latin versions. I've been told everybody expect this. */
40: 547: if (options.target_enc.charset == enca_name_to_charset("ibm866")) {
3: 548: xdata.ucs2_map[0x0406] = (byte)'I';
3: 549: xdata.ucs2_map[0x0456] = (byte)'i';
-: 550: }
-: 551:
10240: 552: for (i = 0; i < 0x100; i++) {
10240: 553: size_t j = 0xff - i;
-: 554:
10240: 555: if (from_map[j] != ENCA_NOT_A_CHAR
10201: 556: && xdata.ucs2_map[from_map[j]] != ENCA_NOT_A_CHAR)
9065: 557: xdata.tables[0x100*fidx + j] = (byte)xdata.ucs2_map[from_map[j]];
-: 558: }
-: 559:
40: 560: return xdata.tables + 0x100*fidx;
-: 561:}
-: 562:
-: 563:static void
40: 564:xdata_free(void)
-: 565:{
40: 566: enca_free(xdata.charsets);
40: 567: enca_free(xdata.tables);
40: 568: enca_free(xdata.have_table);
40: 569: enca_free(xdata.ucs2_map);
40: 570:}
-: 571:
-: 572:/* vim: ts=2
-: 573: */
<<<<<< EOF
# path=/home/travis/build/nijel/enca/src/stdio.h.gcov
-: 0:Source:/usr/include/x86_64-linux-gnu/bits/stdio.h
-: 0:Graph:enca-options.gcno
-: 0:Data:enca-options.gcda
-: 0:Runs:275
-: 0:Programs:1
-: 1:/* Optimizing macros and inline functions for stdio functions.
-: 2: Copyright (C) 1998-2016 Free Software Foundation, Inc.
-: 3: This file is part of the GNU C Library.
-: 4:
-: 5: The GNU C Library is free software; you can redistribute it and/or
-: 6: modify it under the terms of the GNU Lesser General Public
-: 7: License as published by the Free Software Foundation; either
-: 8: version 2.1 of the License, or (at your option) any later version.
-: 9:
-: 10: The GNU C Library is distributed in the hope that it will be useful,
-: 11: but WITHOUT ANY WARRANTY; without even the implied warranty of
-: 12: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-: 13: Lesser General Public License for more details.
-: 14:
-: 15: You should have received a copy of the GNU Lesser General Public
-: 16: License along with the GNU C Library; if not, see
-: 17: . */
-: 18:
-: 19:#ifndef _STDIO_H
-: 20:# error "Never include directly; use instead."
-: 21:#endif
-: 22:
-: 23:#ifndef __extern_inline
-: 24:# define __STDIO_INLINE inline
-: 25:#else
-: 26:# define __STDIO_INLINE __extern_inline
-: 27:#endif
-: 28:
-: 29:
-: 30:#ifdef __USE_EXTERN_INLINES
-: 31:/* For -D_FORTIFY_SOURCE{,=2} bits/stdio2.h will define a different
-: 32: inline. */
-: 33:# if !(__USE_FORTIFY_LEVEL > 0 && defined __fortify_function)
-: 34:/* Write formatted output to stdout from argument list ARG. */
-: 35:__STDIO_INLINE int
-: 36:vprintf (const char *__restrict __fmt, _G_va_list __arg)
-: 37:{
-: 38: return vfprintf (stdout, __fmt, __arg);
-: 39:}
-: 40:# endif
-: 41:
-: 42:/* Read a character from stdin. */
-: 43:__STDIO_INLINE int
-: 44:getchar (void)
-: 45:{
-: 46: return _IO_getc (stdin);
-: 47:}
-: 48:
-: 49:
-: 50:# ifdef __USE_MISC
-: 51:/* Faster version when locking is not necessary. */
-: 52:__STDIO_INLINE int
-: 53:fgetc_unlocked (FILE *__fp)
-: 54:{
-: 55: return _IO_getc_unlocked (__fp);
-: 56:}
-: 57:# endif /* misc */
-: 58:
-: 59:
-: 60:# ifdef __USE_POSIX
-: 61:/* This is defined in POSIX.1:1996. */
-: 62:__STDIO_INLINE int
-: 63:getc_unlocked (FILE *__fp)
-: 64:{
-: 65: return _IO_getc_unlocked (__fp);
-: 66:}
-: 67:
-: 68:/* This is defined in POSIX.1:1996. */
-: 69:__STDIO_INLINE int
-: 70:getchar_unlocked (void)
-: 71:{
-: 72: return _IO_getc_unlocked (stdin);
-: 73:}
-: 74:# endif /* POSIX */
-: 75:
-: 76:
-: 77:/* Write a character to stdout. */
-: 78:__STDIO_INLINE int
-: 79:putchar (int __c)
-: 80:{
47: 81: return _IO_putc (__c, stdout);
-: 82:}
-: 83:
-: 84:
-: 85:# ifdef __USE_MISC
-: 86:/* Faster version when locking is not necessary. */
-: 87:__STDIO_INLINE int
-: 88:fputc_unlocked (int __c, FILE *__stream)
-: 89:{
-: 90: return _IO_putc_unlocked (__c, __stream);
-: 91:}
-: 92:# endif /* misc */
-: 93:
-: 94:
-: 95:# ifdef __USE_POSIX
-: 96:/* This is defined in POSIX.1:1996. */
-: 97:__STDIO_INLINE int
-: 98:putc_unlocked (int __c, FILE *__stream)
-: 99:{
-: 100: return _IO_putc_unlocked (__c, __stream);
-: 101:}
-: 102:
-: 103:/* This is defined in POSIX.1:1996. */
-: 104:__STDIO_INLINE int
-: 105:putchar_unlocked (int __c)
-: 106:{
-: 107: return _IO_putc_unlocked (__c, stdout);
-: 108:}
-: 109:# endif /* POSIX */
-: 110:
-: 111:
-: 112:# ifdef __USE_GNU
-: 113:/* Like `getdelim', but reads up to a newline. */
-: 114:__STDIO_INLINE _IO_ssize_t
-: 115:getline (char **__lineptr, size_t *__n, FILE *__stream)
-: 116:{
-: 117: return __getdelim (__lineptr, __n, '\n', __stream);
-: 118:}
-: 119:# endif /* GNU */
-: 120:
-: 121:
-: 122:# ifdef __USE_MISC
-: 123:/* Faster versions when locking is not required. */
-: 124:__STDIO_INLINE int
-: 125:__NTH (feof_unlocked (FILE *__stream))
-: 126:{
-: 127: return _IO_feof_unlocked (__stream);
-: 128:}
-: 129:
-: 130:/* Faster versions when locking is not required. */
-: 131:__STDIO_INLINE int
-: 132:__NTH (ferror_unlocked (FILE *__stream))
-: 133:{
-: 134: return _IO_ferror_unlocked (__stream);
-: 135:}
-: 136:# endif /* misc */
-: 137:
-: 138:#endif /* Use extern inlines. */
-: 139:
-: 140:
-: 141:#if defined __USE_MISC && defined __GNUC__ && defined __OPTIMIZE__ \
-: 142: && !defined __cplusplus
-: 143:/* Perform some simple optimizations. */
-: 144:# define fread_unlocked(ptr, size, n, stream) \
-: 145: (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) \
-: 146: && (size_t) (size) * (size_t) (n) <= 8 \
-: 147: && (size_t) (size) != 0) \
-: 148: ? ({ char *__ptr = (char *) (ptr); \
-: 149: FILE *__stream = (stream); \
-: 150: size_t __cnt; \
-: 151: for (__cnt = (size_t) (size) * (size_t) (n); \
-: 152: __cnt > 0; --__cnt) \
-: 153: { \
-: 154: int __c = _IO_getc_unlocked (__stream); \
-: 155: if (__c == EOF) \
-: 156: break; \
-: 157: *__ptr++ = __c; \
-: 158: } \
-: 159: ((size_t) (size) * (size_t) (n) - __cnt) \
-: 160: / (size_t) (size); }) \
-: 161: : (((__builtin_constant_p (size) && (size_t) (size) == 0) \
-: 162: || (__builtin_constant_p (n) && (size_t) (n) == 0)) \
-: 163: /* Evaluate all parameters once. */ \
-: 164: ? ((void) (ptr), (void) (stream), (void) (size), \
-: 165: (void) (n), (size_t) 0) \
-: 166: : fread_unlocked (ptr, size, n, stream))))
-: 167:
-: 168:# define fwrite_unlocked(ptr, size, n, stream) \
-: 169: (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) \
-: 170: && (size_t) (size) * (size_t) (n) <= 8 \
-: 171: && (size_t) (size) != 0) \
-: 172: ? ({ const char *__ptr = (const char *) (ptr); \
-: 173: FILE *__stream = (stream); \
-: 174: size_t __cnt; \
-: 175: for (__cnt = (size_t) (size) * (size_t) (n); \
-: 176: __cnt > 0; --__cnt) \
-: 177: if (_IO_putc_unlocked (*__ptr++, __stream) == EOF) \
-: 178: break; \
-: 179: ((size_t) (size) * (size_t) (n) - __cnt) \
-: 180: / (size_t) (size); }) \
-: 181: : (((__builtin_constant_p (size) && (size_t) (size) == 0) \
-: 182: || (__builtin_constant_p (n) && (size_t) (n) == 0)) \
-: 183: /* Evaluate all parameters once. */ \
-: 184: ? ((void) (ptr), (void) (stream), (void) (size), \
-: 185: (void) (n), (size_t) 0) \
-: 186: : fwrite_unlocked (ptr, size, n, stream))))
-: 187:#endif
-: 188:
-: 189:/* Define helper macro. */
-: 190:#undef __STDIO_INLINE
<<<<<< EOF
# path=/home/travis/build/nijel/enca/src/filebuf.c.gcov
-: 0:Source:filebuf.c
-: 0:Graph:enca-filebuf.gcno
-: 0:Data:enca-filebuf.gcda
-: 0:Runs:275
-: 0:Programs:1
-: 1:/*
-: 2: buffers, input/output operations with magic buffering and small utils
-: 3:
-: 4: Copyright (C) 2000-2002 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#include "common.h"
-: 20:
-: 21:/* XXX: We can't go on w/o this, defining struct stat manually is
-: 22: * braindamaged. */
-: 23:#include
-: 24:#include
-: 25:
-: 26:#if HAVE_FCNTL_H
-: 27:# include
-: 28:#else /* HAVE_FCNTL_H */
-: 29:int open(const char *pathname, int flags, mode_t mode);
-: 30:#endif /* HAVE_FCNTL_H */
-: 31:
-: 32:/* MS simply cannot use the same function names as everyone else... */
-: 33:#ifndef HAVE_FTRUNCATE
-: 34:# ifdef WIN32
-: 35:# include
-: 36:# define ftruncate _chsize
-: 37:# else
-: 38: /* XXX: We are in trouble. */
-: 39:# endif
-: 40:#endif
-: 41:
-: 42:/* stdin and stdout names */
-: 43:static const char *stdin_fname = "STDIN";
-: 44:static const char *stdout_fname = "STDOUT";
-: 45:
-: 46:/* Local prototypes. */
-: 47:static off_t file_size(File *file);
-: 48:static int file_fileno(File *file);
-: 49:static ssize_t file_read_limited(File *file,
-: 50: ssize_t limit);
-: 51:
-: 52:/* I/O buffer size. */
-: 53:size_t buffer_size = 0x10000;
-: 54:
-: 55:/*
-: 56: Implementation notes:
-: 57:
-: 58: All the file_* functions below contain a considerable amount of magic.
-: 59: This means you don't have to care about many things when using them;
-: 60: unfortunately, some other things you would intuitively expect to work,
-: 61: don't work and can break them totally. So be careful and RTFS in case
-: 62: of doubts.
-: 63:*/
-: 64:
-: 65:/* create and return a new byte buffer of size size
-: 66: when size is zero use size provided by the system as `good' */
-: 67:Buffer*
477: 68:buffer_new(size_t size)
-: 69:{
-: 70: Buffer *buf;
-: 71:
477: 72: buf = NEW(Buffer, 1);
477: 73: buf->size = (size == 0 ? BUFSIZ : size);
477: 74: buf->data = (byte*)enca_malloc(buf->size);
477: 75: buf->pos = 0;
-: 76:
477: 77: return buf;
-: 78:}
-: 79:
-: 80:/* destroy a buffer object buf
-: 81: can be safely called repeatedly */
-: 82:void
471: 83:buffer_free(Buffer *buf)
-: 84:{
471: 85: if (buf == NULL)
-: 86: return;
-: 87:
471: 88: enca_free(buf->data);
471: 89: enca_free(buf);
-: 90:}
-: 91:
-: 92:/* Find abbreviated name in atable and return pointer to corresponding data.
-: 93: * When name is NULL, print list of all abbreviations, instead (and
-: 94: * return NULL too).
-: 95: *
-: 96: * Returns NULL when no unique abbreviation is found (or when name
-: 97: * is NULL too), object_name is then used as object name for diagnostics. */
-: 98:const Abbreviation*
503: 99:expand_abbreviation(const char *name,
-: 100: const Abbreviation *atable,
-: 101: size_t size,
-: 102: const char *object_name)
-: 103:{
-: 104: size_t n, i, pos, acount;
-: 105:
-: 106: /* Print list for NULL name. */
503: 107: if (name == NULL) {
29: 108: for (i = 0; i < size; i++)
29: 109: puts(atable[i].name);
-: 110:
-: 111: return NULL;
-: 112: }
-: 113:
-: 114: /* Find all matching abbreviations. */
499: 115: n = strlen(name);
499: 116: pos = 0;
499: 117: acount = 0;
2554: 118: for (i = 0; i < size; i++) {
2055: 119: if (strncmp(name, atable[i].name, n) == 0) {
495: 120: acount++;
495: 121: pos = i;
-: 122: }
-: 123: }
-: 124:
-: 125: /* No match? */
499: 126: if (acount == 0) {
8: 127: fprintf(stderr, "%s: `%s' doesn't look like a valid %s name\n",
-: 128: program_name,
-: 129: name,
-: 130: object_name);
4: 131: return NULL;
-: 132: }
-: 133:
-: 134: /* More than one match? */
495: 135: if (acount > 1) {
#####: 136: fprintf(stderr, "%s: Abbreviation `%s' is ambiguous, matches:\n",
-: 137: program_name,
-: 138: name);
#####: 139: for (i = 0; i < size; i++) {
#####: 140: if (strncmp(name, atable[i].name, n) == 0)
#####: 141: fprintf(stderr, " %s\n", atable[i].name);
-: 142: }
-: 143: return NULL;
-: 144: }
-: 145:
-: 146: /* OK, exactly one. */
495: 147: return atable + pos;
-: 148:}
-: 149:
-: 150:
-: 151:/* filename wrapper, return STDIN_FNAME on NULL */
-: 152:const char*
289: 153:ffname_r(const char *fname)
-: 154:{
289: 155: return (fname == NULL) ? stdin_fname : fname;
-: 156:}
-: 157:
-: 158:/* filename wrapper, return STDOUT_FNAME on NULL */
-: 159:const char*
1: 160:ffname_w(const char *fname)
-: 161:{
1: 162: return (fname == NULL) ? stdout_fname : fname;
-: 163:}
-: 164:
-: 165:/* file_read_limited() wrapper, limit is buffer size */
-: 166:ssize_t
694: 167:file_read(File *file)
-: 168:{
694: 169: return file_read_limited(file, file->buffer->size);
-: 170:}
-: 171:
-: 172:/* read from file file storing data to the associated buffer
-: 173: limit is the desired total number of bytes that should be in the buffer
-: 174: (not maximum bytes to read)
-: 175: returns the number of bytes in file's buffer after read, -1 on failure
-: 176: is up to caller to provide a limit value not greater than buffer size */
-: 177:static ssize_t
19369: 178:file_read_limited(File *file, ssize_t limit)
-: 179:{
-: 180: FILE *stream;
-: 181:
19369: 182: assert(limit >= 0);
19369: 183: assert(file != NULL);
19369: 184: assert(file->buffer != NULL);
-: 185:
19369: 186: if (limit < file->buffer->pos)
-: 187: return file->buffer->pos;
-: 188:
19369: 189: assert((size_t)limit <= file->buffer->size);
-: 190:
19369: 191: if (file->name == NULL)
225: 192: stream = stdin;
-: 193: else
19144: 194: stream = file->stream;
-: 195:
38738: 196: file->buffer->pos += fread(file->buffer->data + file->buffer->pos,
-: 197: 1,
19369: 198: limit - file->buffer->pos,
-: 199: stream);
-: 200:
-: 201: /* read failed? */
19369: 202: if (file->buffer->pos < limit && ferror(stream)) {
#####: 203: fprintf(stderr, "%s: Cannot read file `%s': %s\n",
-: 204: program_name,
#####: 205: ffname_r(file->name),
#####: 206: strerror(errno));
#####: 207: file_close(file);
#####: 208: file->buffer->pos = -1;
-: 209: }
-: 210:
19369: 211: return file->buffer->pos;
-: 212:}
-: 213:
-: 214:/* file_read_limited() wrapper, is like fgets(), but generates MUCH less
-: 215: * system calls (usually exactly two per call) than GNU libc's fgets() due to
-: 216: * buffering. Anyway, getline() is not available on non-GNU.
-: 217:
-: 218: * XXX: must NOT be used on non-seekable streams!
-: 219: */
-: 220:byte*
18675: 221:file_getline(File *file)
-: 222:{
-: 223: static const size_t READ_AHEAD = 256; /* 256 is the minimum guaranteed value
-: 224: of BUFSIZE and also a good maximum
-: 225: expected line length */
-: 226:
-: 227: ssize_t err;
-: 228: size_t want_bytes,old;
-: 229: Buffer *buf; /* file->buffer alias */
18675: 230: byte *p = NULL;
-: 231:
18675: 232: assert(file != NULL);
18675: 233: assert(file->buffer != NULL);
-: 234:
-: 235: /* overwrite what could remain in the buffer */
18675: 236: buf = file->buffer;
18675: 237: buf->pos = want_bytes = old = 0;
-: 238:
-: 239: /* read chunks of approximately one line size until we hit EOF or find an
-: 240: EOL */
-: 241: do {
18675: 242: want_bytes += READ_AHEAD;
18675: 243: if (want_bytes >= buf->size)
#####: 244: want_bytes = buf->size - 1;
-: 245:
18675: 246: err = file_read_limited(file, want_bytes);
18675: 247: if (err == -1 || buf->pos == 0)
-: 248: return NULL;
-: 249:
18450: 250: p = memchr(buf->data + old, '\n', buf->pos - old);
18450: 251: if (p != NULL || (size_t)(buf->pos) < want_bytes)
-: 252: break;
-: 253:
-: 254: old = buf->pos;
-: 255: } while (1);
-: 256:
-: 257: /* something found? */
18450: 258: if (p != NULL) {
18450: 259: *(p+1) = '\0';
18450: 260: file_seek(file, (off_t)(p - buf->data - buf->pos) + 1, SEEK_CUR);
-: 261: }
-: 262: /* or just EOF? */
-: 263: else
#####: 264: file->buffer->data[file->buffer->pos + 1] = '\0';
-: 265:
18450: 266: return file->buffer->data;
-: 267:}
-: 268:
-: 269:/* write to file @file the associated buffer and reset buffer position
-: 270: returns nonzero if it was successfully written, -1 on failure */
-: 271:ssize_t
172: 272:file_write(File *file)
-: 273:{
-: 274: ssize_t bw;
-: 275: FILE *stream;
-: 276:
172: 277: assert(file != NULL);
172: 278: assert(file->buffer != NULL);
-: 279:
172: 280: if (file->buffer->pos == 0)
-: 281: return 0;
-: 282:
172: 283: if (file->name == NULL)
73: 284: stream = stdout;
-: 285: else
99: 286: stream = file->stream;
-: 287:
172: 288: bw = fwrite(file->buffer->data, 1, file->buffer->pos, stream);
-: 289: /* write failed? */
172: 290: if (bw < file->buffer->pos) {
#####: 291: fprintf(stderr, "%s: Cannot write to file `%s': %s\n",
-: 292: program_name,
#####: 293: ffname_w(file->name),
#####: 294: strerror(errno));
#####: 295: file_close(file);
#####: 296: return -1;
-: 297: }
172: 298: file->buffer->pos = 0;
-: 299:
172: 300: return bw;
-: 301:}
-: 302:
-: 303:/* create temporary file, open it readwrite and return the created File
-: 304: retuns NULL when we are unable to create a temporary file
-: 305: when ulink is true, delete it right after opening
-: 306: (XXX: this requires POSIX-conformant system)
-: 307:
-: 308: FIXME: we always create temporary files in /tmp */
-: 309:File*
14: 310:file_temporary(Buffer *buffer, int ulink)
-: 311:{
-: 312: /* `template' for temporary file creation */
-: 313: char *temp_filename;
-: 314:
14: 315: File *file = NULL;
-: 316: int fd;
-: 317:
28: 318: temp_filename = strdup("/tmp/" PACKAGE_TARNAME "XXXXXX");
-: 319:
14: 320: if ((fd = mkstemp(temp_filename)) < 0) {
-: 321: /* trieed heavy without success? that's bad */
#####: 322: fprintf(stderr, "%s: Unable to create a temporary file\n"
-: 323: "do you have write permissions in /tmp?\n",
-: 324: program_name);
-: 325:
#####: 326: free(temp_filename);
#####: 327: return NULL;
-: 328: }
-: 329:
14: 330: file = file_new(temp_filename, buffer);
-: 331:
14: 332: free(temp_filename);
-: 333:
-: 334: /* fdopen it to get the stream */
14: 335: if ((file->stream = fdopen(fd, "w+b")) == NULL) {
#####: 336: fprintf(stderr, "%s: Cannot get stream for an open filedescriptor %d: %s\n",
-: 337: program_name,
-: 338: fd,
#####: 339: strerror(errno));
#####: 340: exit(EXIT_TROUBLE);
-: 341: }
-: 342: /* here, we have a unique temporary file opened readwrite */
14: 343: if (ulink)
13: 344: file_unlink(file->name);
-: 345: return file;
-: 346:}
-: 347:
-: 348:/* reposition file file
-: 349: see lseek(2) for description
-: 350: returns current position from begining of file, -1 on failure */
-: 351:off_t
18682: 352:file_seek(File *file, off_t offset, int whence)
-: 353:{
-: 354: off_t i;
-: 355:
18682: 356: assert(file != NULL);
-: 357:
18682: 358: i = fseek(file->stream, offset, whence);
18682: 359: if (i == -1) {
#####: 360: fprintf(stderr, "%s: Cannot seek in file `%s': %s\n",
-: 361: program_name,
-: 362: file->name,
#####: 363: strerror(errno));
#####: 364: file_close(file);
-: 365: }
-: 366:
18682: 367: return i;
-: 368:}
-: 369:
-: 370:/* truncate file file
-: 371: see truncate(2) for description
-: 372: returns zero on success, -1 on failure */
-: 373:int
12: 374:file_truncate(File *file, off_t length)
-: 375:{
-: 376: int fd;
-: 377:
12: 378: assert(file != NULL);
12: 379: assert(file->name != NULL); /* we should not be called on stdin/stdout */
-: 380:
12: 381: fd = file_fileno(file);
12: 382: if (options.verbosity_level > 8)
#####: 383: fprintf(stderr, "Truncating `%s' to %ld\n", file->name, (long int)length);
12: 384: if (ftruncate(fd, length) == 0)
-: 385: return 0;
-: 386:
#####: 387: fprintf(stderr, "%s: Cannot truncate file `%s' to %ld: %s\n",
-: 388: program_name,
-: 389: file->name,
-: 390: (long int)length,
#####: 391: strerror(errno));
#####: 392: file_close(file);
#####: 393: return -1;
-: 394:}
-: 395:
-: 396:/* unlink file fname
-: 397: see unlink(2) for description
-: 398: returns 0 on success, nonzero on failure */
-: 399:int
13: 400:file_unlink(const char *fname)
-: 401:{
-: 402: int err;
-: 403:
13: 404: assert(fname != NULL);
-: 405:
13: 406: if (options.verbosity_level > 8)
#####: 407: fprintf(stderr, "Unlinking `%s'\n", fname);
13: 408: err = unlink(fname);
13: 409: if (err != 0) {
#####: 410: fprintf(stderr, "%s: Cannot unlink file `%s': %s\n",
-: 411: program_name,
-: 412: fname,
#####: 413: strerror(errno));
-: 414: }
-: 415:
13: 416: return err;
-: 417:}
-: 418:
-: 419:/* open a file file in mode mode
-: 420: see fopen(3) for description
-: 421: however, we disable buffering by default
-: 422: and opening file whose name is NULL assings the `magic' stdin/stdout
-: 423: returns 0 on success, nonzero otherwise */
-: 424:int
713: 425:file_open(File *file, const char *mode)
-: 426:{
713: 427: assert(file != NULL);
713: 428: assert(file->buffer != NULL);
713: 429: assert(mode != NULL);
713: 430: assert(*mode);
-: 431:
713: 432: if (mode[0] == 'r')
711: 433: file->buffer->pos = 0;
-: 434:
-: 435: /* fake stdin/stdout opening */
713: 436: if (file->name == NULL) {
151: 437: if (options.verbosity_level > 8)
#####: 438: fprintf(stderr, "Fake-opening stdin/stdout in mode %s\n", mode);
151: 439: if (mode[0] == 'r' || mode[0] =='w') {
151: 440: file->stream = NULL;
151: 441: file->size = -1;
151: 442: return 0;
-: 443: }
#####: 444: fprintf(stderr, "%s: Cannot open stdin/stdout in mode %s\n",
-: 445: program_name,
-: 446: mode);
#####: 447: return 1;
-: 448: }
-: 449:
-: 450: /* open a regular file */
562: 451: if (options.verbosity_level > 8)
#####: 452: fprintf(stderr, "Opening file `%s' in mode %s\n", file->name, mode);
562: 453: file->stream = fopen(file->name, mode);
562: 454: if (file->stream == NULL) {
4: 455: fprintf(stderr, "%s: Cannot open file `%s' in mode %s: %s\n",
-: 456: program_name,
-: 457: file->name,
-: 458: mode,
2: 459: strerror(errno));
2: 460: return 1;
-: 461: }
-: 462:
-: 463: /* get length */
560: 464: if (mode[0] == 'r') {
560: 465: file->size = file_size(file);
560: 466: if (options.verbosity_level > 8)
#####: 467: fprintf(stderr, "File `%s' size is %ld\n",
-: 468: file->name, (long int)file->size);
560: 469: if (file->size == -1)
-: 470: return 1;
-: 471: }
#####: 472: else file->size = -1;
-: 473:
-: 474: return 0;
-: 475:}
-: 476:
-: 477:/* close file file
-: 478: see fclose(3) for description
-: 479: but this one can be safely called repeatedly on the same stream or on
-: 480: a not-yet-opened stream */
-: 481:int
702: 482:file_close(File *file)
-: 483:{
702: 484: assert(file != NULL);
-: 485:
-: 486: /* it's OK to close files any times we want and to close files that have
-: 487: never been opened
-: 488: also fake `magic' stdin/stdout closing */
702: 489: if (file->name == NULL) {
129: 490: if (options.verbosity_level > 8)
#####: 491: fprintf(stderr, "Fake-closing stdin/stdout\n");
-: 492: return 0;
-: 493: }
-: 494:
573: 495: if (file->stream == NULL) {
#####: 496: if (options.verbosity_level > 8)
#####: 497: fprintf(stderr, "Closing an already closed file (noop)\n");
-: 498: return 0;
-: 499: }
-: 500:
-: 501: /* close a regular file */
573: 502: if (options.verbosity_level > 8)
#####: 503: fprintf(stderr, "Closing file `%s'\n", file->name);
573: 504: if (fclose(file->stream) == EOF) {
#####: 505: fprintf(stderr, "%s: Cannot close file `%s': %s\n",
-: 506: program_name,
-: 507: file->name,
#####: 508: strerror(errno));
#####: 509: exit(EXIT_TROUBLE);
-: 510: }
573: 511: file->stream = NULL;
-: 512:
573: 513: return 0;
-: 514:}
-: 515:
-: 516:/* return the size of an open stream (by stat()-ing it)
-: 517: returns -1 on failure */
-: 518:static off_t
560: 519:file_size(File *file)
-: 520:{
-: 521: int fd;
-: 522: struct stat st;
-: 523:
560: 524: assert(file != NULL);
-: 525:
560: 526: if (file->name == NULL)
-: 527: return -1;
-: 528:
560: 529: fd = file_fileno(file);
560: 530: if (options.verbosity_level > 8)
#####: 531: fprintf(stderr, "stat()-ing `%s' (fd %d) for its size\n", file->name, fd);
560: 532: if (fstat(fd, &st) != 0) {
#####: 533: fprintf(stderr, "%s: Cannot stat file `%s': %s\n",
-: 534: program_name,
#####: 535: ffname_r(file->name),
#####: 536: strerror(errno));
#####: 537: return -1;
-: 538: }
-: 539:
560: 540: return st.st_size;
-: 541:}
-: 542:
-: 543:/* return a filedescriptor given a stream, see fileno(3) for description
-: 544: * never fails, on failure aborts program. */
-: 545:static int
572: 546:file_fileno(File *file)
-: 547:{
-: 548: int fd;
-: 549:
572: 550: fd = fileno(file->stream);
572: 551: if (fd != -1)
-: 552: return fd;
-: 553:
#####: 554: fprintf(stderr, "%s: Cannot get filedescriptor for an open stream `%s': %s\n",
-: 555: program_name,
#####: 556: ffname_r(file->name),
#####: 557: strerror(errno));
#####: 558: exit(EXIT_TROUBLE);
-: 559:
-: 560: return -1;
-: 561:}
-: 562:
-: 563:/* create and return a file object whose filename is fname
-: 564: and which uses buffer buffer for i/o operations */
-: 565:File*
725: 566:file_new(const char *fname, Buffer *buffer) {
-: 567: File *file;
-: 568:
725: 569: file = NEW(File, 1);
725: 570: file->name = enca_strdup(fname);
725: 571: file->stream = NULL;
725: 572: file->size = -1;
725: 573: file->buffer = buffer;
-: 574:
725: 575: return file;
-: 576:}
-: 577:
-: 578:/* destroy a file object file, possibly closing it when opened
-: 579: does NOT destroy the associated buffer
-: 580: can be safely called repeatedly */
-: 581:void
724: 582:file_free(File *file)
-: 583:{
724: 584: if (file == NULL)
-: 585: return;
-: 586:
724: 587: if (file->stream != NULL)
55: 588: file_close(file);
724: 589: enca_free(file->name);
724: 590: enca_free(file);
-: 591:}
-: 592:
-: 593:/* vim: ts=2
-: 594: */
<<<<<< EOF
# path=/home/travis/build/nijel/enca/src/convert_extern.c.gcov
-: 0:Source:convert_extern.c
-: 0:Graph:enca-convert_extern.gcno
-: 0:Data:enca-convert_extern.gcda
-: 0:Runs:275
-: 0:Programs:1
-: 1:/*
-: 2: interface to external converter programs
-: 3:
-: 4: Copyright (C) 2000-2003 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#include "common.h"
-: 20:#ifdef ENABLE_EXTERNAL
-: 21:
-: 22:#ifdef HAVE_SYS_WAIT_H
-: 23:# include
-: 24:#else
-: 25:pid_t waitpid(pid_t pid, int *status, int options);
-: 26:#endif
-: 27:
-: 28:/* We can't go on w/o this, defining struct stat manually is braindamaged. */
-: 29:#include
-: 30:#include
-: 31:
-: 32:#include
-: 33:
-: 34:#ifdef HAVE_LIMITS_H
-: 35:# include
-: 36:#endif /* HAVE_LIMITS_H */
-: 37:
-: 38:/* Resolve all the forking mess. */
-: 39:#ifdef HAVE_WORKING_VFORK
-: 40:# ifdef HAVE_VFORK_H
-: 41:# include
-: 42:# endif /* HAVE_VFORK_H */
-: 43:#else /* HAVE_WORKING_VFORK */
-: 44:# define vfork fork
-: 45:#endif /* HAVE_WORKING_VFORK */
-: 46:
-: 47:/* external converter command */
-: 48:static char *extern_converter = NULL;
-: 49:
-: 50:/* fork and the child executes Settings.Converter on fname
-: 51: create temporary file containing stdin when fname == NULL and convert it
-: 52: passing special option STDOUT to converter (that is assumed to delete
-: 53: the temporary file itself)
-: 54: from_enc, to_enc are encoding names as should be passed to converter
-: 55: returns 0 on success, nonzero on failure;
-: 56: on critical failure (like we cannot fork()) it simply aborts */
-: 57:int
4: 58:convert_external(File *file,
-: 59: const EncaEncoding from_enc)
-: 60:{
-: 61: /* special fourth parameter passed to external converter to instruct it to
-: 62: send result to stdout */
-: 63: static const char *STDOUT_CONV = "-";
-: 64:
-: 65: pid_t pid;
-: 66: int status;
4: 67: File *tempfile = NULL;
-: 68: char *from_name, *target_name;
-: 69:
4: 70: if (*extern_converter == '\0') {
#####: 71: fprintf(stderr, "%s: No external converter defined!\n", program_name);
-: 72: return ERR_CANNOT;
-: 73: }
-: 74:
4: 75: if (options.verbosity_level > 2)
#####: 76: fprintf(stderr, " launching `%s' to convert `%s'\n",
#####: 77: extern_converter, ffname_r(file->name));
-: 78:
-: 79: /* Is conversion of stdin requested? */
4: 80: if (file->name == NULL) {
-: 81: /* Then we have to copy it to a temporary file. */
1: 82: tempfile = file_temporary(file->buffer, 0);
1: 83: if (tempfile == NULL)
-: 84: return ERR_IOFAIL;
-: 85:
1: 86: if (copy_and_convert(file, tempfile, NULL) != 0) {
#####: 87: file_unlink(tempfile->name);
#####: 88: file_free(tempfile);
-: 89: return ERR_IOFAIL;
-: 90: }
-: 91: }
-: 92:
-: 93: /* Construct the charset names before fork() */
4: 94: from_name = enca_strconcat(enca_charset_name(from_enc.charset,
-: 95: ENCA_NAME_STYLE_ENCA),
-: 96: enca_get_surface_name(from_enc.surface,
-: 97: ENCA_NAME_STYLE_ENCA),
-: 98: NULL);
4: 99: if (enca_charset_is_known(options.target_enc.charset)
4: 100: && (options.target_enc.surface & ENCA_SURFACE_UNKNOWN) == 0) {
-: 101: target_name
4: 102: = enca_strconcat(enca_charset_name(options.target_enc.charset,
-: 103: ENCA_NAME_STYLE_ENCA),
-: 104: enca_get_surface_name(options.target_enc.surface,
-: 105: ENCA_NAME_STYLE_ENCA),
-: 106: NULL);
-: 107: }
-: 108: else
#####: 109: target_name = enca_strdup(options.target_enc_str);
-: 110:
-: 111: /* Fork. */
4: 112: pid = vfork();
4: 113: if (pid == 0) {
-: 114: /* Child. */
#####: 115: if (tempfile)
#####: 116: execlp(extern_converter, extern_converter,
-: 117: from_name, target_name, tempfile->name,
-: 118: STDOUT_CONV, NULL);
-: 119: else
#####: 120: execlp(extern_converter, extern_converter,
-: 121: from_name, target_name, file->name, NULL);
-: 122:
#####: 123: exit(ERR_EXEC);
-: 124: }
-: 125:
-: 126: /* Parent. */
4: 127: if (pid == -1) {
#####: 128: fprintf(stderr, "%s: Cannot fork() to execute converter: %s\n",
-: 129: program_name,
#####: 130: strerror(errno));
#####: 131: exit(EXIT_TROUBLE);
-: 132: }
-: 133: /* Wait until the child returns. */
4: 134: if (waitpid(pid, &status, 0) == -1) {
-: 135: /* Error. */
#####: 136: fprintf(stderr, "%s: wait_pid() error while waiting for converter: %s\n",
-: 137: program_name,
#####: 138: strerror(errno));
#####: 139: exit(EXIT_TROUBLE);
-: 140: }
4: 141: if (!WIFEXITED(status)) {
-: 142: /* Child exited abnormally. */
2: 143: fprintf(stderr, "%s: Child converter process has been murdered.\n",
-: 144: program_name);
1: 145: exit(EXIT_TROUBLE);
-: 146: }
-: 147:
3: 148: enca_free(from_name);
3: 149: enca_free(target_name);
-: 150:
3: 151: if (tempfile) {
1: 152: unlink(tempfile->name);
1: 153: file_free(tempfile);
-: 154: }
-: 155:
-: 156: /* Child exited normally, test exit status. */
3: 157: if (WEXITSTATUS(status) != EXIT_SUCCESS) {
-: 158: /* This means child was unable to execute converter or converter failed. */
2: 159: fprintf(stderr, "%s: External converter failed (error code %d)\n",
-: 160: program_name,
1: 161: WEXITSTATUS(status));
1: 162: if (WEXITSTATUS(status) == ERR_EXEC)
-: 163: return ERR_EXEC;
-: 164: else
1: 165: return ERR_CANNOT;
-: 166: }
-: 167: /* Success! Wow! */
-: 168: return ERR_OK;
-: 169:}
-: 170:
-: 171:/* set external converter to extc */
-: 172:void
282: 173:set_external_converter(const char *extc)
-: 174:{
282: 175: enca_free(extern_converter);
282: 176: if (strchr(extc, '/') == NULL) {
278: 177: if (extc[0] == 'b' && extc[1] == '-') {
#####: 178: extc += 2;
#####: 179: fprintf(stderr, "%s: The `b-' prefix for standard external converters "
-: 180: "is deprecated.\n"
-: 181: "I'll pretend you said `%s'.\n",
-: 182: program_name,
-: 183: extc);
-: 184: }
278: 185: extern_converter = enca_strconcat(EXTCONV_DIR, "/", extc, NULL);
-: 186: }
-: 187: else
4: 188: extern_converter = enca_strdup(extc);
282: 189:}
-: 190:
-: 191:/* return nonzero if external converter seems ok */
-: 192:int
6: 193:check_external_converter(void)
-: 194:{
-: 195: /* FIXME: This creates a race condition. However we don't want to do all
-: 196: * the checking before every execlp() when conveting 500 files in a row,
-: 197: * and even if doing that, something can still sneak between stat() and
-: 198: * execlp(), so what. This is just a simple sanity check, nothing strict.
-: 199: */
6: 200: if (*extern_converter == '\0'
6: 201: || access(extern_converter, X_OK) != 0) {
4: 202: fprintf(stderr, "%s: Converter `%s' doesn't seem to be executable.\n"
-: 203: "Note as of enca-1.3 external converters must be\n"
-: 204: "(a) one of the standard ones residing in %s\n"
-: 205: "(b) specified with full path\n",
-: 206: program_name,
-: 207: extern_converter,
-: 208: EXTCONV_DIR);
2: 209: return 0;
-: 210: }
-: 211:
-: 212: return 1;
-: 213:}
-: 214:
-: 215:#endif /* ENABLE_EXTERNAL */
-: 216:/* vim: ts=2
-: 217: */
<<<<<< EOF
# path=/home/travis/build/nijel/enca/src/stdio2.h.gcov
-: 0:Source:/usr/include/x86_64-linux-gnu/bits/stdio2.h
-: 0:Graph:enca-options.gcno
-: 0:Data:enca-options.gcda
-: 0:Runs:275
-: 0:Programs:1
-: 1:/* Checking macros for stdio functions.
-: 2: Copyright (C) 2004-2016 Free Software Foundation, Inc.
-: 3: This file is part of the GNU C Library.
-: 4:
-: 5: The GNU C Library is free software; you can redistribute it and/or
-: 6: modify it under the terms of the GNU Lesser General Public
-: 7: License as published by the Free Software Foundation; either
-: 8: version 2.1 of the License, or (at your option) any later version.
-: 9:
-: 10: The GNU C Library is distributed in the hope that it will be useful,
-: 11: but WITHOUT ANY WARRANTY; without even the implied warranty of
-: 12: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-: 13: Lesser General Public License for more details.
-: 14:
-: 15: You should have received a copy of the GNU Lesser General Public
-: 16: License along with the GNU C Library; if not, see
-: 17: . */
-: 18:
-: 19:#ifndef _STDIO_H
-: 20:# error "Never include directly; use instead."
-: 21:#endif
-: 22:
-: 23:extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen,
-: 24: const char *__restrict __format, ...) __THROW;
-: 25:extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen,
-: 26: const char *__restrict __format,
-: 27: _G_va_list __ap) __THROW;
-: 28:
-: 29:#ifdef __va_arg_pack
-: 30:__fortify_function int
-: 31:__NTH (sprintf (char *__restrict __s, const char *__restrict __fmt, ...))
-: 32:{
-: 33: return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
-: 34: __bos (__s), __fmt, __va_arg_pack ());
-: 35:}
-: 36:#elif !defined __cplusplus
-: 37:# define sprintf(str, ...) \
-: 38: __builtin___sprintf_chk (str, __USE_FORTIFY_LEVEL - 1, __bos (str), \
-: 39: __VA_ARGS__)
-: 40:#endif
-: 41:
-: 42:__fortify_function int
-: 43:__NTH (vsprintf (char *__restrict __s, const char *__restrict __fmt,
-: 44: _G_va_list __ap))
-: 45:{
-: 46: return __builtin___vsprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
-: 47: __bos (__s), __fmt, __ap);
-: 48:}
-: 49:
-: 50:#if defined __USE_ISOC99 || defined __USE_UNIX98
-: 51:
-: 52:extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag,
-: 53: size_t __slen, const char *__restrict __format,
-: 54: ...) __THROW;
-: 55:extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag,
-: 56: size_t __slen, const char *__restrict __format,
-: 57: _G_va_list __ap) __THROW;
-: 58:
-: 59:# ifdef __va_arg_pack
-: 60:__fortify_function int
-: 61:__NTH (snprintf (char *__restrict __s, size_t __n,
-: 62: const char *__restrict __fmt, ...))
-: 63:{
-: 64: return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
-: 65: __bos (__s), __fmt, __va_arg_pack ());
-: 66:}
-: 67:# elif !defined __cplusplus
-: 68:# define snprintf(str, len, ...) \
-: 69: __builtin___snprintf_chk (str, len, __USE_FORTIFY_LEVEL - 1, __bos (str), \
-: 70: __VA_ARGS__)
-: 71:# endif
-: 72:
-: 73:__fortify_function int
-: 74:__NTH (vsnprintf (char *__restrict __s, size_t __n,
-: 75: const char *__restrict __fmt, _G_va_list __ap))
-: 76:{
-: 77: return __builtin___vsnprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
-: 78: __bos (__s), __fmt, __ap);
-: 79:}
-: 80:
-: 81:#endif
-: 82:
-: 83:#if __USE_FORTIFY_LEVEL > 1
-: 84:
-: 85:extern int __fprintf_chk (FILE *__restrict __stream, int __flag,
-: 86: const char *__restrict __format, ...);
-: 87:extern int __printf_chk (int __flag, const char *__restrict __format, ...);
-: 88:extern int __vfprintf_chk (FILE *__restrict __stream, int __flag,
-: 89: const char *__restrict __format, _G_va_list __ap);
-: 90:extern int __vprintf_chk (int __flag, const char *__restrict __format,
-: 91: _G_va_list __ap);
-: 92:
-: 93:# ifdef __va_arg_pack
-: 94:__fortify_function int
-: 95:fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...)
-: 96:{
4: 97: return __fprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt,
-: 98: __va_arg_pack ());
-: 99:}
-: 100:
-: 101:__fortify_function int
-: 102:printf (const char *__restrict __fmt, ...)
-: 103:{
311: 104: return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
-: 105:}
-: 106:# elif !defined __cplusplus
-: 107:# define printf(...) \
-: 108: __printf_chk (__USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
-: 109:# define fprintf(stream, ...) \
-: 110: __fprintf_chk (stream, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
-: 111:# endif
-: 112:
-: 113:__fortify_function int
-: 114:vprintf (const char *__restrict __fmt, _G_va_list __ap)
-: 115:{
-: 116:#ifdef __USE_EXTERN_INLINES
-: 117: return __vfprintf_chk (stdout, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
-: 118:#else
-: 119: return __vprintf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __ap);
-: 120:#endif
-: 121:}
-: 122:
-: 123:__fortify_function int
-: 124:vfprintf (FILE *__restrict __stream,
-: 125: const char *__restrict __fmt, _G_va_list __ap)
-: 126:{
-: 127: return __vfprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
-: 128:}
-: 129:
-: 130:# ifdef __USE_XOPEN2K8
-: 131:extern int __dprintf_chk (int __fd, int __flag, const char *__restrict __fmt,
-: 132: ...) __attribute__ ((__format__ (__printf__, 3, 4)));
-: 133:extern int __vdprintf_chk (int __fd, int __flag,
-: 134: const char *__restrict __fmt, _G_va_list __arg)
-: 135: __attribute__ ((__format__ (__printf__, 3, 0)));
-: 136:
-: 137:# ifdef __va_arg_pack
-: 138:__fortify_function int
-: 139:dprintf (int __fd, const char *__restrict __fmt, ...)
-: 140:{
-: 141: return __dprintf_chk (__fd, __USE_FORTIFY_LEVEL - 1, __fmt,
-: 142: __va_arg_pack ());
-: 143:}
-: 144:# elif !defined __cplusplus
-: 145:# define dprintf(fd, ...) \
-: 146: __dprintf_chk (fd, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
-: 147:# endif
-: 148:
-: 149:__fortify_function int
-: 150:vdprintf (int __fd, const char *__restrict __fmt, _G_va_list __ap)
-: 151:{
-: 152: return __vdprintf_chk (__fd, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
-: 153:}
-: 154:# endif
-: 155:
-: 156:# ifdef __USE_GNU
-: 157:
-: 158:extern int __asprintf_chk (char **__restrict __ptr, int __flag,
-: 159: const char *__restrict __fmt, ...)
-: 160: __THROW __attribute__ ((__format__ (__printf__, 3, 4))) __wur;
-: 161:extern int __vasprintf_chk (char **__restrict __ptr, int __flag,
-: 162: const char *__restrict __fmt, _G_va_list __arg)
-: 163: __THROW __attribute__ ((__format__ (__printf__, 3, 0))) __wur;
-: 164:extern int __obstack_printf_chk (struct obstack *__restrict __obstack,
-: 165: int __flag, const char *__restrict __format,
-: 166: ...)
-: 167: __THROW __attribute__ ((__format__ (__printf__, 3, 4)));
-: 168:extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack,
-: 169: int __flag,
-: 170: const char *__restrict __format,
-: 171: _G_va_list __args)
-: 172: __THROW __attribute__ ((__format__ (__printf__, 3, 0)));
-: 173:
-: 174:# ifdef __va_arg_pack
-: 175:__fortify_function int
-: 176:__NTH (asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...))
-: 177:{
-: 178: return __asprintf_chk (__ptr, __USE_FORTIFY_LEVEL - 1, __fmt,
-: 179: __va_arg_pack ());
-: 180:}
-: 181:
-: 182:__fortify_function int
-: 183:__NTH (__asprintf (char **__restrict __ptr, const char *__restrict __fmt,
-: 184: ...))
-: 185:{
-: 186: return __asprintf_chk (__ptr, __USE_FORTIFY_LEVEL - 1, __fmt,
-: 187: __va_arg_pack ());
-: 188:}
-: 189:
-: 190:__fortify_function int
-: 191:__NTH (obstack_printf (struct obstack *__restrict __obstack,
-: 192: const char *__restrict __fmt, ...))
-: 193:{
-: 194: return __obstack_printf_chk (__obstack, __USE_FORTIFY_LEVEL - 1, __fmt,
-: 195: __va_arg_pack ());
-: 196:}
-: 197:# elif !defined __cplusplus
-: 198:# define asprintf(ptr, ...) \
-: 199: __asprintf_chk (ptr, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
-: 200:# define __asprintf(ptr, ...) \
-: 201: __asprintf_chk (ptr, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
-: 202:# define obstack_printf(obstack, ...) \
-: 203: __obstack_printf_chk (obstack, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
-: 204:# endif
-: 205:
-: 206:__fortify_function int
-: 207:__NTH (vasprintf (char **__restrict __ptr, const char *__restrict __fmt,
-: 208: _G_va_list __ap))
-: 209:{
-: 210: return __vasprintf_chk (__ptr, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
-: 211:}
-: 212:
-: 213:__fortify_function int
-: 214:__NTH (obstack_vprintf (struct obstack *__restrict __obstack,
-: 215: const char *__restrict __fmt, _G_va_list __ap))
-: 216:{
-: 217: return __obstack_vprintf_chk (__obstack, __USE_FORTIFY_LEVEL - 1, __fmt,
-: 218: __ap);
-: 219:}
-: 220:
-: 221:# endif
-: 222:
-: 223:#endif
-: 224:
-: 225:#if !defined __USE_ISOC11 \
-: 226: || (defined __cplusplus && __cplusplus <= 201103L && !defined __USE_GNU)
-: 227:extern char *__gets_chk (char *__str, size_t) __wur;
-: 228:extern char *__REDIRECT (__gets_warn, (char *__str), gets)
-: 229: __wur __warnattr ("please use fgets or getline instead, gets can't "
-: 230: "specify buffer size");
-: 231:
-: 232:__fortify_function __wur char *
-: 233:gets (char *__str)
-: 234:{
-: 235: if (__bos (__str) != (size_t) -1)
-: 236: return __gets_chk (__str, __bos (__str));
-: 237: return __gets_warn (__str);
-: 238:}
-: 239:#endif
-: 240:
-: 241:extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n,
-: 242: FILE *__restrict __stream) __wur;
-: 243:extern char *__REDIRECT (__fgets_alias,
-: 244: (char *__restrict __s, int __n,
-: 245: FILE *__restrict __stream), fgets) __wur;
-: 246:extern char *__REDIRECT (__fgets_chk_warn,
-: 247: (char *__restrict __s, size_t __size, int __n,
-: 248: FILE *__restrict __stream), __fgets_chk)
-: 249: __wur __warnattr ("fgets called with bigger size than length "
-: 250: "of destination buffer");
-: 251:
-: 252:__fortify_function __wur char *
-: 253:fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
-: 254:{
-: 255: if (__bos (__s) != (size_t) -1)
-: 256: {
-: 257: if (!__builtin_constant_p (__n) || __n <= 0)
-: 258: return __fgets_chk (__s, __bos (__s), __n, __stream);
-: 259:
-: 260: if ((size_t) __n > __bos (__s))
-: 261: return __fgets_chk_warn (__s, __bos (__s), __n, __stream);
-: 262: }
-: 263: return __fgets_alias (__s, __n, __stream);
-: 264:}
-: 265:
-: 266:extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen,
-: 267: size_t __size, size_t __n,
-: 268: FILE *__restrict __stream) __wur;
-: 269:extern size_t __REDIRECT (__fread_alias,
-: 270: (void *__restrict __ptr, size_t __size,
-: 271: size_t __n, FILE *__restrict __stream),
-: 272: fread) __wur;
-: 273:extern size_t __REDIRECT (__fread_chk_warn,
-: 274: (void *__restrict __ptr, size_t __ptrlen,
-: 275: size_t __size, size_t __n,
-: 276: FILE *__restrict __stream),
-: 277: __fread_chk)
-: 278: __wur __warnattr ("fread called with bigger size * nmemb than length "
-: 279: "of destination buffer");
-: 280:
-: 281:__fortify_function __wur size_t
-: 282:fread (void *__restrict __ptr, size_t __size, size_t __n,
-: 283: FILE *__restrict __stream)
-: 284:{
-: 285: if (__bos0 (__ptr) != (size_t) -1)
-: 286: {
-: 287: if (!__builtin_constant_p (__size)
-: 288: || !__builtin_constant_p (__n)
-: 289: || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
-: 290: return __fread_chk (__ptr, __bos0 (__ptr), __size, __n, __stream);
-: 291:
-: 292: if (__size * __n > __bos0 (__ptr))
-: 293: return __fread_chk_warn (__ptr, __bos0 (__ptr), __size, __n, __stream);
-: 294: }
-: 295: return __fread_alias (__ptr, __size, __n, __stream);
-: 296:}
-: 297:
-: 298:#ifdef __USE_GNU
-: 299:extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size,
-: 300: int __n, FILE *__restrict __stream) __wur;
-: 301:extern char *__REDIRECT (__fgets_unlocked_alias,
-: 302: (char *__restrict __s, int __n,
-: 303: FILE *__restrict __stream), fgets_unlocked) __wur;
-: 304:extern char *__REDIRECT (__fgets_unlocked_chk_warn,
-: 305: (char *__restrict __s, size_t __size, int __n,
-: 306: FILE *__restrict __stream), __fgets_unlocked_chk)
-: 307: __wur __warnattr ("fgets_unlocked called with bigger size than length "
-: 308: "of destination buffer");
-: 309:
-: 310:__fortify_function __wur char *
-: 311:fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream)
-: 312:{
-: 313: if (__bos (__s) != (size_t) -1)
-: 314: {
-: 315: if (!__builtin_constant_p (__n) || __n <= 0)
-: 316: return __fgets_unlocked_chk (__s, __bos (__s), __n, __stream);
-: 317:
-: 318: if ((size_t) __n > __bos (__s))
-: 319: return __fgets_unlocked_chk_warn (__s, __bos (__s), __n, __stream);
-: 320: }
-: 321: return __fgets_unlocked_alias (__s, __n, __stream);
-: 322:}
-: 323:#endif
-: 324:
-: 325:#ifdef __USE_MISC
-: 326:# undef fread_unlocked
-: 327:extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen,
-: 328: size_t __size, size_t __n,
-: 329: FILE *__restrict __stream) __wur;
-: 330:extern size_t __REDIRECT (__fread_unlocked_alias,
-: 331: (void *__restrict __ptr, size_t __size,
-: 332: size_t __n, FILE *__restrict __stream),
-: 333: fread_unlocked) __wur;
-: 334:extern size_t __REDIRECT (__fread_unlocked_chk_warn,
-: 335: (void *__restrict __ptr, size_t __ptrlen,
-: 336: size_t __size, size_t __n,
-: 337: FILE *__restrict __stream),
-: 338: __fread_unlocked_chk)
-: 339: __wur __warnattr ("fread_unlocked called with bigger size * nmemb than "
-: 340: "length of destination buffer");
-: 341:
-: 342:__fortify_function __wur size_t
-: 343:fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n,
-: 344: FILE *__restrict __stream)
-: 345:{
-: 346: if (__bos0 (__ptr) != (size_t) -1)
-: 347: {
-: 348: if (!__builtin_constant_p (__size)
-: 349: || !__builtin_constant_p (__n)
-: 350: || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
-: 351: return __fread_unlocked_chk (__ptr, __bos0 (__ptr), __size, __n,
-: 352: __stream);
-: 353:
-: 354: if (__size * __n > __bos0 (__ptr))
-: 355: return __fread_unlocked_chk_warn (__ptr, __bos0 (__ptr), __size, __n,
-: 356: __stream);
-: 357: }
-: 358:
-: 359:# ifdef __USE_EXTERN_INLINES
-: 360: if (__builtin_constant_p (__size)
-: 361: && __builtin_constant_p (__n)
-: 362: && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2))
-: 363: && __size * __n <= 8)
-: 364: {
-: 365: size_t __cnt = __size * __n;
-: 366: char *__cptr = (char *) __ptr;
-: 367: if (__cnt == 0)
-: 368: return 0;
-: 369:
-: 370: for (; __cnt > 0; --__cnt)
-: 371: {
-: 372: int __c = _IO_getc_unlocked (__stream);
-: 373: if (__c == EOF)
-: 374: break;
-: 375: *__cptr++ = __c;
-: 376: }
-: 377: return (__cptr - (char *) __ptr) / __size;
-: 378: }
-: 379:# endif
-: 380: return __fread_unlocked_alias (__ptr, __size, __n, __stream);
-: 381:}
-: 382:#endif
<<<<<< EOF
# path=/home/travis/build/nijel/enca/src/enca.c.gcov
-: 0:Source:enca.c
-: 0:Graph:enca-enca.gcno
-: 0:Data:enca-enca.gcda
-: 0:Runs:275
-: 0:Programs:1
-: 1:/*
-: 2: Extremely Naive Charset Analyser. main module
-: 3:
-: 4: Copyright (C) 2000-2002 David Necas (Yeti)
-: 5:
-: 6: This program is free software; you can redistribute it and/or modify it
-: 7: under the terms of version 2 of the GNU General Public License as published
-: 8: by the Free Software Foundation.
-: 9:
-: 10: This program is distributed in the hope that it will be useful, but WITHOUT
-: 11: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-: 12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-: 13: more details.
-: 14:
-: 15: You should have received a copy of the GNU General Public License along
-: 16: with this program; if not, write to the Free Software Foundation, Inc.,
-: 17: 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-: 18:*/
-: 19:#include
-: 20:#include "common.h"
-: 21:
-: 22:/* Local prototypes. */
-: 23:static int process_file (EncaAnalyser an,
-: 24: const char *fname);
-: 25:static void dwim_libenca_options(EncaAnalyser an,
-: 26: const File *file);
-: 27:static void print_results (const char *fname,
-: 28: EncaAnalyser an,
-: 29: EncaEncoding result,
-: 30: int gerrno);
-: 31:static void indent_surface (const char *s);
-: 32:static void double_utf8_chk (EncaAnalyser an,
-: 33: const unsigned char *sample,
-: 34: size_t size);
-: 35:
-: 36:/* process options and do some other initializations, then go through the
-: 37: file list and process files one by one
-: 38: at the end, exit and return 0 on succes, 1 on failure, 2 on troubles */
-: 39:int
275: 40:main(int argc, char *argv[])
-: 41:{
-: 42: char **pp_file, **flist; /* filename list pointer */
275: 43: long int err=0; /* nonzero if process_file() ever returned nonzero */
-: 44: EncaAnalyser an;
-: 45:
-: 46: /* Process command line arguments. */
275: 47: pp_file = flist = process_opt(argc, argv);
-: 48:
-: 49: /* Initialization. */
247: 50: if (options.verbosity_level > 2)
#####: 51: fprintf(stderr, "Initializing language %s\n", options.language);
247: 52: an = enca_analyser_alloc(options.language);
247: 53: if (!an) {
#####: 54: fprintf(stderr, "%s: Language `%s' is unknown or not supported.\n"
-: 55: "Run `%s --list languages' to get list "
-: 56: "of supported languages.\n"
-: 57: "Run `%s -L none' to test only language independent, "
-: 58: "multibyte encodings.\n",
-: 59: program_name, options.language,
-: 60: program_name,
-: 61: program_name);
#####: 62: exit(EXIT_TROUBLE);
-: 63: }
-: 64:
247: 65: enca_set_threshold(an, 1.38);
247: 66: enca_set_multibyte(an, 1);
247: 67: enca_set_ambiguity(an, 1);
247: 68: enca_set_garbage_test(an, 1);
-: 69:
-: 70: /* Any files specified on command line? */
247: 71: if (pp_file == NULL) {
-: 72: /* No => read stdin. */
149: 73: err = process_file(an, NULL);
-: 74: }
-: 75: else {
-: 76: /* Process file list, cumultate the worst error in err. */
434: 77: while (*pp_file != NULL) {
337: 78: err |= process_file(an, *pp_file);
336: 79: enca_free(*pp_file);
336: 80: pp_file++;
-: 81: }
-: 82: }
-: 83:
-: 84: /* Free buffer */
246: 85: process_file(NULL, NULL);
246: 86: enca_analyser_free(an);
246: 87: enca_free(options.language);
246: 88: enca_free(options.target_enc_str);
246: 89: enca_free(flist);
-: 90:
246: 91: if (err & EXIT_TROUBLE)
3: 92: err = EXIT_TROUBLE;
-: 93:
246: 94: return err;
-: 95:}
-: 96:
-: 97:/* process file named fname
-: 98: this is the `boss' function
-: 99: returns 0 on succes, 1 on failure, 2 on troubles */
-: 100:static int
732: 101:process_file(EncaAnalyser an,
-: 102: const char *fname)
-: 103:{
-: 104: static int utf8 = ENCA_CS_UNKNOWN;
-: 105: static Buffer *buffer = NULL; /* persistent i/o buffer */
732: 106: int ot_is_convert = (options.output_type == OTYPE_CONVERT);
-: 107:
-: 108: EncaEncoding result; /* the guessed encoding */
-: 109: File *file; /* the processed file */
-: 110:
732: 111: if (!an) {
246: 112: buffer_free(buffer);
246: 113: return 0;
-: 114: }
-: 115:
-: 116: /* Initialize when we are called the first time. */
486: 117: if (buffer == NULL)
247: 118: buffer = buffer_new(buffer_size);
-: 119:
486: 120: if (!enca_charset_is_known(utf8)) {
247: 121: utf8 = enca_name_to_charset("utf8");
247: 122: assert(enca_charset_is_known(utf8));
-: 123: }
-: 124:
-: 125: /* Read sample. */
486: 126: file = file_new(fname, buffer);
486: 127: if (file_open(file, ot_is_convert ? "r+b" : "rb") != 0) {
2: 128: file_free(file);
2: 129: return EXIT_TROUBLE;
-: 130: }
484: 131: if (file_read(file) == -1) {
#####: 132: file_free(file);
#####: 133: return EXIT_TROUBLE;
-: 134: }
484: 135: if (!ot_is_convert)
420: 136: file_close(file);
-: 137:
-: 138: /* Guess encoding. */
484: 139: dwim_libenca_options(an, file);
484: 140: if (ot_is_convert)
64: 141: result = enca_analyse_const(an, buffer->data, buffer->pos);
-: 142: else
420: 143: result = enca_analyse(an, buffer->data, buffer->pos);
-: 144:
-: 145: /* Is conversion required? */
484: 146: if (ot_is_convert) {
64: 147: int err = 0;
-: 148:
64: 149: if (enca_charset_is_known(result.charset))
62: 150: err = convert(file, result);
-: 151: else {
2: 152: if (enca_errno(an) != ENCA_EEMPTY) {
#####: 153: fprintf(stderr, "%s: Cannot convert `%s' from unknown encoding\n",
-: 154: program_name,
#####: 155: ffname_r(file->name));
-: 156: }
-: 157: /* Copy stdin to stdout unchanged. */
2: 158: if (file->name == NULL)
2: 159: err = copy_and_convert(file, file, NULL);
-: 160: }
-: 161:
63: 162: file_free(file);
63: 163: if ((err == ERR_OK && !enca_charset_is_known(result.charset)
2: 164: && enca_errno(an) != ENCA_EEMPTY)
63: 165: || err == ERR_CANNOT)
-: 166: return EXIT_FAILURE;
-: 167:
59: 168: return (err == ERR_OK) ? EXIT_SUCCESS : EXIT_TROUBLE;
-: 169: }
-: 170:
-: 171: /* Print results. */
420: 172: print_results(file->name, an, result, enca_errno(an));
420: 173: if (result.charset == utf8)
97: 174: double_utf8_chk(an, buffer->data, buffer->pos);
-: 175:
420: 176: file_free(file);
-: 177:
420: 178: return enca_charset_is_known(result.charset) ? EXIT_SUCCESS : EXIT_FAILURE;
-: 179:}
-: 180:
-: 181:/*
-: 182: * DWIM
-: 183: *
-: 184: * Choose some suitable values of all the libenca tuning parameters.
-: 185: */
-: 186:static void
484: 187:dwim_libenca_options(EncaAnalyser an, const File *file)
-: 188:{
484: 189: const double mu = 0.005; /* derivation in 0 */
484: 190: const double m = 15.0; /* value in infinity */
484: 191: ssize_t size = file->buffer->pos;
-: 192: size_t sgnf;
-: 193:
-: 194: /* The number of significant characters */
484: 195: if (!size)
-: 196: sgnf = 1;
-: 197: else
481: 198: sgnf = ceil((double)size/(size/m + 1.0/mu));
484: 199: enca_set_significant(an, sgnf);
-: 200:
-: 201: /* When buffer contains whole file, require correct termination. */
484: 202: if (file->size == size)
322: 203: enca_set_termination_strictness(an, 1);
-: 204: else
162: 205: enca_set_termination_strictness(an, 0);
-: 206:
484: 207: enca_set_filtering(an, sgnf > 2);
484: 208:}
-: 209:
-: 210:/**
-: 211: * Prints results.
-: 212: **/
-: 213:static void
420: 214:print_results(const char *fname,
-: 215: EncaAnalyser an,
-: 216: EncaEncoding result,
-: 217: int gerrno)
-: 218:{
-: 219: char *s;
840: 220: EncaSurface surf = result.surface
420: 221: & ~enca_charset_natural_surface(result.charset);
-: 222:
420: 223: if (options.prefix_filename)
284: 224: printf("%s: ", ffname_r(fname));
-: 225:
420: 226: switch (options.output_type) {
-: 227: case OTYPE_ALIASES:
#####: 228: print_aliases(result.charset);
#####: 229: break;
-: 230:
-: 231: case OTYPE_CANON:
368: 232: if (surf) {
117: 233: s = enca_get_surface_name(surf, ENCA_NAME_STYLE_ENCA);
117: 234: fputs(enca_charset_name(result.charset, ENCA_NAME_STYLE_ENCA), stdout);
117: 235: puts(s);
117: 236: enca_free(s);
-: 237: }
-: 238: else
251: 239: puts(enca_charset_name(result.charset, ENCA_NAME_STYLE_ENCA));
-: 240: break;
-: 241:
-: 242: case OTYPE_HUMAN:
-: 243: case OTYPE_DETAILS:
52: 244: if (surf) {
20: 245: s = enca_get_surface_name(surf, ENCA_NAME_STYLE_HUMAN);
20: 246: puts(enca_charset_name(result.charset, ENCA_NAME_STYLE_HUMAN));
20: 247: indent_surface(s);
20: 248: enca_free(s);
-: 249: }
-: 250: else
32: 251: puts(enca_charset_name(result.charset, ENCA_NAME_STYLE_HUMAN));
-: 252: break;
-: 253:
-: 254: case OTYPE_RFC1345:
#####: 255: puts(enca_charset_name(result.charset, ENCA_NAME_STYLE_RFC1345));
#####: 256: break;
-: 257:
-: 258: case OTYPE_CS2CS:
#####: 259: if (enca_charset_name(result.charset, ENCA_NAME_STYLE_CSTOCS) != NULL)
#####: 260: puts(enca_charset_name(result.charset, ENCA_NAME_STYLE_CSTOCS));
-: 261: else
#####: 262: puts(enca_charset_name(ENCA_CS_UNKNOWN, ENCA_NAME_STYLE_CSTOCS));
-: 263: break;
-: 264:
-: 265: case OTYPE_ICONV:
#####: 266: if (enca_charset_name(result.charset, ENCA_NAME_STYLE_ICONV) != NULL)
#####: 267: puts(enca_charset_name(result.charset, ENCA_NAME_STYLE_ICONV));
-: 268: else
#####: 269: puts(enca_charset_name(ENCA_CS_UNKNOWN, ENCA_NAME_STYLE_ICONV));
-: 270: break;
-: 271:
-: 272: case OTYPE_MIME:
#####: 273: if (enca_charset_name(result.charset, ENCA_NAME_STYLE_MIME) != NULL)
#####: 274: puts(enca_charset_name(result.charset, ENCA_NAME_STYLE_MIME));
-: 275: else
#####: 276: puts(enca_charset_name(ENCA_CS_UNKNOWN, ENCA_NAME_STYLE_MIME));
-: 277: break;
-: 278:
-: 279: default:
#####: 280: abort();
-: 281: break;
-: 282: }
-: 283:
420: 284: if (gerrno && options.output_type == OTYPE_DETAILS) {
#####: 285: printf(" Failure reason: %s.\n", enca_strerror(an, gerrno));
-: 286: }
420: 287:}
-: 288:
-: 289:/**
-: 290: * Reformats surface names as returned from enca_get_surface_name() one
-: 291: * per line to be indented and prints them.
-: 292: **/
-: 293:static void
20: 294:indent_surface(const char *s)
-: 295:{
-: 296: const char *p;
-: 297:
60: 298: while ((p = strchr(s, '\n')) != NULL) {
20: 299: p++;
40: 300: printf(" %.*s", (int)(p-s), s);
20: 301: s = p;
-: 302: }
20: 303:}
-: 304:
-: 305:/**
-: 306: * Checks for doubly-encoded UTF-8 and prints a line when it looks so.
-: 307: **/
-: 308:static void
97: 309:double_utf8_chk(EncaAnalyser an,
-: 310: const unsigned char *sample,
-: 311: size_t size)
-: 312:{
-: 313: size_t dbl, i;
-: 314: int *candidates;
-: 315:
194: 316: if (options.output_type != OTYPE_DETAILS
97: 317: && options.output_type != OTYPE_HUMAN)
-: 318: return;
-: 319:
49: 320: dbl = enca_double_utf8_check(an, sample, size);
49: 321: if (!dbl)
-: 322: return;
-: 323:
38: 324: candidates = enca_double_utf8_get_candidates(an);
38: 325: if (candidates == NULL)
-: 326: return;
38: 327: if (dbl == 1)
-: 328: printf(" Doubly-encoded to UTF-8 from");
-: 329: else
-: 330: printf(" Doubly-encoded to UTF-8 from one of:");
-: 331:
55: 332: for (i = 0; i < dbl; i++)
110: 333: printf(" %s", enca_charset_name(candidates[i], ENCA_NAME_STYLE_ENCA));
-: 334:
38: 335: putchar('\n');
38: 336: enca_free(candidates);
-: 337:}
-: 338:
-: 339:/* vim: ts=2
-: 340: */
<<<<<< EOF
# path=/home/travis/build/nijel/enca/src/stat.h.gcov
-: 0:Source:/usr/include/x86_64-linux-gnu/sys/stat.h
-: 0:Graph:enca-filebuf.gcno
-: 0:Data:enca-filebuf.gcda
-: 0:Runs:275
-: 0:Programs:1
-: 1:/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
-: 2: This file is part of the GNU C Library.
-: 3:
-: 4: The GNU C Library is free software; you can redistribute it and/or
-: 5: modify it under the terms of the GNU Lesser General Public
-: 6: License as published by the Free Software Foundation; either
-: 7: version 2.1 of the License, or (at your option) any later version.
-: 8:
-: 9: The GNU C Library is distributed in the hope that it will be useful,
-: 10: but WITHOUT ANY WARRANTY; without even the implied warranty of
-: 11: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-: 12: Lesser General Public License for more details.
-: 13:
-: 14: You should have received a copy of the GNU Lesser General Public
-: 15: License along with the GNU C Library; if not, see
-: 16: . */
-: 17:
-: 18:/*
-: 19: * POSIX Standard: 5.6 File Characteristics
-: 20: */
-: 21:
-: 22:#ifndef _SYS_STAT_H
-: 23:#define _SYS_STAT_H 1
-: 24:
-: 25:#include
-: 26:
-: 27:#include /* For __mode_t and __dev_t. */
-: 28:
-: 29:#if defined __USE_XOPEN || defined __USE_XOPEN2K || defined __USE_ATFILE
-: 30:# if defined __USE_XOPEN || defined __USE_XOPEN2K
-: 31:# define __need_time_t
-: 32:# endif
-: 33:# ifdef __USE_ATFILE
-: 34:# define __need_timespec
-: 35:# endif
-: 36:# include /* For time_t resp. timespec. */
-: 37:#endif
-: 38:
-: 39:#if defined __USE_XOPEN || defined __USE_XOPEN2K
-: 40:/* The Single Unix specification says that some more types are
-: 41: available here. */
-: 42:# ifndef __dev_t_defined
-: 43:typedef __dev_t dev_t;
-: 44:# define __dev_t_defined
-: 45:# endif
-: 46:
-: 47:# ifndef __gid_t_defined
-: 48:typedef __gid_t gid_t;
-: 49:# define __gid_t_defined
-: 50:# endif
-: 51:
-: 52:# ifndef __ino_t_defined
-: 53:# ifndef __USE_FILE_OFFSET64
-: 54:typedef __ino_t ino_t;
-: 55:# else
-: 56:typedef __ino64_t ino_t;
-: 57:# endif
-: 58:# define __ino_t_defined
-: 59:# endif
-: 60:
-: 61:# ifndef __mode_t_defined
-: 62:typedef __mode_t mode_t;
-: 63:# define __mode_t_defined
-: 64:# endif
-: 65:
-: 66:# ifndef __nlink_t_defined
-: 67:typedef __nlink_t nlink_t;
-: 68:# define __nlink_t_defined
-: 69:# endif
-: 70:
-: 71:# ifndef __off_t_defined
-: 72:# ifndef __USE_FILE_OFFSET64
-: 73:typedef __off_t off_t;
-: 74:# else
-: 75:typedef __off64_t off_t;
-: 76:# endif
-: 77:# define __off_t_defined
-: 78:# endif
-: 79:
-: 80:# ifndef __uid_t_defined
-: 81:typedef __uid_t uid_t;
-: 82:# define __uid_t_defined
-: 83:# endif
-: 84:#endif /* X/Open */
-: 85:
-: 86:#ifdef __USE_UNIX98
-: 87:# ifndef __blkcnt_t_defined
-: 88:# ifndef __USE_FILE_OFFSET64
-: 89:typedef __blkcnt_t blkcnt_t;
-: 90:# else
-: 91:typedef __blkcnt64_t blkcnt_t;
-: 92:# endif
-: 93:# define __blkcnt_t_defined
-: 94:# endif
-: 95:
-: 96:# ifndef __blksize_t_defined
-: 97:typedef __blksize_t blksize_t;
-: 98:# define __blksize_t_defined
-: 99:# endif
-: 100:#endif /* Unix98 */
-: 101:
-: 102:__BEGIN_DECLS
-: 103:
-: 104:#include
-: 105:
-: 106:#if defined __USE_MISC || defined __USE_XOPEN
-: 107:# define S_IFMT __S_IFMT
-: 108:# define S_IFDIR __S_IFDIR
-: 109:# define S_IFCHR __S_IFCHR
-: 110:# define S_IFBLK __S_IFBLK
-: 111:# define S_IFREG __S_IFREG
-: 112:# ifdef __S_IFIFO
-: 113:# define S_IFIFO __S_IFIFO
-: 114:# endif
-: 115:# ifdef __S_IFLNK
-: 116:# define S_IFLNK __S_IFLNK
-: 117:# endif
-: 118:# if (defined __USE_MISC || defined __USE_UNIX98) \
-: 119: && defined __S_IFSOCK
-: 120:# define S_IFSOCK __S_IFSOCK
-: 121:# endif
-: 122:#endif
-: 123:
-: 124:/* Test macros for file types. */
-: 125:
-: 126:#define __S_ISTYPE(mode, mask) (((mode) & __S_IFMT) == (mask))
-: 127:
-: 128:#define S_ISDIR(mode) __S_ISTYPE((mode), __S_IFDIR)
-: 129:#define S_ISCHR(mode) __S_ISTYPE((mode), __S_IFCHR)
-: 130:#define S_ISBLK(mode) __S_ISTYPE((mode), __S_IFBLK)
-: 131:#define S_ISREG(mode) __S_ISTYPE((mode), __S_IFREG)
-: 132:#ifdef __S_IFIFO
-: 133:# define S_ISFIFO(mode) __S_ISTYPE((mode), __S_IFIFO)
-: 134:#endif
-: 135:#ifdef __S_IFLNK
-: 136:# define S_ISLNK(mode) __S_ISTYPE((mode), __S_IFLNK)
-: 137:#endif
-: 138:
-: 139:#if defined __USE_MISC && !defined __S_IFLNK
-: 140:# define S_ISLNK(mode) 0
-: 141:#endif
-: 142:
-: 143:#if (defined __USE_UNIX98 || defined __USE_XOPEN2K) \
-: 144: && defined __S_IFSOCK
-: 145:# define S_ISSOCK(mode) __S_ISTYPE((mode), __S_IFSOCK)
-: 146:#elif defined __USE_XOPEN2K
-: 147:# define S_ISSOCK(mode) 0
-: 148:#endif
-: 149:
-: 150:/* These are from POSIX.1b. If the objects are not implemented using separate
-: 151: distinct file types, the macros always will evaluate to zero. Unlike the
-: 152: other S_* macros the following three take a pointer to a `struct stat'
-: 153: object as the argument. */
-: 154:#ifdef __USE_POSIX199309
-: 155:# define S_TYPEISMQ(buf) __S_TYPEISMQ(buf)
-: 156:# define S_TYPEISSEM(buf) __S_TYPEISSEM(buf)
-: 157:# define S_TYPEISSHM(buf) __S_TYPEISSHM(buf)
-: 158:#endif
-: 159:
-: 160:
-: 161:/* Protection bits. */
-: 162:
-: 163:#define S_ISUID __S_ISUID /* Set user ID on execution. */
-: 164:#define S_ISGID __S_ISGID /* Set group ID on execution. */
-: 165:
-: 166:#if defined __USE_MISC || defined __USE_XOPEN
-: 167:/* Save swapped text after use (sticky bit). This is pretty well obsolete. */
-: 168:# define S_ISVTX __S_ISVTX
-: 169:#endif
-: 170:
-: 171:#define S_IRUSR __S_IREAD /* Read by owner. */
-: 172:#define S_IWUSR __S_IWRITE /* Write by owner. */
-: 173:#define S_IXUSR __S_IEXEC /* Execute by owner. */
-: 174:/* Read, write, and execute by owner. */
-: 175:#define S_IRWXU (__S_IREAD|__S_IWRITE|__S_IEXEC)
-: 176:
-: 177:#ifdef __USE_MISC
-: 178:# define S_IREAD S_IRUSR
-: 179:# define S_IWRITE S_IWUSR
-: 180:# define S_IEXEC S_IXUSR
-: 181:#endif
-: 182:
-: 183:#define S_IRGRP (S_IRUSR >> 3) /* Read by group. */
-: 184:#define S_IWGRP (S_IWUSR >> 3) /* Write by group. */
-: 185:#define S_IXGRP (S_IXUSR >> 3) /* Execute by group. */
-: 186:/* Read, write, and execute by group. */
-: 187:#define S_IRWXG (S_IRWXU >> 3)
-: 188:
-: 189:#define S_IROTH (S_IRGRP >> 3) /* Read by others. */
-: 190:#define S_IWOTH (S_IWGRP >> 3) /* Write by others. */
-: 191:#define S_IXOTH (S_IXGRP >> 3) /* Execute by others. */
-: 192:/* Read, write, and execute by others. */
-: 193:#define S_IRWXO (S_IRWXG >> 3)
-: 194:
-: 195:
-: 196:#ifdef __USE_MISC
-: 197:/* Macros for common mode bit masks. */
-: 198:# define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */
-: 199:# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
-: 200:# define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)/* 0666*/
-: 201:
-: 202:# define S_BLKSIZE 512 /* Block size for `st_blocks'. */
-: 203:#endif
-: 204:
-: 205:
-: 206:#ifndef __USE_FILE_OFFSET64
-: 207:/* Get file attributes for FILE and put them in BUF. */
-: 208:extern int stat (const char *__restrict __file,
-: 209: struct stat *__restrict __buf) __THROW __nonnull ((1, 2));
-: 210:
-: 211:/* Get file attributes for the file, device, pipe, or socket
-: 212: that file descriptor FD is open on and put them in BUF. */
-: 213:extern int fstat (int __fd, struct stat *__buf) __THROW __nonnull ((2));
-: 214:#else
-: 215:# ifdef __REDIRECT_NTH
-: 216:extern int __REDIRECT_NTH (stat, (const char *__restrict __file,
-: 217: struct stat *__restrict __buf), stat64)
-: 218: __nonnull ((1, 2));
-: 219:extern int __REDIRECT_NTH (fstat, (int __fd, struct stat *__buf), fstat64)
-: 220: __nonnull ((2));
-: 221:# else
-: 222:# define stat stat64
-: 223:# define fstat fstat64
-: 224:# endif
-: 225:#endif
-: 226:#ifdef __USE_LARGEFILE64
-: 227:extern int stat64 (const char *__restrict __file,
-: 228: struct stat64 *__restrict __buf) __THROW __nonnull ((1, 2));
-: 229:extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2));
-: 230:#endif
-: 231:
-: 232:#ifdef __USE_ATFILE
-: 233:/* Similar to stat, get the attributes for FILE and put them in BUF.
-: 234: Relative path names are interpreted relative to FD unless FD is
-: 235: AT_FDCWD. */
-: 236:# ifndef __USE_FILE_OFFSET64
-: 237:extern int fstatat (int __fd, const char *__restrict __file,
-: 238: struct stat *__restrict __buf, int __flag)
-: 239: __THROW __nonnull ((2, 3));
-: 240:# else
-: 241:# ifdef __REDIRECT_NTH
-: 242:extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file,
-: 243: struct stat *__restrict __buf,
-: 244: int __flag),
-: 245: fstatat64) __nonnull ((2, 3));
-: 246:# else
-: 247:# define fstatat fstatat64
-: 248:# endif
-: 249:# endif
-: 250:
-: 251:# ifdef __USE_LARGEFILE64
-: 252:extern int fstatat64 (int __fd, const char *__restrict __file,
-: 253: struct stat64 *__restrict __buf, int __flag)
-: 254: __THROW __nonnull ((2, 3));
-: 255:# endif
-: 256:#endif
-: 257:
-: 258:#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
-: 259:# ifndef __USE_FILE_OFFSET64
-: 260:/* Get file attributes about FILE and put them in BUF.
-: 261: If FILE is a symbolic link, do not follow it. */
-: 262:extern int lstat (const char *__restrict __file,
-: 263: struct stat *__restrict __buf) __THROW __nonnull ((1, 2));
-: 264:# else
-: 265:# ifdef __REDIRECT_NTH
-: 266:extern int __REDIRECT_NTH (lstat,
-: 267: (const char *__restrict __file,
-: 268: struct stat *__restrict __buf), lstat64)
-: 269: __nonnull ((1, 2));
-: 270:# else
-: 271:# define lstat lstat64
-: 272:# endif
-: 273:# endif
-: 274:# ifdef __USE_LARGEFILE64
-: 275:extern int lstat64 (const char *__restrict __file,
-: 276: struct stat64 *__restrict __buf)
-: 277: __THROW __nonnull ((1, 2));
-: 278:# endif
-: 279:#endif
-: 280:
-: 281:/* Set file access permissions for FILE to MODE.
-: 282: If FILE is a symbolic link, this affects its target instead. */
-: 283:extern int chmod (const char *__file, __mode_t __mode)
-: 284: __THROW __nonnull ((1));
-: 285:
-: 286:#ifdef __USE_MISC
-: 287:/* Set file access permissions for FILE to MODE.
-: 288: If FILE is a symbolic link, this affects the link itself
-: 289: rather than its target. */
-: 290:extern int lchmod (const char *__file, __mode_t __mode)
-: 291: __THROW __nonnull ((1));
-: 292:#endif
-: 293:
-: 294:/* Set file access permissions of the file FD is open on to MODE. */
-: 295:#ifdef __USE_POSIX
-: 296:extern int fchmod (int __fd, __mode_t __mode) __THROW;
-: 297:#endif
-: 298:
-: 299:#ifdef __USE_ATFILE
-: 300:/* Set file access permissions of FILE relative to
-: 301: the directory FD is open on. */
-: 302:extern int fchmodat (int __fd, const char *__file, __mode_t __mode,
-: 303: int __flag)
-: 304: __THROW __nonnull ((2)) __wur;
-: 305:#endif /* Use ATFILE. */
-: 306:
-: 307:
-: 308:
-: 309:/* Set the file creation mask of the current process to MASK,
-: 310: and return the old creation mask. */
-: 311:extern __mode_t umask (__mode_t __mask) __THROW;
-: 312:
-: 313:#ifdef __USE_GNU
-: 314:/* Get the current `umask' value without changing it.
-: 315: This function is only available under the GNU Hurd. */
-: 316:extern __mode_t getumask (void) __THROW;
-: 317:#endif
-: 318:
-: 319:/* Create a new directory named PATH, with permission bits MODE. */
-: 320:extern int mkdir (const char *__path, __mode_t __mode)
-: 321: __THROW __nonnull ((1));
-: 322:
-: 323:#ifdef __USE_ATFILE
-: 324:/* Like mkdir, create a new directory with permission bits MODE. But
-: 325: interpret relative PATH names relative to the directory associated
-: 326: with FD. */
-: 327:extern int mkdirat (int __fd, const char *__path, __mode_t __mode)
-: 328: __THROW __nonnull ((2));
-: 329:#endif
-: 330:
-: 331:/* Create a device file named PATH, with permission and special bits MODE
-: 332: and device number DEV (which can be constructed from major and minor
-: 333: device numbers with the `makedev' macro above). */
-: 334:#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
-: 335:extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev)
-: 336: __THROW __nonnull ((1));
-: 337:
-: 338:# ifdef __USE_ATFILE
-: 339:/* Like mknod, create a new device file with permission bits MODE and
-: 340: device number DEV. But interpret relative PATH names relative to
-: 341: the directory associated with FD. */
-: 342:extern int mknodat (int __fd, const char *__path, __mode_t __mode,
-: 343: __dev_t __dev) __THROW __nonnull ((2));
-: 344:# endif
-: 345:#endif
-: 346:
-: 347:
-: 348:/* Create a new FIFO named PATH, with permission bits MODE. */
-: 349:extern int mkfifo (const char *__path, __mode_t __mode)
-: 350: __THROW __nonnull ((1));
-: 351:
-: 352:#ifdef __USE_ATFILE
-: 353:/* Like mkfifo, create a new FIFO with permission bits MODE. But
-: 354: interpret relative PATH names relative to the directory associated
-: 355: with FD. */
-: 356:extern int mkfifoat (int __fd, const char *__path, __mode_t __mode)
-: 357: __THROW __nonnull ((2));
-: 358:#endif
-: 359:
-: 360:#ifdef __USE_ATFILE
-: 361:/* Set file access and modification times relative to directory file
-: 362: descriptor. */
-: 363:extern int utimensat (int __fd, const char *__path,
-: 364: const struct timespec __times[2],
-: 365: int __flags)
-: 366: __THROW __nonnull ((2));
-: 367:#endif
-: 368:
-: 369:#ifdef __USE_XOPEN2K8
-: 370:/* Set file access and modification times of the file associated with FD. */
-: 371:extern int futimens (int __fd, const struct timespec __times[2]) __THROW;
-: 372:#endif
-: 373:
-: 374:/* To allow the `struct stat' structure and the file type `mode_t'
-: 375: bits to vary without changing shared library major version number,
-: 376: the `stat' family of functions and `mknod' are in fact inline
-: 377: wrappers around calls to `xstat', `fxstat', `lxstat', and `xmknod',
-: 378: which all take a leading version-number argument designating the
-: 379: data structure and bits used. defines _STAT_VER with
-: 380: the version number corresponding to `struct stat' as defined in
-: 381: that file; and _MKNOD_VER with the version number corresponding to
-: 382: the S_IF* macros defined therein. It is arranged that when not
-: 383: inlined these function are always statically linked; that way a
-: 384: dynamically-linked executable always encodes the version number
-: 385: corresponding to the data structures it uses, so the `x' functions
-: 386: in the shared library can adapt without needing to recompile all
-: 387: callers. */
-: 388:
-: 389:#ifndef _STAT_VER
-: 390:# define _STAT_VER 0
-: 391:#endif
-: 392:#ifndef _MKNOD_VER
-: 393:# define _MKNOD_VER 0
-: 394:#endif
-: 395:
-: 396:/* Wrappers for stat and mknod system calls. */
-: 397:#ifndef __USE_FILE_OFFSET64
-: 398:extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf)
-: 399: __THROW __nonnull ((3));
-: 400:extern int __xstat (int __ver, const char *__filename,
-: 401: struct stat *__stat_buf) __THROW __nonnull ((2, 3));
-: 402:extern int __lxstat (int __ver, const char *__filename,
-: 403: struct stat *__stat_buf) __THROW __nonnull ((2, 3));
-: 404:extern int __fxstatat (int __ver, int __fildes, const char *__filename,
-: 405: struct stat *__stat_buf, int __flag)
-: 406: __THROW __nonnull ((3, 4));
-: 407:#else
-: 408:# ifdef __REDIRECT_NTH
-: 409:extern int __REDIRECT_NTH (__fxstat, (int __ver, int __fildes,
-: 410: struct stat *__stat_buf), __fxstat64)
-: 411: __nonnull ((3));
-: 412:extern int __REDIRECT_NTH (__xstat, (int __ver, const char *__filename,
-: 413: struct stat *__stat_buf), __xstat64)
-: 414: __nonnull ((2, 3));
-: 415:extern int __REDIRECT_NTH (__lxstat, (int __ver, const char *__filename,
-: 416: struct stat *__stat_buf), __lxstat64)
-: 417: __nonnull ((2, 3));
-: 418:extern int __REDIRECT_NTH (__fxstatat, (int __ver, int __fildes,
-: 419: const char *__filename,
-: 420: struct stat *__stat_buf, int __flag),
-: 421: __fxstatat64) __nonnull ((3, 4));
-: 422:
-: 423:# else
-: 424:# define __fxstat __fxstat64
-: 425:# define __xstat __xstat64
-: 426:# define __lxstat __lxstat64
-: 427:# endif
-: 428:#endif
-: 429:
-: 430:#ifdef __USE_LARGEFILE64
-: 431:extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf)
-: 432: __THROW __nonnull ((3));
-: 433:extern int __xstat64 (int __ver, const char *__filename,
-: 434: struct stat64 *__stat_buf) __THROW __nonnull ((2, 3));
-: 435:extern int __lxstat64 (int __ver, const char *__filename,
-: 436: struct stat64 *__stat_buf) __THROW __nonnull ((2, 3));
-: 437:extern int __fxstatat64 (int __ver, int __fildes, const char *__filename,
-: 438: struct stat64 *__stat_buf, int __flag)
-: 439: __THROW __nonnull ((3, 4));
-: 440:#endif
-: 441:extern int __xmknod (int __ver, const char *__path, __mode_t __mode,
-: 442: __dev_t *__dev) __THROW __nonnull ((2, 4));
-: 443:
-: 444:extern int __xmknodat (int __ver, int __fd, const char *__path,
-: 445: __mode_t __mode, __dev_t *__dev)
-: 446: __THROW __nonnull ((3, 5));
-: 447:
-: 448:#ifdef __USE_EXTERN_INLINES
-: 449:/* Inlined versions of the real stat and mknod functions. */
-: 450:
-: 451:__extern_inline int
-: 452:__NTH (stat (const char *__path, struct stat *__statbuf))
-: 453:{
-: 454: return __xstat (_STAT_VER, __path, __statbuf);
-: 455:}
-: 456:
-: 457:# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
-: 458:__extern_inline int
-: 459:__NTH (lstat (const char *__path, struct stat *__statbuf))
-: 460:{
-: 461: return __lxstat (_STAT_VER, __path, __statbuf);
-: 462:}
-: 463:# endif
-: 464:
-: 465:__extern_inline int
-: 466:__NTH (fstat (int __fd, struct stat *__statbuf))
-: 467:{
560: 468: return __fxstat (_STAT_VER, __fd, __statbuf);
-: 469:}
-: 470:
-: 471:# ifdef __USE_ATFILE
-: 472:__extern_inline int
-: 473:__NTH (fstatat (int __fd, const char *__filename, struct stat *__statbuf,
-: 474: int __flag))
-: 475:{
-: 476: return __fxstatat (_STAT_VER, __fd, __filename, __statbuf, __flag);
-: 477:}
-: 478:# endif
-: 479:
-: 480:# ifdef __USE_MISC
-: 481:__extern_inline int
-: 482:__NTH (mknod (const char *__path, __mode_t __mode, __dev_t __dev))
-: 483:{
-: 484: return __xmknod (_MKNOD_VER, __path, __mode, &__dev);
-: 485:}
-: 486:# endif
-: 487:
-: 488:# ifdef __USE_ATFILE
-: 489:__extern_inline int
-: 490:__NTH (mknodat (int __fd, const char *__path, __mode_t __mode,
-: 491: __dev_t __dev))
-: 492:{
-: 493: return __xmknodat (_MKNOD_VER, __fd, __path, __mode, &__dev);
-: 494:}
-: 495:# endif
-: 496:
-: 497:# if defined __USE_LARGEFILE64 \
-: 498: && (! defined __USE_FILE_OFFSET64 \
-: 499: || (defined __REDIRECT_NTH && defined __OPTIMIZE__))
-: 500:__extern_inline int
-: 501:__NTH (stat64 (const char *__path, struct stat64 *__statbuf))
-: 502:{
-: 503: return __xstat64 (_STAT_VER, __path, __statbuf);
-: 504:}
-: 505:
-: 506:# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
-: 507:__extern_inline int
-: 508:__NTH (lstat64 (const char *__path, struct stat64 *__statbuf))
-: 509:{
-: 510: return __lxstat64 (_STAT_VER, __path, __statbuf);
-: 511:}
-: 512:# endif
-: 513:
-: 514:__extern_inline int
-: 515:__NTH (fstat64 (int __fd, struct stat64 *__statbuf))
-: 516:{
-: 517: return __fxstat64 (_STAT_VER, __fd, __statbuf);
-: 518:}
-: 519:
-: 520:# ifdef __USE_ATFILE
-: 521:__extern_inline int
-: 522:__NTH (fstatat64 (int __fd, const char *__filename, struct stat64 *__statbuf,
-: 523: int __flag))
-: 524:{
-: 525: return __fxstatat64 (_STAT_VER, __fd, __filename, __statbuf, __flag);
-: 526:}
-: 527:# endif
-: 528:
-: 529:# endif
-: 530:
-: 531:#endif
-: 532:
-: 533:__END_DECLS
-: 534:
-: 535:
-: 536:#endif /* sys/stat.h */
<<<<<< EOF
# path=/home/travis/build/nijel/enca/test/simtable.c.gcov
-: 0:Source:simtable.c
-: 0:Graph:simtable.gcno
-: 0:Data:simtable.gcda
-: 0:Runs:1
-: 0:Programs:1
-: 1:#include
-: 2:#include
-: 3:#include
-: 4:
-: 5:#include "enca.h"
-: 6:/* To cheat... */
-: 7:#include "internal.h"
-: 8:
-: 9:int myargc;
-: 10:char **myargv;
-: 11:
-: 12:static void
13: 13:prl(const EncaLanguageInfo *l, const char *hooks)
-: 14:{
-: 15: double *m;
-: 16: int a;
-: 17: size_t i, j;
-: 18:
13: 19: if (myargc > 1) {
-: 20: a = 1;
#####: 21: while (a < myargc && strcmp(myargv[a], l->name))
#####: 22: a++;
#####: 23: if (a == myargc)
-: 24: return;
-: 25: }
-: 26:
26: 27: printf("\n==\x1b[1m%s\x1b[m==\n", l->name);
13: 28: m = enca_get_charset_similarity_matrix(l);
91: 29: for (i = 0; i < l->ncharsets; i++) {
480: 30: for (j = 0; j < l->ncharsets; j++) {
480: 31: double q = 1000.0*m[i*l->ncharsets + j];
-: 32:
480: 33: if (i == j)
-: 34: printf("\x1b[36m");
402: 35: else if (q > 500)
-: 36: printf("\x1b[1;31m");
362: 37: else if (q > 333)
-: 38: printf("\x1b[31m");
342: 39: else if (q > 200)
-: 40: printf("\x1b[34m");
302: 41: else if (q < 50)
-: 42: printf("\x1b[30m");
480: 43: printf("%4.0f ", q);
480: 44: printf("\x1b[m");
-: 45: }
156: 46: printf(" %s\n", l->csnames[i]);
-: 47: }
13: 48: printf("Hooks: \x1b[32m%s\x1b[m\n", hooks);
13: 49: free(m);
-: 50:}
-: 51:
-: 52:int
1: 53:main(int argc, char *argv[])
-: 54:{
1: 55: myargc = argc;
1: 56: myargv = argv;
-: 57:
1: 58: prl(&ENCA_LANGUAGE_BE, "macwin isokoi 855866");
1: 59: prl(&ENCA_LANGUAGE_BG, "1251mac");
1: 60: prl(&ENCA_LANGUAGE_CS, "isowin 852kam");
1: 61: prl(&ENCA_LANGUAGE_ET, "");
1: 62: prl(&ENCA_LANGUAGE_HR, "isowin");
1: 63: prl(&ENCA_LANGUAGE_HU, "isocork isowin[XXX]");
1: 64: prl(&ENCA_LANGUAGE_LT, "winbalt lat4balt iso13win[XXX]");
1: 65: prl(&ENCA_LANGUAGE_LV, "winbalt iso13win[XXX]");
1: 66: prl(&ENCA_LANGUAGE_PL, "isowin balt13");
1: 67: prl(&ENCA_LANGUAGE_RU, "macwin");
1: 68: prl(&ENCA_LANGUAGE_SK, "isowin 852kam");
1: 69: prl(&ENCA_LANGUAGE_SL, "");
1: 70: prl(&ENCA_LANGUAGE_UK, "macwin isokoi ibm1125");
-: 71:
-: 72: return 0;
-: 73:}
<<<<<< EOF
# path=/home/travis/build/nijel/enca/test/stdio2.h.gcov
-: 0:Source:/usr/include/x86_64-linux-gnu/bits/stdio2.h
-: 0:Graph:simtable.gcno
-: 0:Data:simtable.gcda
-: 0:Runs:1
-: 0:Programs:1
-: 1:/* Checking macros for stdio functions.
-: 2: Copyright (C) 2004-2016 Free Software Foundation, Inc.
-: 3: This file is part of the GNU C Library.
-: 4:
-: 5: The GNU C Library is free software; you can redistribute it and/or
-: 6: modify it under the terms of the GNU Lesser General Public
-: 7: License as published by the Free Software Foundation; either
-: 8: version 2.1 of the License, or (at your option) any later version.
-: 9:
-: 10: The GNU C Library is distributed in the hope that it will be useful,
-: 11: but WITHOUT ANY WARRANTY; without even the implied warranty of
-: 12: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-: 13: Lesser General Public License for more details.
-: 14:
-: 15: You should have received a copy of the GNU Lesser General Public
-: 16: License along with the GNU C Library; if not, see
-: 17: . */
-: 18:
-: 19:#ifndef _STDIO_H
-: 20:# error "Never include directly; use instead."
-: 21:#endif
-: 22:
-: 23:extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen,
-: 24: const char *__restrict __format, ...) __THROW;
-: 25:extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen,
-: 26: const char *__restrict __format,
-: 27: _G_va_list __ap) __THROW;
-: 28:
-: 29:#ifdef __va_arg_pack
-: 30:__fortify_function int
-: 31:__NTH (sprintf (char *__restrict __s, const char *__restrict __fmt, ...))
-: 32:{
-: 33: return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
-: 34: __bos (__s), __fmt, __va_arg_pack ());
-: 35:}
-: 36:#elif !defined __cplusplus
-: 37:# define sprintf(str, ...) \
-: 38: __builtin___sprintf_chk (str, __USE_FORTIFY_LEVEL - 1, __bos (str), \
-: 39: __VA_ARGS__)
-: 40:#endif
-: 41:
-: 42:__fortify_function int
-: 43:__NTH (vsprintf (char *__restrict __s, const char *__restrict __fmt,
-: 44: _G_va_list __ap))
-: 45:{
-: 46: return __builtin___vsprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
-: 47: __bos (__s), __fmt, __ap);
-: 48:}
-: 49:
-: 50:#if defined __USE_ISOC99 || defined __USE_UNIX98
-: 51:
-: 52:extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag,
-: 53: size_t __slen, const char *__restrict __format,
-: 54: ...) __THROW;
-: 55:extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag,
-: 56: size_t __slen, const char *__restrict __format,
-: 57: _G_va_list __ap) __THROW;
-: 58:
-: 59:# ifdef __va_arg_pack
-: 60:__fortify_function int
-: 61:__NTH (snprintf (char *__restrict __s, size_t __n,
-: 62: const char *__restrict __fmt, ...))
-: 63:{
-: 64: return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
-: 65: __bos (__s), __fmt, __va_arg_pack ());
-: 66:}
-: 67:# elif !defined __cplusplus
-: 68:# define snprintf(str, len, ...) \
-: 69: __builtin___snprintf_chk (str, len, __USE_FORTIFY_LEVEL - 1, __bos (str), \
-: 70: __VA_ARGS__)
-: 71:# endif
-: 72:
-: 73:__fortify_function int
-: 74:__NTH (vsnprintf (char *__restrict __s, size_t __n,
-: 75: const char *__restrict __fmt, _G_va_list __ap))
-: 76:{
-: 77: return __builtin___vsnprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
-: 78: __bos (__s), __fmt, __ap);
-: 79:}
-: 80:
-: 81:#endif
-: 82:
-: 83:#if __USE_FORTIFY_LEVEL > 1
-: 84:
-: 85:extern int __fprintf_chk (FILE *__restrict __stream, int __flag,
-: 86: const char *__restrict __format, ...);
-: 87:extern int __printf_chk (int __flag, const char *__restrict __format, ...);
-: 88:extern int __vfprintf_chk (FILE *__restrict __stream, int __flag,
-: 89: const char *__restrict __format, _G_va_list __ap);
-: 90:extern int __vprintf_chk (int __flag, const char *__restrict __format,
-: 91: _G_va_list __ap);
-: 92:
-: 93:# ifdef __va_arg_pack
-: 94:__fortify_function int
-: 95:fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...)
-: 96:{
-: 97: return __fprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt,
-: 98: __va_arg_pack ());
-: 99:}
-: 100:
-: 101:__fortify_function int
-: 102:printf (const char *__restrict __fmt, ...)
-: 103:{
947: 104: return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
-: 105:}
-: 106:# elif !defined __cplusplus
-: 107:# define printf(...) \
-: 108: __printf_chk (__USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
-: 109:# define fprintf(stream, ...) \
-: 110: __fprintf_chk (stream, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
-: 111:# endif
-: 112:
-: 113:__fortify_function int
-: 114:vprintf (const char *__restrict __fmt, _G_va_list __ap)
-: 115:{
-: 116:#ifdef __USE_EXTERN_INLINES
-: 117: return __vfprintf_chk (stdout, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
-: 118:#else
-: 119: return __vprintf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __ap);
-: 120:#endif
-: 121:}
-: 122:
-: 123:__fortify_function int
-: 124:vfprintf (FILE *__restrict __stream,
-: 125: const char *__restrict __fmt, _G_va_list __ap)
-: 126:{
-: 127: return __vfprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
-: 128:}
-: 129:
-: 130:# ifdef __USE_XOPEN2K8
-: 131:extern int __dprintf_chk (int __fd, int __flag, const char *__restrict __fmt,
-: 132: ...) __attribute__ ((__format__ (__printf__, 3, 4)));
-: 133:extern int __vdprintf_chk (int __fd, int __flag,
-: 134: const char *__restrict __fmt, _G_va_list __arg)
-: 135: __attribute__ ((__format__ (__printf__, 3, 0)));
-: 136:
-: 137:# ifdef __va_arg_pack
-: 138:__fortify_function int
-: 139:dprintf (int __fd, const char *__restrict __fmt, ...)
-: 140:{
-: 141: return __dprintf_chk (__fd, __USE_FORTIFY_LEVEL - 1, __fmt,
-: 142: __va_arg_pack ());
-: 143:}
-: 144:# elif !defined __cplusplus
-: 145:# define dprintf(fd, ...) \
-: 146: __dprintf_chk (fd, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
-: 147:# endif
-: 148:
-: 149:__fortify_function int
-: 150:vdprintf (int __fd, const char *__restrict __fmt, _G_va_list __ap)
-: 151:{
-: 152: return __vdprintf_chk (__fd, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
-: 153:}
-: 154:# endif
-: 155:
-: 156:# ifdef __USE_GNU
-: 157:
-: 158:extern int __asprintf_chk (char **__restrict __ptr, int __flag,
-: 159: const char *__restrict __fmt, ...)
-: 160: __THROW __attribute__ ((__format__ (__printf__, 3, 4))) __wur;
-: 161:extern int __vasprintf_chk (char **__restrict __ptr, int __flag,
-: 162: const char *__restrict __fmt, _G_va_list __arg)
-: 163: __THROW __attribute__ ((__format__ (__printf__, 3, 0))) __wur;
-: 164:extern int __obstack_printf_chk (struct obstack *__restrict __obstack,
-: 165: int __flag, const char *__restrict __format,
-: 166: ...)
-: 167: __THROW __attribute__ ((__format__ (__printf__, 3, 4)));
-: 168:extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack,
-: 169: int __flag,
-: 170: const char *__restrict __format,
-: 171: _G_va_list __args)
-: 172: __THROW __attribute__ ((__format__ (__printf__, 3, 0)));
-: 173:
-: 174:# ifdef __va_arg_pack
-: 175:__fortify_function int
-: 176:__NTH (asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...))
-: 177:{
-: 178: return __asprintf_chk (__ptr, __USE_FORTIFY_LEVEL - 1, __fmt,
-: 179: __va_arg_pack ());
-: 180:}
-: 181:
-: 182:__fortify_function int
-: 183:__NTH (__asprintf (char **__restrict __ptr, const char *__restrict __fmt,
-: 184: ...))
-: 185:{
-: 186: return __asprintf_chk (__ptr, __USE_FORTIFY_LEVEL - 1, __fmt,
-: 187: __va_arg_pack ());
-: 188:}
-: 189:
-: 190:__fortify_function int
-: 191:__NTH (obstack_printf (struct obstack *__restrict __obstack,
-: 192: const char *__restrict __fmt, ...))
-: 193:{
-: 194: return __obstack_printf_chk (__obstack, __USE_FORTIFY_LEVEL - 1, __fmt,
-: 195: __va_arg_pack ());
-: 196:}
-: 197:# elif !defined __cplusplus
-: 198:# define asprintf(ptr, ...) \
-: 199: __asprintf_chk (ptr, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
-: 200:# define __asprintf(ptr, ...) \
-: 201: __asprintf_chk (ptr, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
-: 202:# define obstack_printf(obstack, ...) \
-: 203: __obstack_printf_chk (obstack, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
-: 204:# endif
-: 205:
-: 206:__fortify_function int
-: 207:__NTH (vasprintf (char **__restrict __ptr, const char *__restrict __fmt,
-: 208: _G_va_list __ap))
-: 209:{
-: 210: return __vasprintf_chk (__ptr, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
-: 211:}
-: 212:
-: 213:__fortify_function int
-: 214:__NTH (obstack_vprintf (struct obstack *__restrict __obstack,
-: 215: const char *__restrict __fmt, _G_va_list __ap))
-: 216:{
-: 217: return __obstack_vprintf_chk (__obstack, __USE_FORTIFY_LEVEL - 1, __fmt,
-: 218: __ap);
-: 219:}
-: 220:
-: 221:# endif
-: 222:
-: 223:#endif
-: 224:
-: 225:#if !defined __USE_ISOC11 \
-: 226: || (defined __cplusplus && __cplusplus <= 201103L && !defined __USE_GNU)
-: 227:extern char *__gets_chk (char *__str, size_t) __wur;
-: 228:extern char *__REDIRECT (__gets_warn, (char *__str), gets)
-: 229: __wur __warnattr ("please use fgets or getline instead, gets can't "
-: 230: "specify buffer size");
-: 231:
-: 232:__fortify_function __wur char *
-: 233:gets (char *__str)
-: 234:{
-: 235: if (__bos (__str) != (size_t) -1)
-: 236: return __gets_chk (__str, __bos (__str));
-: 237: return __gets_warn (__str);
-: 238:}
-: 239:#endif
-: 240:
-: 241:extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n,
-: 242: FILE *__restrict __stream) __wur;
-: 243:extern char *__REDIRECT (__fgets_alias,
-: 244: (char *__restrict __s, int __n,
-: 245: FILE *__restrict __stream), fgets) __wur;
-: 246:extern char *__REDIRECT (__fgets_chk_warn,
-: 247: (char *__restrict __s, size_t __size, int __n,
-: 248: FILE *__restrict __stream), __fgets_chk)
-: 249: __wur __warnattr ("fgets called with bigger size than length "
-: 250: "of destination buffer");
-: 251:
-: 252:__fortify_function __wur char *
-: 253:fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
-: 254:{
-: 255: if (__bos (__s) != (size_t) -1)
-: 256: {
-: 257: if (!__builtin_constant_p (__n) || __n <= 0)
-: 258: return __fgets_chk (__s, __bos (__s), __n, __stream);
-: 259:
-: 260: if ((size_t) __n > __bos (__s))
-: 261: return __fgets_chk_warn (__s, __bos (__s), __n, __stream);
-: 262: }
-: 263: return __fgets_alias (__s, __n, __stream);
-: 264:}
-: 265:
-: 266:extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen,
-: 267: size_t __size, size_t __n,
-: 268: FILE *__restrict __stream) __wur;
-: 269:extern size_t __REDIRECT (__fread_alias,
-: 270: (void *__restrict __ptr, size_t __size,
-: 271: size_t __n, FILE *__restrict __stream),
-: 272: fread) __wur;
-: 273:extern size_t __REDIRECT (__fread_chk_warn,
-: 274: (void *__restrict __ptr, size_t __ptrlen,
-: 275: size_t __size, size_t __n,
-: 276: FILE *__restrict __stream),
-: 277: __fread_chk)
-: 278: __wur __warnattr ("fread called with bigger size * nmemb than length "
-: 279: "of destination buffer");
-: 280:
-: 281:__fortify_function __wur size_t
-: 282:fread (void *__restrict __ptr, size_t __size, size_t __n,
-: 283: FILE *__restrict __stream)
-: 284:{
-: 285: if (__bos0 (__ptr) != (size_t) -1)
-: 286: {
-: 287: if (!__builtin_constant_p (__size)
-: 288: || !__builtin_constant_p (__n)
-: 289: || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
-: 290: return __fread_chk (__ptr, __bos0 (__ptr), __size, __n, __stream);
-: 291:
-: 292: if (__size * __n > __bos0 (__ptr))
-: 293: return __fread_chk_warn (__ptr, __bos0 (__ptr), __size, __n, __stream);
-: 294: }
-: 295: return __fread_alias (__ptr, __size, __n, __stream);
-: 296:}
-: 297:
-: 298:#ifdef __USE_GNU
-: 299:extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size,
-: 300: int __n, FILE *__restrict __stream) __wur;
-: 301:extern char *__REDIRECT (__fgets_unlocked_alias,
-: 302: (char *__restrict __s, int __n,
-: 303: FILE *__restrict __stream), fgets_unlocked) __wur;
-: 304:extern char *__REDIRECT (__fgets_unlocked_chk_warn,
-: 305: (char *__restrict __s, size_t __size, int __n,
-: 306: FILE *__restrict __stream), __fgets_unlocked_chk)
-: 307: __wur __warnattr ("fgets_unlocked called with bigger size than length "
-: 308: "of destination buffer");
-: 309:
-: 310:__fortify_function __wur char *
-: 311:fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream)
-: 312:{
-: 313: if (__bos (__s) != (size_t) -1)
-: 314: {
-: 315: if (!__builtin_constant_p (__n) || __n <= 0)
-: 316: return __fgets_unlocked_chk (__s, __bos (__s), __n, __stream);
-: 317:
-: 318: if ((size_t) __n > __bos (__s))
-: 319: return __fgets_unlocked_chk_warn (__s, __bos (__s), __n, __stream);
-: 320: }
-: 321: return __fgets_unlocked_alias (__s, __n, __stream);
-: 322:}
-: 323:#endif
-: 324:
-: 325:#ifdef __USE_MISC
-: 326:# undef fread_unlocked
-: 327:extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen,
-: 328: size_t __size, size_t __n,
-: 329: FILE *__restrict __stream) __wur;
-: 330:extern size_t __REDIRECT (__fread_unlocked_alias,
-: 331: (void *__restrict __ptr, size_t __size,
-: 332: size_t __n, FILE *__restrict __stream),
-: 333: fread_unlocked) __wur;
-: 334:extern size_t __REDIRECT (__fread_unlocked_chk_warn,
-: 335: (void *__restrict __ptr, size_t __ptrlen,
-: 336: size_t __size, size_t __n,
-: 337: FILE *__restrict __stream),
-: 338: __fread_unlocked_chk)
-: 339: __wur __warnattr ("fread_unlocked called with bigger size * nmemb than "
-: 340: "length of destination buffer");
-: 341:
-: 342:__fortify_function __wur size_t
-: 343:fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n,
-: 344: FILE *__restrict __stream)
-: 345:{
-: 346: if (__bos0 (__ptr) != (size_t) -1)
-: 347: {
-: 348: if (!__builtin_constant_p (__size)
-: 349: || !__builtin_constant_p (__n)
-: 350: || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
-: 351: return __fread_unlocked_chk (__ptr, __bos0 (__ptr), __size, __n,
-: 352: __stream);
-: 353:
-: 354: if (__size * __n > __bos0 (__ptr))
-: 355: return __fread_unlocked_chk_warn (__ptr, __bos0 (__ptr), __size, __n,
-: 356: __stream);
-: 357: }
-: 358:
-: 359:# ifdef __USE_EXTERN_INLINES
-: 360: if (__builtin_constant_p (__size)
-: 361: && __builtin_constant_p (__n)
-: 362: && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2))
-: 363: && __size * __n <= 8)
-: 364: {
-: 365: size_t __cnt = __size * __n;
-: 366: char *__cptr = (char *) __ptr;
-: 367: if (__cnt == 0)
-: 368: return 0;
-: 369:
-: 370: for (; __cnt > 0; --__cnt)
-: 371: {
-: 372: int __c = _IO_getc_unlocked (__stream);
-: 373: if (__c == EOF)
-: 374: break;
-: 375: *__cptr++ = __c;
-: 376: }
-: 377: return (__cptr - (char *) __ptr) / __size;
-: 378: }
-: 379:# endif
-: 380: return __fread_unlocked_alias (__ptr, __size, __n, __stream);
-: 381:}
-: 382:#endif
<<<<<< EOF