| @@ -622,7 +622,7 @@ otfupem(Otf *o) · 621 unmodified lines |
| 622 | int | 622 | int |
| 623 | read_SubHeader(Otf *o, SubHeader *v) | 623 | read_SubHeader(Otf *o, SubHeader *v) |
| 624 | { | 624 | { |
| 625 | u8int *b; | 625 | u8int *b = nil; USED(b); |
| 626 | if((b = otfreadn(o, 8)) == nil) | 626 | if((b = otfreadn(o, 8)) == nil) |
| 627 | goto err; | 627 | goto err; |
| 628 | v->firstCode = b[0]<<8 | b[1]; | 628 | v->firstCode = b[0]<<8 | b[1]; |
| @@ -648,7 +648,7 @@ print_SubHeader(Otfile *f, int indent, Otf *o, SubHeader *v) · 19 unmodified lines |
| 648 | int | 648 | int |
| 649 | read_MapGroup(Otf *o, MapGroup *v) | 649 | read_MapGroup(Otf *o, MapGroup *v) |
| 650 | { | 650 | { |
| 651 | u8int *b; | 651 | u8int *b = nil; USED(b); |
| 652 | if((b = otfreadn(o, 12)) == nil) | 652 | if((b = otfreadn(o, 12)) == nil) |
| 653 | goto err; | 653 | goto err; |
| 654 | v->startCharCode = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; | 654 | v->startCharCode = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; |
| @@ -672,7 +672,7 @@ print_MapGroup(Otfile *f, int indent, Otf *o, MapGroup *v) · 17 unmodified lines |
| 672 | int | 672 | int |
| 673 | read_SubtableCmap0(Otf *o, SubtableCmap0 *v) | 673 | read_SubtableCmap0(Otf *o, SubtableCmap0 *v) |
| 674 | { | 674 | { |
| 675 | u8int *b; | 675 | u8int *b = nil; USED(b); |
| 676 | if((b = otfreadn(o, 260)) == nil) | 676 | if((b = otfreadn(o, 260)) == nil) |
| 677 | goto err; | 677 | goto err; |
| 678 | v->length = b[0]<<8 | b[1]; | 678 | v->length = b[0]<<8 | b[1]; |
| @@ -698,7 +698,7 @@ print_SubtableCmap0(Otfile *f, int indent, Otf *o, SubtableCmap0 *v) · 19 unmodified lines |
| 698 | int | 698 | int |
| 699 | read_SubtableCmap2(Otf *o, SubtableCmap2 *v) | 699 | read_SubtableCmap2(Otf *o, SubtableCmap2 *v) |
| 700 | { | 700 | { |
| 701 | u8int *b; | 701 | u8int *b = nil; USED(b); |
| 702 | if((b = otfreadn(o, 516)) == nil) | 702 | if((b = otfreadn(o, 516)) == nil) |
| 703 | goto err; | 703 | goto err; |
| 704 | v->length = b[0]<<8 | b[1]; | 704 | v->length = b[0]<<8 | b[1]; |
| @@ -724,7 +724,7 @@ print_SubtableCmap2(Otfile *f, int indent, Otf *o, SubtableCmap2 *v) · 19 unmodified lines |
| 724 | int | 724 | int |
| 725 | read_SubtableCmap4(Otf *o, SubtableCmap4 *v) | 725 | read_SubtableCmap4(Otf *o, SubtableCmap4 *v) |
| 726 | { | 726 | { |
| 727 | u8int *b; | 727 | u8int *b = nil; USED(b); |
| 728 | if((b = otfreadn(o, 12)) == nil) | 728 | if((b = otfreadn(o, 12)) == nil) |
| 729 | goto err; | 729 | goto err; |
| 730 | v->length = b[0]<<8 | b[1]; | 730 | v->length = b[0]<<8 | b[1]; |
| @@ -785,7 +785,7 @@ print_SubtableCmap4(Otfile *f, int indent, Otf *o, SubtableCmap4 *v) · 54 unmodified lines |
| 785 | int | 785 | int |
| 786 | read_SubtableCmap6(Otf *o, SubtableCmap6 *v) | 786 | read_SubtableCmap6(Otf *o, SubtableCmap6 *v) |
| 787 | { | 787 | { |
| 788 | u8int *b; | 788 | u8int *b = nil; USED(b); |
| 789 | if((b = otfreadn(o, 8)) == nil) | 789 | if((b = otfreadn(o, 8)) == nil) |
| 790 | goto err; | 790 | goto err; |
| 791 | v->length = b[0]<<8 | b[1]; | 791 | v->length = b[0]<<8 | b[1]; |
| @@ -818,7 +818,7 @@ print_SubtableCmap6(Otfile *f, int indent, Otf *o, SubtableCmap6 *v) · 26 unmodified lines |
| 818 | int | 818 | int |
| 819 | read_SubtableCmap8(Otf *o, SubtableCmap8 *v) | 819 | read_SubtableCmap8(Otf *o, SubtableCmap8 *v) |
| 820 | { | 820 | { |
| 821 | u8int *b; | 821 | u8int *b = nil; USED(b); |
| 822 | if((b = otfreadn(o, 8200)) == nil) | 822 | if((b = otfreadn(o, 8200)) == nil) |
| 823 | goto err; | 823 | goto err; |
| 824 | v->length = b[0]<<8 | b[1]; | 824 | v->length = b[0]<<8 | b[1]; |
| @@ -854,7 +854,7 @@ print_SubtableCmap8(Otfile *f, int indent, Otf *o, SubtableCmap8 *v) · 29 unmodified lines |
| 854 | int | 854 | int |
| 855 | read_SubtableCmap10(Otf *o, SubtableCmap10 *v) | 855 | read_SubtableCmap10(Otf *o, SubtableCmap10 *v) |
| 856 | { | 856 | { |
| 857 | u8int *b; | 857 | u8int *b = nil; USED(b); |
| 858 | if((b = otfreadn(o, 18)) == nil) | 858 | if((b = otfreadn(o, 18)) == nil) |
| 859 | goto err; | 859 | goto err; |
| 860 | v->reserved = b[0]<<8 | b[1]; | 860 | v->reserved = b[0]<<8 | b[1]; |
| @@ -882,7 +882,7 @@ print_SubtableCmap10(Otfile *f, int indent, Otf *o, SubtableCmap10 *v) · 21 unmodified lines |
| 882 | int | 882 | int |
| 883 | read_SubtableCmap12or13(Otf *o, SubtableCmap12or13 *v) | 883 | read_SubtableCmap12or13(Otf *o, SubtableCmap12or13 *v) |
| 884 | { | 884 | { |
| 885 | u8int *b; | 885 | u8int *b = nil; USED(b); |
| 886 | if((b = otfreadn(o, 14)) == nil) | 886 | if((b = otfreadn(o, 14)) == nil) |
| 887 | goto err; | 887 | goto err; |
| 888 | v->reserved = b[0]<<8 | b[1]; | 888 | v->reserved = b[0]<<8 | b[1]; |
| @@ -916,7 +916,7 @@ print_SubtableCmap12or13(Otfile *f, int indent, Otf *o, SubtableCmap12or13 *v) · 27 unmodified lines |
| 916 | int | 916 | int |
| 917 | read_UnicodeRange(Otf *o, UnicodeRange *v) | 917 | read_UnicodeRange(Otf *o, UnicodeRange *v) |
| 918 | { | 918 | { |
| 919 | u8int *b; | 919 | u8int *b = nil; USED(b); |
| 920 | if((b = otfreadn(o, 4)) == nil) | 920 | if((b = otfreadn(o, 4)) == nil) |
| 921 | goto err; | 921 | goto err; |
| 922 | v->startUnicodeValue = b[0]<<16 | b[1]<<8 | b[2]; | 922 | v->startUnicodeValue = b[0]<<16 | b[1]<<8 | b[2]; |
| @@ -938,7 +938,7 @@ print_UnicodeRange(Otfile *f, int indent, Otf *o, UnicodeRange *v) · 15 unmodified lines |
| 938 | int | 938 | int |
| 939 | read_DefaultUVS(Otf *o, DefaultUVS *v) | 939 | read_DefaultUVS(Otf *o, DefaultUVS *v) |
| 940 | { | 940 | { |
| 941 | u8int *b; | 941 | u8int *b = nil; USED(b); |
| 942 | if((b = otfreadn(o, 4)) == nil) | 942 | if((b = otfreadn(o, 4)) == nil) |
| 943 | goto err; | 943 | goto err; |
| 944 | v->numUnicodeValueRanges = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; | 944 | v->numUnicodeValueRanges = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; |
| @@ -966,7 +966,7 @@ print_DefaultUVS(Otfile *f, int indent, Otf *o, DefaultUVS *v) · 21 unmodified lines |
| 966 | int | 966 | int |
| 967 | read_UVSMapping(Otf *o, UVSMapping *v) | 967 | read_UVSMapping(Otf *o, UVSMapping *v) |
| 968 | { | 968 | { |
| 969 | u8int *b; | 969 | u8int *b = nil; USED(b); |
| 970 | if((b = otfreadn(o, 5)) == nil) | 970 | if((b = otfreadn(o, 5)) == nil) |
| 971 | goto err; | 971 | goto err; |
| 972 | v->unicodeValue = b[0]<<16 | b[1]<<8 | b[2]; | 972 | v->unicodeValue = b[0]<<16 | b[1]<<8 | b[2]; |
| @@ -988,7 +988,7 @@ print_UVSMapping(Otfile *f, int indent, Otf *o, UVSMapping *v) · 15 unmodified lines |
| 988 | int | 988 | int |
| 989 | read_NonDefaultUVS(Otf *o, NonDefaultUVS *v) | 989 | read_NonDefaultUVS(Otf *o, NonDefaultUVS *v) |
| 990 | { | 990 | { |
| 991 | u8int *b; | 991 | u8int *b = nil; USED(b); |
| 992 | if((b = otfreadn(o, 4)) == nil) | 992 | if((b = otfreadn(o, 4)) == nil) |
| 993 | goto err; | 993 | goto err; |
| 994 | v->numUVSMappings = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; | 994 | v->numUVSMappings = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; |
| @@ -1016,7 +1016,7 @@ print_NonDefaultUVS(Otfile *f, int indent, Otf *o, NonDefaultUVS *v) · 21 unmodified lines |
| 1016 | int | 1016 | int |
| 1017 | read_VariationSelector(Otf *o, VariationSelector *v) | 1017 | read_VariationSelector(Otf *o, VariationSelector *v) |
| 1018 | { | 1018 | { |
| 1019 | u8int *b; | 1019 | u8int *b = nil; USED(b); |
| 1020 | if((b = otfreadn(o, 11)) == nil) | 1020 | if((b = otfreadn(o, 11)) == nil) |
| 1021 | goto err; | 1021 | goto err; |
| 1022 | v->varSelector = b[0]<<16 | b[1]<<8 | b[2]; | 1022 | v->varSelector = b[0]<<16 | b[1]<<8 | b[2]; |
| @@ -1068,7 +1068,7 @@ print_VariationSelector(Otfile *f, int indent, Otf *o, VariationSelector *v) · 45 unmodified lines |
| 1068 | int | 1068 | int |
| 1069 | read_SubtableCmap14(Otf *o, SubtableCmap14 *v) | 1069 | read_SubtableCmap14(Otf *o, SubtableCmap14 *v) |
| 1070 | { | 1070 | { |
| 1071 | u8int *b; | 1071 | u8int *b = nil; USED(b); |
| 1072 | if((b = otfreadn(o, 8)) == nil) | 1072 | if((b = otfreadn(o, 8)) == nil) |
| 1073 | goto err; | 1073 | goto err; |
| 1074 | v->length = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; | 1074 | v->length = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; |
| @@ -1098,7 +1098,7 @@ print_SubtableCmap14(Otfile *f, int indent, Otf *o, SubtableCmap14 *v) · 23 unmodified lines |
| 1098 | int | 1098 | int |
| 1099 | read_SubtableCmap(Otf *o, SubtableCmap *v) | 1099 | read_SubtableCmap(Otf *o, SubtableCmap *v) |
| 1100 | { | 1100 | { |
| 1101 | u8int *b; | 1101 | u8int *b = nil; USED(b); |
| 1102 | if((b = otfreadn(o, 2)) == nil) | 1102 | if((b = otfreadn(o, 2)) == nil) |
| 1103 | goto err; | 1103 | goto err; |
| 1104 | v->format = b[0]<<8 | b[1]; | 1104 | v->format = b[0]<<8 | b[1]; |
| @@ -1202,7 +1202,7 @@ print_SubtableCmap(Otfile *f, int indent, Otf *o, SubtableCmap *v) · 97 unmodified lines |
| 1202 | int | 1202 | int |
| 1203 | read_EncodingRecord(Otf *o, EncodingRecord *v) | 1203 | read_EncodingRecord(Otf *o, EncodingRecord *v) |
| 1204 | { | 1204 | { |
| 1205 | u8int *b; | 1205 | u8int *b = nil; USED(b); |
| 1206 | if((b = otfreadn(o, 8)) == nil) | 1206 | if((b = otfreadn(o, 8)) == nil) |
| 1207 | goto err; | 1207 | goto err; |
| 1208 | v->platformID = b[0]<<8 | b[1]; | 1208 | v->platformID = b[0]<<8 | b[1]; |
| @@ -1244,7 +1244,7 @@ print_EncodingRecord(Otfile *f, int indent, Otf *o, EncodingRecord *v) · 35 unmodified lines |
| 1244 | int | 1244 | int |
| 1245 | read_TableCmap(Otf *o, TableCmap *v) | 1245 | read_TableCmap(Otf *o, TableCmap *v) |
| 1246 | { | 1246 | { |
| 1247 | u8int *b; | 1247 | u8int *b = nil; USED(b); |
| 1248 | if((b = otfreadn(o, 4)) == nil) | 1248 | if((b = otfreadn(o, 4)) == nil) |
| 1249 | goto err; | 1249 | goto err; |
| 1250 | u16int version = b[0]<<8 | b[1]; | 1250 | u16int version = b[0]<<8 | b[1]; |
| @@ -1277,7 +1277,7 @@ print_TableCmap(Otfile *f, int indent, Otf *o, TableCmap *v) · 26 unmodified lines |
| 1277 | int | 1277 | int |
| 1278 | read_TableHead(Otf *o, TableHead *v) | 1278 | read_TableHead(Otf *o, TableHead *v) |
| 1279 | { | 1279 | { |
| 1280 | u8int *b; | 1280 | u8int *b = nil; USED(b); |
| 1281 | if((b = otfreadn(o, 54)) == nil) | 1281 | if((b = otfreadn(o, 54)) == nil) |
| 1282 | goto err; | 1282 | goto err; |
| 1283 | u16int majorVersion = b[0]<<8 | b[1]; | 1283 | u16int majorVersion = b[0]<<8 | b[1]; |
| @@ -1351,7 +1351,7 @@ print_TableHead(Otfile *f, int indent, Otf *o, TableHead *v) · 67 unmodified lines |
| 1351 | int | 1351 | int |
| 1352 | read_TableHhea(Otf *o, TableHhea *v) | 1352 | read_TableHhea(Otf *o, TableHhea *v) |
| 1353 | { | 1353 | { |
| 1354 | u8int *b; | 1354 | u8int *b = nil; USED(b); |
| 1355 | if((b = otfreadn(o, 36)) == nil) | 1355 | if((b = otfreadn(o, 36)) == nil) |
| 1356 | goto err; | 1356 | goto err; |
| 1357 | v->majorVersion = b[0]<<8 | b[1]; | 1357 | v->majorVersion = b[0]<<8 | b[1]; |
| @@ -1410,7 +1410,7 @@ print_TableHhea(Otfile *f, int indent, Otf *o, TableHhea *v) · 52 unmodified lines |
| 1410 | int | 1410 | int |
| 1411 | read_Glyf(Otf *o, Glyf *v) | 1411 | read_Glyf(Otf *o, Glyf *v) |
| 1412 | { | 1412 | { |
| 1413 | u8int *b; | 1413 | u8int *b = nil; USED(b); |
| 1414 | if((b = otfreadn(o, 10)) == nil) | 1414 | if((b = otfreadn(o, 10)) == nil) |
| 1415 | goto err; | 1415 | goto err; |
| 1416 | v->numberOfContours = b[0]<<8 | b[1]; | 1416 | v->numberOfContours = b[0]<<8 | b[1]; |
| @@ -1450,7 +1450,7 @@ print_Glyf(Otfile *f, int indent, Otf *o, Glyf *v) · 33 unmodified lines |
| 1450 | int | 1450 | int |
| 1451 | read_LongHorMetric(Otf *o, LongHorMetric *v) | 1451 | read_LongHorMetric(Otf *o, LongHorMetric *v) |
| 1452 | { | 1452 | { |
| 1453 | u8int *b; | 1453 | u8int *b = nil; USED(b); |
| 1454 | if((b = otfreadn(o, 4)) == nil) | 1454 | if((b = otfreadn(o, 4)) == nil) |
| 1455 | goto err; | 1455 | goto err; |
| 1456 | v->advanceWidth = b[0]<<8 | b[1]; | 1456 | v->advanceWidth = b[0]<<8 | b[1]; |
| @@ -1472,7 +1472,7 @@ print_LongHorMetric(Otfile *f, int indent, Otf *o, LongHorMetric *v) · 15 unmodified lines |
| 1472 | int | 1472 | int |
| 1473 | read_TableMaxp(Otf *o, TableMaxp *v) | 1473 | read_TableMaxp(Otf *o, TableMaxp *v) |
| 1474 | { | 1474 | { |
| 1475 | u8int *b; | 1475 | u8int *b = nil; USED(b); |
| 1476 | if((b = otfreadn(o, 6)) == nil) | 1476 | if((b = otfreadn(o, 6)) == nil) |
| 1477 | goto err; | 1477 | goto err; |
| 1478 | u32int version = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; | 1478 | u32int version = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; |
| @@ -1498,7 +1498,7 @@ print_TableMaxp(Otfile *f, int indent, Otf *o, TableMaxp *v) · 19 unmodified lines |
| 1498 | int | 1498 | int |
| 1499 | read_TableHmtx(Otf *o, TableHmtx *v) | 1499 | read_TableHmtx(Otf *o, TableHmtx *v) |
| 1500 | { | 1500 | { |
| 1501 | u8int *b; | 1501 | u8int *b = nil; USED(b); |
| 1502 | if(otfarray(o, &v->hMetrics, read_LongHorMetric, sizeof(LongHorMetric), o->numberOfHMetrics) < 0){ | 1502 | if(otfarray(o, &v->hMetrics, read_LongHorMetric, sizeof(LongHorMetric), o->numberOfHMetrics) < 0){ |
| 1503 | werrstr("%s: %r", "hMetrics"); | 1503 | werrstr("%s: %r", "hMetrics"); |
| 1504 | goto err; | 1504 | goto err; |
| @@ -1529,7 +1529,7 @@ print_TableHmtx(Otfile *f, int indent, Otf *o, TableHmtx *v) · 24 unmodified lines |
| 1529 | int | 1529 | int |
| 1530 | read_TablePost(Otf *o, TablePost *v) | 1530 | read_TablePost(Otf *o, TablePost *v) |
| 1531 | { | 1531 | { |
| 1532 | u8int *b; | 1532 | u8int *b = nil; USED(b); |
| 1533 | if((b = otfreadn(o, 16)) == nil) | 1533 | if((b = otfreadn(o, 16)) == nil) |
| 1534 | goto err; | 1534 | goto err; |
| 1535 | u32int version = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; | 1535 | u32int version = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; |
| @@ -1560,7 +1560,7 @@ print_TablePost(Otfile *f, int indent, Otf *o, TablePost *v) · 24 unmodified lines |
| 1560 | int | 1560 | int |
| 1561 | read_NameRecord(Otf *o, NameRecord *v) | 1561 | read_NameRecord(Otf *o, NameRecord *v) |
| 1562 | { | 1562 | { |
| 1563 | u8int *b; | 1563 | u8int *b = nil; USED(b); |
| 1564 | if((b = otfreadn(o, 12)) == nil) | 1564 | if((b = otfreadn(o, 12)) == nil) |
| 1565 | goto err; | 1565 | goto err; |
| 1566 | v->platformID = b[0]<<8 | b[1]; | 1566 | v->platformID = b[0]<<8 | b[1]; |
| @@ -1602,7 +1602,7 @@ print_NameRecord(Otfile *f, int indent, Otf *o, NameRecord *v) · 35 unmodified lines |
| 1602 | int | 1602 | int |
| 1603 | read_LangTagRecord(Otf *o, LangTagRecord *v) | 1603 | read_LangTagRecord(Otf *o, LangTagRecord *v) |
| 1604 | { | 1604 | { |
| 1605 | u8int *b; | 1605 | u8int *b = nil; USED(b); |
| 1606 | if((b = otfreadn(o, 4)) == nil) | 1606 | if((b = otfreadn(o, 4)) == nil) |
| 1607 | goto err; | 1607 | goto err; |
| 1608 | v->length = b[0]<<8 | b[1]; | 1608 | v->length = b[0]<<8 | b[1]; |
| @@ -1635,7 +1635,7 @@ print_LangTagRecord(Otfile *f, int indent, Otf *o, LangTagRecord *v) · 26 unmodified lines |
| 1635 | int | 1635 | int |
| 1636 | read_TableName(Otf *o, TableName *v) | 1636 | read_TableName(Otf *o, TableName *v) |
| 1637 | { | 1637 | { |
| 1638 | u8int *b; | 1638 | u8int *b = nil; USED(b); |
| 1639 | if((b = otfreadn(o, 6)) == nil) | 1639 | if((b = otfreadn(o, 6)) == nil) |
| 1640 | goto err; | 1640 | goto err; |
| 1641 | v->version = b[0]<<8 | b[1]; | 1641 | v->version = b[0]<<8 | b[1]; |
| @@ -1691,7 +1691,7 @@ print_TableName(Otfile *f, int indent, Otf *o, TableName *v) · 49 unmodified lines |
| 1691 | int | 1691 | int |
| 1692 | read_BigGlyphMetrics(Otf *o, BigGlyphMetrics *v) | 1692 | read_BigGlyphMetrics(Otf *o, BigGlyphMetrics *v) |
| 1693 | { | 1693 | { |
| 1694 | u8int *b; | 1694 | u8int *b = nil; USED(b); |
| 1695 | if((b = otfreadn(o, 8)) == nil) | 1695 | if((b = otfreadn(o, 8)) == nil) |
| 1696 | goto err; | 1696 | goto err; |
| 1697 | v->height = b[0]; | 1697 | v->height = b[0]; |
| @@ -1725,7 +1725,7 @@ print_BigGlyphMetrics(Otfile *f, int indent, Otf *o, BigGlyphMetrics *v) · 27 unmodified lines |
| 1725 | int | 1725 | int |
| 1726 | read_SmallGlyphMetrics(Otf *o, SmallGlyphMetrics *v) | 1726 | read_SmallGlyphMetrics(Otf *o, SmallGlyphMetrics *v) |
| 1727 | { | 1727 | { |
| 1728 | u8int *b; | 1728 | u8int *b = nil; USED(b); |
| 1729 | if((b = otfreadn(o, 5)) == nil) | 1729 | if((b = otfreadn(o, 5)) == nil) |
| 1730 | goto err; | 1730 | goto err; |
| 1731 | v->height = b[0]; | 1731 | v->height = b[0]; |
| @@ -1753,7 +1753,7 @@ print_SmallGlyphMetrics(Otfile *f, int indent, Otf *o, SmallGlyphMetrics *v) · 21 unmodified lines |
| 1753 | int | 1753 | int |
| 1754 | read_SbitLineMetrics(Otf *o, SbitLineMetrics *v) | 1754 | read_SbitLineMetrics(Otf *o, SbitLineMetrics *v) |
| 1755 | { | 1755 | { |
| 1756 | u8int *b; | 1756 | u8int *b = nil; USED(b); |
| 1757 | if((b = otfreadn(o, 12)) == nil) | 1757 | if((b = otfreadn(o, 12)) == nil) |
| 1758 | goto err; | 1758 | goto err; |
| 1759 | v->ascender = b[0]; | 1759 | v->ascender = b[0]; |
| @@ -1791,7 +1791,7 @@ print_SbitLineMetrics(Otfile *f, int indent, Otf *o, SbitLineMetrics *v) · 31 unmodified lines |
| 1791 | int | 1791 | int |
| 1792 | read_IndexSubtable1(Otf *o, IndexSubtable1 *v) | 1792 | read_IndexSubtable1(Otf *o, IndexSubtable1 *v) |
| 1793 | { | 1793 | { |
| 1794 | u8int *b; | 1794 | u8int *b = nil; USED(b); |
| 1795 | if((b = otfreadn(o, ((o->lastGlyphIndex-o->firstGlyphIndex)+2)*4)) == nil) | 1795 | if((b = otfreadn(o, ((o->lastGlyphIndex-o->firstGlyphIndex)+2)*4)) == nil) |
| 1796 | goto err; | 1796 | goto err; |
| 1797 | v->sbitOffsets = malloc(((o->lastGlyphIndex-o->firstGlyphIndex)+2)*sizeof(*v->sbitOffsets)); | 1797 | v->sbitOffsets = malloc(((o->lastGlyphIndex-o->firstGlyphIndex)+2)*sizeof(*v->sbitOffsets)); |
| @@ -1814,7 +1814,7 @@ print_IndexSubtable1(Otfile *f, int indent, Otf *o, IndexSubtable1 *v) · 16 unmodified lines |
| 1814 | int | 1814 | int |
| 1815 | read_IndexSubtable2(Otf *o, IndexSubtable2 *v) | 1815 | read_IndexSubtable2(Otf *o, IndexSubtable2 *v) |
| 1816 | { | 1816 | { |
| 1817 | u8int *b; | 1817 | u8int *b = nil; USED(b); |
| 1818 | if((b = otfreadn(o, 4)) == nil) | 1818 | if((b = otfreadn(o, 4)) == nil) |
| 1819 | goto err; | 1819 | goto err; |
| 1820 | v->imageSize = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; | 1820 | v->imageSize = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; |
| @@ -1840,7 +1840,7 @@ print_IndexSubtable2(Otfile *f, int indent, Otf *o, IndexSubtable2 *v) · 19 unmodified lines |
| 1840 | int | 1840 | int |
| 1841 | read_IndexSubtable3(Otf *o, IndexSubtable3 *v) | 1841 | read_IndexSubtable3(Otf *o, IndexSubtable3 *v) |
| 1842 | { | 1842 | { |
| 1843 | u8int *b; | 1843 | u8int *b = nil; USED(b); |
| 1844 | if((b = otfreadn(o, ((o->lastGlyphIndex-o->firstGlyphIndex)+2)*2)) == nil) | 1844 | if((b = otfreadn(o, ((o->lastGlyphIndex-o->firstGlyphIndex)+2)*2)) == nil) |
| 1845 | goto err; | 1845 | goto err; |
| 1846 | v->sbitOffsets = malloc(((o->lastGlyphIndex-o->firstGlyphIndex)+2)*sizeof(*v->sbitOffsets)); | 1846 | v->sbitOffsets = malloc(((o->lastGlyphIndex-o->firstGlyphIndex)+2)*sizeof(*v->sbitOffsets)); |
| @@ -1863,7 +1863,7 @@ print_IndexSubtable3(Otfile *f, int indent, Otf *o, IndexSubtable3 *v) · 16 unmodified lines |
| 1863 | int | 1863 | int |
| 1864 | read_GlyphIdOffsetPair(Otf *o, GlyphIdOffsetPair *v) | 1864 | read_GlyphIdOffsetPair(Otf *o, GlyphIdOffsetPair *v) |
| 1865 | { | 1865 | { |
| 1866 | u8int *b; | 1866 | u8int *b = nil; USED(b); |
| 1867 | if((b = otfreadn(o, 4)) == nil) | 1867 | if((b = otfreadn(o, 4)) == nil) |
| 1868 | goto err; | 1868 | goto err; |
| 1869 | v->glyphID = b[0]<<8 | b[1]; | 1869 | v->glyphID = b[0]<<8 | b[1]; |
| @@ -1885,7 +1885,7 @@ print_GlyphIdOffsetPair(Otfile *f, int indent, Otf *o, GlyphIdOffsetPair *v) · 15 unmodified lines |
| 1885 | int | 1885 | int |
| 1886 | read_IndexSubtable4(Otf *o, IndexSubtable4 *v) | 1886 | read_IndexSubtable4(Otf *o, IndexSubtable4 *v) |
| 1887 | { | 1887 | { |
| 1888 | u8int *b; | 1888 | u8int *b = nil; USED(b); |
| 1889 | if((b = otfreadn(o, 4)) == nil) | 1889 | if((b = otfreadn(o, 4)) == nil) |
| 1890 | goto err; | 1890 | goto err; |
| 1891 | v->numGlyphs = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; | 1891 | v->numGlyphs = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; |
| @@ -1913,7 +1913,7 @@ print_IndexSubtable4(Otfile *f, int indent, Otf *o, IndexSubtable4 *v) · 21 unmodified lines |
| 1913 | int | 1913 | int |
| 1914 | read_IndexSubtable5(Otf *o, IndexSubtable5 *v) | 1914 | read_IndexSubtable5(Otf *o, IndexSubtable5 *v) |
| 1915 | { | 1915 | { |
| 1916 | u8int *b; | 1916 | u8int *b = nil; USED(b); |
| 1917 | if((b = otfreadn(o, 4)) == nil) | 1917 | if((b = otfreadn(o, 4)) == nil) |
| 1918 | goto err; | 1918 | goto err; |
| 1919 | v->imageSize = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; | 1919 | v->imageSize = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; |
| @@ -1950,7 +1950,7 @@ print_IndexSubtable5(Otfile *f, int indent, Otf *o, IndexSubtable5 *v) · 30 unmodified lines |
| 1950 | int | 1950 | int |
| 1951 | read_IndexSubtable(Otf *o, IndexSubtable *v) | 1951 | read_IndexSubtable(Otf *o, IndexSubtable *v) |
| 1952 | { | 1952 | { |
| 1953 | u8int *b; | 1953 | u8int *b = nil; USED(b); |
| 1954 | if((b = otfreadn(o, 8)) == nil) | 1954 | if((b = otfreadn(o, 8)) == nil) |
| 1955 | goto err; | 1955 | goto err; |
| 1956 | v->indexFormat = b[0]<<8 | b[1]; | 1956 | v->indexFormat = b[0]<<8 | b[1]; |
| @@ -2028,7 +2028,7 @@ print_IndexSubtable(Otfile *f, int indent, Otf *o, IndexSubtable *v) · 71 unmodified lines |
| 2028 | int | 2028 | int |
| 2029 | read_IndexSubtableRecord(Otf *o, IndexSubtableRecord *v) | 2029 | read_IndexSubtableRecord(Otf *o, IndexSubtableRecord *v) |
| 2030 | { | 2030 | { |
| 2031 | u8int *b; | 2031 | u8int *b = nil; USED(b); |
| 2032 | if((b = otfreadn(o, 8)) == nil) | 2032 | if((b = otfreadn(o, 8)) == nil) |
| 2033 | goto err; | 2033 | goto err; |
| 2034 | v->firstGlyphIndex = b[0]<<8 | b[1]; | 2034 | v->firstGlyphIndex = b[0]<<8 | b[1]; |
| @@ -2068,7 +2068,7 @@ print_IndexSubtableRecord(Otfile *f, int indent, Otf *o, IndexSubtableRecord *v) · 33 unmodified lines |
| 2068 | int | 2068 | int |
| 2069 | read_BitmapSize(Otf *o, BitmapSize *v) | 2069 | read_BitmapSize(Otf *o, BitmapSize *v) |
| 2070 | { | 2070 | { |
| 2071 | u8int *b; | 2071 | u8int *b = nil; USED(b); |
| 2072 | if((b = otfreadn(o, 16)) == nil) | 2072 | if((b = otfreadn(o, 16)) == nil) |
| 2073 | goto err; | 2073 | goto err; |
| 2074 | v->indexSubtableListOffset = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; | 2074 | v->indexSubtableListOffset = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; |
| @@ -2132,7 +2132,7 @@ print_BitmapSize(Otfile *f, int indent, Otf *o, BitmapSize *v) · 57 unmodified lines |
| 2132 | int | 2132 | int |
| 2133 | read_TableEBDT(Otf *o, TableEBDT *v) | 2133 | read_TableEBDT(Otf *o, TableEBDT *v) |
| 2134 | { | 2134 | { |
| 2135 | u8int *b; | 2135 | u8int *b = nil; USED(b); |
| 2136 | if((b = otfreadn(o, 4)) == nil) | 2136 | if((b = otfreadn(o, 4)) == nil) |
| 2137 | goto err; | 2137 | goto err; |
| 2138 | v->majorVersion = b[0]<<8 | b[1]; | 2138 | v->majorVersion = b[0]<<8 | b[1]; |
| @@ -2161,7 +2161,7 @@ print_TableEBDT(Otfile *f, int indent, Otf *o, TableEBDT *v) · 22 unmodified lines |
| 2161 | int | 2161 | int |
| 2162 | read_TableEBLC(Otf *o, TableEBLC *v) | 2162 | read_TableEBLC(Otf *o, TableEBLC *v) |
| 2163 | { | 2163 | { |
| 2164 | u8int *b; | 2164 | u8int *b = nil; USED(b); |
| 2165 | if((b = otfreadn(o, 8)) == nil) | 2165 | if((b = otfreadn(o, 8)) == nil) |
| 2166 | goto err; | 2166 | goto err; |
| 2167 | u16int majorVersion = b[0]<<8 | b[1]; | 2167 | u16int majorVersion = b[0]<<8 | b[1]; |
| @@ -2199,7 +2199,7 @@ print_TableEBLC(Otfile *f, int indent, Otf *o, TableEBLC *v) · 31 unmodified lines |
| 2199 | int | 2199 | int |
| 2200 | read_AttachList(Otf *o, AttachList *v) | 2200 | read_AttachList(Otf *o, AttachList *v) |
| 2201 | { | 2201 | { |
| 2202 | u8int *b; | 2202 | u8int *b = nil; USED(b); |
| 2203 | if((b = otfreadn(o, 4)) == nil) | 2203 | if((b = otfreadn(o, 4)) == nil) |
| 2204 | goto err; | 2204 | goto err; |
| 2205 | v->coverageOffset = b[0]<<8 | b[1]; | 2205 | v->coverageOffset = b[0]<<8 | b[1]; |
| @@ -2228,7 +2228,7 @@ print_AttachList(Otfile *f, int indent, Otf *o, AttachList *v) · 22 unmodified lines |
| 2228 | int | 2228 | int |
| 2229 | read_AttachPoint(Otf *o, AttachPoint *v) | 2229 | read_AttachPoint(Otf *o, AttachPoint *v) |
| 2230 | { | 2230 | { |
| 2231 | u8int *b; | 2231 | u8int *b = nil; USED(b); |
| 2232 | if((b = otfreadn(o, 2)) == nil) | 2232 | if((b = otfreadn(o, 2)) == nil) |
| 2233 | goto err; | 2233 | goto err; |
| 2234 | v->pointCount = b[0]<<8 | b[1]; | 2234 | v->pointCount = b[0]<<8 | b[1]; |
| @@ -2255,7 +2255,7 @@ print_AttachPoint(Otfile *f, int indent, Otf *o, AttachPoint *v) · 20 unmodified lines |
| 2255 | int | 2255 | int |
| 2256 | read_LigCaretList(Otf *o, LigCaretList *v) | 2256 | read_LigCaretList(Otf *o, LigCaretList *v) |
| 2257 | { | 2257 | { |
| 2258 | u8int *b; | 2258 | u8int *b = nil; USED(b); |
| 2259 | if((b = otfreadn(o, 4)) == nil) | 2259 | if((b = otfreadn(o, 4)) == nil) |
| 2260 | goto err; | 2260 | goto err; |
| 2261 | v->coverageOffset = b[0]<<8 | b[1]; | 2261 | v->coverageOffset = b[0]<<8 | b[1]; |
| @@ -2284,7 +2284,7 @@ print_LigCaretList(Otfile *f, int indent, Otf *o, LigCaretList *v) · 22 unmodified lines |
| 2284 | int | 2284 | int |
| 2285 | read_LigGlyph(Otf *o, LigGlyph *v) | 2285 | read_LigGlyph(Otf *o, LigGlyph *v) |
| 2286 | { | 2286 | { |
| 2287 | u8int *b; | 2287 | u8int *b = nil; USED(b); |
| 2288 | if((b = otfreadn(o, 2)) == nil) | 2288 | if((b = otfreadn(o, 2)) == nil) |
| 2289 | goto err; | 2289 | goto err; |
| 2290 | v->caretCount = b[0]<<8 | b[1]; | 2290 | v->caretCount = b[0]<<8 | b[1]; |
| @@ -2311,7 +2311,7 @@ print_LigGlyph(Otfile *f, int indent, Otf *o, LigGlyph *v) · 20 unmodified lines |
| 2311 | int | 2311 | int |
| 2312 | read_CaretValue(Otf *o, CaretValue *v) | 2312 | read_CaretValue(Otf *o, CaretValue *v) |
| 2313 | { | 2313 | { |
| 2314 | u8int *b; | 2314 | u8int *b = nil; USED(b); |
| 2315 | if((b = otfreadn(o, 2)) == nil) | 2315 | if((b = otfreadn(o, 2)) == nil) |
| 2316 | goto err; | 2316 | goto err; |
| 2317 | v->format = b[0]<<8 | b[1]; | 2317 | v->format = b[0]<<8 | b[1]; |
| @@ -2356,7 +2356,7 @@ print_CaretValue(Otfile *f, int indent, Otf *o, CaretValue *v) · 38 unmodified lines |
| 2356 | int | 2356 | int |
| 2357 | read_ValueRecord(Otf *o, ValueRecord *v) | 2357 | read_ValueRecord(Otf *o, ValueRecord *v) |
| 2358 | { | 2358 | { |
| 2359 | u8int *b; | 2359 | u8int *b = nil; USED(b); |
| 2360 | if((b = otfreadn(o, 16)) == nil) | 2360 | if((b = otfreadn(o, 16)) == nil) |
| 2361 | goto err; | 2361 | goto err; |
| 2362 | v->xPlacement = b[0]<<8 | b[1]; | 2362 | v->xPlacement = b[0]<<8 | b[1]; |
| @@ -2390,7 +2390,7 @@ print_ValueRecord(Otfile *f, int indent, Otf *o, ValueRecord *v) · 27 unmodified lines |
| 2390 | int | 2390 | int |
| 2391 | read_SinglePos(Otf *o, SinglePos *v) | 2391 | read_SinglePos(Otf *o, SinglePos *v) |
| 2392 | { | 2392 | { |
| 2393 | u8int *b; | 2393 | u8int *b = nil; USED(b); |
| 2394 | if((b = otfreadn(o, 6)) == nil) | 2394 | if((b = otfreadn(o, 6)) == nil) |
| 2395 | goto err; | 2395 | goto err; |
| 2396 | v->format = b[0]<<8 | b[1]; | 2396 | v->format = b[0]<<8 | b[1]; |
| @@ -2447,7 +2447,7 @@ print_SinglePos(Otfile *f, int indent, Otf *o, SinglePos *v) · 50 unmodified lines |
| 2447 | int | 2447 | int |
| 2448 | read_TableGDEF(Otf *o, TableGDEF *v) | 2448 | read_TableGDEF(Otf *o, TableGDEF *v) |
| 2449 | { | 2449 | { |
| 2450 | u8int *b; | 2450 | u8int *b = nil; USED(b); |
| 2451 | if((b = otfreadn(o, 12)) == nil) | 2451 | if((b = otfreadn(o, 12)) == nil) |
| 2452 | goto err; | 2452 | goto err; |
| 2453 | u16int majorVersion = b[0]<<8 | b[1]; | 2453 | u16int majorVersion = b[0]<<8 | b[1]; |
| @@ -2498,7 +2498,7 @@ print_TableGDEF(Otfile *f, int indent, Otf *o, TableGDEF *v) · 44 unmodified lines |
| 2498 | int | 2498 | int |
| 2499 | read_LangSys(Otf *o, LangSys *v) | 2499 | read_LangSys(Otf *o, LangSys *v) |
| 2500 | { | 2500 | { |
| 2501 | u8int *b; | 2501 | u8int *b = nil; USED(b); |
| 2502 | if((b = otfreadn(o, 6)) == nil) | 2502 | if((b = otfreadn(o, 6)) == nil) |
| 2503 | goto err; | 2503 | goto err; |
| 2504 | v->requiredFeatureIndex = b[2]<<8 | b[3]; | 2504 | v->requiredFeatureIndex = b[2]<<8 | b[3]; |
| @@ -2527,7 +2527,7 @@ print_LangSys(Otfile *f, int indent, Otf *o, LangSys *v) · 22 unmodified lines |
| 2527 | int | 2527 | int |
| 2528 | read_LangSysRecord(Otf *o, LangSysRecord *v) | 2528 | read_LangSysRecord(Otf *o, LangSysRecord *v) |
| 2529 | { | 2529 | { |
| 2530 | u8int *b; | 2530 | u8int *b = nil; USED(b); |
| 2531 | if((b = otfreadn(o, 6)) == nil) | 2531 | if((b = otfreadn(o, 6)) == nil) |
| 2532 | goto err; | 2532 | goto err; |
| 2533 | v->langSysTag = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; | 2533 | v->langSysTag = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; |
| @@ -2563,7 +2563,7 @@ print_LangSysRecord(Otfile *f, int indent, Otf *o, LangSysRecord *v) · 29 unmodified lines |
| 2563 | int | 2563 | int |
| 2564 | read_Script(Otf *o, Script *v) | 2564 | read_Script(Otf *o, Script *v) |
| 2565 | { | 2565 | { |
| 2566 | u8int *b; | 2566 | u8int *b = nil; USED(b); |
| 2567 | if((b = otfreadn(o, 4)) == nil) | 2567 | if((b = otfreadn(o, 4)) == nil) |
| 2568 | goto err; | 2568 | goto err; |
| 2569 | v->defaultLangSysOffset = b[0]<<8 | b[1]; | 2569 | v->defaultLangSysOffset = b[0]<<8 | b[1]; |
| @@ -2607,7 +2607,7 @@ print_Script(Otfile *f, int indent, Otf *o, Script *v) · 37 unmodified lines |
| 2607 | int | 2607 | int |
| 2608 | read_ScriptRecord(Otf *o, ScriptRecord *v) | 2608 | read_ScriptRecord(Otf *o, ScriptRecord *v) |
| 2609 | { | 2609 | { |
| 2610 | u8int *b; | 2610 | u8int *b = nil; USED(b); |
| 2611 | if((b = otfreadn(o, 6)) == nil) | 2611 | if((b = otfreadn(o, 6)) == nil) |
| 2612 | goto err; | 2612 | goto err; |
| 2613 | v->scriptTag = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; | 2613 | v->scriptTag = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; |
| @@ -2643,7 +2643,7 @@ print_ScriptRecord(Otfile *f, int indent, Otf *o, ScriptRecord *v) · 29 unmodified lines |
| 2643 | int | 2643 | int |
| 2644 | read_ScriptList(Otf *o, ScriptList *v) | 2644 | read_ScriptList(Otf *o, ScriptList *v) |
| 2645 | { | 2645 | { |
| 2646 | u8int *b; | 2646 | u8int *b = nil; USED(b); |
| 2647 | if((b = otfreadn(o, 2)) == nil) | 2647 | if((b = otfreadn(o, 2)) == nil) |
| 2648 | goto err; | 2648 | goto err; |
| 2649 | v->scriptCount = b[0]<<8 | b[1]; | 2649 | v->scriptCount = b[0]<<8 | b[1]; |
| @@ -2671,7 +2671,7 @@ print_ScriptList(Otfile *f, int indent, Otf *o, ScriptList *v) · 21 unmodified lines |
| 2671 | int | 2671 | int |
| 2672 | read_Feature(Otf *o, Feature *v) | 2672 | read_Feature(Otf *o, Feature *v) |
| 2673 | { | 2673 | { |
| 2674 | u8int *b; | 2674 | u8int *b = nil; USED(b); |
| 2675 | if((b = otfreadn(o, 4)) == nil) | 2675 | if((b = otfreadn(o, 4)) == nil) |
| 2676 | goto err; | 2676 | goto err; |
| 2677 | v->featureParamsOffset = b[0]<<8 | b[1]; | 2677 | v->featureParamsOffset = b[0]<<8 | b[1]; |
| @@ -2700,7 +2700,7 @@ print_Feature(Otfile *f, int indent, Otf *o, Feature *v) · 22 unmodified lines |
| 2700 | int | 2700 | int |
| 2701 | read_FeatureRecord(Otf *o, FeatureRecord *v) | 2701 | read_FeatureRecord(Otf *o, FeatureRecord *v) |
| 2702 | { | 2702 | { |
| 2703 | u8int *b; | 2703 | u8int *b = nil; USED(b); |
| 2704 | if((b = otfreadn(o, 6)) == nil) | 2704 | if((b = otfreadn(o, 6)) == nil) |
| 2705 | goto err; | 2705 | goto err; |
| 2706 | v->featureTag = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; | 2706 | v->featureTag = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; |
| @@ -2736,7 +2736,7 @@ print_FeatureRecord(Otfile *f, int indent, Otf *o, FeatureRecord *v) · 29 unmodified lines |
| 2736 | int | 2736 | int |
| 2737 | read_FeatureList(Otf *o, FeatureList *v) | 2737 | read_FeatureList(Otf *o, FeatureList *v) |
| 2738 | { | 2738 | { |
| 2739 | u8int *b; | 2739 | u8int *b = nil; USED(b); |
| 2740 | if((b = otfreadn(o, 2)) == nil) | 2740 | if((b = otfreadn(o, 2)) == nil) |
| 2741 | goto err; | 2741 | goto err; |
| 2742 | v->featureCount = b[0]<<8 | b[1]; | 2742 | v->featureCount = b[0]<<8 | b[1]; |
| @@ -2764,7 +2764,7 @@ print_FeatureList(Otfile *f, int indent, Otf *o, FeatureList *v) · 21 unmodified lines |
| 2764 | int | 2764 | int |
| 2765 | read_Lookup(Otf *o, Lookup *v) | 2765 | read_Lookup(Otf *o, Lookup *v) |
| 2766 | { | 2766 | { |
| 2767 | u8int *b; | 2767 | u8int *b = nil; USED(b); |
| 2768 | if((b = otfreadn(o, 6)) == nil) | 2768 | if((b = otfreadn(o, 6)) == nil) |
| 2769 | goto err; | 2769 | goto err; |
| 2770 | v->lookupType = b[0]<<8 | b[1]; | 2770 | v->lookupType = b[0]<<8 | b[1]; |
| @@ -2799,7 +2799,7 @@ print_Lookup(Otfile *f, int indent, Otf *o, Lookup *v) · 28 unmodified lines |
| 2799 | int | 2799 | int |
| 2800 | read_LookupList(Otf *o, LookupList *v) | 2800 | read_LookupList(Otf *o, LookupList *v) |
| 2801 | { | 2801 | { |
| 2802 | u8int *b; | 2802 | u8int *b = nil; USED(b); |
| 2803 | if((b = otfreadn(o, 2)) == nil) | 2803 | if((b = otfreadn(o, 2)) == nil) |
| 2804 | goto err; | 2804 | goto err; |
| 2805 | v->lookupCount = b[0]<<8 | b[1]; | 2805 | v->lookupCount = b[0]<<8 | b[1]; |
| @@ -2826,7 +2826,7 @@ print_LookupList(Otfile *f, int indent, Otf *o, LookupList *v) · 20 unmodified lines |
| 2826 | int | 2826 | int |
| 2827 | read_TableGPOS(Otf *o, TableGPOS *v) | 2827 | read_TableGPOS(Otf *o, TableGPOS *v) |
| 2828 | { | 2828 | { |
| 2829 | u8int *b; | 2829 | u8int *b = nil; USED(b); |
| 2830 | if((b = otfreadn(o, 10)) == nil) | 2830 | if((b = otfreadn(o, 10)) == nil) |
| 2831 | goto err; | 2831 | goto err; |
| 2832 | u16int majorVersion = b[0]<<8 | b[1]; | 2832 | u16int majorVersion = b[0]<<8 | b[1]; |
| @@ -2910,7 +2910,7 @@ print_TableGPOS(Otfile *f, int indent, Otf *o, TableGPOS *v) · 77 unmodified lines |
| 2910 | int | 2910 | int |
| 2911 | read_TableGSUB(Otf *o, TableGSUB *v) | 2911 | read_TableGSUB(Otf *o, TableGSUB *v) |
| 2912 | { | 2912 | { |
| 2913 | u8int *b; | 2913 | u8int *b = nil; USED(b); |
| 2914 | if((b = otfreadn(o, 10)) == nil) | 2914 | if((b = otfreadn(o, 10)) == nil) |
| 2915 | goto err; | 2915 | goto err; |
| 2916 | u16int majorVersion = b[0]<<8 | b[1]; | 2916 | u16int majorVersion = b[0]<<8 | b[1]; |
| @@ -2980,7 +2980,7 @@ print_TableGSUB(Otfile *f, int indent, Otf *o, TableGSUB *v) · 63 unmodified lines |
| 2980 | int | 2980 | int |
| 2981 | read_MathValueRecord(Otf *o, MathValueRecord *v) | 2981 | read_MathValueRecord(Otf *o, MathValueRecord *v) |
| 2982 | { | 2982 | { |
| 2983 | u8int *b; | 2983 | u8int *b = nil; USED(b); |
| 2984 | if((b = otfreadn(o, 4)) == nil) | 2984 | if((b = otfreadn(o, 4)) == nil) |
| 2985 | goto err; | 2985 | goto err; |
| 2986 | v->value = b[0]<<8 | b[1]; | 2986 | v->value = b[0]<<8 | b[1]; |
| @@ -3002,7 +3002,7 @@ print_MathValueRecord(Otfile *f, int indent, Otf *o, MathValueRecord *v) · 15 unmodified lines |
| 3002 | int | 3002 | int |
| 3003 | read_MathConstants(Otf *o, MathConstants *v) | 3003 | read_MathConstants(Otf *o, MathConstants *v) |
| 3004 | { | 3004 | { |
| 3005 | u8int *b; | 3005 | u8int *b = nil; USED(b); |
| 3006 | if((b = otfreadn(o, 8)) == nil) | 3006 | if((b = otfreadn(o, 8)) == nil) |
| 3007 | goto err; | 3007 | goto err; |
| 3008 | v->scriptPercentScaleDown = b[0]<<8 | b[1]; | 3008 | v->scriptPercentScaleDown = b[0]<<8 | b[1]; |
| @@ -3338,7 +3338,7 @@ print_MathConstants(Otfile *f, int indent, Otf *o, MathConstants *v) · 329 unmodified lines |
| 3338 | int | 3338 | int |
| 3339 | read_MathItalicsCorrectionInfo(Otf *o, MathItalicsCorrectionInfo *v) | 3339 | read_MathItalicsCorrectionInfo(Otf *o, MathItalicsCorrectionInfo *v) |
| 3340 | { | 3340 | { |
| 3341 | u8int *b; | 3341 | u8int *b = nil; USED(b); |
| 3342 | if((b = otfreadn(o, 4)) == nil) | 3342 | if((b = otfreadn(o, 4)) == nil) |
| 3343 | goto err; | 3343 | goto err; |
| 3344 | v->italicsCorrectionCoverageOffset = b[0]<<8 | b[1]; | 3344 | v->italicsCorrectionCoverageOffset = b[0]<<8 | b[1]; |
| @@ -3368,7 +3368,7 @@ print_MathItalicsCorrectionInfo(Otfile *f, int indent, Otf *o, MathItalicsCorrec · 23 unmodified lines |
| 3368 | int | 3368 | int |
| 3369 | read_MathTopAccentAttachment(Otf *o, MathTopAccentAttachment *v) | 3369 | read_MathTopAccentAttachment(Otf *o, MathTopAccentAttachment *v) |
| 3370 | { | 3370 | { |
| 3371 | u8int *b; | 3371 | u8int *b = nil; USED(b); |
| 3372 | if((b = otfreadn(o, 4)) == nil) | 3372 | if((b = otfreadn(o, 4)) == nil) |
| 3373 | goto err; | 3373 | goto err; |
| 3374 | v->topAccentCoverageOffset = b[0]<<8 | b[1]; | 3374 | v->topAccentCoverageOffset = b[0]<<8 | b[1]; |
| @@ -3398,7 +3398,7 @@ print_MathTopAccentAttachment(Otfile *f, int indent, Otf *o, MathTopAccentAttach · 23 unmodified lines |
| 3398 | int | 3398 | int |
| 3399 | read_MathKernInfoRecord(Otf *o, MathKernInfoRecord *v) | 3399 | read_MathKernInfoRecord(Otf *o, MathKernInfoRecord *v) |
| 3400 | { | 3400 | { |
| 3401 | u8int *b; | 3401 | u8int *b = nil; USED(b); |
| 3402 | if((b = otfreadn(o, 8)) == nil) | 3402 | if((b = otfreadn(o, 8)) == nil) |
| 3403 | goto err; | 3403 | goto err; |
| 3404 | v->topRightMathKernOffset = b[0]<<8 | b[1]; | 3404 | v->topRightMathKernOffset = b[0]<<8 | b[1]; |
| @@ -3424,7 +3424,7 @@ print_MathKernInfoRecord(Otfile *f, int indent, Otf *o, MathKernInfoRecord *v) · 19 unmodified lines |
| 3424 | int | 3424 | int |
| 3425 | read_MathKernInfo(Otf *o, MathKernInfo *v) | 3425 | read_MathKernInfo(Otf *o, MathKernInfo *v) |
| 3426 | { | 3426 | { |
| 3427 | u8int *b; | 3427 | u8int *b = nil; USED(b); |
| 3428 | if((b = otfreadn(o, 4)) == nil) | 3428 | if((b = otfreadn(o, 4)) == nil) |
| 3429 | goto err; | 3429 | goto err; |
| 3430 | v->mathKernCoverageOffset = b[0]<<8 | b[1]; | 3430 | v->mathKernCoverageOffset = b[0]<<8 | b[1]; |
| @@ -3454,7 +3454,7 @@ print_MathKernInfo(Otfile *f, int indent, Otf *o, MathKernInfo *v) · 23 unmodified lines |
| 3454 | int | 3454 | int |
| 3455 | read_MathKern(Otf *o, MathKern *v) | 3455 | read_MathKern(Otf *o, MathKern *v) |
| 3456 | { | 3456 | { |
| 3457 | u8int *b; | 3457 | u8int *b = nil; USED(b); |
| 3458 | if((b = otfreadn(o, 2)) == nil) | 3458 | if((b = otfreadn(o, 2)) == nil) |
| 3459 | goto err; | 3459 | goto err; |
| 3460 | v->heightCount = b[0]<<8 | b[1]; | 3460 | v->heightCount = b[0]<<8 | b[1]; |
| @@ -3490,7 +3490,7 @@ print_MathKern(Otfile *f, int indent, Otf *o, MathKern *v) · 29 unmodified lines |
| 3490 | int | 3490 | int |
| 3491 | read_Coverage1(Otf *o, Coverage1 *v) | 3491 | read_Coverage1(Otf *o, Coverage1 *v) |
| 3492 | { | 3492 | { |
| 3493 | u8int *b; | 3493 | u8int *b = nil; USED(b); |
| 3494 | if((b = otfreadn(o, 2)) == nil) | 3494 | if((b = otfreadn(o, 2)) == nil) |
| 3495 | goto err; | 3495 | goto err; |
| 3496 | v->glyphCount = b[0]<<8 | b[1]; | 3496 | v->glyphCount = b[0]<<8 | b[1]; |
| @@ -3517,7 +3517,7 @@ print_Coverage1(Otfile *f, int indent, Otf *o, Coverage1 *v) · 20 unmodified lines |
| 3517 | int | 3517 | int |
| 3518 | read_RangeRecord(Otf *o, RangeRecord *v) | 3518 | read_RangeRecord(Otf *o, RangeRecord *v) |
| 3519 | { | 3519 | { |
| 3520 | u8int *b; | 3520 | u8int *b = nil; USED(b); |
| 3521 | if((b = otfreadn(o, 6)) == nil) | 3521 | if((b = otfreadn(o, 6)) == nil) |
| 3522 | goto err; | 3522 | goto err; |
| 3523 | v->startGlyphID = b[0]<<8 | b[1]; | 3523 | v->startGlyphID = b[0]<<8 | b[1]; |
| @@ -3541,7 +3541,7 @@ print_RangeRecord(Otfile *f, int indent, Otf *o, RangeRecord *v) · 17 unmodified lines |
| 3541 | int | 3541 | int |
| 3542 | read_Coverage2(Otf *o, Coverage2 *v) | 3542 | read_Coverage2(Otf *o, Coverage2 *v) |
| 3543 | { | 3543 | { |
| 3544 | u8int *b; | 3544 | u8int *b = nil; USED(b); |
| 3545 | if((b = otfreadn(o, 2)) == nil) | 3545 | if((b = otfreadn(o, 2)) == nil) |
| 3546 | goto err; | 3546 | goto err; |
| 3547 | v->rangeCount = b[0]<<8 | b[1]; | 3547 | v->rangeCount = b[0]<<8 | b[1]; |
| @@ -3569,7 +3569,7 @@ print_Coverage2(Otfile *f, int indent, Otf *o, Coverage2 *v) · 21 unmodified lines |
| 3569 | int | 3569 | int |
| 3570 | read_Coverage(Otf *o, Coverage *v) | 3570 | read_Coverage(Otf *o, Coverage *v) |
| 3571 | { | 3571 | { |
| 3572 | u8int *b; | 3572 | u8int *b = nil; USED(b); |
| 3573 | if((b = otfreadn(o, 2)) == nil) | 3573 | if((b = otfreadn(o, 2)) == nil) |
| 3574 | goto err; | 3574 | goto err; |
| 3575 | v->format = b[0]<<8 | b[1]; | 3575 | v->format = b[0]<<8 | b[1]; |
| @@ -3613,7 +3613,7 @@ print_Coverage(Otfile *f, int indent, Otf *o, Coverage *v) · 37 unmodified lines |
| 3613 | int | 3613 | int |
| 3614 | read_MathVariants(Otf *o, MathVariants *v) | 3614 | read_MathVariants(Otf *o, MathVariants *v) |
| 3615 | { | 3615 | { |
| 3616 | u8int *b; | 3616 | u8int *b = nil; USED(b); |
| 3617 | if((b = otfreadn(o, 10)) == nil) | 3617 | if((b = otfreadn(o, 10)) == nil) |
| 3618 | goto err; | 3618 | goto err; |
| 3619 | v->minConnectorOverlap = b[0]<<8 | b[1]; | 3619 | v->minConnectorOverlap = b[0]<<8 | b[1]; |
| @@ -3683,7 +3683,7 @@ print_MathVariants(Otfile *f, int indent, Otf *o, MathVariants *v) · 63 unmodified lines |
| 3683 | int | 3683 | int |
| 3684 | read_MathGlyphInfo(Otf *o, MathGlyphInfo *v) | 3684 | read_MathGlyphInfo(Otf *o, MathGlyphInfo *v) |
| 3685 | { | 3685 | { |
| 3686 | u8int *b; | 3686 | u8int *b = nil; USED(b); |
| 3687 | if((b = otfreadn(o, 8)) == nil) | 3687 | if((b = otfreadn(o, 8)) == nil) |
| 3688 | goto err; | 3688 | goto err; |
| 3689 | v->mathItalicsCorrectionInfoOffset = b[0]<<8 | b[1]; | 3689 | v->mathItalicsCorrectionInfoOffset = b[0]<<8 | b[1]; |
| @@ -3765,7 +3765,7 @@ print_MathGlyphInfo(Otfile *f, int indent, Otf *o, MathGlyphInfo *v) · 75 unmodified lines |
| 3765 | int | 3765 | int |
| 3766 | read_MathGlyphVariantRecord(Otf *o, MathGlyphVariantRecord *v) | 3766 | read_MathGlyphVariantRecord(Otf *o, MathGlyphVariantRecord *v) |
| 3767 | { | 3767 | { |
| 3768 | u8int *b; | 3768 | u8int *b = nil; USED(b); |
| 3769 | if((b = otfreadn(o, 4)) == nil) | 3769 | if((b = otfreadn(o, 4)) == nil) |
| 3770 | goto err; | 3770 | goto err; |
| 3771 | v->variantGlyph = b[0]<<8 | b[1]; | 3771 | v->variantGlyph = b[0]<<8 | b[1]; |
| @@ -3787,7 +3787,7 @@ print_MathGlyphVariantRecord(Otfile *f, int indent, Otf *o, MathGlyphVariantReco · 15 unmodified lines |
| 3787 | int | 3787 | int |
| 3788 | read_GlyphPart(Otf *o, GlyphPart *v) | 3788 | read_GlyphPart(Otf *o, GlyphPart *v) |
| 3789 | { | 3789 | { |
| 3790 | u8int *b; | 3790 | u8int *b = nil; USED(b); |
| 3791 | if((b = otfreadn(o, 10)) == nil) | 3791 | if((b = otfreadn(o, 10)) == nil) |
| 3792 | goto err; | 3792 | goto err; |
| 3793 | v->glyphID = b[0]<<8 | b[1]; | 3793 | v->glyphID = b[0]<<8 | b[1]; |
| @@ -3815,7 +3815,7 @@ print_GlyphPart(Otfile *f, int indent, Otf *o, GlyphPart *v) · 21 unmodified lines |
| 3815 | int | 3815 | int |
| 3816 | read_GlyphAssembly(Otf *o, GlyphAssembly *v) | 3816 | read_GlyphAssembly(Otf *o, GlyphAssembly *v) |
| 3817 | { | 3817 | { |
| 3818 | u8int *b; | 3818 | u8int *b = nil; USED(b); |
| 3819 | if(read_MathValueRecord(o, &v->italicsCorrection) < 0){ | 3819 | if(read_MathValueRecord(o, &v->italicsCorrection) < 0){ |
| 3820 | werrstr("%s: %r", "italicsCorrection"); | 3820 | werrstr("%s: %r", "italicsCorrection"); |
| 3821 | goto err; | 3821 | goto err; |
| @@ -3849,7 +3849,7 @@ print_GlyphAssembly(Otfile *f, int indent, Otf *o, GlyphAssembly *v) · 27 unmodified lines |
| 3849 | int | 3849 | int |
| 3850 | read_MathGlyphConstruction(Otf *o, MathGlyphConstruction *v) | 3850 | read_MathGlyphConstruction(Otf *o, MathGlyphConstruction *v) |
| 3851 | { | 3851 | { |
| 3852 | u8int *b; | 3852 | u8int *b = nil; USED(b); |
| 3853 | if((b = otfreadn(o, 4)) == nil) | 3853 | if((b = otfreadn(o, 4)) == nil) |
| 3854 | goto err; | 3854 | goto err; |
| 3855 | v->glyphAssemblyOffset = b[0]<<8 | b[1]; | 3855 | v->glyphAssemblyOffset = b[0]<<8 | b[1]; |
| @@ -3893,7 +3893,7 @@ print_MathGlyphConstruction(Otfile *f, int indent, Otf *o, MathGlyphConstruction · 37 unmodified lines |
| 3893 | int | 3893 | int |
| 3894 | read_TableMATH(Otf *o, TableMATH *v) | 3894 | read_TableMATH(Otf *o, TableMATH *v) |
| 3895 | { | 3895 | { |
| 3896 | u8int *b; | 3896 | u8int *b = nil; USED(b); |
| 3897 | if((b = otfreadn(o, 10)) == nil) | 3897 | if((b = otfreadn(o, 10)) == nil) |
| 3898 | goto err; | 3898 | goto err; |
| 3899 | u16int majorVersion = b[0]<<8 | b[1]; | 3899 | u16int majorVersion = b[0]<<8 | b[1]; |
| @@ -3969,7 +3969,7 @@ print_TableMATH(Otfile *f, int indent, Otf *o, TableMATH *v) · 69 unmodified lines |
| 3969 | int | 3969 | int |
| 3970 | read_KernPair(Otf *o, KernPair *v) | 3970 | read_KernPair(Otf *o, KernPair *v) |
| 3971 | { | 3971 | { |
| 3972 | u8int *b; | 3972 | u8int *b = nil; USED(b); |
| 3973 | if((b = otfreadn(o, 6)) == nil) | 3973 | if((b = otfreadn(o, 6)) == nil) |
| 3974 | goto err; | 3974 | goto err; |
| 3975 | v->left = b[0]<<8 | b[1]; | 3975 | v->left = b[0]<<8 | b[1]; |
| @@ -3993,7 +3993,7 @@ print_KernPair(Otfile *f, int indent, Otf *o, KernPair *v) · 17 unmodified lines |
| 3993 | int | 3993 | int |
| 3994 | read_KernSubtable0(Otf *o, KernSubtable0 *v) | 3994 | read_KernSubtable0(Otf *o, KernSubtable0 *v) |
| 3995 | { | 3995 | { |
| 3996 | u8int *b; | 3996 | u8int *b = nil; USED(b); |
| 3997 | if((b = otfreadn(o, 8)) == nil) | 3997 | if((b = otfreadn(o, 8)) == nil) |
| 3998 | goto err; | 3998 | goto err; |
| 3999 | v->nPairs = b[0]<<8 | b[1]; | 3999 | v->nPairs = b[0]<<8 | b[1]; |
| @@ -4027,7 +4027,7 @@ print_KernSubtable0(Otfile *f, int indent, Otf *o, KernSubtable0 *v) · 27 unmodified lines |
| 4027 | int | 4027 | int |
| 4028 | read_KernClass(Otf *o, KernClass *v) | 4028 | read_KernClass(Otf *o, KernClass *v) |
| 4029 | { | 4029 | { |
| 4030 | u8int *b; | 4030 | u8int *b = nil; USED(b); |
| 4031 | if((b = otfreadn(o, 4)) == nil) | 4031 | if((b = otfreadn(o, 4)) == nil) |
| 4032 | goto err; | 4032 | goto err; |
| 4033 | v->firstGlyph = b[0]<<8 | b[1]; | 4033 | v->firstGlyph = b[0]<<8 | b[1]; |
| @@ -4056,7 +4056,7 @@ print_KernClass(Otfile *f, int indent, Otf *o, KernClass *v) · 22 unmodified lines |
| 4056 | int | 4056 | int |
| 4057 | read_KernSubtable2(Otf *o, KernSubtable2 *v) | 4057 | read_KernSubtable2(Otf *o, KernSubtable2 *v) |
| 4058 | { | 4058 | { |
| 4059 | u8int *b; | 4059 | u8int *b = nil; USED(b); |
| 4060 | if((b = otfreadn(o, 8)) == nil) | 4060 | if((b = otfreadn(o, 8)) == nil) |
| 4061 | goto err; | 4061 | goto err; |
| 4062 | v->rowWidth = b[0]<<8 | b[1]; | 4062 | v->rowWidth = b[0]<<8 | b[1]; |
| @@ -4117,7 +4117,7 @@ print_KernSubtable2(Otfile *f, int indent, Otf *o, KernSubtable2 *v) · 54 unmodified lines |
| 4117 | int | 4117 | int |
| 4118 | read_KernSubtable(Otf *o, KernSubtable *v) | 4118 | read_KernSubtable(Otf *o, KernSubtable *v) |
| 4119 | { | 4119 | { |
| 4120 | u8int *b; | 4120 | u8int *b = nil; USED(b); |
| 4121 | if((b = otfreadn(o, 6)) == nil) | 4121 | if((b = otfreadn(o, 6)) == nil) |
| 4122 | goto err; | 4122 | goto err; |
| 4123 | u16int version = b[0]<<8 | b[1]; | 4123 | u16int version = b[0]<<8 | b[1]; |
| @@ -4148,7 +4148,7 @@ print_KernSubtable(Otfile *f, int indent, Otf *o, KernSubtable *v) · 24 unmodified lines |
| 4148 | int | 4148 | int |
| 4149 | read_TableKern(Otf *o, TableKern *v) | 4149 | read_TableKern(Otf *o, TableKern *v) |
| 4150 | { | 4150 | { |
| 4151 | u8int *b; | 4151 | u8int *b = nil; USED(b); |
| 4152 | if((b = otfreadn(o, 4)) == nil) | 4152 | if((b = otfreadn(o, 4)) == nil) |
| 4153 | goto err; | 4153 | goto err; |
| 4154 | u16int version = b[0]<<8 | b[1]; | 4154 | u16int version = b[0]<<8 | b[1]; |
| @@ -4181,7 +4181,7 @@ print_TableKern(Otfile *f, int indent, Otf *o, TableKern *v) · 26 unmodified lines |
| 4181 | int | 4181 | int |
| 4182 | read_TableLoca(Otf *o, TableLoca *v) | 4182 | read_TableLoca(Otf *o, TableLoca *v) |
| 4183 | { | 4183 | { |
| 4184 | u8int *b; | 4184 | u8int *b = nil; USED(b); |
| 4185 | if(o->indexToLocFormat == 0){ | 4185 | if(o->indexToLocFormat == 0){ |
| 4186 | if((b = otfreadn(o, (o->numGlyphs+1)*2)) == nil) | 4186 | if((b = otfreadn(o, (o->numGlyphs+1)*2)) == nil) |
| 4187 | goto err; | 4187 | goto err; |
| @@ -4219,7 +4219,7 @@ print_TableLoca(Otfile *f, int indent, Otf *o, TableLoca *v) · 31 unmodified lines |
| 4219 | int | 4219 | int |
| 4220 | read_VariationAxisRecord(Otf *o, VariationAxisRecord *v) | 4220 | read_VariationAxisRecord(Otf *o, VariationAxisRecord *v) |
| 4221 | { | 4221 | { |
| 4222 | u8int *b; | 4222 | u8int *b = nil; USED(b); |
| 4223 | if((b = otfreadn(o, 20)) == nil) | 4223 | if((b = otfreadn(o, 20)) == nil) |
| 4224 | goto err; | 4224 | goto err; |
| 4225 | v->axisTag = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; | 4225 | v->axisTag = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; |
| @@ -4249,7 +4249,7 @@ print_VariationAxisRecord(Otfile *f, int indent, Otf *o, VariationAxisRecord *v) · 23 unmodified lines |
| 4249 | int | 4249 | int |
| 4250 | read_UserTuple(Otf *o, UserTuple *v) | 4250 | read_UserTuple(Otf *o, UserTuple *v) |
| 4251 | { | 4251 | { |
| 4252 | u8int *b; | 4252 | u8int *b = nil; USED(b); |
| 4253 | if((b = otfreadn(o, o->axisCount*4)) == nil) | 4253 | if((b = otfreadn(o, o->axisCount*4)) == nil) |
| 4254 | goto err; | 4254 | goto err; |
| 4255 | v->coordinates = malloc(o->axisCount*sizeof(*v->coordinates)); | 4255 | v->coordinates = malloc(o->axisCount*sizeof(*v->coordinates)); |
| @@ -4272,7 +4272,7 @@ print_UserTuple(Otfile *f, int indent, Otf *o, UserTuple *v) · 16 unmodified lines |
| 4272 | int | 4272 | int |
| 4273 | read_InstanceRecord(Otf *o, InstanceRecord *v) | 4273 | read_InstanceRecord(Otf *o, InstanceRecord *v) |
| 4274 | { | 4274 | { |
| 4275 | u8int *b; | 4275 | u8int *b = nil; USED(b); |
| 4276 | if((b = otfreadn(o, 4)) == nil) | 4276 | if((b = otfreadn(o, 4)) == nil) |
| 4277 | goto err; | 4277 | goto err; |
| 4278 | v->subfamilyNameID = b[0]<<8 | b[1]; | 4278 | v->subfamilyNameID = b[0]<<8 | b[1]; |
| @@ -4305,7 +4305,7 @@ print_InstanceRecord(Otfile *f, int indent, Otf *o, InstanceRecord *v) · 26 unmodified lines |
| 4305 | int | 4305 | int |
| 4306 | read_AxisInstances(Otf *o, AxisInstances *v) | 4306 | read_AxisInstances(Otf *o, AxisInstances *v) |
| 4307 | { | 4307 | { |
| 4308 | u8int *b; | 4308 | u8int *b = nil; USED(b); |
| 4309 | if(otfarray(o, &v->axes, read_VariationAxisRecord, sizeof(VariationAxisRecord), o->axisCount) < 0){ | 4309 | if(otfarray(o, &v->axes, read_VariationAxisRecord, sizeof(VariationAxisRecord), o->axisCount) < 0){ |
| 4310 | werrstr("%s: %r", "axes"); | 4310 | werrstr("%s: %r", "axes"); |
| 4311 | goto err; | 4311 | goto err; |
| @@ -4337,7 +4337,7 @@ print_AxisInstances(Otfile *f, int indent, Otf *o, AxisInstances *v) · 25 unmodified lines |
| 4337 | int | 4337 | int |
| 4338 | read_TableFvar(Otf *o, TableFvar *v) | 4338 | read_TableFvar(Otf *o, TableFvar *v) |
| 4339 | { | 4339 | { |
| 4340 | u8int *b; | 4340 | u8int *b = nil; USED(b); |
| 4341 | if((b = otfreadn(o, 16)) == nil) | 4341 | if((b = otfreadn(o, 16)) == nil) |
| 4342 | goto err; | 4342 | goto err; |
| 4343 | u16int majorVersion = b[0]<<8 | b[1]; | 4343 | u16int majorVersion = b[0]<<8 | b[1]; |
| @@ -4395,7 +4395,7 @@ print_TableFvar(Otfile *f, int indent, Otf *o, TableFvar *v) · 51 unmodified lines |
| 4395 | int | 4395 | int |
| 4396 | read_RegionAxisCoordinates(Otf *o, RegionAxisCoordinates *v) | 4396 | read_RegionAxisCoordinates(Otf *o, RegionAxisCoordinates *v) |
| 4397 | { | 4397 | { |
| 4398 | u8int *b; | 4398 | u8int *b = nil; USED(b); |
| 4399 | if((b = otfreadn(o, 6)) == nil) | 4399 | if((b = otfreadn(o, 6)) == nil) |
| 4400 | goto err; | 4400 | goto err; |
| 4401 | v->startCoord = (b[0]<<8 | b[1]>>14)+(b[0]<<8 | b[1]&((1<<14)-1))/16384.0; | 4401 | v->startCoord = (b[0]<<8 | b[1]>>14)+(b[0]<<8 | b[1]&((1<<14)-1))/16384.0; |
| @@ -4419,7 +4419,7 @@ print_RegionAxisCoordinates(Otfile *f, int indent, Otf *o, RegionAxisCoordinates · 17 unmodified lines |
| 4419 | int | 4419 | int |
| 4420 | read_VariationRegion(Otf *o, VariationRegion *v) | 4420 | read_VariationRegion(Otf *o, VariationRegion *v) |
| 4421 | { | 4421 | { |
| 4422 | u8int *b; | 4422 | u8int *b = nil; USED(b); |
| 4423 | if(otfarray(o, &v->regionAxes, read_RegionAxisCoordinates, sizeof(RegionAxisCoordinates), o->axisCount) < 0){ | 4423 | if(otfarray(o, &v->regionAxes, read_RegionAxisCoordinates, sizeof(RegionAxisCoordinates), o->axisCount) < 0){ |
| 4424 | werrstr("%s: %r", "regionAxes"); | 4424 | werrstr("%s: %r", "regionAxes"); |
| 4425 | goto err; | 4425 | goto err; |
| @@ -4443,7 +4443,7 @@ print_VariationRegion(Otfile *f, int indent, Otf *o, VariationRegion *v) · 17 unmodified lines |
| 4443 | int | 4443 | int |
| 4444 | read_VariationRegionList(Otf *o, VariationRegionList *v) | 4444 | read_VariationRegionList(Otf *o, VariationRegionList *v) |
| 4445 | { | 4445 | { |
| 4446 | u8int *b; | 4446 | u8int *b = nil; USED(b); |
| 4447 | if((b = otfreadn(o, 4)) == nil) | 4447 | if((b = otfreadn(o, 4)) == nil) |
| 4448 | goto err; | 4448 | goto err; |
| 4449 | v->axisCount = b[0]<<8 | b[1]; | 4449 | v->axisCount = b[0]<<8 | b[1]; |
| @@ -4473,7 +4473,7 @@ print_VariationRegionList(Otfile *f, int indent, Otf *o, VariationRegionList *v) · 23 unmodified lines |
| 4473 | int | 4473 | int |
| 4474 | read_ItemVariationData(Otf *o, ItemVariationData *v) | 4474 | read_ItemVariationData(Otf *o, ItemVariationData *v) |
| 4475 | { | 4475 | { |
| 4476 | u8int *b; | 4476 | u8int *b = nil; USED(b); |
| 4477 | if((b = otfreadn(o, 6)) == nil) | 4477 | if((b = otfreadn(o, 6)) == nil) |
| 4478 | goto err; | 4478 | goto err; |
| 4479 | v->itemCount = b[0]<<8 | b[1]; | 4479 | v->itemCount = b[0]<<8 | b[1]; |
| @@ -4504,7 +4504,7 @@ print_ItemVariationData(Otfile *f, int indent, Otf *o, ItemVariationData *v) · 24 unmodified lines |
| 4504 | int | 4504 | int |
| 4505 | read_ItemVariationStore(Otf *o, ItemVariationStore *v) | 4505 | read_ItemVariationStore(Otf *o, ItemVariationStore *v) |
| 4506 | { | 4506 | { |
| 4507 | u8int *b; | 4507 | u8int *b = nil; USED(b); |
| 4508 | if((b = otfreadn(o, 8)) == nil) | 4508 | if((b = otfreadn(o, 8)) == nil) |
| 4509 | goto err; | 4509 | goto err; |
| 4510 | u16int format = b[0]<<8 | b[1]; | 4510 | u16int format = b[0]<<8 | b[1]; |
| @@ -4538,7 +4538,7 @@ print_ItemVariationStore(Otfile *f, int indent, Otf *o, ItemVariationStore *v) · 27 unmodified lines |
| 4538 | int | 4538 | int |
| 4539 | read_DeltaSetIndexMap(Otf *o, DeltaSetIndexMap *v) | 4539 | read_DeltaSetIndexMap(Otf *o, DeltaSetIndexMap *v) |
| 4540 | { | 4540 | { |
| 4541 | u8int *b; | 4541 | u8int *b = nil; USED(b); |
| 4542 | if((b = otfreadn(o, 2)) == nil) | 4542 | if((b = otfreadn(o, 2)) == nil) |
| 4543 | goto err; | 4543 | goto err; |
| 4544 | v->format = b[0]; | 4544 | v->format = b[0]; |
| @@ -4582,7 +4582,7 @@ print_DeltaSetIndexMap(Otfile *f, int indent, Otf *o, DeltaSetIndexMap *v) · 37 unmodified lines |
| 4582 | int | 4582 | int |
| 4583 | read_TableHVAR(Otf *o, TableHVAR *v) | 4583 | read_TableHVAR(Otf *o, TableHVAR *v) |
| 4584 | { | 4584 | { |
| 4585 | u8int *b; | 4585 | u8int *b = nil; USED(b); |
| 4586 | if((b = otfreadn(o, 20)) == nil) | 4586 | if((b = otfreadn(o, 20)) == nil) |
| 4587 | goto err; | 4587 | goto err; |
| 4588 | u16int majorVersion = b[0]<<8 | b[1]; | 4588 | u16int majorVersion = b[0]<<8 | b[1]; |
| @@ -4674,7 +4674,7 @@ print_TableHVAR(Otfile *f, int indent, Otf *o, TableHVAR *v) · 85 unmodified lines |
| 4674 | int | 4674 | int |
| 4675 | read_TableFFTM(Otf *o, TableFFTM *v) | 4675 | read_TableFFTM(Otf *o, TableFFTM *v) |
| 4676 | { | 4676 | { |
| 4677 | u8int *b; | 4677 | u8int *b = nil; USED(b); |
| 4678 | if((b = otfreadn(o, 4)) == nil) | 4678 | if((b = otfreadn(o, 4)) == nil) |
| 4679 | goto err; | 4679 | goto err; |
| 4680 | v->version = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; | 4680 | v->version = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; |
| @@ -4707,7 +4707,7 @@ print_TableFFTM(Otfile *f, int indent, Otf *o, TableFFTM *v) · 26 unmodified lines |
| 4707 | int | 4707 | int |
| 4708 | read_SignatureBlock1(Otf *o, SignatureBlock1 *v) | 4708 | read_SignatureBlock1(Otf *o, SignatureBlock1 *v) |
| 4709 | { | 4709 | { |
| 4710 | u8int *b; | 4710 | u8int *b = nil; USED(b); |
| 4711 | if((b = otfreadn(o, 8)) == nil) | 4711 | if((b = otfreadn(o, 8)) == nil) |
| 4712 | goto err; | 4712 | goto err; |
| 4713 | v->signatureLength = b[4]<<24 | b[5]<<16 | b[6]<<8 | b[7]; | 4713 | v->signatureLength = b[4]<<24 | b[5]<<16 | b[6]<<8 | b[7]; |
| @@ -4734,7 +4734,7 @@ print_SignatureBlock1(Otfile *f, int indent, Otf *o, SignatureBlock1 *v) · 20 unmodified lines |
| 4734 | int | 4734 | int |
| 4735 | read_SignatureRecord(Otf *o, SignatureRecord *v) | 4735 | read_SignatureRecord(Otf *o, SignatureRecord *v) |
| 4736 | { | 4736 | { |
| 4737 | u8int *b; | 4737 | u8int *b = nil; USED(b); |
| 4738 | if((b = otfreadn(o, 12)) == nil) | 4738 | if((b = otfreadn(o, 12)) == nil) |
| 4739 | goto err; | 4739 | goto err; |
| 4740 | v->format = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; | 4740 | v->format = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; |
| @@ -4776,7 +4776,7 @@ print_SignatureRecord(Otfile *f, int indent, Otf *o, SignatureRecord *v) · 35 unmodified lines |
| 4776 | int | 4776 | int |
| 4777 | read_TableDSIG(Otf *o, TableDSIG *v) | 4777 | read_TableDSIG(Otf *o, TableDSIG *v) |
| 4778 | { | 4778 | { |
| 4779 | u8int *b; | 4779 | u8int *b = nil; USED(b); |
| 4780 | if((b = otfreadn(o, 8)) == nil) | 4780 | if((b = otfreadn(o, 8)) == nil) |
| 4781 | goto err; | 4781 | goto err; |
| 4782 | u32int version = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; | 4782 | u32int version = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; |
| @@ -4811,7 +4811,7 @@ print_TableDSIG(Otfile *f, int indent, Otf *o, TableDSIG *v) · 28 unmodified lines |
| 4811 | int | 4811 | int |
| 4812 | read_AxisRecord(Otf *o, AxisRecord *v) | 4812 | read_AxisRecord(Otf *o, AxisRecord *v) |
| 4813 | { | 4813 | { |
| 4814 | u8int *b; | 4814 | u8int *b = nil; USED(b); |
| 4815 | if((b = otfreadn(o, 8)) == nil) | 4815 | if((b = otfreadn(o, 8)) == nil) |
| 4816 | goto err; | 4816 | goto err; |
| 4817 | v->axisTag = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; | 4817 | v->axisTag = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; |
| @@ -4838,7 +4838,7 @@ print_AxisRecord(Otfile *f, int indent, Otf *o, AxisRecord *v) · 20 unmodified lines |
| 4838 | int | 4838 | int |
| 4839 | read_DesignAxes(Otf *o, DesignAxes *v) | 4839 | read_DesignAxes(Otf *o, DesignAxes *v) |
| 4840 | { | 4840 | { |
| 4841 | u8int *b; | 4841 | u8int *b = nil; USED(b); |
| 4842 | if(otfarray(o, &v->designAxes, read_AxisRecord, sizeof(AxisRecord), o->designAxisCount) < 0){ | 4842 | if(otfarray(o, &v->designAxes, read_AxisRecord, sizeof(AxisRecord), o->designAxisCount) < 0){ |
| 4843 | werrstr("%s: %r", "designAxes"); | 4843 | werrstr("%s: %r", "designAxes"); |
| 4844 | goto err; | 4844 | goto err; |
| @@ -4869,7 +4869,7 @@ print_DesignAxes(Otfile *f, int indent, Otf *o, DesignAxes *v) · 24 unmodified lines |
| 4869 | int | 4869 | int |
| 4870 | read_TableSTAT(Otf *o, TableSTAT *v) | 4870 | read_TableSTAT(Otf *o, TableSTAT *v) |
| 4871 | { | 4871 | { |
| 4872 | u8int *b; | 4872 | u8int *b = nil; USED(b); |
| 4873 | if((b = otfreadn(o, 18)) == nil) | 4873 | if((b = otfreadn(o, 18)) == nil) |
| 4874 | goto err; | 4874 | goto err; |
| 4875 | u16int majorVersion = b[0]<<8 | b[1]; | 4875 | u16int majorVersion = b[0]<<8 | b[1]; |
| @@ -4932,7 +4932,7 @@ print_TableSTAT(Otfile *f, int indent, Otf *o, TableSTAT *v) · 56 unmodified lines |
| 4932 | int | 4932 | int |
| 4933 | read_GaspRange(Otf *o, GaspRange *v) | 4933 | read_GaspRange(Otf *o, GaspRange *v) |
| 4934 | { | 4934 | { |
| 4935 | u8int *b; | 4935 | u8int *b = nil; USED(b); |
| 4936 | if((b = otfreadn(o, 4)) == nil) | 4936 | if((b = otfreadn(o, 4)) == nil) |
| 4937 | goto err; | 4937 | goto err; |
| 4938 | v->rangeMaxPPEM = b[0]<<8 | b[1]; | 4938 | v->rangeMaxPPEM = b[0]<<8 | b[1]; |
| @@ -4954,7 +4954,7 @@ print_GaspRange(Otfile *f, int indent, Otf *o, GaspRange *v) · 15 unmodified lines |
| 4954 | int | 4954 | int |
| 4955 | read_TableGasp(Otf *o, TableGasp *v) | 4955 | read_TableGasp(Otf *o, TableGasp *v) |
| 4956 | { | 4956 | { |
| 4957 | u8int *b; | 4957 | u8int *b = nil; USED(b); |
| 4958 | if((b = otfreadn(o, 4)) == nil) | 4958 | if((b = otfreadn(o, 4)) == nil) |
| 4959 | goto err; | 4959 | goto err; |
| 4960 | v->version = b[0]<<8 | b[1]; | 4960 | v->version = b[0]<<8 | b[1]; |
| @@ -4988,7 +4988,7 @@ print_TableGasp(Otfile *f, int indent, Otf *o, TableGasp *v) · 27 unmodified lines |
| 4988 | int | 4988 | int |
| 4989 | read_Tuple(Otf *o, Tuple *v) | 4989 | read_Tuple(Otf *o, Tuple *v) |
| 4990 | { | 4990 | { |
| 4991 | u8int *b; | 4991 | u8int *b = nil; USED(b); |
| 4992 | if((b = otfreadn(o, o->axisCount*2)) == nil) | 4992 | if((b = otfreadn(o, o->axisCount*2)) == nil) |
| 4993 | goto err; | 4993 | goto err; |
| 4994 | v->coordinates = malloc(o->axisCount*sizeof(*v->coordinates)); | 4994 | v->coordinates = malloc(o->axisCount*sizeof(*v->coordinates)); |
| @@ -5011,7 +5011,7 @@ print_Tuple(Otfile *f, int indent, Otf *o, Tuple *v) · 16 unmodified lines |
| 5011 | int | 5011 | int |
| 5012 | read_TupleVariationHeader(Otf *o, TupleVariationHeader *v) | 5012 | read_TupleVariationHeader(Otf *o, TupleVariationHeader *v) |
| 5013 | { | 5013 | { |
| 5014 | u8int *b; | 5014 | u8int *b = nil; USED(b); |
| 5015 | if((b = otfreadn(o, 4)) == nil) | 5015 | if((b = otfreadn(o, 4)) == nil) |
| 5016 | goto err; | 5016 | goto err; |
| 5017 | v->variationDataSize = b[0]<<8 | b[1]; | 5017 | v->variationDataSize = b[0]<<8 | b[1]; |
| @@ -5051,7 +5051,7 @@ print_TupleVariationHeader(Otfile *f, int indent, Otf *o, TupleVariationHeader * · 33 unmodified lines |
| 5051 | int | 5051 | int |
| 5052 | read_GlyphVariationData(Otf *o, GlyphVariationData *v) | 5052 | read_GlyphVariationData(Otf *o, GlyphVariationData *v) |
| 5053 | { | 5053 | { |
| 5054 | u8int *b; | 5054 | u8int *b = nil; USED(b); |
| 5055 | if((b = otfreadn(o, 4)) == nil) | 5055 | if((b = otfreadn(o, 4)) == nil) |
| 5056 | goto err; | 5056 | goto err; |
| 5057 | v->tupleVariationCount = b[0]<<8 | b[1]; | 5057 | v->tupleVariationCount = b[0]<<8 | b[1]; |
| @@ -5081,7 +5081,7 @@ print_GlyphVariationData(Otfile *f, int indent, Otf *o, GlyphVariationData *v) · 23 unmodified lines |
| 5081 | int | 5081 | int |
| 5082 | read_TableGvar(Otf *o, TableGvar *v) | 5082 | read_TableGvar(Otf *o, TableGvar *v) |
| 5083 | { | 5083 | { |
| 5084 | u8int *b; | 5084 | u8int *b = nil; USED(b); |
| 5085 | if((b = otfreadn(o, 20)) == nil) | 5085 | if((b = otfreadn(o, 20)) == nil) |
| 5086 | goto err; | 5086 | goto err; |
| 5087 | u16int majorVersion = b[0]<<8 | b[1]; | 5087 | u16int majorVersion = b[0]<<8 | b[1]; |
| @@ -5157,7 +5157,7 @@ print_TableGvar(Otfile *f, int indent, Otf *o, TableGvar *v) · 69 unmodified lines |
| 5157 | int | 5157 | int |
| 5158 | read_AxisValueMap(Otf *o, AxisValueMap *v) | 5158 | read_AxisValueMap(Otf *o, AxisValueMap *v) |
| 5159 | { | 5159 | { |
| 5160 | u8int *b; | 5160 | u8int *b = nil; USED(b); |
| 5161 | if((b = otfreadn(o, 4)) == nil) | 5161 | if((b = otfreadn(o, 4)) == nil) |
| 5162 | goto err; | 5162 | goto err; |
| 5163 | v->fromCoordinate = (b[0]<<8 | b[1]>>14)+(b[0]<<8 | b[1]&((1<<14)-1))/16384.0; | 5163 | v->fromCoordinate = (b[0]<<8 | b[1]>>14)+(b[0]<<8 | b[1]&((1<<14)-1))/16384.0; |
| @@ -5179,7 +5179,7 @@ print_AxisValueMap(Otfile *f, int indent, Otf *o, AxisValueMap *v) · 15 unmodified lines |
| 5179 | int | 5179 | int |
| 5180 | read_SegmentMaps(Otf *o, SegmentMaps *v) | 5180 | read_SegmentMaps(Otf *o, SegmentMaps *v) |
| 5181 | { | 5181 | { |
| 5182 | u8int *b; | 5182 | u8int *b = nil; USED(b); |
| 5183 | if((b = otfreadn(o, 2)) == nil) | 5183 | if((b = otfreadn(o, 2)) == nil) |
| 5184 | goto err; | 5184 | goto err; |
| 5185 | v->positionMapCount = b[0]<<8 | b[1]; | 5185 | v->positionMapCount = b[0]<<8 | b[1]; |
| @@ -5207,7 +5207,7 @@ print_SegmentMaps(Otfile *f, int indent, Otf *o, SegmentMaps *v) · 21 unmodified lines |
| 5207 | int | 5207 | int |
| 5208 | read_TableAvar(Otf *o, TableAvar *v) | 5208 | read_TableAvar(Otf *o, TableAvar *v) |
| 5209 | { | 5209 | { |
| 5210 | u8int *b; | 5210 | u8int *b = nil; USED(b); |
| 5211 | if((b = otfreadn(o, 8)) == nil) | 5211 | if((b = otfreadn(o, 8)) == nil) |
| 5212 | goto err; | 5212 | goto err; |
| 5213 | u16int majorVersion = b[0]<<8 | b[1]; | 5213 | u16int majorVersion = b[0]<<8 | b[1]; |
| @@ -5245,7 +5245,7 @@ print_TableAvar(Otfile *f, int indent, Otf *o, TableAvar *v) · 31 unmodified lines |
| 5245 | int | 5245 | int |
| 5246 | read_TableOS∕2(Otf *o, TableOS∕2 *v) | 5246 | read_TableOS∕2(Otf *o, TableOS∕2 *v) |
| 5247 | { | 5247 | { |
| 5248 | u8int *b; | 5248 | u8int *b = nil; USED(b); |
| 5249 | if((b = otfreadn(o, 78)) == nil) | 5249 | if((b = otfreadn(o, 78)) == nil) |
| 5250 | goto err; | 5250 | goto err; |
| 5251 | v->version = b[0]<<8 | b[1]; | 5251 | v->version = b[0]<<8 | b[1]; |
| @@ -5368,7 +5368,7 @@ print_TableOS∕2(Otfile *f, int indent, Otf *o, TableOS∕2 *v) · 116 unmodified lines |
| 5368 | int | 5368 | int |
| 5369 | read_TableRecord(Otf *o, TableRecord *v) | 5369 | read_TableRecord(Otf *o, TableRecord *v) |
| 5370 | { | 5370 | { |
| 5371 | u8int *b; | 5371 | u8int *b = nil; USED(b); |
| 5372 | if((b = otfreadn(o, 16)) == nil) | 5372 | if((b = otfreadn(o, 16)) == nil) |
| 5373 | goto err; | 5373 | goto err; |
| 5374 | v->tableTag = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; | 5374 | v->tableTag = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; |
| @@ -5394,7 +5394,7 @@ print_TableRecord(Otfile *f, int indent, Otf *o, TableRecord *v) · 19 unmodified lines |
| 5394 | int | 5394 | int |
| 5395 | read_TableDirectory(Otf *o, TableDirectory *v) | 5395 | read_TableDirectory(Otf *o, TableDirectory *v) |
| 5396 | { | 5396 | { |
| 5397 | u8int *b; | 5397 | u8int *b = nil; USED(b); |
| 5398 | if((b = otfreadn(o, 12)) == nil) | 5398 | if((b = otfreadn(o, 12)) == nil) |
| 5399 | goto err; | 5399 | goto err; |
| 5400 | v->sfntVersion = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; | 5400 | v->sfntVersion = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]; |