| Line | Source Code | Coverage |
|---|
| 1 | /* | - |
| 2 | * Copyright (C) 1998-2004 David Turner and Werner Lemberg | - |
| 3 | * Copyright (C) 2006 Behdad Esfahbod | - |
| 4 | * Copyright (C) 2007 Red Hat, Inc. | - |
| 5 | * | - |
| 6 | * This is part of HarfBuzz, an OpenType Layout engine library. | - |
| 7 | * | - |
| 8 | * Permission is hereby granted, without written agreement and without | - |
| 9 | * license or royalty fees, to use, copy, modify, and distribute this | - |
| 10 | * software and its documentation for any purpose, provided that the | - |
| 11 | * above copyright notice and the following two paragraphs appear in | - |
| 12 | * all copies of this software. | - |
| 13 | * | - |
| 14 | * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR | - |
| 15 | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES | - |
| 16 | * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN | - |
| 17 | * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH | - |
| 18 | * DAMAGE. | - |
| 19 | * | - |
| 20 | * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, | - |
| 21 | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | - |
| 22 | * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS | - |
| 23 | * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO | - |
| 24 | * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | - |
| 25 | * | - |
| 26 | * Red Hat Author(s): Behdad Esfahbod | - |
| 27 | */ | - |
| 28 | | - |
| 29 | #include "harfbuzz-impl.h" | - |
| 30 | #include "harfbuzz-gpos-private.h" | - |
| 31 | #include "harfbuzz-open-private.h" | - |
| 32 | #include "harfbuzz-gdef-private.h" | - |
| 33 | #include "harfbuzz-shaper.h" | - |
| 34 | | - |
| 35 | struct GPOS_Instance_ | - |
| 36 | { | - |
| 37 | HB_GPOSHeader* gpos; | - |
| 38 | HB_Font font; | - |
| 39 | HB_Bool dvi; | - |
| 40 | HB_UShort load_flags; /* how the glyph should be loaded */ | - |
| 41 | HB_Bool r2l; | - |
| 42 | | - |
| 43 | HB_UShort last; /* the last valid glyph -- used | - |
| 44 | with cursive positioning */ | - |
| 45 | HB_Fixed anchor_x; /* the coordinates of the anchor point */ | - |
| 46 | HB_Fixed anchor_y; /* of the last valid glyph */ | - |
| 47 | }; | - |
| 48 | | - |
| 49 | typedef struct GPOS_Instance_ GPOS_Instance; | - |
| 50 | | - |
| 51 | | - |
| 52 | static HB_Error GPOS_Do_Glyph_Lookup( GPOS_Instance* gpi, | - |
| 53 | HB_UShort lookup_index, | - |
| 54 | HB_Buffer buffer, | - |
| 55 | HB_UShort context_length, | - |
| 56 | int nesting_level ); | - |
| 57 | | - |
| 58 | | - |
| 59 | | - |
| 60 | #ifdef HB_SUPPORT_MULTIPLE_MASTER | - |
| 61 | /* the client application must replace this with something more | - |
| 62 | meaningful if multiple master fonts are to be supported. */ | - |
| 63 | | - |
| 64 | static HB_Error default_mmfunc( HB_Font font, | - |
| 65 | HB_UShort metric_id, | - |
| 66 | HB_Fixed* metric_value, | - |
| 67 | void* data ) | - |
| 68 | { | - |
| 69 | HB_UNUSED(font); | - |
| 70 | HB_UNUSED(metric_id); | - |
| 71 | HB_UNUSED(metric_value); | - |
| 72 | HB_UNUSED(data); | - |
| 73 | return ERR(HB_Err_Not_Covered); /* ERR() call intended */ | - |
| 74 | } | - |
| 75 | #endif | - |
| 76 | | - |
| 77 | | - |
| 78 | | - |
| 79 | HB_Error HB_Load_GPOS_Table( HB_Stream stream, | - |
| 80 | HB_GPOSHeader** retptr, | - |
| 81 | HB_GDEFHeader* gdef, | - |
| 82 | HB_Stream gdefStream ) | - |
| 83 | { | - |
| 84 | HB_UInt cur_offset, new_offset, base_offset; executed (the execution status of this line is deduced): HB_UInt cur_offset, new_offset, base_offset; | - |
| 85 | | - |
| 86 | HB_GPOSHeader* gpos; executed (the execution status of this line is deduced): HB_GPOSHeader* gpos; | - |
| 87 | | - |
| 88 | HB_Error error = HB_Err_Ok; executed (the execution status of this line is deduced): HB_Error error = HB_Err_Ok; | - |
| 89 | | - |
| 90 | | - |
| 91 | if ( !retptr ) partially evaluated: !retptr| no Evaluation Count:0 | yes Evaluation Count:139 |
| 0-139 |
| 92 | return ERR(HB_Err_Invalid_Argument); never executed: return _hb_err (HB_Err_Invalid_Argument); | 0 |
| 93 | | - |
| 94 | if ( GOTO_Table( TTAG_GPOS ) ) partially evaluated: (0)| no Evaluation Count:0 | yes Evaluation Count:139 |
| 0-139 |
| 95 | return error; never executed: return error; | 0 |
| 96 | | - |
| 97 | base_offset = FILE_Pos(); executed (the execution status of this line is deduced): base_offset = _hb_stream_pos( stream ); | - |
| 98 | | - |
| 99 | if ( ALLOC ( gpos, sizeof( *gpos ) ) ) partially evaluated: ( (gpos) = _hb_alloc( sizeof( *gpos ), &error ), error != 0 )| no Evaluation Count:0 | yes Evaluation Count:139 |
| 0-139 |
| 100 | return error; never executed: return error; | 0 |
| 101 | | - |
| 102 | #ifdef HB_SUPPORT_MULTIPLE_MASTER | - |
| 103 | gpos->mmfunc = default_mmfunc; | - |
| 104 | #endif | - |
| 105 | | - |
| 106 | /* skip version */ | - |
| 107 | | - |
| 108 | if ( FILE_Seek( base_offset + 4L ) || partially evaluated: ( (error = (_hb_stream_seek( stream, base_offset + 4L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:139 |
| 0-139 |
| 109 | ACCESS_Frame( 2L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:139 |
| 0-139 |
| 110 | goto Fail4; never executed: goto Fail4; | 0 |
| 111 | | - |
| 112 | new_offset = GET_UShort() + base_offset; executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 113 | | - |
| 114 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 115 | | - |
| 116 | cur_offset = FILE_Pos(); executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 117 | if ( FILE_Seek( new_offset ) || partially evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:139 |
| 0-139 |
| 118 | ( error = _HB_OPEN_Load_ScriptList( &gpos->ScriptList, partially evaluated: ( error = _HB_OPEN_Load_ScriptList( &gpos->ScriptList, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:139 |
| 0-139 |
| 119 | stream ) ) != HB_Err_Ok ) partially evaluated: ( error = _HB_OPEN_Load_ScriptList( &gpos->ScriptList, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:139 |
| 0-139 |
| 120 | goto Fail4; never executed: goto Fail4; | 0 |
| 121 | (void)FILE_Seek( cur_offset ); executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 122 | | - |
| 123 | if ( ACCESS_Frame( 2L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:139 |
| 0-139 |
| 124 | goto Fail3; never executed: goto Fail3; | 0 |
| 125 | | - |
| 126 | new_offset = GET_UShort() + base_offset; executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 127 | | - |
| 128 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 129 | | - |
| 130 | cur_offset = FILE_Pos(); executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 131 | if ( FILE_Seek( new_offset ) || partially evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:139 |
| 0-139 |
| 132 | ( error = _HB_OPEN_Load_FeatureList( &gpos->FeatureList, partially evaluated: ( error = _HB_OPEN_Load_FeatureList( &gpos->FeatureList, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:139 |
| 0-139 |
| 133 | stream ) ) != HB_Err_Ok ) partially evaluated: ( error = _HB_OPEN_Load_FeatureList( &gpos->FeatureList, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:139 |
| 0-139 |
| 134 | goto Fail3; never executed: goto Fail3; | 0 |
| 135 | (void)FILE_Seek( cur_offset ); executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 136 | | - |
| 137 | if ( ACCESS_Frame( 2L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:139 |
| 0-139 |
| 138 | goto Fail2; never executed: goto Fail2; | 0 |
| 139 | | - |
| 140 | new_offset = GET_UShort() + base_offset; executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 141 | | - |
| 142 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 143 | | - |
| 144 | cur_offset = FILE_Pos(); executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 145 | if ( FILE_Seek( new_offset ) || partially evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:139 |
| 0-139 |
| 146 | ( error = _HB_OPEN_Load_LookupList( &gpos->LookupList, partially evaluated: ( error = _HB_OPEN_Load_LookupList( &gpos->LookupList, stream, HB_Type_GPOS ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:139 |
| 0-139 |
| 147 | stream, HB_Type_GPOS ) ) != HB_Err_Ok ) partially evaluated: ( error = _HB_OPEN_Load_LookupList( &gpos->LookupList, stream, HB_Type_GPOS ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:139 |
| 0-139 |
| 148 | goto Fail2; never executed: goto Fail2; | 0 |
| 149 | | - |
| 150 | gpos->gdef = gdef; /* can be NULL */ executed (the execution status of this line is deduced): gpos->gdef = gdef; | - |
| 151 | | - |
| 152 | if ( ( error = _HB_GDEF_LoadMarkAttachClassDef_From_LookupFlags( gdef, gdefStream, partially evaluated: ( error = _HB_GDEF_LoadMarkAttachClassDef_From_LookupFlags( gdef, gdefStream, gpos->LookupList.Lookup, gpos->LookupList.LookupCount ) )| no Evaluation Count:0 | yes Evaluation Count:139 |
| 0-139 |
| 153 | gpos->LookupList.Lookup, partially evaluated: ( error = _HB_GDEF_LoadMarkAttachClassDef_From_LookupFlags( gdef, gdefStream, gpos->LookupList.Lookup, gpos->LookupList.LookupCount ) )| no Evaluation Count:0 | yes Evaluation Count:139 |
| 0-139 |
| 154 | gpos->LookupList.LookupCount ) ) ) partially evaluated: ( error = _HB_GDEF_LoadMarkAttachClassDef_From_LookupFlags( gdef, gdefStream, gpos->LookupList.Lookup, gpos->LookupList.LookupCount ) )| no Evaluation Count:0 | yes Evaluation Count:139 |
| 0-139 |
| 155 | goto Fail1; never executed: goto Fail1; | 0 |
| 156 | | - |
| 157 | *retptr = gpos; executed (the execution status of this line is deduced): *retptr = gpos; | - |
| 158 | | - |
| 159 | return HB_Err_Ok; executed: return HB_Err_Ok;Execution Count:139 | 139 |
| 160 | | - |
| 161 | Fail1: | - |
| 162 | _HB_OPEN_Free_LookupList( &gpos->LookupList, HB_Type_GPOS ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_LookupList( &gpos->LookupList, HB_Type_GPOS ); | - |
| 163 | | - |
| 164 | Fail2: code before this statement never executed: Fail2: | 0 |
| 165 | _HB_OPEN_Free_FeatureList( &gpos->FeatureList ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_FeatureList( &gpos->FeatureList ); | - |
| 166 | | - |
| 167 | Fail3: code before this statement never executed: Fail3: | 0 |
| 168 | _HB_OPEN_Free_ScriptList( &gpos->ScriptList ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_ScriptList( &gpos->ScriptList ); | - |
| 169 | | - |
| 170 | Fail4: code before this statement never executed: Fail4: | 0 |
| 171 | FREE( gpos ); never executed: } never executed: } never evaluated: (gpos) never evaluated: 0 | 0 |
| 172 | | - |
| 173 | return error; never executed: return error; | 0 |
| 174 | } | - |
| 175 | | - |
| 176 | | - |
| 177 | HB_Error HB_Done_GPOS_Table( HB_GPOSHeader* gpos ) | - |
| 178 | { | - |
| 179 | _HB_OPEN_Free_LookupList( &gpos->LookupList, HB_Type_GPOS ); executed (the execution status of this line is deduced): _HB_OPEN_Free_LookupList( &gpos->LookupList, HB_Type_GPOS ); | - |
| 180 | _HB_OPEN_Free_FeatureList( &gpos->FeatureList ); executed (the execution status of this line is deduced): _HB_OPEN_Free_FeatureList( &gpos->FeatureList ); | - |
| 181 | _HB_OPEN_Free_ScriptList( &gpos->ScriptList ); executed (the execution status of this line is deduced): _HB_OPEN_Free_ScriptList( &gpos->ScriptList ); | - |
| 182 | | - |
| 183 | FREE( gpos ); executed: }Execution Count:132 executed: }Execution Count:132 partially evaluated: (gpos)| yes Evaluation Count:132 | no Evaluation Count:0 |
partially evaluated: 0| no Evaluation Count:0 | yes Evaluation Count:132 |
| 0-132 |
| 184 | | - |
| 185 | return HB_Err_Ok; executed: return HB_Err_Ok;Execution Count:132 | 132 |
| 186 | } | - |
| 187 | | - |
| 188 | static HB_UInt Calculate_Class2RecordSize(HB_UShort format1, HB_UShort format2) | - |
| 189 | { | - |
| 190 | // Return number of 16 bit values in two value records with given formats | - |
| 191 | return (format1 & 0x01) + (format2 & 0x01) executed: return (format1 & 0x01) + (format2 & 0x01) + ((format1 & 0x02) >> 1) + ((format2 & 0x02) >> 1) + ((format1 & 0x04) >> 2) + ((format2 & 0x04) >> 2) + ((format1 & 0x08) >> 3) + ((format2 & 0x08) >> 3) + ((format1 & 0x10) >> 4) + ((format2 & 0x10) >> 4) + ((format1 & 0x20) >> 5) + ((format2 & 0x20) >> 5) + ((format1 & 0x40) >> 6) + ((format2 & 0x40) >> 6) + ((format1 & 0x80) >> 7) + ((format2 & 0x80) >> 7);Execution Count:867382 | 867382 |
| 192 | + ((format1 & 0x02) >> 1) + ((format2 & 0x02) >> 1) executed: return (format1 & 0x01) + (format2 & 0x01) + ((format1 & 0x02) >> 1) + ((format2 & 0x02) >> 1) + ((format1 & 0x04) >> 2) + ((format2 & 0x04) >> 2) + ((format1 & 0x08) >> 3) + ((format2 & 0x08) >> 3) + ((format1 & 0x10) >> 4) + ((format2 & 0x10) >> 4) + ((format1 & 0x20) >> 5) + ((format2 & 0x20) >> 5) + ((format1 & 0x40) >> 6) + ((format2 & 0x40) >> 6) + ((format1 & 0x80) >> 7) + ((format2 & 0x80) >> 7);Execution Count:867382 | 867382 |
| 193 | + ((format1 & 0x04) >> 2) + ((format2 & 0x04) >> 2) executed: return (format1 & 0x01) + (format2 & 0x01) + ((format1 & 0x02) >> 1) + ((format2 & 0x02) >> 1) + ((format1 & 0x04) >> 2) + ((format2 & 0x04) >> 2) + ((format1 & 0x08) >> 3) + ((format2 & 0x08) >> 3) + ((format1 & 0x10) >> 4) + ((format2 & 0x10) >> 4) + ((format1 & 0x20) >> 5) + ((format2 & 0x20) >> 5) + ((format1 & 0x40) >> 6) + ((format2 & 0x40) >> 6) + ((format1 & 0x80) >> 7) + ((format2 & 0x80) >> 7);Execution Count:867382 | 867382 |
| 194 | + ((format1 & 0x08) >> 3) + ((format2 & 0x08) >> 3) executed: return (format1 & 0x01) + (format2 & 0x01) + ((format1 & 0x02) >> 1) + ((format2 & 0x02) >> 1) + ((format1 & 0x04) >> 2) + ((format2 & 0x04) >> 2) + ((format1 & 0x08) >> 3) + ((format2 & 0x08) >> 3) + ((format1 & 0x10) >> 4) + ((format2 & 0x10) >> 4) + ((format1 & 0x20) >> 5) + ((format2 & 0x20) >> 5) + ((format1 & 0x40) >> 6) + ((format2 & 0x40) >> 6) + ((format1 & 0x80) >> 7) + ((format2 & 0x80) >> 7);Execution Count:867382 | 867382 |
| 195 | + ((format1 & 0x10) >> 4) + ((format2 & 0x10) >> 4) executed: return (format1 & 0x01) + (format2 & 0x01) + ((format1 & 0x02) >> 1) + ((format2 & 0x02) >> 1) + ((format1 & 0x04) >> 2) + ((format2 & 0x04) >> 2) + ((format1 & 0x08) >> 3) + ((format2 & 0x08) >> 3) + ((format1 & 0x10) >> 4) + ((format2 & 0x10) >> 4) + ((format1 & 0x20) >> 5) + ((format2 & 0x20) >> 5) + ((format1 & 0x40) >> 6) + ((format2 & 0x40) >> 6) + ((format1 & 0x80) >> 7) + ((format2 & 0x80) >> 7);Execution Count:867382 | 867382 |
| 196 | + ((format1 & 0x20) >> 5) + ((format2 & 0x20) >> 5) executed: return (format1 & 0x01) + (format2 & 0x01) + ((format1 & 0x02) >> 1) + ((format2 & 0x02) >> 1) + ((format1 & 0x04) >> 2) + ((format2 & 0x04) >> 2) + ((format1 & 0x08) >> 3) + ((format2 & 0x08) >> 3) + ((format1 & 0x10) >> 4) + ((format2 & 0x10) >> 4) + ((format1 & 0x20) >> 5) + ((format2 & 0x20) >> 5) + ((format1 & 0x40) >> 6) + ((format2 & 0x40) >> 6) + ((format1 & 0x80) >> 7) + ((format2 & 0x80) >> 7);Execution Count:867382 | 867382 |
| 197 | + ((format1 & 0x40) >> 6) + ((format2 & 0x40) >> 6) executed: return (format1 & 0x01) + (format2 & 0x01) + ((format1 & 0x02) >> 1) + ((format2 & 0x02) >> 1) + ((format1 & 0x04) >> 2) + ((format2 & 0x04) >> 2) + ((format1 & 0x08) >> 3) + ((format2 & 0x08) >> 3) + ((format1 & 0x10) >> 4) + ((format2 & 0x10) >> 4) + ((format1 & 0x20) >> 5) + ((format2 & 0x20) >> 5) + ((format1 & 0x40) >> 6) + ((format2 & 0x40) >> 6) + ((format1 & 0x80) >> 7) + ((format2 & 0x80) >> 7);Execution Count:867382 | 867382 |
| 198 | + ((format1 & 0x80) >> 7) + ((format2 & 0x80) >> 7); executed: return (format1 & 0x01) + (format2 & 0x01) + ((format1 & 0x02) >> 1) + ((format2 & 0x02) >> 1) + ((format1 & 0x04) >> 2) + ((format2 & 0x04) >> 2) + ((format1 & 0x08) >> 3) + ((format2 & 0x08) >> 3) + ((format1 & 0x10) >> 4) + ((format2 & 0x10) >> 4) + ((format1 & 0x20) >> 5) + ((format2 & 0x20) >> 5) + ((format1 & 0x40) >> 6) + ((format2 & 0x40) >> 6) + ((format1 & 0x80) >> 7) + ((format2 & 0x80) >> 7);Execution Count:867382 | 867382 |
| 199 | } | - |
| 200 | | - |
| 201 | /***************************** | - |
| 202 | * SubTable related functions | - |
| 203 | *****************************/ | - |
| 204 | | - |
| 205 | /* shared tables */ | - |
| 206 | | - |
| 207 | /* ValueRecord */ | - |
| 208 | | - |
| 209 | static HB_Error Get_FlexibleValueRecord( GPOS_Instance* gpi, | - |
| 210 | HB_Short* vr, | - |
| 211 | HB_UShort format, | - |
| 212 | HB_Position gd ) | - |
| 213 | { | - |
| 214 | HB_Error error = HB_Err_Ok; executed (the execution status of this line is deduced): HB_Error error = HB_Err_Ok; | - |
| 215 | | - |
| 216 | HB_16Dot16 x_scale, y_scale; executed (the execution status of this line is deduced): HB_16Dot16 x_scale, y_scale; | - |
| 217 | | - |
| 218 | if ( !format ) evaluated: !format| yes Evaluation Count:433444 | yes Evaluation Count:433444 |
| 433444 |
| 219 | return HB_Err_Ok; executed: return HB_Err_Ok;Execution Count:433444 | 433444 |
| 220 | | - |
| 221 | x_scale = gpi->font->x_scale; executed (the execution status of this line is deduced): x_scale = gpi->font->x_scale; | - |
| 222 | y_scale = gpi->font->y_scale; executed (the execution status of this line is deduced): y_scale = gpi->font->y_scale; | - |
| 223 | | - |
| 224 | /* design units -> fractional pixel */ | - |
| 225 | | - |
| 226 | if ( format & HB_GPOS_FORMAT_HAVE_X_PLACEMENT ) { partially evaluated: format & 0x0001| no Evaluation Count:0 | yes Evaluation Count:433444 |
| 0-433444 |
| 227 | gd->x_pos += *vr * x_scale / 0x10000; never executed (the execution status of this line is deduced): gd->x_pos += *vr * x_scale / 0x10000; | - |
| 228 | vr++; never executed (the execution status of this line is deduced): vr++; | - |
| 229 | } | 0 |
| 230 | if ( format & HB_GPOS_FORMAT_HAVE_Y_PLACEMENT ) { partially evaluated: format & 0x0002| no Evaluation Count:0 | yes Evaluation Count:433444 |
| 0-433444 |
| 231 | gd->y_pos += *vr * y_scale / 0x10000; never executed (the execution status of this line is deduced): gd->y_pos += *vr * y_scale / 0x10000; | - |
| 232 | vr++; never executed (the execution status of this line is deduced): vr++; | - |
| 233 | } | 0 |
| 234 | if ( format & HB_GPOS_FORMAT_HAVE_X_ADVANCE ) { partially evaluated: format & 0x0004| yes Evaluation Count:433444 | no Evaluation Count:0 |
| 0-433444 |
| 235 | gd->x_advance += *vr * x_scale / 0x10000; executed (the execution status of this line is deduced): gd->x_advance += *vr * x_scale / 0x10000; | - |
| 236 | vr++; executed (the execution status of this line is deduced): vr++; | - |
| 237 | } executed: }Execution Count:433444 | 433444 |
| 238 | if ( format & HB_GPOS_FORMAT_HAVE_Y_ADVANCE ) { partially evaluated: format & 0x0008| no Evaluation Count:0 | yes Evaluation Count:433444 |
| 0-433444 |
| 239 | gd->y_advance += *vr * y_scale / 0x10000; never executed (the execution status of this line is deduced): gd->y_advance += *vr * y_scale / 0x10000; | - |
| 240 | vr++; never executed (the execution status of this line is deduced): vr++; | - |
| 241 | } | 0 |
| 242 | | - |
| 243 | return error; executed: return error;Execution Count:433444 | 433444 |
| 244 | } | - |
| 245 | | - |
| 246 | /* There is a subtle difference in the specs between a `table' and a | - |
| 247 | `record' -- offsets for device tables in ValueRecords are taken from | - |
| 248 | the parent table and not the parent record. */ | - |
| 249 | | - |
| 250 | static HB_Error Load_ValueRecord( HB_ValueRecord* vr, | - |
| 251 | HB_UShort format, | - |
| 252 | HB_UInt base_offset, | - |
| 253 | HB_Stream stream ) | - |
| 254 | { | - |
| 255 | HB_Error error; executed (the execution status of this line is deduced): HB_Error error; | - |
| 256 | | - |
| 257 | HB_UInt cur_offset, new_offset; executed (the execution status of this line is deduced): HB_UInt cur_offset, new_offset; | - |
| 258 | | - |
| 259 | | - |
| 260 | if ( format & HB_GPOS_FORMAT_HAVE_X_PLACEMENT ) evaluated: format & 0x0001| yes Evaluation Count:2 | yes Evaluation Count:12 |
| 2-12 |
| 261 | { | - |
| 262 | if ( ACCESS_Frame( 2L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:2 |
| 0-2 |
| 263 | return error; never executed: return error; | 0 |
| 264 | | - |
| 265 | vr->XPlacement = GET_Short(); executed (the execution status of this line is deduced): vr->XPlacement = (stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) )); | - |
| 266 | | - |
| 267 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 268 | } executed: }Execution Count:2 | 2 |
| 269 | else | - |
| 270 | vr->XPlacement = 0; executed: vr->XPlacement = 0;Execution Count:12 | 12 |
| 271 | | - |
| 272 | if ( format & HB_GPOS_FORMAT_HAVE_Y_PLACEMENT ) partially evaluated: format & 0x0002| no Evaluation Count:0 | yes Evaluation Count:14 |
| 0-14 |
| 273 | { | - |
| 274 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 275 | return error; never executed: return error; | 0 |
| 276 | | - |
| 277 | vr->YPlacement = GET_Short(); never executed (the execution status of this line is deduced): vr->YPlacement = (stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) )); | - |
| 278 | | - |
| 279 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 280 | } | 0 |
| 281 | else | - |
| 282 | vr->YPlacement = 0; executed: vr->YPlacement = 0;Execution Count:14 | 14 |
| 283 | | - |
| 284 | if ( format & HB_GPOS_FORMAT_HAVE_X_ADVANCE ) evaluated: format & 0x0004| yes Evaluation Count:12 | yes Evaluation Count:2 |
| 2-12 |
| 285 | { | - |
| 286 | if ( ACCESS_Frame( 2L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:12 |
| 0-12 |
| 287 | return error; never executed: return error; | 0 |
| 288 | | - |
| 289 | vr->XAdvance = GET_Short(); executed (the execution status of this line is deduced): vr->XAdvance = (stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) )); | - |
| 290 | | - |
| 291 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 292 | } executed: }Execution Count:12 | 12 |
| 293 | else | - |
| 294 | vr->XAdvance = 0; executed: vr->XAdvance = 0;Execution Count:2 | 2 |
| 295 | | - |
| 296 | if ( format & HB_GPOS_FORMAT_HAVE_Y_ADVANCE ) partially evaluated: format & 0x0008| no Evaluation Count:0 | yes Evaluation Count:14 |
| 0-14 |
| 297 | { | - |
| 298 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 299 | return error; never executed: return error; | 0 |
| 300 | | - |
| 301 | vr->YAdvance = GET_Short(); never executed (the execution status of this line is deduced): vr->YAdvance = (stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) )); | - |
| 302 | | - |
| 303 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 304 | } | 0 |
| 305 | else | - |
| 306 | vr->YAdvance = 0; executed: vr->YAdvance = 0;Execution Count:14 | 14 |
| 307 | | - |
| 308 | if ( format & HB_GPOS_FORMAT_HAVE_DEVICE_TABLES ) partially evaluated: format & 0x00F0| no Evaluation Count:0 | yes Evaluation Count:14 |
| 0-14 |
| 309 | { | - |
| 310 | if ( ALLOC_ARRAY( vr->DeviceTables, 4, HB_Device ) ) never evaluated: ( (vr->DeviceTables) = _hb_alloc( (4)*sizeof(HB_Device), &error ), error != 0 ) | 0 |
| 311 | return error; never executed: return error; | 0 |
| 312 | vr->DeviceTables[VR_X_ADVANCE_DEVICE] = 0; never executed (the execution status of this line is deduced): vr->DeviceTables[2] = 0; | - |
| 313 | vr->DeviceTables[VR_Y_ADVANCE_DEVICE] = 0; never executed (the execution status of this line is deduced): vr->DeviceTables[3] = 0; | - |
| 314 | vr->DeviceTables[VR_X_PLACEMENT_DEVICE] = 0; never executed (the execution status of this line is deduced): vr->DeviceTables[0] = 0; | - |
| 315 | vr->DeviceTables[VR_Y_PLACEMENT_DEVICE] = 0; never executed (the execution status of this line is deduced): vr->DeviceTables[1] = 0; | - |
| 316 | } | 0 |
| 317 | else | - |
| 318 | { | - |
| 319 | vr->DeviceTables = 0; executed (the execution status of this line is deduced): vr->DeviceTables = 0; | - |
| 320 | } executed: }Execution Count:14 | 14 |
| 321 | | - |
| 322 | if ( format & HB_GPOS_FORMAT_HAVE_X_PLACEMENT_DEVICE ) partially evaluated: format & 0x0010| no Evaluation Count:0 | yes Evaluation Count:14 |
| 0-14 |
| 323 | { | - |
| 324 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 325 | goto Fail4; never executed: goto Fail4; | 0 |
| 326 | | - |
| 327 | new_offset = GET_UShort(); never executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 328 | | - |
| 329 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 330 | | - |
| 331 | if ( new_offset ) never evaluated: new_offset | 0 |
| 332 | { | - |
| 333 | new_offset += base_offset; never executed (the execution status of this line is deduced): new_offset += base_offset; | - |
| 334 | | - |
| 335 | cur_offset = FILE_Pos(); never executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 336 | if ( FILE_Seek( new_offset ) || never evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 ) | 0 |
| 337 | ( error = _HB_OPEN_Load_Device( &vr->DeviceTables[VR_X_PLACEMENT_DEVICE], never evaluated: ( error = _HB_OPEN_Load_Device( &vr->DeviceTables[0], stream ) ) != HB_Err_Ok | 0 |
| 338 | stream ) ) != HB_Err_Ok ) never evaluated: ( error = _HB_OPEN_Load_Device( &vr->DeviceTables[0], stream ) ) != HB_Err_Ok | 0 |
| 339 | goto Fail4; never executed: goto Fail4; | 0 |
| 340 | (void)FILE_Seek( cur_offset ); never executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 341 | } | 0 |
| 342 | } | 0 |
| 343 | | - |
| 344 | if ( format & HB_GPOS_FORMAT_HAVE_Y_PLACEMENT_DEVICE ) partially evaluated: format & 0x0020| no Evaluation Count:0 | yes Evaluation Count:14 |
| 0-14 |
| 345 | { | - |
| 346 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 347 | goto Fail3; never executed: goto Fail3; | 0 |
| 348 | | - |
| 349 | new_offset = GET_UShort(); never executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 350 | | - |
| 351 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 352 | | - |
| 353 | if ( new_offset ) never evaluated: new_offset | 0 |
| 354 | { | - |
| 355 | new_offset += base_offset; never executed (the execution status of this line is deduced): new_offset += base_offset; | - |
| 356 | | - |
| 357 | cur_offset = FILE_Pos(); never executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 358 | if ( FILE_Seek( new_offset ) || never evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 ) | 0 |
| 359 | ( error = _HB_OPEN_Load_Device( &vr->DeviceTables[VR_Y_PLACEMENT_DEVICE], never evaluated: ( error = _HB_OPEN_Load_Device( &vr->DeviceTables[1], stream ) ) != HB_Err_Ok | 0 |
| 360 | stream ) ) != HB_Err_Ok ) never evaluated: ( error = _HB_OPEN_Load_Device( &vr->DeviceTables[1], stream ) ) != HB_Err_Ok | 0 |
| 361 | goto Fail3; never executed: goto Fail3; | 0 |
| 362 | (void)FILE_Seek( cur_offset ); never executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 363 | } | 0 |
| 364 | } | 0 |
| 365 | | - |
| 366 | if ( format & HB_GPOS_FORMAT_HAVE_X_ADVANCE_DEVICE ) partially evaluated: format & 0x0040| no Evaluation Count:0 | yes Evaluation Count:14 |
| 0-14 |
| 367 | { | - |
| 368 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 369 | goto Fail2; never executed: goto Fail2; | 0 |
| 370 | | - |
| 371 | new_offset = GET_UShort(); never executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 372 | | - |
| 373 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 374 | | - |
| 375 | if ( new_offset ) never evaluated: new_offset | 0 |
| 376 | { | - |
| 377 | new_offset += base_offset; never executed (the execution status of this line is deduced): new_offset += base_offset; | - |
| 378 | | - |
| 379 | cur_offset = FILE_Pos(); never executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 380 | if ( FILE_Seek( new_offset ) || never evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 ) | 0 |
| 381 | ( error = _HB_OPEN_Load_Device( &vr->DeviceTables[VR_X_ADVANCE_DEVICE], never evaluated: ( error = _HB_OPEN_Load_Device( &vr->DeviceTables[2], stream ) ) != HB_Err_Ok | 0 |
| 382 | stream ) ) != HB_Err_Ok ) never evaluated: ( error = _HB_OPEN_Load_Device( &vr->DeviceTables[2], stream ) ) != HB_Err_Ok | 0 |
| 383 | goto Fail2; never executed: goto Fail2; | 0 |
| 384 | (void)FILE_Seek( cur_offset ); never executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 385 | } | 0 |
| 386 | } | 0 |
| 387 | | - |
| 388 | if ( format & HB_GPOS_FORMAT_HAVE_Y_ADVANCE_DEVICE ) partially evaluated: format & 0x0080| no Evaluation Count:0 | yes Evaluation Count:14 |
| 0-14 |
| 389 | { | - |
| 390 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 391 | goto Fail1; never executed: goto Fail1; | 0 |
| 392 | | - |
| 393 | new_offset = GET_UShort(); never executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 394 | | - |
| 395 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 396 | | - |
| 397 | if ( new_offset ) never evaluated: new_offset | 0 |
| 398 | { | - |
| 399 | new_offset += base_offset; never executed (the execution status of this line is deduced): new_offset += base_offset; | - |
| 400 | | - |
| 401 | cur_offset = FILE_Pos(); never executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 402 | if ( FILE_Seek( new_offset ) || never evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 ) | 0 |
| 403 | ( error = _HB_OPEN_Load_Device( &vr->DeviceTables[VR_Y_ADVANCE_DEVICE], never evaluated: ( error = _HB_OPEN_Load_Device( &vr->DeviceTables[3], stream ) ) != HB_Err_Ok | 0 |
| 404 | stream ) ) != HB_Err_Ok ) never evaluated: ( error = _HB_OPEN_Load_Device( &vr->DeviceTables[3], stream ) ) != HB_Err_Ok | 0 |
| 405 | goto Fail1; never executed: goto Fail1; | 0 |
| 406 | (void)FILE_Seek( cur_offset ); never executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 407 | } | 0 |
| 408 | } | 0 |
| 409 | | - |
| 410 | if ( format & HB_GPOS_FORMAT_HAVE_X_ID_PLACEMENT ) partially evaluated: format & 0x0100| no Evaluation Count:0 | yes Evaluation Count:14 |
| 0-14 |
| 411 | { | - |
| 412 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 413 | goto Fail1; never executed: goto Fail1; | 0 |
| 414 | | - |
| 415 | #ifdef HB_SUPPORT_MULTIPLE_MASTER | - |
| 416 | vr->XIdPlacement = GET_UShort(); | - |
| 417 | #else | - |
| 418 | (void) GET_UShort(); never executed (the execution status of this line is deduced): (void) ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 419 | #endif | - |
| 420 | | - |
| 421 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 422 | } | 0 |
| 423 | #ifdef HB_SUPPORT_MULTIPLE_MASTER | - |
| 424 | else | - |
| 425 | vr->XIdPlacement = 0; | - |
| 426 | #endif | - |
| 427 | | - |
| 428 | if ( format & HB_GPOS_FORMAT_HAVE_Y_ID_PLACEMENT ) partially evaluated: format & 0x0200| no Evaluation Count:0 | yes Evaluation Count:14 |
| 0-14 |
| 429 | { | - |
| 430 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 431 | goto Fail1; never executed: goto Fail1; | 0 |
| 432 | | - |
| 433 | #ifdef HB_SUPPORT_MULTIPLE_MASTER | - |
| 434 | vr->YIdPlacement = GET_UShort(); | - |
| 435 | #else | - |
| 436 | (void) GET_UShort(); never executed (the execution status of this line is deduced): (void) ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 437 | #endif | - |
| 438 | | - |
| 439 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 440 | } | 0 |
| 441 | #ifdef HB_SUPPORT_MULTIPLE_MASTER | - |
| 442 | else | - |
| 443 | vr->YIdPlacement = 0; | - |
| 444 | #endif | - |
| 445 | | - |
| 446 | if ( format & HB_GPOS_FORMAT_HAVE_X_ID_ADVANCE ) partially evaluated: format & 0x0400| no Evaluation Count:0 | yes Evaluation Count:14 |
| 0-14 |
| 447 | { | - |
| 448 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 449 | goto Fail1; never executed: goto Fail1; | 0 |
| 450 | | - |
| 451 | #ifdef HB_SUPPORT_MULTIPLE_MASTER | - |
| 452 | vr->XIdAdvance = GET_UShort(); | - |
| 453 | #else | - |
| 454 | (void) GET_UShort(); never executed (the execution status of this line is deduced): (void) ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 455 | #endif | - |
| 456 | | - |
| 457 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 458 | } | 0 |
| 459 | #ifdef HB_SUPPORT_MULTIPLE_MASTER | - |
| 460 | else | - |
| 461 | vr->XIdAdvance = 0; | - |
| 462 | #endif | - |
| 463 | | - |
| 464 | if ( format & HB_GPOS_FORMAT_HAVE_Y_ID_ADVANCE ) partially evaluated: format & 0x0800| no Evaluation Count:0 | yes Evaluation Count:14 |
| 0-14 |
| 465 | { | - |
| 466 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 467 | goto Fail1; never executed: goto Fail1; | 0 |
| 468 | | - |
| 469 | #ifdef HB_SUPPORT_MULTIPLE_MASTER | - |
| 470 | vr->YIdAdvance = GET_UShort(); | - |
| 471 | #else | - |
| 472 | (void) GET_UShort(); never executed (the execution status of this line is deduced): (void) ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 473 | #endif | - |
| 474 | | - |
| 475 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 476 | } | 0 |
| 477 | #ifdef HB_SUPPORT_MULTIPLE_MASTER | - |
| 478 | else | - |
| 479 | vr->YIdAdvance = 0; | - |
| 480 | #endif | - |
| 481 | | - |
| 482 | return HB_Err_Ok; executed: return HB_Err_Ok;Execution Count:14 | 14 |
| 483 | | - |
| 484 | Fail1: | - |
| 485 | if ( vr->DeviceTables ) never evaluated: vr->DeviceTables | 0 |
| 486 | _HB_OPEN_Free_Device( vr->DeviceTables[VR_Y_ADVANCE_DEVICE] ); never executed: _HB_OPEN_Free_Device( vr->DeviceTables[3] ); | 0 |
| 487 | | - |
| 488 | Fail2: code before this statement never executed: Fail2: | 0 |
| 489 | if ( vr->DeviceTables ) never evaluated: vr->DeviceTables | 0 |
| 490 | _HB_OPEN_Free_Device( vr->DeviceTables[VR_X_ADVANCE_DEVICE] ); never executed: _HB_OPEN_Free_Device( vr->DeviceTables[2] ); | 0 |
| 491 | | - |
| 492 | Fail3: code before this statement never executed: Fail3: | 0 |
| 493 | if ( vr->DeviceTables ) never evaluated: vr->DeviceTables | 0 |
| 494 | _HB_OPEN_Free_Device( vr->DeviceTables[VR_Y_PLACEMENT_DEVICE] ); never executed: _HB_OPEN_Free_Device( vr->DeviceTables[1] ); | 0 |
| 495 | | - |
| 496 | Fail4: code before this statement never executed: Fail4: | 0 |
| 497 | FREE( vr->DeviceTables ); never executed: } never executed: } never evaluated: (vr->DeviceTables) never evaluated: 0 | 0 |
| 498 | return error; never executed: return error; | 0 |
| 499 | } | - |
| 500 | | - |
| 501 | | - |
| 502 | static void Free_ValueRecord( HB_ValueRecord* vr, | - |
| 503 | HB_UShort format ) | - |
| 504 | { | - |
| 505 | if ( format & HB_GPOS_FORMAT_HAVE_Y_ADVANCE_DEVICE ) partially evaluated: format & 0x0080| no Evaluation Count:0 | yes Evaluation Count:12 |
| 0-12 |
| 506 | _HB_OPEN_Free_Device( vr->DeviceTables[VR_Y_ADVANCE_DEVICE] ); never executed: _HB_OPEN_Free_Device( vr->DeviceTables[3] ); | 0 |
| 507 | if ( format & HB_GPOS_FORMAT_HAVE_X_ADVANCE_DEVICE ) partially evaluated: format & 0x0040| no Evaluation Count:0 | yes Evaluation Count:12 |
| 0-12 |
| 508 | _HB_OPEN_Free_Device( vr->DeviceTables[VR_X_ADVANCE_DEVICE] ); never executed: _HB_OPEN_Free_Device( vr->DeviceTables[2] ); | 0 |
| 509 | if ( format & HB_GPOS_FORMAT_HAVE_Y_PLACEMENT_DEVICE ) partially evaluated: format & 0x0020| no Evaluation Count:0 | yes Evaluation Count:12 |
| 0-12 |
| 510 | _HB_OPEN_Free_Device( vr->DeviceTables[VR_Y_PLACEMENT_DEVICE] ); never executed: _HB_OPEN_Free_Device( vr->DeviceTables[1] ); | 0 |
| 511 | if ( format & HB_GPOS_FORMAT_HAVE_X_PLACEMENT_DEVICE ) partially evaluated: format & 0x0010| no Evaluation Count:0 | yes Evaluation Count:12 |
| 0-12 |
| 512 | _HB_OPEN_Free_Device( vr->DeviceTables[VR_X_PLACEMENT_DEVICE] ); never executed: _HB_OPEN_Free_Device( vr->DeviceTables[0] ); | 0 |
| 513 | FREE( vr->DeviceTables ); never executed: } executed: }Execution Count:12 partially evaluated: (vr->DeviceTables)| no Evaluation Count:0 | yes Evaluation Count:12 |
partially evaluated: 0| no Evaluation Count:0 | yes Evaluation Count:12 |
| 0-12 |
| 514 | } executed: }Execution Count:12 | 12 |
| 515 | | - |
| 516 | | - |
| 517 | static HB_Error Get_ValueRecord( GPOS_Instance* gpi, | - |
| 518 | HB_ValueRecord* vr, | - |
| 519 | HB_UShort format, | - |
| 520 | HB_Position gd ) | - |
| 521 | { | - |
| 522 | HB_Short pixel_value; never executed (the execution status of this line is deduced): HB_Short pixel_value; | - |
| 523 | HB_Error error = HB_Err_Ok; never executed (the execution status of this line is deduced): HB_Error error = HB_Err_Ok; | - |
| 524 | #ifdef HB_SUPPORT_MULTIPLE_MASTER | - |
| 525 | HB_GPOSHeader* gpos = gpi->gpos; | - |
| 526 | HB_Fixed value; | - |
| 527 | #endif | - |
| 528 | | - |
| 529 | HB_UShort x_ppem, y_ppem; never executed (the execution status of this line is deduced): HB_UShort x_ppem, y_ppem; | - |
| 530 | HB_16Dot16 x_scale, y_scale; never executed (the execution status of this line is deduced): HB_16Dot16 x_scale, y_scale; | - |
| 531 | | - |
| 532 | | - |
| 533 | if ( !format ) | 0 |
| 534 | return HB_Err_Ok; never executed: return HB_Err_Ok; | 0 |
| 535 | | - |
| 536 | x_ppem = gpi->font->x_ppem; never executed (the execution status of this line is deduced): x_ppem = gpi->font->x_ppem; | - |
| 537 | y_ppem = gpi->font->y_ppem; never executed (the execution status of this line is deduced): y_ppem = gpi->font->y_ppem; | - |
| 538 | x_scale = gpi->font->x_scale; never executed (the execution status of this line is deduced): x_scale = gpi->font->x_scale; | - |
| 539 | y_scale = gpi->font->y_scale; never executed (the execution status of this line is deduced): y_scale = gpi->font->y_scale; | - |
| 540 | | - |
| 541 | /* design units -> fractional pixel */ | - |
| 542 | | - |
| 543 | if ( format & HB_GPOS_FORMAT_HAVE_X_PLACEMENT ) never evaluated: format & 0x0001 | 0 |
| 544 | gd->x_pos += x_scale * vr->XPlacement / 0x10000; never executed: gd->x_pos += x_scale * vr->XPlacement / 0x10000; | 0 |
| 545 | if ( format & HB_GPOS_FORMAT_HAVE_Y_PLACEMENT ) never evaluated: format & 0x0002 | 0 |
| 546 | gd->y_pos += y_scale * vr->YPlacement / 0x10000; never executed: gd->y_pos += y_scale * vr->YPlacement / 0x10000; | 0 |
| 547 | if ( format & HB_GPOS_FORMAT_HAVE_X_ADVANCE ) never evaluated: format & 0x0004 | 0 |
| 548 | gd->x_advance += x_scale * vr->XAdvance / 0x10000; never executed: gd->x_advance += x_scale * vr->XAdvance / 0x10000; | 0 |
| 549 | if ( format & HB_GPOS_FORMAT_HAVE_Y_ADVANCE ) never evaluated: format & 0x0008 | 0 |
| 550 | gd->y_advance += y_scale * vr->YAdvance / 0x10000; never executed: gd->y_advance += y_scale * vr->YAdvance / 0x10000; | 0 |
| 551 | | - |
| 552 | if ( !gpi->dvi ) never evaluated: !gpi->dvi | 0 |
| 553 | { | - |
| 554 | /* pixel -> fractional pixel */ | - |
| 555 | | - |
| 556 | if ( format & HB_GPOS_FORMAT_HAVE_X_PLACEMENT_DEVICE ) never evaluated: format & 0x0010 | 0 |
| 557 | { | - |
| 558 | _HB_OPEN_Get_Device( vr->DeviceTables[VR_X_PLACEMENT_DEVICE], x_ppem, &pixel_value ); never executed (the execution status of this line is deduced): _HB_OPEN_Get_Device( vr->DeviceTables[0], x_ppem, &pixel_value ); | - |
| 559 | gd->x_pos += pixel_value << 6; never executed (the execution status of this line is deduced): gd->x_pos += pixel_value << 6; | - |
| 560 | } | 0 |
| 561 | if ( format & HB_GPOS_FORMAT_HAVE_Y_PLACEMENT_DEVICE ) never evaluated: format & 0x0020 | 0 |
| 562 | { | - |
| 563 | _HB_OPEN_Get_Device( vr->DeviceTables[VR_Y_PLACEMENT_DEVICE], y_ppem, &pixel_value ); never executed (the execution status of this line is deduced): _HB_OPEN_Get_Device( vr->DeviceTables[1], y_ppem, &pixel_value ); | - |
| 564 | gd->y_pos += pixel_value << 6; never executed (the execution status of this line is deduced): gd->y_pos += pixel_value << 6; | - |
| 565 | } | 0 |
| 566 | if ( format & HB_GPOS_FORMAT_HAVE_X_ADVANCE_DEVICE ) never evaluated: format & 0x0040 | 0 |
| 567 | { | - |
| 568 | _HB_OPEN_Get_Device( vr->DeviceTables[VR_X_ADVANCE_DEVICE], x_ppem, &pixel_value ); never executed (the execution status of this line is deduced): _HB_OPEN_Get_Device( vr->DeviceTables[2], x_ppem, &pixel_value ); | - |
| 569 | gd->x_advance += pixel_value << 6; never executed (the execution status of this line is deduced): gd->x_advance += pixel_value << 6; | - |
| 570 | } | 0 |
| 571 | if ( format & HB_GPOS_FORMAT_HAVE_Y_ADVANCE_DEVICE ) never evaluated: format & 0x0080 | 0 |
| 572 | { | - |
| 573 | _HB_OPEN_Get_Device( vr->DeviceTables[VR_Y_ADVANCE_DEVICE], y_ppem, &pixel_value ); never executed (the execution status of this line is deduced): _HB_OPEN_Get_Device( vr->DeviceTables[3], y_ppem, &pixel_value ); | - |
| 574 | gd->y_advance += pixel_value << 6; never executed (the execution status of this line is deduced): gd->y_advance += pixel_value << 6; | - |
| 575 | } | 0 |
| 576 | } | 0 |
| 577 | | - |
| 578 | #ifdef HB_SUPPORT_MULTIPLE_MASTER | - |
| 579 | /* values returned from mmfunc() are already in fractional pixels */ | - |
| 580 | | - |
| 581 | if ( format & HB_GPOS_FORMAT_HAVE_X_ID_PLACEMENT ) | - |
| 582 | { | - |
| 583 | error = (gpos->mmfunc)( gpi->font, vr->XIdPlacement, | - |
| 584 | &value, gpos->data ); | - |
| 585 | if ( error ) | - |
| 586 | return error; | - |
| 587 | gd->x_pos += value; | - |
| 588 | } | - |
| 589 | if ( format & HB_GPOS_FORMAT_HAVE_Y_ID_PLACEMENT ) | - |
| 590 | { | - |
| 591 | error = (gpos->mmfunc)( gpi->font, vr->YIdPlacement, | - |
| 592 | &value, gpos->data ); | - |
| 593 | if ( error ) | - |
| 594 | return error; | - |
| 595 | gd->y_pos += value; | - |
| 596 | } | - |
| 597 | if ( format & HB_GPOS_FORMAT_HAVE_X_ID_ADVANCE ) | - |
| 598 | { | - |
| 599 | error = (gpos->mmfunc)( gpi->font, vr->XIdAdvance, | - |
| 600 | &value, gpos->data ); | - |
| 601 | if ( error ) | - |
| 602 | return error; | - |
| 603 | gd->x_advance += value; | - |
| 604 | } | - |
| 605 | if ( format & HB_GPOS_FORMAT_HAVE_Y_ID_ADVANCE ) | - |
| 606 | { | - |
| 607 | error = (gpos->mmfunc)( gpi->font, vr->YIdAdvance, | - |
| 608 | &value, gpos->data ); | - |
| 609 | if ( error ) | - |
| 610 | return error; | - |
| 611 | gd->y_advance += value; | - |
| 612 | } | - |
| 613 | #endif | - |
| 614 | | - |
| 615 | return error; never executed: return error; | 0 |
| 616 | } | - |
| 617 | | - |
| 618 | | - |
| 619 | /* AnchorFormat1 */ | - |
| 620 | /* AnchorFormat2 */ | - |
| 621 | /* AnchorFormat3 */ | - |
| 622 | /* AnchorFormat4 */ | - |
| 623 | | - |
| 624 | static HB_Error Load_Anchor( HB_Anchor* an, | - |
| 625 | HB_Stream stream ) | - |
| 626 | { | - |
| 627 | HB_Error error; executed (the execution status of this line is deduced): HB_Error error; | - |
| 628 | | - |
| 629 | HB_UInt cur_offset, new_offset, base_offset; executed (the execution status of this line is deduced): HB_UInt cur_offset, new_offset, base_offset; | - |
| 630 | | - |
| 631 | | - |
| 632 | base_offset = FILE_Pos(); executed (the execution status of this line is deduced): base_offset = _hb_stream_pos( stream ); | - |
| 633 | | - |
| 634 | if ( ACCESS_Frame( 2L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:371584 |
| 0-371584 |
| 635 | return error; never executed: return error; | 0 |
| 636 | | - |
| 637 | an->PosFormat = GET_UShort(); executed (the execution status of this line is deduced): an->PosFormat = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 638 | | - |
| 639 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 640 | | - |
| 641 | switch ( an->PosFormat ) | - |
| 642 | { | - |
| 643 | case 1: | - |
| 644 | if ( ACCESS_Frame( 4L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 4L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:366135 |
| 0-366135 |
| 645 | return error; never executed: return error; | 0 |
| 646 | | - |
| 647 | an->af.af1.XCoordinate = GET_Short(); executed (the execution status of this line is deduced): an->af.af1.XCoordinate = (stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) )); | - |
| 648 | an->af.af1.YCoordinate = GET_Short(); executed (the execution status of this line is deduced): an->af.af1.YCoordinate = (stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) )); | - |
| 649 | | - |
| 650 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 651 | break; executed: break;Execution Count:366135 | 366135 |
| 652 | | - |
| 653 | case 2: | - |
| 654 | if ( ACCESS_Frame( 6L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 6L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:5230 |
| 0-5230 |
| 655 | return error; never executed: return error; | 0 |
| 656 | | - |
| 657 | an->af.af2.XCoordinate = GET_Short(); executed (the execution status of this line is deduced): an->af.af2.XCoordinate = (stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) )); | - |
| 658 | an->af.af2.YCoordinate = GET_Short(); executed (the execution status of this line is deduced): an->af.af2.YCoordinate = (stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) )); | - |
| 659 | an->af.af2.AnchorPoint = GET_UShort(); executed (the execution status of this line is deduced): an->af.af2.AnchorPoint = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 660 | | - |
| 661 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 662 | break; executed: break;Execution Count:5230 | 5230 |
| 663 | | - |
| 664 | case 3: | - |
| 665 | if ( ACCESS_Frame( 6L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 6L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:219 |
| 0-219 |
| 666 | return error; never executed: return error; | 0 |
| 667 | | - |
| 668 | an->af.af3.XCoordinate = GET_Short(); executed (the execution status of this line is deduced): an->af.af3.XCoordinate = (stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) )); | - |
| 669 | an->af.af3.YCoordinate = GET_Short(); executed (the execution status of this line is deduced): an->af.af3.YCoordinate = (stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) )); | - |
| 670 | | - |
| 671 | new_offset = GET_UShort(); executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 672 | | - |
| 673 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 674 | | - |
| 675 | if ( new_offset ) evaluated: new_offset| yes Evaluation Count:75 | yes Evaluation Count:144 |
| 75-144 |
| 676 | { | - |
| 677 | if ( ALLOC_ARRAY( an->af.af3.DeviceTables, 2, HB_Device ) ) partially evaluated: ( (an->af.af3.DeviceTables) = _hb_alloc( (2)*sizeof(HB_Device), &error ), error != 0 )| no Evaluation Count:0 | yes Evaluation Count:75 |
| 0-75 |
| 678 | return error; never executed: return error; | 0 |
| 679 | | - |
| 680 | an->af.af3.DeviceTables[AF3_X_DEVICE_TABLE] = 0; executed (the execution status of this line is deduced): an->af.af3.DeviceTables[0] = 0; | - |
| 681 | an->af.af3.DeviceTables[AF3_Y_DEVICE_TABLE] = 0; executed (the execution status of this line is deduced): an->af.af3.DeviceTables[1] = 0; | - |
| 682 | | - |
| 683 | new_offset += base_offset; executed (the execution status of this line is deduced): new_offset += base_offset; | - |
| 684 | | - |
| 685 | cur_offset = FILE_Pos(); executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 686 | if ( FILE_Seek( new_offset ) || partially evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:75 |
| 0-75 |
| 687 | ( error = _HB_OPEN_Load_Device( &an->af.af3.DeviceTables[AF3_X_DEVICE_TABLE], partially evaluated: ( error = _HB_OPEN_Load_Device( &an->af.af3.DeviceTables[0], stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:75 |
| 0-75 |
| 688 | stream ) ) != HB_Err_Ok ) partially evaluated: ( error = _HB_OPEN_Load_Device( &an->af.af3.DeviceTables[0], stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:75 |
| 0-75 |
| 689 | goto Fail2; never executed: goto Fail2; | 0 |
| 690 | (void)FILE_Seek( cur_offset ); executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 691 | } executed: }Execution Count:75 | 75 |
| 692 | | - |
| 693 | if ( ACCESS_Frame( 2L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:219 |
| 0-219 |
| 694 | goto Fail; never executed: goto Fail; | 0 |
| 695 | | - |
| 696 | new_offset = GET_UShort(); executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 697 | | - |
| 698 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 699 | | - |
| 700 | if ( new_offset ) evaluated: new_offset| yes Evaluation Count:150 | yes Evaluation Count:69 |
| 69-150 |
| 701 | { | - |
| 702 | if ( !an->af.af3.DeviceTables ) evaluated: !an->af.af3.DeviceTables| yes Evaluation Count:144 | yes Evaluation Count:6 |
| 6-144 |
| 703 | { | - |
| 704 | if ( ALLOC_ARRAY( an->af.af3.DeviceTables, 2, HB_Device ) ) partially evaluated: ( (an->af.af3.DeviceTables) = _hb_alloc( (2)*sizeof(HB_Device), &error ), error != 0 )| no Evaluation Count:0 | yes Evaluation Count:144 |
| 0-144 |
| 705 | return error; never executed: return error; | 0 |
| 706 | | - |
| 707 | an->af.af3.DeviceTables[AF3_X_DEVICE_TABLE] = 0; executed (the execution status of this line is deduced): an->af.af3.DeviceTables[0] = 0; | - |
| 708 | an->af.af3.DeviceTables[AF3_Y_DEVICE_TABLE] = 0; executed (the execution status of this line is deduced): an->af.af3.DeviceTables[1] = 0; | - |
| 709 | } executed: }Execution Count:144 | 144 |
| 710 | | - |
| 711 | new_offset += base_offset; executed (the execution status of this line is deduced): new_offset += base_offset; | - |
| 712 | | - |
| 713 | cur_offset = FILE_Pos(); executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 714 | if ( FILE_Seek( new_offset ) || partially evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:150 |
| 0-150 |
| 715 | ( error = _HB_OPEN_Load_Device( &an->af.af3.DeviceTables[AF3_Y_DEVICE_TABLE], partially evaluated: ( error = _HB_OPEN_Load_Device( &an->af.af3.DeviceTables[1], stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:150 |
| 0-150 |
| 716 | stream ) ) != HB_Err_Ok ) partially evaluated: ( error = _HB_OPEN_Load_Device( &an->af.af3.DeviceTables[1], stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:150 |
| 0-150 |
| 717 | goto Fail; never executed: goto Fail; | 0 |
| 718 | (void)FILE_Seek( cur_offset ); executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 719 | } executed: }Execution Count:150 | 150 |
| 720 | break; executed: break;Execution Count:219 | 219 |
| 721 | | - |
| 722 | case 4: | - |
| 723 | if ( ACCESS_Frame( 4L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 4L ))) != 0 ) | 0 |
| 724 | return error; never executed: return error; | 0 |
| 725 | | - |
| 726 | #ifdef HB_SUPPORT_MULTIPLE_MASTER | - |
| 727 | an->af.af4.XIdAnchor = GET_UShort(); | - |
| 728 | an->af.af4.YIdAnchor = GET_UShort(); | - |
| 729 | #else | - |
| 730 | (void) GET_UShort(); never executed (the execution status of this line is deduced): (void) ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 731 | (void) GET_UShort(); never executed (the execution status of this line is deduced): (void) ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 732 | #endif | - |
| 733 | | - |
| 734 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 735 | break; | 0 |
| 736 | | - |
| 737 | default: | - |
| 738 | return ERR(HB_Err_Invalid_SubTable_Format); never executed: return _hb_err (HB_Err_Invalid_SubTable_Format); | 0 |
| 739 | } | - |
| 740 | | - |
| 741 | return HB_Err_Ok; executed: return HB_Err_Ok;Execution Count:371584 | 371584 |
| 742 | | - |
| 743 | Fail: | - |
| 744 | if ( an->af.af3.DeviceTables ) never evaluated: an->af.af3.DeviceTables | 0 |
| 745 | _HB_OPEN_Free_Device( an->af.af3.DeviceTables[AF3_X_DEVICE_TABLE] ); never executed: _HB_OPEN_Free_Device( an->af.af3.DeviceTables[0] ); | 0 |
| 746 | | - |
| 747 | Fail2: code before this statement never executed: Fail2: | 0 |
| 748 | FREE( an->af.af3.DeviceTables ); never executed: } never executed: } never evaluated: (an->af.af3.DeviceTables) never evaluated: 0 | 0 |
| 749 | return error; never executed: return error; | 0 |
| 750 | } | - |
| 751 | | - |
| 752 | | - |
| 753 | static void Free_Anchor( HB_Anchor* an) | - |
| 754 | { | - |
| 755 | if ( an->PosFormat == 3 && an->af.af3.DeviceTables ) evaluated: an->PosFormat == 3| yes Evaluation Count:116 | yes Evaluation Count:341345 |
partially evaluated: an->af.af3.DeviceTables| yes Evaluation Count:116 | no Evaluation Count:0 |
| 0-341345 |
| 756 | { | - |
| 757 | _HB_OPEN_Free_Device( an->af.af3.DeviceTables[AF3_X_DEVICE_TABLE] ); executed (the execution status of this line is deduced): _HB_OPEN_Free_Device( an->af.af3.DeviceTables[0] ); | - |
| 758 | _HB_OPEN_Free_Device( an->af.af3.DeviceTables[AF3_Y_DEVICE_TABLE] ); executed (the execution status of this line is deduced): _HB_OPEN_Free_Device( an->af.af3.DeviceTables[1] ); | - |
| 759 | FREE( an->af.af3.DeviceTables ); executed: }Execution Count:116 executed: }Execution Count:116 partially evaluated: (an->af.af3.DeviceTables)| yes Evaluation Count:116 | no Evaluation Count:0 |
partially evaluated: 0| no Evaluation Count:0 | yes Evaluation Count:116 |
| 0-116 |
| 760 | } executed: }Execution Count:116 | 116 |
| 761 | } executed: }Execution Count:341461 | 341461 |
| 762 | | - |
| 763 | | - |
| 764 | static HB_Error Get_Anchor( GPOS_Instance* gpi, | - |
| 765 | HB_Anchor* an, | - |
| 766 | HB_UShort glyph_index, | - |
| 767 | HB_Fixed* x_value, | - |
| 768 | HB_Fixed* y_value ) | - |
| 769 | { | - |
| 770 | HB_Error error = HB_Err_Ok; executed (the execution status of this line is deduced): HB_Error error = HB_Err_Ok; | - |
| 771 | | - |
| 772 | #ifdef HB_SUPPORT_MULTIPLE_MASTER | - |
| 773 | HB_GPOSHeader* gpos = gpi->gpos; | - |
| 774 | #endif | - |
| 775 | HB_UShort ap; executed (the execution status of this line is deduced): HB_UShort ap; | - |
| 776 | | - |
| 777 | HB_Short pixel_value; executed (the execution status of this line is deduced): HB_Short pixel_value; | - |
| 778 | | - |
| 779 | HB_UShort x_ppem, y_ppem; executed (the execution status of this line is deduced): HB_UShort x_ppem, y_ppem; | - |
| 780 | HB_16Dot16 x_scale, y_scale; executed (the execution status of this line is deduced): HB_16Dot16 x_scale, y_scale; | - |
| 781 | | - |
| 782 | | - |
| 783 | x_ppem = gpi->font->x_ppem; executed (the execution status of this line is deduced): x_ppem = gpi->font->x_ppem; | - |
| 784 | y_ppem = gpi->font->y_ppem; executed (the execution status of this line is deduced): y_ppem = gpi->font->y_ppem; | - |
| 785 | x_scale = gpi->font->x_scale; executed (the execution status of this line is deduced): x_scale = gpi->font->x_scale; | - |
| 786 | y_scale = gpi->font->y_scale; executed (the execution status of this line is deduced): y_scale = gpi->font->y_scale; | - |
| 787 | | - |
| 788 | switch ( an->PosFormat ) | - |
| 789 | { | - |
| 790 | case 0: | - |
| 791 | /* The special case of an empty AnchorTable */ | - |
| 792 | default: | - |
| 793 | | - |
| 794 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 795 | | - |
| 796 | case 1: | - |
| 797 | *x_value = x_scale * an->af.af1.XCoordinate / 0x10000; executed (the execution status of this line is deduced): *x_value = x_scale * an->af.af1.XCoordinate / 0x10000; | - |
| 798 | *y_value = y_scale * an->af.af1.YCoordinate / 0x10000; executed (the execution status of this line is deduced): *y_value = y_scale * an->af.af1.YCoordinate / 0x10000; | - |
| 799 | break; executed: break;Execution Count:2400 | 2400 |
| 800 | | - |
| 801 | case 2: | - |
| 802 | if ( !gpi->dvi ) never evaluated: !gpi->dvi | 0 |
| 803 | { | - |
| 804 | hb_uint32 n_points = 0; never executed (the execution status of this line is deduced): hb_uint32 n_points = 0; | - |
| 805 | ap = an->af.af2.AnchorPoint; never executed (the execution status of this line is deduced): ap = an->af.af2.AnchorPoint; | - |
| 806 | if (!gpi->font->klass->getPointInOutline) never evaluated: !gpi->font->klass->getPointInOutline | 0 |
| 807 | goto no_contour_point; never executed: goto no_contour_point; | 0 |
| 808 | error = gpi->font->klass->getPointInOutline(gpi->font, glyph_index, gpi->load_flags, ap, x_value, y_value, &n_points); never executed (the execution status of this line is deduced): error = gpi->font->klass->getPointInOutline(gpi->font, glyph_index, gpi->load_flags, ap, x_value, y_value, &n_points); | - |
| 809 | if (error) | 0 |
| 810 | return error; never executed: return error; | 0 |
| 811 | /* if n_points is set to zero, we use the design coordinate value pair. | - |
| 812 | * This can happen e.g. for sbit glyphs. */ | - |
| 813 | if (!n_points) never evaluated: !n_points | 0 |
| 814 | goto no_contour_point; never executed: goto no_contour_point; | 0 |
| 815 | } | 0 |
| 816 | else | - |
| 817 | { | - |
| 818 | no_contour_point: | - |
| 819 | *x_value = x_scale * an->af.af3.XCoordinate / 0x10000; never executed (the execution status of this line is deduced): *x_value = x_scale * an->af.af3.XCoordinate / 0x10000; | - |
| 820 | *y_value = y_scale * an->af.af3.YCoordinate / 0x10000; never executed (the execution status of this line is deduced): *y_value = y_scale * an->af.af3.YCoordinate / 0x10000; | - |
| 821 | } | 0 |
| 822 | break; | 0 |
| 823 | | - |
| 824 | case 3: | - |
| 825 | if ( !gpi->dvi ) partially evaluated: !gpi->dvi| yes Evaluation Count:48 | no Evaluation Count:0 |
| 0-48 |
| 826 | { | - |
| 827 | _HB_OPEN_Get_Device( an->af.af3.DeviceTables[AF3_X_DEVICE_TABLE], x_ppem, &pixel_value ); executed (the execution status of this line is deduced): _HB_OPEN_Get_Device( an->af.af3.DeviceTables[0], x_ppem, &pixel_value ); | - |
| 828 | *x_value = pixel_value << 6; executed (the execution status of this line is deduced): *x_value = pixel_value << 6; | - |
| 829 | _HB_OPEN_Get_Device( an->af.af3.DeviceTables[AF3_Y_DEVICE_TABLE], y_ppem, &pixel_value ); executed (the execution status of this line is deduced): _HB_OPEN_Get_Device( an->af.af3.DeviceTables[1], y_ppem, &pixel_value ); | - |
| 830 | *y_value = pixel_value << 6; executed (the execution status of this line is deduced): *y_value = pixel_value << 6; | - |
| 831 | } executed: }Execution Count:48 | 48 |
| 832 | else | - |
| 833 | *x_value = *y_value = 0; never executed: *x_value = *y_value = 0; | 0 |
| 834 | | - |
| 835 | *x_value += x_scale * an->af.af3.XCoordinate / 0x10000; executed (the execution status of this line is deduced): *x_value += x_scale * an->af.af3.XCoordinate / 0x10000; | - |
| 836 | *y_value += y_scale * an->af.af3.YCoordinate / 0x10000; executed (the execution status of this line is deduced): *y_value += y_scale * an->af.af3.YCoordinate / 0x10000; | - |
| 837 | break; executed: break;Execution Count:48 | 48 |
| 838 | | - |
| 839 | case 4: | - |
| 840 | #ifdef HB_SUPPORT_MULTIPLE_MASTER | - |
| 841 | error = (gpos->mmfunc)( gpi->font, an->af.af4.XIdAnchor, | - |
| 842 | x_value, gpos->data ); | - |
| 843 | if ( error ) | - |
| 844 | return error; | - |
| 845 | | - |
| 846 | error = (gpos->mmfunc)( gpi->font, an->af.af4.YIdAnchor, | - |
| 847 | y_value, gpos->data ); | - |
| 848 | if ( error ) | - |
| 849 | return error; | - |
| 850 | break; | - |
| 851 | #else | - |
| 852 | return ERR(HB_Err_Not_Covered); never executed: return _hb_err (HB_Err_Not_Covered); | 0 |
| 853 | #endif | - |
| 854 | } | - |
| 855 | | - |
| 856 | return error; executed: return error;Execution Count:2448 | 2448 |
| 857 | } | - |
| 858 | | - |
| 859 | | - |
| 860 | /* MarkArray */ | - |
| 861 | | - |
| 862 | static HB_Error Load_MarkArray ( HB_MarkArray* ma, | - |
| 863 | HB_Stream stream ) | - |
| 864 | { | - |
| 865 | HB_Error error; executed (the execution status of this line is deduced): HB_Error error; | - |
| 866 | | - |
| 867 | HB_UShort n, m, count; executed (the execution status of this line is deduced): HB_UShort n, m, count; | - |
| 868 | HB_UInt cur_offset, new_offset, base_offset; executed (the execution status of this line is deduced): HB_UInt cur_offset, new_offset, base_offset; | - |
| 869 | | - |
| 870 | HB_MarkRecord* mr; executed (the execution status of this line is deduced): HB_MarkRecord* mr; | - |
| 871 | | - |
| 872 | | - |
| 873 | base_offset = FILE_Pos(); executed (the execution status of this line is deduced): base_offset = _hb_stream_pos( stream ); | - |
| 874 | | - |
| 875 | if ( ACCESS_Frame( 2L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:2394 |
| 0-2394 |
| 876 | return error; never executed: return error; | 0 |
| 877 | | - |
| 878 | count = ma->MarkCount = GET_UShort(); executed (the execution status of this line is deduced): count = ma->MarkCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 879 | | - |
| 880 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 881 | | - |
| 882 | ma->MarkRecord = NULL; executed (the execution status of this line is deduced): ma->MarkRecord = ((void *)0); | - |
| 883 | | - |
| 884 | if ( ALLOC_ARRAY( ma->MarkRecord, count, HB_MarkRecord ) ) partially evaluated: ( (ma->MarkRecord) = _hb_alloc( (count)*sizeof(HB_MarkRecord), &error ), error != 0 )| no Evaluation Count:0 | yes Evaluation Count:2394 |
| 0-2394 |
| 885 | return error; never executed: return error; | 0 |
| 886 | | - |
| 887 | mr = ma->MarkRecord; executed (the execution status of this line is deduced): mr = ma->MarkRecord; | - |
| 888 | | - |
| 889 | for ( n = 0; n < count; n++ ) evaluated: n < count| yes Evaluation Count:44292 | yes Evaluation Count:2394 |
| 2394-44292 |
| 890 | { | - |
| 891 | if ( ACCESS_Frame( 4L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 4L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:44292 |
| 0-44292 |
| 892 | goto Fail; never executed: goto Fail; | 0 |
| 893 | | - |
| 894 | mr[n].Class = GET_UShort(); executed (the execution status of this line is deduced): mr[n].Class = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 895 | new_offset = GET_UShort() + base_offset; executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 896 | | - |
| 897 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 898 | | - |
| 899 | cur_offset = FILE_Pos(); executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 900 | if ( FILE_Seek( new_offset ) || partially evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:44292 |
| 0-44292 |
| 901 | ( error = Load_Anchor( &mr[n].MarkAnchor, stream ) ) != HB_Err_Ok ) partially evaluated: ( error = Load_Anchor( &mr[n].MarkAnchor, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:44292 |
| 0-44292 |
| 902 | goto Fail; never executed: goto Fail; | 0 |
| 903 | (void)FILE_Seek( cur_offset ); executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 904 | } executed: }Execution Count:44292 | 44292 |
| 905 | | - |
| 906 | return HB_Err_Ok; executed: return HB_Err_Ok;Execution Count:2394 | 2394 |
| 907 | | - |
| 908 | Fail: | - |
| 909 | for ( m = 0; m < n; m++ ) | 0 |
| 910 | Free_Anchor( &mr[m].MarkAnchor ); never executed: Free_Anchor( &mr[m].MarkAnchor ); | 0 |
| 911 | | - |
| 912 | FREE( mr ); never executed: } never executed: } never evaluated: (mr) never evaluated: 0 | 0 |
| 913 | return error; never executed: return error; | 0 |
| 914 | } | - |
| 915 | | - |
| 916 | | - |
| 917 | static void Free_MarkArray( HB_MarkArray* ma ) | - |
| 918 | { | - |
| 919 | HB_UShort n, count; executed (the execution status of this line is deduced): HB_UShort n, count; | - |
| 920 | | - |
| 921 | HB_MarkRecord* mr; executed (the execution status of this line is deduced): HB_MarkRecord* mr; | - |
| 922 | | - |
| 923 | | - |
| 924 | if ( ma->MarkRecord ) partially evaluated: ma->MarkRecord| yes Evaluation Count:2271 | no Evaluation Count:0 |
| 0-2271 |
| 925 | { | - |
| 926 | count = ma->MarkCount; executed (the execution status of this line is deduced): count = ma->MarkCount; | - |
| 927 | mr = ma->MarkRecord; executed (the execution status of this line is deduced): mr = ma->MarkRecord; | - |
| 928 | | - |
| 929 | for ( n = 0; n < count; n++ ) evaluated: n < count| yes Evaluation Count:42044 | yes Evaluation Count:2271 |
| 2271-42044 |
| 930 | Free_Anchor( &mr[n].MarkAnchor ); executed: Free_Anchor( &mr[n].MarkAnchor );Execution Count:42044 | 42044 |
| 931 | | - |
| 932 | FREE( mr ); executed: }Execution Count:2271 executed: }Execution Count:2271 partially evaluated: (mr)| yes Evaluation Count:2271 | no Evaluation Count:0 |
partially evaluated: 0| no Evaluation Count:0 | yes Evaluation Count:2271 |
| 0-2271 |
| 933 | } executed: }Execution Count:2271 | 2271 |
| 934 | } executed: }Execution Count:2271 | 2271 |
| 935 | | - |
| 936 | | - |
| 937 | /* LookupType 1 */ | - |
| 938 | | - |
| 939 | /* SinglePosFormat1 */ | - |
| 940 | /* SinglePosFormat2 */ | - |
| 941 | | - |
| 942 | static HB_Error Load_SinglePos( HB_GPOS_SubTable* st, | - |
| 943 | HB_Stream stream ) | - |
| 944 | { | - |
| 945 | HB_Error error; executed (the execution status of this line is deduced): HB_Error error; | - |
| 946 | HB_SinglePos* sp = &st->single; executed (the execution status of this line is deduced): HB_SinglePos* sp = &st->single; | - |
| 947 | | - |
| 948 | HB_UShort n, m, count, format; executed (the execution status of this line is deduced): HB_UShort n, m, count, format; | - |
| 949 | HB_UInt cur_offset, new_offset, base_offset; executed (the execution status of this line is deduced): HB_UInt cur_offset, new_offset, base_offset; | - |
| 950 | | - |
| 951 | HB_ValueRecord* vr; executed (the execution status of this line is deduced): HB_ValueRecord* vr; | - |
| 952 | | - |
| 953 | | - |
| 954 | base_offset = FILE_Pos(); executed (the execution status of this line is deduced): base_offset = _hb_stream_pos( stream ); | - |
| 955 | | - |
| 956 | if ( ACCESS_Frame( 6L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 6L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:14 |
| 0-14 |
| 957 | return error; never executed: return error; | 0 |
| 958 | | - |
| 959 | sp->PosFormat = GET_UShort(); executed (the execution status of this line is deduced): sp->PosFormat = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 960 | new_offset = GET_UShort() + base_offset; executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 961 | | - |
| 962 | format = sp->ValueFormat = GET_UShort(); executed (the execution status of this line is deduced): format = sp->ValueFormat = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 963 | | - |
| 964 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 965 | | - |
| 966 | if ( !format ) partially evaluated: !format| no Evaluation Count:0 | yes Evaluation Count:14 |
| 0-14 |
| 967 | return ERR(HB_Err_Invalid_SubTable); never executed: return _hb_err (HB_Err_Invalid_SubTable); | 0 |
| 968 | | - |
| 969 | cur_offset = FILE_Pos(); executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 970 | if ( FILE_Seek( new_offset ) || partially evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:14 |
| 0-14 |
| 971 | ( error = _HB_OPEN_Load_Coverage( &sp->Coverage, stream ) ) != HB_Err_Ok ) partially evaluated: ( error = _HB_OPEN_Load_Coverage( &sp->Coverage, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:14 |
| 0-14 |
| 972 | return error; never executed: return error; | 0 |
| 973 | (void)FILE_Seek( cur_offset ); executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 974 | | - |
| 975 | switch ( sp->PosFormat ) | - |
| 976 | { | - |
| 977 | case 1: | - |
| 978 | error = Load_ValueRecord( &sp->spf.spf1.Value, format, executed (the execution status of this line is deduced): error = Load_ValueRecord( &sp->spf.spf1.Value, format, | - |
| 979 | base_offset, stream ); executed (the execution status of this line is deduced): base_offset, stream ); | - |
| 980 | if ( error ) partially evaluated: error| no Evaluation Count:0 | yes Evaluation Count:14 |
| 0-14 |
| 981 | goto Fail2; never executed: goto Fail2; | 0 |
| 982 | break; executed: break;Execution Count:14 | 14 |
| 983 | | - |
| 984 | case 2: | - |
| 985 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 986 | goto Fail2; never executed: goto Fail2; | 0 |
| 987 | | - |
| 988 | count = sp->spf.spf2.ValueCount = GET_UShort(); never executed (the execution status of this line is deduced): count = sp->spf.spf2.ValueCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 989 | | - |
| 990 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 991 | | - |
| 992 | sp->spf.spf2.Value = NULL; never executed (the execution status of this line is deduced): sp->spf.spf2.Value = ((void *)0); | - |
| 993 | | - |
| 994 | if ( ALLOC_ARRAY( sp->spf.spf2.Value, count, HB_ValueRecord ) ) never evaluated: ( (sp->spf.spf2.Value) = _hb_alloc( (count)*sizeof(HB_ValueRecord), &error ), error != 0 ) | 0 |
| 995 | goto Fail2; never executed: goto Fail2; | 0 |
| 996 | | - |
| 997 | vr = sp->spf.spf2.Value; never executed (the execution status of this line is deduced): vr = sp->spf.spf2.Value; | - |
| 998 | | - |
| 999 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 1000 | { | - |
| 1001 | error = Load_ValueRecord( &vr[n], format, base_offset, stream ); never executed (the execution status of this line is deduced): error = Load_ValueRecord( &vr[n], format, base_offset, stream ); | - |
| 1002 | if ( error ) | 0 |
| 1003 | goto Fail1; never executed: goto Fail1; | 0 |
| 1004 | } | 0 |
| 1005 | break; | 0 |
| 1006 | | - |
| 1007 | default: | - |
| 1008 | return ERR(HB_Err_Invalid_SubTable_Format); never executed: return _hb_err (HB_Err_Invalid_SubTable_Format); | 0 |
| 1009 | } | - |
| 1010 | | - |
| 1011 | return HB_Err_Ok; executed: return HB_Err_Ok;Execution Count:14 | 14 |
| 1012 | | - |
| 1013 | Fail1: | - |
| 1014 | for ( m = 0; m < n; m++ ) | 0 |
| 1015 | Free_ValueRecord( &vr[m], format ); never executed: Free_ValueRecord( &vr[m], format ); | 0 |
| 1016 | | - |
| 1017 | FREE( vr ); never executed: } never executed: } never evaluated: (vr) never evaluated: 0 | 0 |
| 1018 | | - |
| 1019 | Fail2: code before this statement never executed: Fail2: | 0 |
| 1020 | _HB_OPEN_Free_Coverage( &sp->Coverage ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_Coverage( &sp->Coverage ); | - |
| 1021 | return error; never executed: return error; | 0 |
| 1022 | } | - |
| 1023 | | - |
| 1024 | | - |
| 1025 | static void Free_SinglePos( HB_GPOS_SubTable* st ) | - |
| 1026 | { | - |
| 1027 | HB_UShort n, count, format; executed (the execution status of this line is deduced): HB_UShort n, count, format; | - |
| 1028 | HB_SinglePos* sp = &st->single; executed (the execution status of this line is deduced): HB_SinglePos* sp = &st->single; | - |
| 1029 | | - |
| 1030 | HB_ValueRecord* v; executed (the execution status of this line is deduced): HB_ValueRecord* v; | - |
| 1031 | | - |
| 1032 | | - |
| 1033 | format = sp->ValueFormat; executed (the execution status of this line is deduced): format = sp->ValueFormat; | - |
| 1034 | | - |
| 1035 | switch ( sp->PosFormat ) | - |
| 1036 | { | - |
| 1037 | case 1: | - |
| 1038 | Free_ValueRecord( &sp->spf.spf1.Value, format ); executed (the execution status of this line is deduced): Free_ValueRecord( &sp->spf.spf1.Value, format ); | - |
| 1039 | break; executed: break;Execution Count:12 | 12 |
| 1040 | | - |
| 1041 | case 2: | - |
| 1042 | if ( sp->spf.spf2.Value ) never evaluated: sp->spf.spf2.Value | 0 |
| 1043 | { | - |
| 1044 | count = sp->spf.spf2.ValueCount; never executed (the execution status of this line is deduced): count = sp->spf.spf2.ValueCount; | - |
| 1045 | v = sp->spf.spf2.Value; never executed (the execution status of this line is deduced): v = sp->spf.spf2.Value; | - |
| 1046 | | - |
| 1047 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 1048 | Free_ValueRecord( &v[n], format ); never executed: Free_ValueRecord( &v[n], format ); | 0 |
| 1049 | | - |
| 1050 | FREE( v ); never executed: } never executed: } never evaluated: (v) never evaluated: 0 | 0 |
| 1051 | } | 0 |
| 1052 | break; | 0 |
| 1053 | default: | - |
| 1054 | break; | 0 |
| 1055 | } | - |
| 1056 | | - |
| 1057 | _HB_OPEN_Free_Coverage( &sp->Coverage ); executed (the execution status of this line is deduced): _HB_OPEN_Free_Coverage( &sp->Coverage ); | - |
| 1058 | } executed: }Execution Count:12 | 12 |
| 1059 | | - |
| 1060 | static HB_Error Lookup_SinglePos( GPOS_Instance* gpi, | - |
| 1061 | HB_GPOS_SubTable* st, | - |
| 1062 | HB_Buffer buffer, | - |
| 1063 | HB_UShort flags, | - |
| 1064 | HB_UShort context_length, | - |
| 1065 | int nesting_level ) | - |
| 1066 | { | - |
| 1067 | HB_UShort index, property; executed (the execution status of this line is deduced): HB_UShort index, property; | - |
| 1068 | HB_Error error; executed (the execution status of this line is deduced): HB_Error error; | - |
| 1069 | HB_GPOSHeader* gpos = gpi->gpos; executed (the execution status of this line is deduced): HB_GPOSHeader* gpos = gpi->gpos; | - |
| 1070 | HB_SinglePos* sp = &st->single; executed (the execution status of this line is deduced): HB_SinglePos* sp = &st->single; | - |
| 1071 | | - |
| 1072 | HB_UNUSED(nesting_level); executed (the execution status of this line is deduced): ((nesting_level) = (nesting_level)); | - |
| 1073 | | - |
| 1074 | if ( context_length != 0xFFFF && context_length < 1 ) partially evaluated: context_length != 0xFFFF| no Evaluation Count:0 | yes Evaluation Count:11 |
never evaluated: context_length < 1 | 0-11 |
| 1075 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 1076 | | - |
| 1077 | if ( CHECK_Property( gpos->gdef, IN_CURITEM(), flags, &property ) ) partially evaluated: ( ( error = _HB_GDEF_Check_Property( (gpos->gdef), ((&buffer->in_string[buffer->in_pos])), (flags), (&property) ) ) != HB_Err_Ok )| no Evaluation Count:0 | yes Evaluation Count:11 |
| 0-11 |
| 1078 | return error; never executed: return error; | 0 |
| 1079 | | - |
| 1080 | error = _HB_OPEN_Coverage_Index( &sp->Coverage, IN_CURGLYPH(), &index ); executed (the execution status of this line is deduced): error = _HB_OPEN_Coverage_Index( &sp->Coverage, (buffer->in_string[buffer->in_pos].gindex), &index ); | - |
| 1081 | if ( error ) partially evaluated: error| yes Evaluation Count:11 | no Evaluation Count:0 |
| 0-11 |
| 1082 | return error; executed: return error;Execution Count:11 | 11 |
| 1083 | | - |
| 1084 | switch ( sp->PosFormat ) | - |
| 1085 | { | - |
| 1086 | case 1: | - |
| 1087 | error = Get_ValueRecord( gpi, &sp->spf.spf1.Value, never executed (the execution status of this line is deduced): error = Get_ValueRecord( gpi, &sp->spf.spf1.Value, | - |
| 1088 | sp->ValueFormat, POSITION( buffer->in_pos ) ); never executed (the execution status of this line is deduced): sp->ValueFormat, (&buffer->positions[(buffer->in_pos)]) ); | - |
| 1089 | if ( error ) | 0 |
| 1090 | return error; never executed: return error; | 0 |
| 1091 | break; | 0 |
| 1092 | | - |
| 1093 | case 2: | - |
| 1094 | if ( index >= sp->spf.spf2.ValueCount ) never evaluated: index >= sp->spf.spf2.ValueCount | 0 |
| 1095 | return ERR(HB_Err_Invalid_SubTable); never executed: return _hb_err (HB_Err_Invalid_SubTable); | 0 |
| 1096 | error = Get_ValueRecord( gpi, &sp->spf.spf2.Value[index], never executed (the execution status of this line is deduced): error = Get_ValueRecord( gpi, &sp->spf.spf2.Value[index], | - |
| 1097 | sp->ValueFormat, POSITION( buffer->in_pos ) ); never executed (the execution status of this line is deduced): sp->ValueFormat, (&buffer->positions[(buffer->in_pos)]) ); | - |
| 1098 | if ( error ) | 0 |
| 1099 | return error; never executed: return error; | 0 |
| 1100 | break; | 0 |
| 1101 | | - |
| 1102 | default: | - |
| 1103 | return ERR(HB_Err_Invalid_SubTable); never executed: return _hb_err (HB_Err_Invalid_SubTable); | 0 |
| 1104 | } | - |
| 1105 | | - |
| 1106 | (buffer->in_pos)++; never executed (the execution status of this line is deduced): (buffer->in_pos)++; | - |
| 1107 | | - |
| 1108 | return HB_Err_Ok; never executed: return HB_Err_Ok; | 0 |
| 1109 | } | - |
| 1110 | | - |
| 1111 | /* LookupType 2 */ | - |
| 1112 | | - |
| 1113 | /* PairSet */ | - |
| 1114 | | - |
| 1115 | static HB_Error Load_PairSet ( HB_PairSet* ps, | - |
| 1116 | HB_UShort format1, | - |
| 1117 | HB_UShort format2, | - |
| 1118 | HB_Stream stream ) | - |
| 1119 | { | - |
| 1120 | HB_Error error; executed (the execution status of this line is deduced): HB_Error error; | - |
| 1121 | | - |
| 1122 | HB_UShort n, m, count; executed (the execution status of this line is deduced): HB_UShort n, m, count; | - |
| 1123 | | - |
| 1124 | #ifdef HB_USE_FLEXIBLE_VALUE_RECORD | - |
| 1125 | HB_UInt record_size = 0; executed (the execution status of this line is deduced): HB_UInt record_size = 0; | - |
| 1126 | HB_Short *vr; executed (the execution status of this line is deduced): HB_Short *vr; | - |
| 1127 | #else | - |
| 1128 | HB_UInt base_offset; | - |
| 1129 | HB_PairValueRecord* pvr; | - |
| 1130 | | - |
| 1131 | base_offset = FILE_Pos(); | - |
| 1132 | #endif | - |
| 1133 | | - |
| 1134 | if ( ACCESS_Frame( 2L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:205 |
| 0-205 |
| 1135 | return error; never executed: return error; | 0 |
| 1136 | | - |
| 1137 | count = ps->PairValueCount = GET_UShort(); executed (the execution status of this line is deduced): count = ps->PairValueCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 1138 | | - |
| 1139 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 1140 | | - |
| 1141 | #ifndef HB_USE_FLEXIBLE_VALUE_RECORD | - |
| 1142 | ps->PairValueRecord = NULL; | - |
| 1143 | | - |
| 1144 | if ( ALLOC_ARRAY( ps->PairValueRecord, count, HB_PairValueRecord ) ) | - |
| 1145 | return error; | - |
| 1146 | | - |
| 1147 | pvr = ps->PairValueRecord; | - |
| 1148 | | - |
| 1149 | for ( n = 0; n < count; n++ ) | - |
| 1150 | { | - |
| 1151 | if ( ACCESS_Frame( 2L ) ) | - |
| 1152 | goto Fail; | - |
| 1153 | | - |
| 1154 | pvr[n].SecondGlyph = GET_UShort(); | - |
| 1155 | | - |
| 1156 | FORGET_Frame(); | - |
| 1157 | | - |
| 1158 | if ( format1 ) | - |
| 1159 | { | - |
| 1160 | error = Load_ValueRecord( &pvr[n].Value1, format1, | - |
| 1161 | base_offset, stream ); | - |
| 1162 | if ( error ) | - |
| 1163 | goto Fail; | - |
| 1164 | } | - |
| 1165 | if ( format2 ) | - |
| 1166 | { | - |
| 1167 | error = Load_ValueRecord( &pvr[n].Value2, format2, | - |
| 1168 | base_offset, stream ); | - |
| 1169 | if ( error ) | - |
| 1170 | { | - |
| 1171 | if ( format1 ) | - |
| 1172 | Free_ValueRecord( &pvr[n].Value1, format1 ); | - |
| 1173 | goto Fail; | - |
| 1174 | } | - |
| 1175 | } | - |
| 1176 | } | - |
| 1177 | #else | - |
| 1178 | ps->ValueRecords = 0; executed (the execution status of this line is deduced): ps->ValueRecords = 0; | - |
| 1179 | | - |
| 1180 | // Add one for the SecondGlyph part of each record | - |
| 1181 | record_size = Calculate_Class2RecordSize( format1, format2 ) + 1; executed (the execution status of this line is deduced): record_size = Calculate_Class2RecordSize( format1, format2 ) + 1; | - |
| 1182 | | - |
| 1183 | if ( ALLOC_ARRAY( ps->ValueRecords, record_size * count, HB_Short ) ) partially evaluated: ( (ps->ValueRecords) = _hb_alloc( (record_size * count)*sizeof(HB_Short), &error ), error != 0 )| no Evaluation Count:0 | yes Evaluation Count:205 |
| 0-205 |
| 1184 | return error; never executed: return error; | 0 |
| 1185 | | - |
| 1186 | vr = ps->ValueRecords; executed (the execution status of this line is deduced): vr = ps->ValueRecords; | - |
| 1187 | | - |
| 1188 | for ( n = 0; n < count; n++ ) evaluated: n < count| yes Evaluation Count:2411 | yes Evaluation Count:205 |
| 205-2411 |
| 1189 | { | - |
| 1190 | for ( m = 0; m < record_size; m++ ) { evaluated: m < record_size| yes Evaluation Count:4822 | yes Evaluation Count:2411 |
| 2411-4822 |
| 1191 | if ( ACCESS_Frame( 2L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:4822 |
| 0-4822 |
| 1192 | goto Fail; never executed: goto Fail; | 0 |
| 1193 | | - |
| 1194 | *(vr++) = GET_Short(); executed (the execution status of this line is deduced): *(vr++) = (stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) )); | - |
| 1195 | | - |
| 1196 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 1197 | } executed: }Execution Count:4822 | 4822 |
| 1198 | } executed: }Execution Count:2411 | 2411 |
| 1199 | #endif | - |
| 1200 | | - |
| 1201 | | - |
| 1202 | return HB_Err_Ok; executed: return HB_Err_Ok;Execution Count:205 | 205 |
| 1203 | | - |
| 1204 | Fail: | - |
| 1205 | #ifndef HB_USE_FLEXIBLE_VALUE_RECORD | - |
| 1206 | for ( m = 0; m < n; m++ ) | - |
| 1207 | { | - |
| 1208 | if ( format1 ) | - |
| 1209 | Free_ValueRecord( &pvr[m].Value1, format1 ); | - |
| 1210 | if ( format2 ) | - |
| 1211 | Free_ValueRecord( &pvr[m].Value2, format2 ); | - |
| 1212 | } | - |
| 1213 | | - |
| 1214 | FREE( pvr ); | - |
| 1215 | #else | - |
| 1216 | FREE ( ps->ValueRecords ); never executed: } never executed: } never evaluated: (ps->ValueRecords) never evaluated: 0 | 0 |
| 1217 | #endif | - |
| 1218 | | - |
| 1219 | return error; never executed: return error; | 0 |
| 1220 | } | - |
| 1221 | | - |
| 1222 | | - |
| 1223 | static void Free_PairSet( HB_PairSet* ps, | - |
| 1224 | HB_UShort format1, | - |
| 1225 | HB_UShort format2) | - |
| 1226 | { | - |
| 1227 | #ifndef HB_USE_FLEXIBLE_VALUE_RECORD | - |
| 1228 | HB_UShort n, count; | - |
| 1229 | | - |
| 1230 | HB_PairValueRecord* pvr; | - |
| 1231 | | - |
| 1232 | if ( ps->PairValueRecord ) | - |
| 1233 | { | - |
| 1234 | count = ps->PairValueCount; | - |
| 1235 | pvr = ps->PairValueRecord; | - |
| 1236 | | - |
| 1237 | for ( n = 0; n < count; n++ ) | - |
| 1238 | { | - |
| 1239 | if ( format1 ) | - |
| 1240 | Free_ValueRecord( &pvr[n].Value1, format1 ); | - |
| 1241 | if ( format2 ) | - |
| 1242 | Free_ValueRecord( &pvr[n].Value2, format2 ); | - |
| 1243 | } | - |
| 1244 | | - |
| 1245 | FREE( pvr ); | - |
| 1246 | } | - |
| 1247 | #else | - |
| 1248 | (void)format1; // unused executed (the execution status of this line is deduced): (void)format1; | - |
| 1249 | (void)format2; // unused executed (the execution status of this line is deduced): (void)format2; | - |
| 1250 | | - |
| 1251 | if ( ps->ValueRecords ) partially evaluated: ps->ValueRecords| yes Evaluation Count:205 | no Evaluation Count:0 |
| 0-205 |
| 1252 | { | - |
| 1253 | FREE( ps->ValueRecords ); executed: }Execution Count:205 executed: }Execution Count:205 partially evaluated: (ps->ValueRecords)| yes Evaluation Count:205 | no Evaluation Count:0 |
partially evaluated: 0| no Evaluation Count:0 | yes Evaluation Count:205 |
| 0-205 |
| 1254 | } executed: }Execution Count:205 | 205 |
| 1255 | #endif | - |
| 1256 | } executed: }Execution Count:205 | 205 |
| 1257 | | - |
| 1258 | | - |
| 1259 | /* PairPosFormat1 */ | - |
| 1260 | | - |
| 1261 | static HB_Error Load_PairPos1( HB_PairPosFormat1* ppf1, | - |
| 1262 | HB_UShort format1, | - |
| 1263 | HB_UShort format2, | - |
| 1264 | HB_Stream stream ) | - |
| 1265 | { | - |
| 1266 | HB_Error error; executed (the execution status of this line is deduced): HB_Error error; | - |
| 1267 | | - |
| 1268 | HB_UShort n, m, count; executed (the execution status of this line is deduced): HB_UShort n, m, count; | - |
| 1269 | HB_UInt cur_offset, new_offset, base_offset; executed (the execution status of this line is deduced): HB_UInt cur_offset, new_offset, base_offset; | - |
| 1270 | | - |
| 1271 | HB_PairSet* ps; executed (the execution status of this line is deduced): HB_PairSet* ps; | - |
| 1272 | | - |
| 1273 | | - |
| 1274 | base_offset = FILE_Pos() - 8L; executed (the execution status of this line is deduced): base_offset = _hb_stream_pos( stream ) - 8L; | - |
| 1275 | | - |
| 1276 | if ( ACCESS_Frame( 2L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
| 1277 | return error; never executed: return error; | 0 |
| 1278 | | - |
| 1279 | count = ppf1->PairSetCount = GET_UShort(); executed (the execution status of this line is deduced): count = ppf1->PairSetCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 1280 | | - |
| 1281 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 1282 | | - |
| 1283 | ppf1->PairSet = NULL; executed (the execution status of this line is deduced): ppf1->PairSet = ((void *)0); | - |
| 1284 | | - |
| 1285 | if ( ALLOC_ARRAY( ppf1->PairSet, count, HB_PairSet ) ) partially evaluated: ( (ppf1->PairSet) = _hb_alloc( (count)*sizeof(HB_PairSet), &error ), error != 0 )| no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
| 1286 | return error; never executed: return error; | 0 |
| 1287 | | - |
| 1288 | ps = ppf1->PairSet; executed (the execution status of this line is deduced): ps = ppf1->PairSet; | - |
| 1289 | | - |
| 1290 | for ( n = 0; n < count; n++ ) evaluated: n < count| yes Evaluation Count:205 | yes Evaluation Count:3 |
| 3-205 |
| 1291 | { | - |
| 1292 | if ( ACCESS_Frame( 2L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:205 |
| 0-205 |
| 1293 | goto Fail; never executed: goto Fail; | 0 |
| 1294 | | - |
| 1295 | new_offset = GET_UShort() + base_offset; executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 1296 | | - |
| 1297 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 1298 | | - |
| 1299 | cur_offset = FILE_Pos(); executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 1300 | if ( FILE_Seek( new_offset ) || partially evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:205 |
| 0-205 |
| 1301 | ( error = Load_PairSet( &ps[n], format1, partially evaluated: ( error = Load_PairSet( &ps[n], format1, format2, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:205 |
| 0-205 |
| 1302 | format2, stream ) ) != HB_Err_Ok ) partially evaluated: ( error = Load_PairSet( &ps[n], format1, format2, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:205 |
| 0-205 |
| 1303 | goto Fail; never executed: goto Fail; | 0 |
| 1304 | (void)FILE_Seek( cur_offset ); executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 1305 | } executed: }Execution Count:205 | 205 |
| 1306 | | - |
| 1307 | return HB_Err_Ok; executed: return HB_Err_Ok;Execution Count:3 | 3 |
| 1308 | | - |
| 1309 | Fail: | - |
| 1310 | for ( m = 0; m < n; m++ ) | 0 |
| 1311 | Free_PairSet( &ps[m], format1, format2 ); never executed: Free_PairSet( &ps[m], format1, format2 ); | 0 |
| 1312 | | - |
| 1313 | FREE( ps ); never executed: } never executed: } never evaluated: (ps) never evaluated: 0 | 0 |
| 1314 | return error; never executed: return error; | 0 |
| 1315 | } | - |
| 1316 | | - |
| 1317 | | - |
| 1318 | static void Free_PairPos1( HB_PairPosFormat1* ppf1, | - |
| 1319 | HB_UShort format1, | - |
| 1320 | HB_UShort format2 ) | - |
| 1321 | { | - |
| 1322 | HB_UShort n, count; executed (the execution status of this line is deduced): HB_UShort n, count; | - |
| 1323 | | - |
| 1324 | HB_PairSet* ps; executed (the execution status of this line is deduced): HB_PairSet* ps; | - |
| 1325 | | - |
| 1326 | | - |
| 1327 | if ( ppf1->PairSet ) partially evaluated: ppf1->PairSet| yes Evaluation Count:3 | no Evaluation Count:0 |
| 0-3 |
| 1328 | { | - |
| 1329 | count = ppf1->PairSetCount; executed (the execution status of this line is deduced): count = ppf1->PairSetCount; | - |
| 1330 | ps = ppf1->PairSet; executed (the execution status of this line is deduced): ps = ppf1->PairSet; | - |
| 1331 | | - |
| 1332 | for ( n = 0; n < count; n++ ) evaluated: n < count| yes Evaluation Count:205 | yes Evaluation Count:3 |
| 3-205 |
| 1333 | Free_PairSet( &ps[n], format1, format2 ); executed: Free_PairSet( &ps[n], format1, format2 );Execution Count:205 | 205 |
| 1334 | | - |
| 1335 | FREE( ps ); executed: }Execution Count:3 executed: }Execution Count:3 partially evaluated: (ps)| yes Evaluation Count:3 | no Evaluation Count:0 |
partially evaluated: 0| no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
| 1336 | } executed: }Execution Count:3 | 3 |
| 1337 | } executed: }Execution Count:3 | 3 |
| 1338 | | - |
| 1339 | | - |
| 1340 | /* PairPosFormat2 */ | - |
| 1341 | | - |
| 1342 | static HB_Error Load_PairPos2( HB_PairPosFormat2* ppf2, | - |
| 1343 | HB_UShort format1, | - |
| 1344 | HB_UShort format2, | - |
| 1345 | HB_Stream stream ) | - |
| 1346 | { | - |
| 1347 | HB_Error error; executed (the execution status of this line is deduced): HB_Error error; | - |
| 1348 | | - |
| 1349 | HB_UShort m, n, k, count1, count2; executed (the execution status of this line is deduced): HB_UShort m, n, k, count1, count2; | - |
| 1350 | HB_UInt cur_offset, new_offset1, new_offset2, base_offset, cls2_record_size = 0; executed (the execution status of this line is deduced): HB_UInt cur_offset, new_offset1, new_offset2, base_offset, cls2_record_size = 0; | - |
| 1351 | | - |
| 1352 | HB_Class1Record* c1r; executed (the execution status of this line is deduced): HB_Class1Record* c1r; | - |
| 1353 | HB_Class2Record* c2r; executed (the execution status of this line is deduced): HB_Class2Record* c2r; | - |
| 1354 | | - |
| 1355 | HB_Short* vr; executed (the execution status of this line is deduced): HB_Short* vr; | - |
| 1356 | | - |
| 1357 | hb_uint8 use_flexible_value_records; executed (the execution status of this line is deduced): hb_uint8 use_flexible_value_records; | - |
| 1358 | | - |
| 1359 | base_offset = FILE_Pos() - 8L; executed (the execution status of this line is deduced): base_offset = _hb_stream_pos( stream ) - 8L; | - |
| 1360 | | - |
| 1361 | if ( ACCESS_Frame( 8L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 8L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:273 |
| 0-273 |
| 1362 | return error; never executed: return error; | 0 |
| 1363 | | - |
| 1364 | new_offset1 = GET_UShort() + base_offset; executed (the execution status of this line is deduced): new_offset1 = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 1365 | new_offset2 = GET_UShort() + base_offset; executed (the execution status of this line is deduced): new_offset2 = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 1366 | | - |
| 1367 | /* `Class1Count' and `Class2Count' are the upper limits for class | - |
| 1368 | values, thus we read it now to make additional safety checks. */ | - |
| 1369 | | - |
| 1370 | count1 = ppf2->Class1Count = GET_UShort(); executed (the execution status of this line is deduced): count1 = ppf2->Class1Count = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 1371 | count2 = ppf2->Class2Count = GET_UShort(); executed (the execution status of this line is deduced): count2 = ppf2->Class2Count = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 1372 | | - |
| 1373 | #ifndef HB_USE_FLEXIBLE_VALUE_RECORD | - |
| 1374 | use_flexible_value_records = 0; | - |
| 1375 | #else | - |
| 1376 | use_flexible_value_records = !((format1 & HB_GPOS_FORMAT_HAVE_DEVICE_TABLES) || partially evaluated: (format1 & 0x00F0)| no Evaluation Count:0 | yes Evaluation Count:273 |
| 0-273 |
| 1377 | (format2 & HB_GPOS_FORMAT_HAVE_DEVICE_TABLES)); partially evaluated: (format2 & 0x00F0)| no Evaluation Count:0 | yes Evaluation Count:273 |
| 0-273 |
| 1378 | #endif | - |
| 1379 | | - |
| 1380 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 1381 | | - |
| 1382 | cur_offset = FILE_Pos(); executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 1383 | if ( FILE_Seek( new_offset1 ) || partially evaluated: ( (error = (_hb_stream_seek( stream, new_offset1 ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:273 |
| 0-273 |
| 1384 | ( error = _HB_OPEN_Load_ClassDefinition( &ppf2->ClassDef1, count1, partially evaluated: ( error = _HB_OPEN_Load_ClassDefinition( &ppf2->ClassDef1, count1, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:273 |
| 0-273 |
| 1385 | stream ) ) != HB_Err_Ok ) partially evaluated: ( error = _HB_OPEN_Load_ClassDefinition( &ppf2->ClassDef1, count1, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:273 |
| 0-273 |
| 1386 | return error; never executed: return error; | 0 |
| 1387 | if ( FILE_Seek( new_offset2 ) || partially evaluated: ( (error = (_hb_stream_seek( stream, new_offset2 ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:273 |
| 0-273 |
| 1388 | ( error = _HB_OPEN_Load_ClassDefinition( &ppf2->ClassDef2, count2, partially evaluated: ( error = _HB_OPEN_Load_ClassDefinition( &ppf2->ClassDef2, count2, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:273 |
| 0-273 |
| 1389 | stream ) ) != HB_Err_Ok ) partially evaluated: ( error = _HB_OPEN_Load_ClassDefinition( &ppf2->ClassDef2, count2, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:273 |
| 0-273 |
| 1390 | goto Fail3; never executed: goto Fail3; | 0 |
| 1391 | (void)FILE_Seek( cur_offset ); executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 1392 | | - |
| 1393 | ppf2->Class1Record = NULL; executed (the execution status of this line is deduced): ppf2->Class1Record = ((void *)0); | - |
| 1394 | | - |
| 1395 | if ( ALLOC_ARRAY( ppf2->Class1Record, count1, HB_Class1Record ) ) partially evaluated: ( (ppf2->Class1Record) = _hb_alloc( (count1)*sizeof(HB_Class1Record), &error ), error != 0 )| no Evaluation Count:0 | yes Evaluation Count:273 |
| 0-273 |
| 1396 | goto Fail2; never executed: goto Fail2; | 0 |
| 1397 | | - |
| 1398 | c1r = ppf2->Class1Record; executed (the execution status of this line is deduced): c1r = ppf2->Class1Record; | - |
| 1399 | | - |
| 1400 | if ( use_flexible_value_records ) partially evaluated: use_flexible_value_records| yes Evaluation Count:273 | no Evaluation Count:0 |
| 0-273 |
| 1401 | cls2_record_size = Calculate_Class2RecordSize(format1, format2); executed: cls2_record_size = Calculate_Class2RecordSize(format1, format2);Execution Count:273 | 273 |
| 1402 | | - |
| 1403 | for ( m = 0; m < count1; m++ ) evaluated: m < count1| yes Evaluation Count:7018 | yes Evaluation Count:273 |
| 273-7018 |
| 1404 | { | - |
| 1405 | c1r[m].IsFlexible = use_flexible_value_records; executed (the execution status of this line is deduced): c1r[m].IsFlexible = use_flexible_value_records; | - |
| 1406 | if ( use_flexible_value_records ) { partially evaluated: use_flexible_value_records| yes Evaluation Count:7018 | no Evaluation Count:0 |
| 0-7018 |
| 1407 | c1r[m].c2r.ValueRecords = NULL; executed (the execution status of this line is deduced): c1r[m].c2r.ValueRecords = ((void *)0); | - |
| 1408 | | - |
| 1409 | if ( ALLOC_ARRAY( c1r[m].c2r.ValueRecords, count2 * cls2_record_size, HB_UShort ) ) partially evaluated: ( (c1r[m].c2r.ValueRecords) = _hb_alloc( (count2 * cls2_record_size)*sizeof(HB_UShort), &error ), error != 0 )| no Evaluation Count:0 | yes Evaluation Count:7018 |
| 0-7018 |
| 1410 | goto Fail1; never executed: goto Fail1; | 0 |
| 1411 | | - |
| 1412 | vr = c1r[m].c2r.ValueRecords; executed (the execution status of this line is deduced): vr = c1r[m].c2r.ValueRecords; | - |
| 1413 | | - |
| 1414 | if ( ACCESS_Frame( count2 * cls2_record_size * 2L )) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, count2 * cls2_record_size * 2L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:7018 |
| 0-7018 |
| 1415 | goto Fail1; never executed: goto Fail1; | 0 |
| 1416 | | - |
| 1417 | for ( n = 0; n < count2 * cls2_record_size; n++ ) evaluated: n < count2 * cls2_record_size| yes Evaluation Count:457511 | yes Evaluation Count:7018 |
| 7018-457511 |
| 1418 | vr[n] = GET_Short(); executed: vr[n] = (stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ));Execution Count:457511 | 457511 |
| 1419 | | - |
| 1420 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 1421 | } else { executed: }Execution Count:7018 | 7018 |
| 1422 | c1r[m].c2r.Class2Record = NULL; never executed (the execution status of this line is deduced): c1r[m].c2r.Class2Record = ((void *)0); | - |
| 1423 | | - |
| 1424 | if ( ALLOC_ARRAY( c1r[m].c2r.Class2Record, count2, HB_Class2Record ) ) never evaluated: ( (c1r[m].c2r.Class2Record) = _hb_alloc( (count2)*sizeof(HB_Class2Record), &error ), error != 0 ) | 0 |
| 1425 | goto Fail1; never executed: goto Fail1; | 0 |
| 1426 | | - |
| 1427 | c2r = c1r[m].c2r.Class2Record; never executed (the execution status of this line is deduced): c2r = c1r[m].c2r.Class2Record; | - |
| 1428 | for ( n = 0; n < count2; n++ ) never evaluated: n < count2 | 0 |
| 1429 | { | - |
| 1430 | if ( format1 ) | 0 |
| 1431 | { | - |
| 1432 | error = Load_ValueRecord( &c2r[n].Value1, format1, never executed (the execution status of this line is deduced): error = Load_ValueRecord( &c2r[n].Value1, format1, | - |
| 1433 | base_offset, stream ); never executed (the execution status of this line is deduced): base_offset, stream ); | - |
| 1434 | if ( error ) | 0 |
| 1435 | goto Fail0; never executed: goto Fail0; | 0 |
| 1436 | } | 0 |
| 1437 | if ( format2 ) | 0 |
| 1438 | { | - |
| 1439 | error = Load_ValueRecord( &c2r[n].Value2, format2, never executed (the execution status of this line is deduced): error = Load_ValueRecord( &c2r[n].Value2, format2, | - |
| 1440 | base_offset, stream ); never executed (the execution status of this line is deduced): base_offset, stream ); | - |
| 1441 | if ( error ) | 0 |
| 1442 | { | - |
| 1443 | if ( format1 ) | 0 |
| 1444 | Free_ValueRecord( &c2r[n].Value1, format1 ); never executed: Free_ValueRecord( &c2r[n].Value1, format1 ); | 0 |
| 1445 | goto Fail0; never executed: goto Fail0; | 0 |
| 1446 | } | - |
| 1447 | } | 0 |
| 1448 | } | 0 |
| 1449 | } | 0 |
| 1450 | | - |
| 1451 | continue; executed: continue;Execution Count:7018 | 7018 |
| 1452 | | - |
| 1453 | Fail0: | - |
| 1454 | for ( k = 0; k < n; k++ ) | 0 |
| 1455 | { | - |
| 1456 | if ( format1 ) | 0 |
| 1457 | Free_ValueRecord( &c2r[k].Value1, format1 ); never executed: Free_ValueRecord( &c2r[k].Value1, format1 ); | 0 |
| 1458 | if ( format2 ) | 0 |
| 1459 | Free_ValueRecord( &c2r[k].Value2, format2 ); never executed: Free_ValueRecord( &c2r[k].Value2, format2 ); | 0 |
| 1460 | } | 0 |
| 1461 | goto Fail1; never executed: goto Fail1; | 0 |
| 1462 | } | - |
| 1463 | | - |
| 1464 | return HB_Err_Ok; executed: return HB_Err_Ok;Execution Count:273 | 273 |
| 1465 | | - |
| 1466 | Fail1: | - |
| 1467 | for ( k = 0; k < m; k++ ) | 0 |
| 1468 | { | - |
| 1469 | if ( !use_flexible_value_records ) { never evaluated: !use_flexible_value_records | 0 |
| 1470 | c2r = c1r[k].c2r.Class2Record; never executed (the execution status of this line is deduced): c2r = c1r[k].c2r.Class2Record; | - |
| 1471 | | - |
| 1472 | for ( n = 0; n < count2; n++ ) never evaluated: n < count2 | 0 |
| 1473 | { | - |
| 1474 | if ( format1 ) | 0 |
| 1475 | Free_ValueRecord( &c2r[n].Value1, format1 ); never executed: Free_ValueRecord( &c2r[n].Value1, format1 ); | 0 |
| 1476 | if ( format2 ) | 0 |
| 1477 | Free_ValueRecord( &c2r[n].Value2, format2 ); never executed: Free_ValueRecord( &c2r[n].Value2, format2 ); | 0 |
| 1478 | } | 0 |
| 1479 | | - |
| 1480 | FREE( c2r ); never executed: } never executed: } never evaluated: (c2r) never evaluated: 0 | 0 |
| 1481 | } else { | 0 |
| 1482 | FREE( c1r[k].c2r.ValueRecords ); never executed: } never executed: } never evaluated: (c1r[k].c2r.ValueRecords) never evaluated: 0 | 0 |
| 1483 | } | 0 |
| 1484 | } | - |
| 1485 | | - |
| 1486 | FREE( c1r ); never executed: } never executed: } never evaluated: (c1r) never evaluated: 0 | 0 |
| 1487 | Fail2: code before this statement never executed: Fail2: | 0 |
| 1488 | | - |
| 1489 | _HB_OPEN_Free_ClassDefinition( &ppf2->ClassDef2 ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_ClassDefinition( &ppf2->ClassDef2 ); | - |
| 1490 | | - |
| 1491 | Fail3: code before this statement never executed: Fail3: | 0 |
| 1492 | _HB_OPEN_Free_ClassDefinition( &ppf2->ClassDef1 ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_ClassDefinition( &ppf2->ClassDef1 ); | - |
| 1493 | return error; never executed: return error; | 0 |
| 1494 | } | - |
| 1495 | | - |
| 1496 | | - |
| 1497 | static void Free_PairPos2( HB_PairPosFormat2* ppf2, | - |
| 1498 | HB_UShort format1, | - |
| 1499 | HB_UShort format2) | - |
| 1500 | { | - |
| 1501 | HB_UShort m, n, count1, count2; executed (the execution status of this line is deduced): HB_UShort m, n, count1, count2; | - |
| 1502 | | - |
| 1503 | HB_Class1Record* c1r; executed (the execution status of this line is deduced): HB_Class1Record* c1r; | - |
| 1504 | HB_Class2Record* c2r; executed (the execution status of this line is deduced): HB_Class2Record* c2r; | - |
| 1505 | | - |
| 1506 | | - |
| 1507 | if ( ppf2->Class1Record ) partially evaluated: ppf2->Class1Record| yes Evaluation Count:261 | no Evaluation Count:0 |
| 0-261 |
| 1508 | { | - |
| 1509 | c1r = ppf2->Class1Record; executed (the execution status of this line is deduced): c1r = ppf2->Class1Record; | - |
| 1510 | count1 = ppf2->Class1Count; executed (the execution status of this line is deduced): count1 = ppf2->Class1Count; | - |
| 1511 | count2 = ppf2->Class2Count; executed (the execution status of this line is deduced): count2 = ppf2->Class2Count; | - |
| 1512 | | - |
| 1513 | for ( m = 0; m < count1; m++ ) evaluated: m < count1| yes Evaluation Count:6670 | yes Evaluation Count:261 |
| 261-6670 |
| 1514 | { | - |
| 1515 | if ( !c1r[m].IsFlexible ) { partially evaluated: !c1r[m].IsFlexible| no Evaluation Count:0 | yes Evaluation Count:6670 |
| 0-6670 |
| 1516 | c2r = c1r[m].c2r.Class2Record; never executed (the execution status of this line is deduced): c2r = c1r[m].c2r.Class2Record; | - |
| 1517 | | - |
| 1518 | for ( n = 0; n < count2; n++ ) never evaluated: n < count2 | 0 |
| 1519 | { | - |
| 1520 | if ( format1 ) | 0 |
| 1521 | Free_ValueRecord( &c2r[n].Value1, format1 ); never executed: Free_ValueRecord( &c2r[n].Value1, format1 ); | 0 |
| 1522 | if ( format2 ) | 0 |
| 1523 | Free_ValueRecord( &c2r[n].Value2, format2 ); never executed: Free_ValueRecord( &c2r[n].Value2, format2 ); | 0 |
| 1524 | } | 0 |
| 1525 | | - |
| 1526 | FREE( c2r ); never executed: } never executed: } never evaluated: (c2r) never evaluated: 0 | 0 |
| 1527 | } else { | 0 |
| 1528 | FREE( c1r[m].c2r.ValueRecords ); executed: }Execution Count:6670 executed: }Execution Count:6670 partially evaluated: (c1r[m].c2r.ValueRecords)| yes Evaluation Count:6670 | no Evaluation Count:0 |
partially evaluated: 0| no Evaluation Count:0 | yes Evaluation Count:6670 |
| 0-6670 |
| 1529 | } executed: }Execution Count:6670 | 6670 |
| 1530 | } | - |
| 1531 | | - |
| 1532 | FREE( c1r ); executed: }Execution Count:261 executed: }Execution Count:261 partially evaluated: (c1r)| yes Evaluation Count:261 | no Evaluation Count:0 |
partially evaluated: 0| no Evaluation Count:0 | yes Evaluation Count:261 |
| 0-261 |
| 1533 | | - |
| 1534 | _HB_OPEN_Free_ClassDefinition( &ppf2->ClassDef2 ); executed (the execution status of this line is deduced): _HB_OPEN_Free_ClassDefinition( &ppf2->ClassDef2 ); | - |
| 1535 | _HB_OPEN_Free_ClassDefinition( &ppf2->ClassDef1 ); executed (the execution status of this line is deduced): _HB_OPEN_Free_ClassDefinition( &ppf2->ClassDef1 ); | - |
| 1536 | } executed: }Execution Count:261 | 261 |
| 1537 | } executed: }Execution Count:261 | 261 |
| 1538 | | - |
| 1539 | | - |
| 1540 | static HB_Error Load_PairPos( HB_GPOS_SubTable* st, | - |
| 1541 | HB_Stream stream ) | - |
| 1542 | { | - |
| 1543 | HB_Error error; executed (the execution status of this line is deduced): HB_Error error; | - |
| 1544 | HB_PairPos* pp = &st->pair; executed (the execution status of this line is deduced): HB_PairPos* pp = &st->pair; | - |
| 1545 | | - |
| 1546 | HB_UShort format1, format2; executed (the execution status of this line is deduced): HB_UShort format1, format2; | - |
| 1547 | HB_UInt cur_offset, new_offset, base_offset; executed (the execution status of this line is deduced): HB_UInt cur_offset, new_offset, base_offset; | - |
| 1548 | | - |
| 1549 | | - |
| 1550 | base_offset = FILE_Pos(); executed (the execution status of this line is deduced): base_offset = _hb_stream_pos( stream ); | - |
| 1551 | | - |
| 1552 | if ( ACCESS_Frame( 8L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 8L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:276 |
| 0-276 |
| 1553 | return error; never executed: return error; | 0 |
| 1554 | | - |
| 1555 | pp->PosFormat = GET_UShort(); executed (the execution status of this line is deduced): pp->PosFormat = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 1556 | new_offset = GET_UShort() + base_offset; executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 1557 | | - |
| 1558 | format1 = pp->ValueFormat1 = GET_UShort(); executed (the execution status of this line is deduced): format1 = pp->ValueFormat1 = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 1559 | format2 = pp->ValueFormat2 = GET_UShort(); executed (the execution status of this line is deduced): format2 = pp->ValueFormat2 = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 1560 | | - |
| 1561 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 1562 | | - |
| 1563 | cur_offset = FILE_Pos(); executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 1564 | if ( FILE_Seek( new_offset ) || partially evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:276 |
| 0-276 |
| 1565 | ( error = _HB_OPEN_Load_Coverage( &pp->Coverage, stream ) ) != HB_Err_Ok ) partially evaluated: ( error = _HB_OPEN_Load_Coverage( &pp->Coverage, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:276 |
| 0-276 |
| 1566 | return error; never executed: return error; | 0 |
| 1567 | (void)FILE_Seek( cur_offset ); executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 1568 | | - |
| 1569 | switch ( pp->PosFormat ) | - |
| 1570 | { | - |
| 1571 | case 1: | - |
| 1572 | error = Load_PairPos1( &pp->ppf.ppf1, format1, format2, stream ); executed (the execution status of this line is deduced): error = Load_PairPos1( &pp->ppf.ppf1, format1, format2, stream ); | - |
| 1573 | if ( error ) partially evaluated: error| no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
| 1574 | goto Fail; never executed: goto Fail; | 0 |
| 1575 | break; executed: break;Execution Count:3 | 3 |
| 1576 | | - |
| 1577 | case 2: | - |
| 1578 | error = Load_PairPos2( &pp->ppf.ppf2, format1, format2, stream ); executed (the execution status of this line is deduced): error = Load_PairPos2( &pp->ppf.ppf2, format1, format2, stream ); | - |
| 1579 | if ( error ) partially evaluated: error| no Evaluation Count:0 | yes Evaluation Count:273 |
| 0-273 |
| 1580 | goto Fail; never executed: goto Fail; | 0 |
| 1581 | break; executed: break;Execution Count:273 | 273 |
| 1582 | | - |
| 1583 | default: | - |
| 1584 | return ERR(HB_Err_Invalid_SubTable_Format); never executed: return _hb_err (HB_Err_Invalid_SubTable_Format); | 0 |
| 1585 | } | - |
| 1586 | | - |
| 1587 | return HB_Err_Ok; executed: return HB_Err_Ok;Execution Count:276 | 276 |
| 1588 | | - |
| 1589 | Fail: | - |
| 1590 | _HB_OPEN_Free_Coverage( &pp->Coverage ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_Coverage( &pp->Coverage ); | - |
| 1591 | return error; never executed: return error; | 0 |
| 1592 | } | - |
| 1593 | | - |
| 1594 | | - |
| 1595 | static void Free_PairPos( HB_GPOS_SubTable* st ) | - |
| 1596 | { | - |
| 1597 | HB_UShort format1, format2; executed (the execution status of this line is deduced): HB_UShort format1, format2; | - |
| 1598 | HB_PairPos* pp = &st->pair; executed (the execution status of this line is deduced): HB_PairPos* pp = &st->pair; | - |
| 1599 | | - |
| 1600 | | - |
| 1601 | format1 = pp->ValueFormat1; executed (the execution status of this line is deduced): format1 = pp->ValueFormat1; | - |
| 1602 | format2 = pp->ValueFormat2; executed (the execution status of this line is deduced): format2 = pp->ValueFormat2; | - |
| 1603 | | - |
| 1604 | switch ( pp->PosFormat ) | - |
| 1605 | { | - |
| 1606 | case 1: | - |
| 1607 | Free_PairPos1( &pp->ppf.ppf1, format1, format2 ); executed (the execution status of this line is deduced): Free_PairPos1( &pp->ppf.ppf1, format1, format2 ); | - |
| 1608 | break; executed: break;Execution Count:3 | 3 |
| 1609 | | - |
| 1610 | case 2: | - |
| 1611 | Free_PairPos2( &pp->ppf.ppf2, format1, format2 ); executed (the execution status of this line is deduced): Free_PairPos2( &pp->ppf.ppf2, format1, format2 ); | - |
| 1612 | break; executed: break;Execution Count:261 | 261 |
| 1613 | | - |
| 1614 | default: | - |
| 1615 | break; | 0 |
| 1616 | } | - |
| 1617 | | - |
| 1618 | _HB_OPEN_Free_Coverage( &pp->Coverage ); executed (the execution status of this line is deduced): _HB_OPEN_Free_Coverage( &pp->Coverage ); | - |
| 1619 | } executed: }Execution Count:264 | 264 |
| 1620 | | - |
| 1621 | static HB_Error Lookup_PairPos1( GPOS_Instance* gpi, | - |
| 1622 | HB_PairPosFormat1* ppf1, | - |
| 1623 | HB_Buffer buffer, | - |
| 1624 | HB_UInt first_pos, | - |
| 1625 | HB_UShort index, | - |
| 1626 | HB_UShort format1, | - |
| 1627 | HB_UShort format2 ) | - |
| 1628 | { | - |
| 1629 | HB_Error error; executed (the execution status of this line is deduced): HB_Error error; | - |
| 1630 | HB_UShort numpvr, glyph2; executed (the execution status of this line is deduced): HB_UShort numpvr, glyph2; | - |
| 1631 | | - |
| 1632 | #ifndef HB_USE_FLEXIBLE_VALUE_RECORD | - |
| 1633 | HB_PairValueRecord* pvr; | - |
| 1634 | #else | - |
| 1635 | HB_Short *vr; executed (the execution status of this line is deduced): HB_Short *vr; | - |
| 1636 | HB_UShort second_glyph; executed (the execution status of this line is deduced): HB_UShort second_glyph; | - |
| 1637 | HB_UInt record_size1, record_size2; executed (the execution status of this line is deduced): HB_UInt record_size1, record_size2; | - |
| 1638 | #endif | - |
| 1639 | | - |
| 1640 | if ( index >= ppf1->PairSetCount ) partially evaluated: index >= ppf1->PairSetCount| no Evaluation Count:0 | yes Evaluation Count:9 |
| 0-9 |
| 1641 | return ERR(HB_Err_Invalid_SubTable); never executed: return _hb_err (HB_Err_Invalid_SubTable); | 0 |
| 1642 | | - |
| 1643 | if (!ppf1->PairSet[index].PairValueCount) partially evaluated: !ppf1->PairSet[index].PairValueCount| no Evaluation Count:0 | yes Evaluation Count:9 |
| 0-9 |
| 1644 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 1645 | | - |
| 1646 | glyph2 = IN_CURGLYPH(); executed (the execution status of this line is deduced): glyph2 = (buffer->in_string[buffer->in_pos].gindex); | - |
| 1647 | | - |
| 1648 | #ifndef HB_USE_FLEXIBLE_VALUE_RECORD | - |
| 1649 | pvr = ppf1->PairSet[index].PairValueRecord; | - |
| 1650 | if ( !pvr ) | - |
| 1651 | return ERR(HB_Err_Invalid_SubTable); | - |
| 1652 | | - |
| 1653 | for ( numpvr = ppf1->PairSet[index].PairValueCount; | - |
| 1654 | numpvr; | - |
| 1655 | numpvr--, pvr++ ) | - |
| 1656 | { | - |
| 1657 | if ( glyph2 == pvr->SecondGlyph ) | - |
| 1658 | { | - |
| 1659 | error = Get_ValueRecord( gpi, &pvr->Value1, format1, | - |
| 1660 | POSITION( first_pos ) ); | - |
| 1661 | if ( error ) | - |
| 1662 | return error; | - |
| 1663 | return Get_ValueRecord( gpi, &pvr->Value2, format2, | - |
| 1664 | POSITION( buffer->in_pos ) ); | - |
| 1665 | } | - |
| 1666 | } | - |
| 1667 | #else | - |
| 1668 | vr = ppf1->PairSet[index].ValueRecords; executed (the execution status of this line is deduced): vr = ppf1->PairSet[index].ValueRecords; | - |
| 1669 | if ( !vr ) partially evaluated: !vr| no Evaluation Count:0 | yes Evaluation Count:9 |
| 0-9 |
| 1670 | return ERR(HB_Err_Invalid_SubTable); never executed: return _hb_err (HB_Err_Invalid_SubTable); | 0 |
| 1671 | | - |
| 1672 | record_size1 = Calculate_Class2RecordSize( format1, 0 ); executed (the execution status of this line is deduced): record_size1 = Calculate_Class2RecordSize( format1, 0 ); | - |
| 1673 | record_size2 = Calculate_Class2RecordSize( format2, 0 ); executed (the execution status of this line is deduced): record_size2 = Calculate_Class2RecordSize( format2, 0 ); | - |
| 1674 | | - |
| 1675 | for ( numpvr = ppf1->PairSet[index].PairValueCount; numpvr; numpvr-- ) evaluated: numpvr| yes Evaluation Count:71 | yes Evaluation Count:8 |
| 8-71 |
| 1676 | { | - |
| 1677 | second_glyph = *((HB_UShort *)vr); executed (the execution status of this line is deduced): second_glyph = *((HB_UShort *)vr); | - |
| 1678 | vr++; executed (the execution status of this line is deduced): vr++; | - |
| 1679 | if ( glyph2 == second_glyph ) evaluated: glyph2 == second_glyph| yes Evaluation Count:1 | yes Evaluation Count:70 |
| 1-70 |
| 1680 | { | - |
| 1681 | error = Get_FlexibleValueRecord( gpi, vr, format1, POSITION( first_pos ) ); executed (the execution status of this line is deduced): error = Get_FlexibleValueRecord( gpi, vr, format1, (&buffer->positions[(first_pos)]) ); | - |
| 1682 | if ( error ) partially evaluated: error| no Evaluation Count:0 | yes Evaluation Count:1 |
| 0-1 |
| 1683 | return error; never executed: return error; | 0 |
| 1684 | vr += record_size1; executed (the execution status of this line is deduced): vr += record_size1; | - |
| 1685 | | - |
| 1686 | return Get_FlexibleValueRecord( gpi, vr, format2, POSITION( buffer->in_pos ) ); executed: return Get_FlexibleValueRecord( gpi, vr, format2, (&buffer->positions[(buffer->in_pos)]) );Execution Count:1 | 1 |
| 1687 | } | - |
| 1688 | else | - |
| 1689 | { | - |
| 1690 | vr += record_size1 + record_size2; executed (the execution status of this line is deduced): vr += record_size1 + record_size2; | - |
| 1691 | } executed: }Execution Count:70 | 70 |
| 1692 | } | - |
| 1693 | #endif | - |
| 1694 | | - |
| 1695 | return HB_Err_Not_Covered; executed: return HB_Err_Not_Covered;Execution Count:8 | 8 |
| 1696 | } | - |
| 1697 | | - |
| 1698 | | - |
| 1699 | static HB_Error Lookup_PairPos2( GPOS_Instance* gpi, | - |
| 1700 | HB_PairPosFormat2* ppf2, | - |
| 1701 | HB_Buffer buffer, | - |
| 1702 | HB_UInt first_pos, | - |
| 1703 | HB_UShort format1, | - |
| 1704 | HB_UShort format2 ) | - |
| 1705 | { | - |
| 1706 | HB_Error error; executed (the execution status of this line is deduced): HB_Error error; | - |
| 1707 | HB_UShort cl1 = 0, cl2 = 0; /* shut compiler up */ executed (the execution status of this line is deduced): HB_UShort cl1 = 0, cl2 = 0; | - |
| 1708 | | - |
| 1709 | HB_Class1Record* c1r; executed (the execution status of this line is deduced): HB_Class1Record* c1r; | - |
| 1710 | HB_Class2Record* c2r; executed (the execution status of this line is deduced): HB_Class2Record* c2r; | - |
| 1711 | HB_Short* vr; executed (the execution status of this line is deduced): HB_Short* vr; | - |
| 1712 | | - |
| 1713 | HB_UShort vr1_size; executed (the execution status of this line is deduced): HB_UShort vr1_size; | - |
| 1714 | HB_UShort vr2_size; executed (the execution status of this line is deduced): HB_UShort vr2_size; | - |
| 1715 | | - |
| 1716 | | - |
| 1717 | error = _HB_OPEN_Get_Class( &ppf2->ClassDef1, IN_GLYPH( first_pos ), executed (the execution status of this line is deduced): error = _HB_OPEN_Get_Class( &ppf2->ClassDef1, (buffer->in_string[(first_pos)].gindex), | - |
| 1718 | &cl1, NULL ); executed (the execution status of this line is deduced): &cl1, ((void *)0) ); | - |
| 1719 | if ( error && error != HB_Err_Not_Covered ) partially evaluated: error| no Evaluation Count:0 | yes Evaluation Count:433443 |
never evaluated: error != HB_Err_Not_Covered | 0-433443 |
| 1720 | return error; never executed: return error; | 0 |
| 1721 | error = _HB_OPEN_Get_Class( &ppf2->ClassDef2, IN_CURGLYPH(), executed (the execution status of this line is deduced): error = _HB_OPEN_Get_Class( &ppf2->ClassDef2, (buffer->in_string[buffer->in_pos].gindex), | - |
| 1722 | &cl2, NULL ); executed (the execution status of this line is deduced): &cl2, ((void *)0) ); | - |
| 1723 | if ( error && error != HB_Err_Not_Covered ) evaluated: error| yes Evaluation Count:87680 | yes Evaluation Count:345763 |
partially evaluated: error != HB_Err_Not_Covered| no Evaluation Count:0 | yes Evaluation Count:87680 |
| 0-345763 |
| 1724 | return error; never executed: return error; | 0 |
| 1725 | | - |
| 1726 | c1r = &ppf2->Class1Record[cl1]; executed (the execution status of this line is deduced): c1r = &ppf2->Class1Record[cl1]; | - |
| 1727 | if ( !c1r ) partially evaluated: !c1r| no Evaluation Count:0 | yes Evaluation Count:433443 |
| 0-433443 |
| 1728 | return ERR(HB_Err_Invalid_SubTable); never executed: return _hb_err (HB_Err_Invalid_SubTable); | 0 |
| 1729 | | - |
| 1730 | if ( !c1r->IsFlexible ) { partially evaluated: !c1r->IsFlexible| no Evaluation Count:0 | yes Evaluation Count:433443 |
| 0-433443 |
| 1731 | c2r = &c1r->c2r.Class2Record[cl2]; never executed (the execution status of this line is deduced): c2r = &c1r->c2r.Class2Record[cl2]; | - |
| 1732 | | - |
| 1733 | error = Get_ValueRecord( gpi, &c2r->Value1, format1, POSITION( first_pos ) ); never executed (the execution status of this line is deduced): error = Get_ValueRecord( gpi, &c2r->Value1, format1, (&buffer->positions[(first_pos)]) ); | - |
| 1734 | if ( error ) | 0 |
| 1735 | return error; never executed: return error; | 0 |
| 1736 | return Get_ValueRecord( gpi, &c2r->Value2, format2, POSITION( buffer->in_pos ) ); never executed: return Get_ValueRecord( gpi, &c2r->Value2, format2, (&buffer->positions[(buffer->in_pos)]) ); | 0 |
| 1737 | } else { | - |
| 1738 | vr1_size = Calculate_Class2RecordSize( format1, 0 ); executed (the execution status of this line is deduced): vr1_size = Calculate_Class2RecordSize( format1, 0 ); | - |
| 1739 | vr2_size = Calculate_Class2RecordSize( format2, 0 ); executed (the execution status of this line is deduced): vr2_size = Calculate_Class2RecordSize( format2, 0 ); | - |
| 1740 | | - |
| 1741 | vr = c1r->c2r.ValueRecords + (cl2 * ( vr1_size + vr2_size )); executed (the execution status of this line is deduced): vr = c1r->c2r.ValueRecords + (cl2 * ( vr1_size + vr2_size )); | - |
| 1742 | | - |
| 1743 | error = Get_FlexibleValueRecord( gpi, vr, format1, POSITION( first_pos ) ); executed (the execution status of this line is deduced): error = Get_FlexibleValueRecord( gpi, vr, format1, (&buffer->positions[(first_pos)]) ); | - |
| 1744 | if ( error ) partially evaluated: error| no Evaluation Count:0 | yes Evaluation Count:433443 |
| 0-433443 |
| 1745 | return error; never executed: return error; | 0 |
| 1746 | vr += vr1_size; // Skip to second record executed (the execution status of this line is deduced): vr += vr1_size; | - |
| 1747 | return Get_FlexibleValueRecord( gpi, vr, format2, POSITION( buffer->in_pos ) ); executed: return Get_FlexibleValueRecord( gpi, vr, format2, (&buffer->positions[(buffer->in_pos)]) );Execution Count:433443 | 433443 |
| 1748 | } | - |
| 1749 | } | - |
| 1750 | | - |
| 1751 | static HB_Error Lookup_PairPos( GPOS_Instance* gpi, | - |
| 1752 | HB_GPOS_SubTable* st, | - |
| 1753 | HB_Buffer buffer, | - |
| 1754 | HB_UShort flags, | - |
| 1755 | HB_UShort context_length, | - |
| 1756 | int nesting_level ) | - |
| 1757 | { | - |
| 1758 | HB_Error error; executed (the execution status of this line is deduced): HB_Error error; | - |
| 1759 | HB_UShort index, property; executed (the execution status of this line is deduced): HB_UShort index, property; | - |
| 1760 | HB_UInt first_pos; executed (the execution status of this line is deduced): HB_UInt first_pos; | - |
| 1761 | HB_GPOSHeader* gpos = gpi->gpos; executed (the execution status of this line is deduced): HB_GPOSHeader* gpos = gpi->gpos; | - |
| 1762 | HB_PairPos* pp = &st->pair; executed (the execution status of this line is deduced): HB_PairPos* pp = &st->pair; | - |
| 1763 | | - |
| 1764 | HB_UNUSED(nesting_level); executed (the execution status of this line is deduced): ((nesting_level) = (nesting_level)); | - |
| 1765 | | - |
| 1766 | if ( buffer->in_pos >= buffer->in_length - 1 ) evaluated: buffer->in_pos >= buffer->in_length - 1| yes Evaluation Count:495854 | yes Evaluation Count:5724511 |
| 495854-5724511 |
| 1767 | return HB_Err_Not_Covered; /* Not enough glyphs in stream */ executed: return HB_Err_Not_Covered;Execution Count:495854 | 495854 |
| 1768 | | - |
| 1769 | if ( context_length != 0xFFFF && context_length < 2 ) partially evaluated: context_length != 0xFFFF| no Evaluation Count:0 | yes Evaluation Count:5724511 |
never evaluated: context_length < 2 | 0-5724511 |
| 1770 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 1771 | | - |
| 1772 | if ( CHECK_Property( gpos->gdef, IN_CURITEM(), flags, &property ) ) partially evaluated: ( ( error = _HB_GDEF_Check_Property( (gpos->gdef), ((&buffer->in_string[buffer->in_pos])), (flags), (&property) ) ) != HB_Err_Ok )| no Evaluation Count:0 | yes Evaluation Count:5724511 |
| 0-5724511 |
| 1773 | return error; never executed: return error; | 0 |
| 1774 | | - |
| 1775 | error = _HB_OPEN_Coverage_Index( &pp->Coverage, IN_CURGLYPH(), &index ); executed (the execution status of this line is deduced): error = _HB_OPEN_Coverage_Index( &pp->Coverage, (buffer->in_string[buffer->in_pos].gindex), &index ); | - |
| 1776 | if ( error ) evaluated: error| yes Evaluation Count:5291059 | yes Evaluation Count:433452 |
| 433452-5291059 |
| 1777 | return error; executed: return error;Execution Count:5291059 | 5291059 |
| 1778 | | - |
| 1779 | /* second glyph */ | - |
| 1780 | | - |
| 1781 | first_pos = buffer->in_pos; executed (the execution status of this line is deduced): first_pos = buffer->in_pos; | - |
| 1782 | (buffer->in_pos)++; executed (the execution status of this line is deduced): (buffer->in_pos)++; | - |
| 1783 | | - |
| 1784 | while ( CHECK_Property( gpos->gdef, IN_CURITEM(), partially evaluated: ( ( error = _HB_GDEF_Check_Property( (gpos->gdef), ((&buffer->in_string[buffer->in_pos])), (flags), (&property) ) ) != HB_Err_Ok )| no Evaluation Count:0 | yes Evaluation Count:433452 |
| 0-433452 |
| 1785 | flags, &property ) ) | - |
| 1786 | { | - |
| 1787 | if ( error && error != HB_Err_Not_Covered ) never evaluated: error never evaluated: error != HB_Err_Not_Covered | 0 |
| 1788 | return error; never executed: return error; | 0 |
| 1789 | | - |
| 1790 | if ( buffer->in_pos == buffer->in_length ) never evaluated: buffer->in_pos == buffer->in_length | 0 |
| 1791 | { | - |
| 1792 | buffer->in_pos = first_pos; never executed (the execution status of this line is deduced): buffer->in_pos = first_pos; | - |
| 1793 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 1794 | } | - |
| 1795 | (buffer->in_pos)++; never executed (the execution status of this line is deduced): (buffer->in_pos)++; | - |
| 1796 | | - |
| 1797 | } | 0 |
| 1798 | | - |
| 1799 | switch ( pp->PosFormat ) | - |
| 1800 | { | - |
| 1801 | case 1: | - |
| 1802 | error = Lookup_PairPos1( gpi, &pp->ppf.ppf1, buffer, executed (the execution status of this line is deduced): error = Lookup_PairPos1( gpi, &pp->ppf.ppf1, buffer, | - |
| 1803 | first_pos, index, executed (the execution status of this line is deduced): first_pos, index, | - |
| 1804 | pp->ValueFormat1, pp->ValueFormat2 ); executed (the execution status of this line is deduced): pp->ValueFormat1, pp->ValueFormat2 ); | - |
| 1805 | break; executed: break;Execution Count:9 | 9 |
| 1806 | | - |
| 1807 | case 2: | - |
| 1808 | error = Lookup_PairPos2( gpi, &pp->ppf.ppf2, buffer, first_pos, executed (the execution status of this line is deduced): error = Lookup_PairPos2( gpi, &pp->ppf.ppf2, buffer, first_pos, | - |
| 1809 | pp->ValueFormat1, pp->ValueFormat2 ); executed (the execution status of this line is deduced): pp->ValueFormat1, pp->ValueFormat2 ); | - |
| 1810 | break; executed: break;Execution Count:433443 | 433443 |
| 1811 | | - |
| 1812 | default: | - |
| 1813 | return ERR(HB_Err_Invalid_SubTable_Format); never executed: return _hb_err (HB_Err_Invalid_SubTable_Format); | 0 |
| 1814 | } | - |
| 1815 | | - |
| 1816 | /* if we don't have coverage for the second glyph don't skip it for | - |
| 1817 | further lookups but reset in_pos back to the first_glyph and let | - |
| 1818 | the caller in Do_String_Lookup increment in_pos */ | - |
| 1819 | if ( error == HB_Err_Not_Covered ) evaluated: error == HB_Err_Not_Covered| yes Evaluation Count:8 | yes Evaluation Count:433444 |
| 8-433444 |
| 1820 | buffer->in_pos = first_pos; executed: buffer->in_pos = first_pos;Execution Count:8 | 8 |
| 1821 | | - |
| 1822 | /* adjusting the `next' glyph */ | - |
| 1823 | | - |
| 1824 | if ( pp->ValueFormat2 ) partially evaluated: pp->ValueFormat2| no Evaluation Count:0 | yes Evaluation Count:433452 |
| 0-433452 |
| 1825 | (buffer->in_pos)++; never executed: (buffer->in_pos)++; | 0 |
| 1826 | | - |
| 1827 | return error; executed: return error;Execution Count:433452 | 433452 |
| 1828 | } | - |
| 1829 | | - |
| 1830 | | - |
| 1831 | /* LookupType 3 */ | - |
| 1832 | | - |
| 1833 | /* CursivePosFormat1 */ | - |
| 1834 | | - |
| 1835 | static HB_Error Load_CursivePos( HB_GPOS_SubTable* st, | - |
| 1836 | HB_Stream stream ) | - |
| 1837 | { | - |
| 1838 | HB_Error error; never executed (the execution status of this line is deduced): HB_Error error; | - |
| 1839 | HB_CursivePos* cp = &st->cursive; never executed (the execution status of this line is deduced): HB_CursivePos* cp = &st->cursive; | - |
| 1840 | | - |
| 1841 | HB_UShort n, m, count; never executed (the execution status of this line is deduced): HB_UShort n, m, count; | - |
| 1842 | HB_UInt cur_offset, new_offset, base_offset; never executed (the execution status of this line is deduced): HB_UInt cur_offset, new_offset, base_offset; | - |
| 1843 | | - |
| 1844 | HB_EntryExitRecord* eer; never executed (the execution status of this line is deduced): HB_EntryExitRecord* eer; | - |
| 1845 | | - |
| 1846 | | - |
| 1847 | base_offset = FILE_Pos(); never executed (the execution status of this line is deduced): base_offset = _hb_stream_pos( stream ); | - |
| 1848 | | - |
| 1849 | if ( ACCESS_Frame( 4L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 4L ))) != 0 ) | 0 |
| 1850 | return error; never executed: return error; | 0 |
| 1851 | | - |
| 1852 | cp->PosFormat = GET_UShort(); never executed (the execution status of this line is deduced): cp->PosFormat = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 1853 | new_offset = GET_UShort() + base_offset; never executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 1854 | | - |
| 1855 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 1856 | | - |
| 1857 | cur_offset = FILE_Pos(); never executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 1858 | if ( FILE_Seek( new_offset ) || never evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 ) | 0 |
| 1859 | ( error = _HB_OPEN_Load_Coverage( &cp->Coverage, stream ) ) != HB_Err_Ok ) never evaluated: ( error = _HB_OPEN_Load_Coverage( &cp->Coverage, stream ) ) != HB_Err_Ok | 0 |
| 1860 | return error; never executed: return error; | 0 |
| 1861 | (void)FILE_Seek( cur_offset ); never executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 1862 | | - |
| 1863 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 1864 | goto Fail2; never executed: goto Fail2; | 0 |
| 1865 | | - |
| 1866 | count = cp->EntryExitCount = GET_UShort(); never executed (the execution status of this line is deduced): count = cp->EntryExitCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 1867 | | - |
| 1868 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 1869 | | - |
| 1870 | cp->EntryExitRecord = NULL; never executed (the execution status of this line is deduced): cp->EntryExitRecord = ((void *)0); | - |
| 1871 | | - |
| 1872 | if ( ALLOC_ARRAY( cp->EntryExitRecord, count, HB_EntryExitRecord ) ) never evaluated: ( (cp->EntryExitRecord) = _hb_alloc( (count)*sizeof(HB_EntryExitRecord), &error ), error != 0 ) | 0 |
| 1873 | goto Fail2; never executed: goto Fail2; | 0 |
| 1874 | | - |
| 1875 | eer = cp->EntryExitRecord; never executed (the execution status of this line is deduced): eer = cp->EntryExitRecord; | - |
| 1876 | | - |
| 1877 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 1878 | { | - |
| 1879 | HB_UInt entry_offset; never executed (the execution status of this line is deduced): HB_UInt entry_offset; | - |
| 1880 | | - |
| 1881 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 1882 | return error; never executed: return error; | 0 |
| 1883 | | - |
| 1884 | entry_offset = new_offset = GET_UShort(); never executed (the execution status of this line is deduced): entry_offset = new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 1885 | | - |
| 1886 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 1887 | | - |
| 1888 | if ( new_offset ) never evaluated: new_offset | 0 |
| 1889 | { | - |
| 1890 | new_offset += base_offset; never executed (the execution status of this line is deduced): new_offset += base_offset; | - |
| 1891 | | - |
| 1892 | cur_offset = FILE_Pos(); never executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 1893 | if ( FILE_Seek( new_offset ) || never evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 ) | 0 |
| 1894 | ( error = Load_Anchor( &eer[n].EntryAnchor, never evaluated: ( error = Load_Anchor( &eer[n].EntryAnchor, stream ) ) != HB_Err_Ok | 0 |
| 1895 | stream ) ) != HB_Err_Ok ) never evaluated: ( error = Load_Anchor( &eer[n].EntryAnchor, stream ) ) != HB_Err_Ok | 0 |
| 1896 | goto Fail1; never executed: goto Fail1; | 0 |
| 1897 | (void)FILE_Seek( cur_offset ); never executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 1898 | } | 0 |
| 1899 | else | - |
| 1900 | eer[n].EntryAnchor.PosFormat = 0; never executed: eer[n].EntryAnchor.PosFormat = 0; | 0 |
| 1901 | | - |
| 1902 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 1903 | return error; never executed: return error; | 0 |
| 1904 | | - |
| 1905 | new_offset = GET_UShort(); never executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 1906 | | - |
| 1907 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 1908 | | - |
| 1909 | if ( new_offset ) never evaluated: new_offset | 0 |
| 1910 | { | - |
| 1911 | new_offset += base_offset; never executed (the execution status of this line is deduced): new_offset += base_offset; | - |
| 1912 | | - |
| 1913 | cur_offset = FILE_Pos(); never executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 1914 | if ( FILE_Seek( new_offset ) || never evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 ) | 0 |
| 1915 | ( error = Load_Anchor( &eer[n].ExitAnchor, never evaluated: ( error = Load_Anchor( &eer[n].ExitAnchor, stream ) ) != HB_Err_Ok | 0 |
| 1916 | stream ) ) != HB_Err_Ok ) never evaluated: ( error = Load_Anchor( &eer[n].ExitAnchor, stream ) ) != HB_Err_Ok | 0 |
| 1917 | { | - |
| 1918 | if ( entry_offset ) never evaluated: entry_offset | 0 |
| 1919 | Free_Anchor( &eer[n].EntryAnchor ); never executed: Free_Anchor( &eer[n].EntryAnchor ); | 0 |
| 1920 | goto Fail1; never executed: goto Fail1; | 0 |
| 1921 | } | - |
| 1922 | (void)FILE_Seek( cur_offset ); never executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 1923 | } | 0 |
| 1924 | else | - |
| 1925 | eer[n].ExitAnchor.PosFormat = 0; never executed: eer[n].ExitAnchor.PosFormat = 0; | 0 |
| 1926 | } | - |
| 1927 | | - |
| 1928 | return HB_Err_Ok; never executed: return HB_Err_Ok; | 0 |
| 1929 | | - |
| 1930 | Fail1: | - |
| 1931 | for ( m = 0; m < n; m++ ) | 0 |
| 1932 | { | - |
| 1933 | Free_Anchor( &eer[m].EntryAnchor ); never executed (the execution status of this line is deduced): Free_Anchor( &eer[m].EntryAnchor ); | - |
| 1934 | Free_Anchor( &eer[m].ExitAnchor ); never executed (the execution status of this line is deduced): Free_Anchor( &eer[m].ExitAnchor ); | - |
| 1935 | } | 0 |
| 1936 | | - |
| 1937 | FREE( eer ); never executed: } never executed: } never evaluated: (eer) never evaluated: 0 | 0 |
| 1938 | | - |
| 1939 | Fail2: code before this statement never executed: Fail2: | 0 |
| 1940 | _HB_OPEN_Free_Coverage( &cp->Coverage ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_Coverage( &cp->Coverage ); | - |
| 1941 | return error; never executed: return error; | 0 |
| 1942 | } | - |
| 1943 | | - |
| 1944 | | - |
| 1945 | static void Free_CursivePos( HB_GPOS_SubTable* st ) | - |
| 1946 | { | - |
| 1947 | HB_UShort n, count; never executed (the execution status of this line is deduced): HB_UShort n, count; | - |
| 1948 | HB_CursivePos* cp = &st->cursive; never executed (the execution status of this line is deduced): HB_CursivePos* cp = &st->cursive; | - |
| 1949 | | - |
| 1950 | HB_EntryExitRecord* eer; never executed (the execution status of this line is deduced): HB_EntryExitRecord* eer; | - |
| 1951 | | - |
| 1952 | | - |
| 1953 | if ( cp->EntryExitRecord ) never evaluated: cp->EntryExitRecord | 0 |
| 1954 | { | - |
| 1955 | count = cp->EntryExitCount; never executed (the execution status of this line is deduced): count = cp->EntryExitCount; | - |
| 1956 | eer = cp->EntryExitRecord; never executed (the execution status of this line is deduced): eer = cp->EntryExitRecord; | - |
| 1957 | | - |
| 1958 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 1959 | { | - |
| 1960 | Free_Anchor( &eer[n].EntryAnchor ); never executed (the execution status of this line is deduced): Free_Anchor( &eer[n].EntryAnchor ); | - |
| 1961 | Free_Anchor( &eer[n].ExitAnchor ); never executed (the execution status of this line is deduced): Free_Anchor( &eer[n].ExitAnchor ); | - |
| 1962 | } | 0 |
| 1963 | | - |
| 1964 | FREE( eer ); never executed: } never executed: } never evaluated: (eer) never evaluated: 0 | 0 |
| 1965 | } | 0 |
| 1966 | | - |
| 1967 | _HB_OPEN_Free_Coverage( &cp->Coverage ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_Coverage( &cp->Coverage ); | - |
| 1968 | } | 0 |
| 1969 | | - |
| 1970 | | - |
| 1971 | static HB_Error Lookup_CursivePos( GPOS_Instance* gpi, | - |
| 1972 | HB_GPOS_SubTable* st, | - |
| 1973 | HB_Buffer buffer, | - |
| 1974 | HB_UShort flags, | - |
| 1975 | HB_UShort context_length, | - |
| 1976 | int nesting_level ) | - |
| 1977 | { | - |
| 1978 | HB_UShort index, property; never executed (the execution status of this line is deduced): HB_UShort index, property; | - |
| 1979 | HB_Error error; never executed (the execution status of this line is deduced): HB_Error error; | - |
| 1980 | HB_GPOSHeader* gpos = gpi->gpos; never executed (the execution status of this line is deduced): HB_GPOSHeader* gpos = gpi->gpos; | - |
| 1981 | HB_CursivePos* cp = &st->cursive; never executed (the execution status of this line is deduced): HB_CursivePos* cp = &st->cursive; | - |
| 1982 | | - |
| 1983 | HB_EntryExitRecord* eer; never executed (the execution status of this line is deduced): HB_EntryExitRecord* eer; | - |
| 1984 | HB_Fixed entry_x, entry_y; never executed (the execution status of this line is deduced): HB_Fixed entry_x, entry_y; | - |
| 1985 | HB_Fixed exit_x, exit_y; never executed (the execution status of this line is deduced): HB_Fixed exit_x, exit_y; | - |
| 1986 | | - |
| 1987 | HB_UNUSED(nesting_level); never executed (the execution status of this line is deduced): ((nesting_level) = (nesting_level)); | - |
| 1988 | | - |
| 1989 | if ( context_length != 0xFFFF && context_length < 1 ) never evaluated: context_length != 0xFFFF never evaluated: context_length < 1 | 0 |
| 1990 | { | - |
| 1991 | gpi->last = 0xFFFF; never executed (the execution status of this line is deduced): gpi->last = 0xFFFF; | - |
| 1992 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 1993 | } | - |
| 1994 | | - |
| 1995 | /* Glyphs not having the right GDEF properties will be ignored, i.e., | - |
| 1996 | gpi->last won't be reset (contrary to user defined properties). */ | - |
| 1997 | | - |
| 1998 | if ( CHECK_Property( gpos->gdef, IN_CURITEM(), flags, &property ) ) never evaluated: ( ( error = _HB_GDEF_Check_Property( (gpos->gdef), ((&buffer->in_string[buffer->in_pos])), (flags), (&property) ) ) != HB_Err_Ok ) | 0 |
| 1999 | return error; never executed: return error; | 0 |
| 2000 | | - |
| 2001 | /* We don't handle mark glyphs here. According to Andrei, this isn't | - |
| 2002 | possible, but who knows... */ | - |
| 2003 | | - |
| 2004 | if ( property == HB_GDEF_MARK ) never evaluated: property == 0x0008 | 0 |
| 2005 | { | - |
| 2006 | gpi->last = 0xFFFF; never executed (the execution status of this line is deduced): gpi->last = 0xFFFF; | - |
| 2007 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 2008 | } | - |
| 2009 | | - |
| 2010 | error = _HB_OPEN_Coverage_Index( &cp->Coverage, IN_CURGLYPH(), &index ); never executed (the execution status of this line is deduced): error = _HB_OPEN_Coverage_Index( &cp->Coverage, (buffer->in_string[buffer->in_pos].gindex), &index ); | - |
| 2011 | if ( error ) | 0 |
| 2012 | { | - |
| 2013 | gpi->last = 0xFFFF; never executed (the execution status of this line is deduced): gpi->last = 0xFFFF; | - |
| 2014 | return error; never executed: return error; | 0 |
| 2015 | } | - |
| 2016 | | - |
| 2017 | if ( index >= cp->EntryExitCount ) never evaluated: index >= cp->EntryExitCount | 0 |
| 2018 | return ERR(HB_Err_Invalid_SubTable); never executed: return _hb_err (HB_Err_Invalid_SubTable); | 0 |
| 2019 | | - |
| 2020 | eer = &cp->EntryExitRecord[index]; never executed (the execution status of this line is deduced): eer = &cp->EntryExitRecord[index]; | - |
| 2021 | | - |
| 2022 | /* Now comes the messiest part of the whole OpenType | - |
| 2023 | specification. At first glance, cursive connections seem easy | - |
| 2024 | to understand, but there are pitfalls! The reason is that | - |
| 2025 | the specs don't mention how to compute the advance values | - |
| 2026 | resp. glyph offsets. I was told it would be an omission, to | - |
| 2027 | be fixed in the next OpenType version... Again many thanks to | - |
| 2028 | Andrei Burago <andreib@microsoft.com> for clarifications. | - |
| 2029 | | - |
| 2030 | Consider the following example: | - |
| 2031 | | - |
| 2032 | | xadv1 | | - |
| 2033 | +---------+ | - |
| 2034 | | | | - |
| 2035 | +-----+--+ 1 | | - |
| 2036 | | | .| | | - |
| 2037 | | 0+--+------+ | - |
| 2038 | | 2 | | - |
| 2039 | | | | - |
| 2040 | 0+--------+ | - |
| 2041 | | xadv2 | | - |
| 2042 | | - |
| 2043 | glyph1: advance width = 12 | - |
| 2044 | anchor point = (3,1) | - |
| 2045 | | - |
| 2046 | glyph2: advance width = 11 | - |
| 2047 | anchor point = (9,4) | - |
| 2048 | | - |
| 2049 | LSB is 1 for both glyphs (so the boxes drawn above are glyph | - |
| 2050 | bboxes). Writing direction is R2L; `0' denotes the glyph's | - |
| 2051 | coordinate origin. | - |
| 2052 | | - |
| 2053 | Now the surprising part: The advance width of the *left* glyph | - |
| 2054 | (resp. of the *bottom* glyph) will be modified, no matter | - |
| 2055 | whether the writing direction is L2R or R2L (resp. T2B or | - |
| 2056 | B2T)! This assymetry is caused by the fact that the glyph's | - |
| 2057 | coordinate origin is always the lower left corner for all | - |
| 2058 | writing directions. | - |
| 2059 | | - |
| 2060 | Continuing the above example, we can compute the new | - |
| 2061 | (horizontal) advance width of glyph2 as | - |
| 2062 | | - |
| 2063 | 9 - 3 = 6 , | - |
| 2064 | | - |
| 2065 | and the new vertical offset of glyph2 as | - |
| 2066 | | - |
| 2067 | 1 - 4 = -3 . | - |
| 2068 | | - |
| 2069 | | - |
| 2070 | Vertical writing direction is far more complicated: | - |
| 2071 | | - |
| 2072 | a) Assuming that we recompute the advance height of the lower glyph: | - |
| 2073 | | - |
| 2074 | -- | - |
| 2075 | +---------+ | - |
| 2076 | -- | | | - |
| 2077 | +-----+--+ 1 | yadv1 | - |
| 2078 | | | .| | | - |
| 2079 | yadv2 | 0+--+------+ -- BSB1 -- | - |
| 2080 | | 2 | -- -- y_offset | - |
| 2081 | | | | - |
| 2082 | BSB2 -- 0+--------+ -- | - |
| 2083 | -- -- | - |
| 2084 | | - |
| 2085 | glyph1: advance height = 6 | - |
| 2086 | anchor point = (3,1) | - |
| 2087 | | - |
| 2088 | glyph2: advance height = 7 | - |
| 2089 | anchor point = (9,4) | - |
| 2090 | | - |
| 2091 | TSB is 1 for both glyphs; writing direction is T2B. | - |
| 2092 | | - |
| 2093 | | - |
| 2094 | BSB1 = yadv1 - (TSB1 + ymax1) | - |
| 2095 | BSB2 = yadv2 - (TSB2 + ymax2) | - |
| 2096 | y_offset = y2 - y1 | - |
| 2097 | | - |
| 2098 | vertical advance width of glyph2 | - |
| 2099 | = y_offset + BSB2 - BSB1 | - |
| 2100 | = (y2 - y1) + (yadv2 - (TSB2 + ymax2)) - (yadv1 - (TSB1 + ymax1)) | - |
| 2101 | = y2 - y1 + yadv2 - TSB2 - ymax2 - (yadv1 - TSB1 - ymax1) | - |
| 2102 | = y2 - y1 + yadv2 - TSB2 - ymax2 - yadv1 + TSB1 + ymax1 | - |
| 2103 | | - |
| 2104 | | - |
| 2105 | b) Assuming that we recompute the advance height of the upper glyph: | - |
| 2106 | | - |
| 2107 | -- -- | - |
| 2108 | +---------+ -- TSB1 | - |
| 2109 | -- -- | | | - |
| 2110 | TSB2 -- +-----+--+ 1 | yadv1 ymax1 | - |
| 2111 | | | .| | | - |
| 2112 | yadv2 | 0+--+------+ -- -- | - |
| 2113 | ymax2 | 2 | -- y_offset | - |
| 2114 | | | | - |
| 2115 | -- 0+--------+ -- | - |
| 2116 | -- | - |
| 2117 | | - |
| 2118 | glyph1: advance height = 6 | - |
| 2119 | anchor point = (3,1) | - |
| 2120 | | - |
| 2121 | glyph2: advance height = 7 | - |
| 2122 | anchor point = (9,4) | - |
| 2123 | | - |
| 2124 | TSB is 1 for both glyphs; writing direction is T2B. | - |
| 2125 | | - |
| 2126 | y_offset = y2 - y1 | - |
| 2127 | | - |
| 2128 | vertical advance width of glyph2 | - |
| 2129 | = TSB1 + ymax1 + y_offset - (TSB2 + ymax2) | - |
| 2130 | = TSB1 + ymax1 + y2 - y1 - TSB2 - ymax2 | - |
| 2131 | | - |
| 2132 | | - |
| 2133 | Comparing a) with b) shows that b) is easier to compute. I'll wait | - |
| 2134 | for a reply from Andrei to see what should really be implemented... | - |
| 2135 | | - |
| 2136 | Since horizontal advance widths or vertical advance heights | - |
| 2137 | can be used alone but not together, no ambiguity occurs. */ | - |
| 2138 | | - |
| 2139 | if ( gpi->last == 0xFFFF ) never evaluated: gpi->last == 0xFFFF | 0 |
| 2140 | goto end; never executed: goto end; | 0 |
| 2141 | | - |
| 2142 | /* Get_Anchor() returns HB_Err_Not_Covered if there is no anchor | - |
| 2143 | table. */ | - |
| 2144 | | - |
| 2145 | error = Get_Anchor( gpi, &eer->EntryAnchor, IN_CURGLYPH(), never executed (the execution status of this line is deduced): error = Get_Anchor( gpi, &eer->EntryAnchor, (buffer->in_string[buffer->in_pos].gindex), | - |
| 2146 | &entry_x, &entry_y ); never executed (the execution status of this line is deduced): &entry_x, &entry_y ); | - |
| 2147 | if ( error == HB_Err_Not_Covered ) never evaluated: error == HB_Err_Not_Covered | 0 |
| 2148 | goto end; never executed: goto end; | 0 |
| 2149 | if ( error ) | 0 |
| 2150 | return error; never executed: return error; | 0 |
| 2151 | | - |
| 2152 | if ( gpi->r2l ) never evaluated: gpi->r2l | 0 |
| 2153 | { | - |
| 2154 | POSITION( buffer->in_pos )->x_advance = entry_x - gpi->anchor_x; never executed (the execution status of this line is deduced): (&buffer->positions[(buffer->in_pos)])->x_advance = entry_x - gpi->anchor_x; | - |
| 2155 | POSITION( buffer->in_pos )->new_advance = TRUE; never executed (the execution status of this line is deduced): (&buffer->positions[(buffer->in_pos)])->new_advance = (!0); | - |
| 2156 | } | 0 |
| 2157 | else | - |
| 2158 | { | - |
| 2159 | POSITION( gpi->last )->x_advance = gpi->anchor_x - entry_x; never executed (the execution status of this line is deduced): (&buffer->positions[(gpi->last)])->x_advance = gpi->anchor_x - entry_x; | - |
| 2160 | POSITION( gpi->last )->new_advance = TRUE; never executed (the execution status of this line is deduced): (&buffer->positions[(gpi->last)])->new_advance = (!0); | - |
| 2161 | } | 0 |
| 2162 | | - |
| 2163 | if ( flags & HB_LOOKUP_FLAG_RIGHT_TO_LEFT ) never evaluated: flags & 0x0001 | 0 |
| 2164 | { | - |
| 2165 | POSITION( gpi->last )->cursive_chain = gpi->last - buffer->in_pos; never executed (the execution status of this line is deduced): (&buffer->positions[(gpi->last)])->cursive_chain = gpi->last - buffer->in_pos; | - |
| 2166 | POSITION( gpi->last )->y_pos = entry_y - gpi->anchor_y; never executed (the execution status of this line is deduced): (&buffer->positions[(gpi->last)])->y_pos = entry_y - gpi->anchor_y; | - |
| 2167 | } | 0 |
| 2168 | else | - |
| 2169 | { | - |
| 2170 | POSITION( buffer->in_pos )->cursive_chain = buffer->in_pos - gpi->last; never executed (the execution status of this line is deduced): (&buffer->positions[(buffer->in_pos)])->cursive_chain = buffer->in_pos - gpi->last; | - |
| 2171 | POSITION( buffer->in_pos )->y_pos = gpi->anchor_y - entry_y; never executed (the execution status of this line is deduced): (&buffer->positions[(buffer->in_pos)])->y_pos = gpi->anchor_y - entry_y; | - |
| 2172 | } | 0 |
| 2173 | | - |
| 2174 | end: code before this statement never executed: end: | 0 |
| 2175 | error = Get_Anchor( gpi, &eer->ExitAnchor, IN_CURGLYPH(), never executed (the execution status of this line is deduced): error = Get_Anchor( gpi, &eer->ExitAnchor, (buffer->in_string[buffer->in_pos].gindex), | - |
| 2176 | &exit_x, &exit_y ); never executed (the execution status of this line is deduced): &exit_x, &exit_y ); | - |
| 2177 | if ( error == HB_Err_Not_Covered ) never evaluated: error == HB_Err_Not_Covered | 0 |
| 2178 | gpi->last = 0xFFFF; never executed: gpi->last = 0xFFFF; | 0 |
| 2179 | else | - |
| 2180 | { | - |
| 2181 | gpi->last = buffer->in_pos; never executed (the execution status of this line is deduced): gpi->last = buffer->in_pos; | - |
| 2182 | gpi->anchor_x = exit_x; never executed (the execution status of this line is deduced): gpi->anchor_x = exit_x; | - |
| 2183 | gpi->anchor_y = exit_y; never executed (the execution status of this line is deduced): gpi->anchor_y = exit_y; | - |
| 2184 | } | 0 |
| 2185 | if ( error ) | 0 |
| 2186 | return error; never executed: return error; | 0 |
| 2187 | | - |
| 2188 | (buffer->in_pos)++; never executed (the execution status of this line is deduced): (buffer->in_pos)++; | - |
| 2189 | | - |
| 2190 | return HB_Err_Ok; never executed: return HB_Err_Ok; | 0 |
| 2191 | } | - |
| 2192 | | - |
| 2193 | | - |
| 2194 | /* LookupType 4 */ | - |
| 2195 | | - |
| 2196 | /* BaseArray */ | - |
| 2197 | | - |
| 2198 | static HB_Error Load_BaseArray( HB_BaseArray* ba, | - |
| 2199 | HB_UShort num_classes, | - |
| 2200 | HB_Stream stream ) | - |
| 2201 | { | - |
| 2202 | HB_Error error; executed (the execution status of this line is deduced): HB_Error error; | - |
| 2203 | | - |
| 2204 | HB_UShort m, n, count; executed (the execution status of this line is deduced): HB_UShort m, n, count; | - |
| 2205 | HB_UInt cur_offset, new_offset, base_offset; executed (the execution status of this line is deduced): HB_UInt cur_offset, new_offset, base_offset; | - |
| 2206 | | - |
| 2207 | HB_BaseRecord *br; executed (the execution status of this line is deduced): HB_BaseRecord *br; | - |
| 2208 | HB_Anchor *ban, *bans; executed (the execution status of this line is deduced): HB_Anchor *ban, *bans; | - |
| 2209 | | - |
| 2210 | | - |
| 2211 | base_offset = FILE_Pos(); executed (the execution status of this line is deduced): base_offset = _hb_stream_pos( stream ); | - |
| 2212 | | - |
| 2213 | if ( ACCESS_Frame( 2L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:1298 |
| 0-1298 |
| 2214 | return error; never executed: return error; | 0 |
| 2215 | | - |
| 2216 | count = ba->BaseCount = GET_UShort(); executed (the execution status of this line is deduced): count = ba->BaseCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 2217 | | - |
| 2218 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 2219 | | - |
| 2220 | ba->BaseRecord = NULL; executed (the execution status of this line is deduced): ba->BaseRecord = ((void *)0); | - |
| 2221 | | - |
| 2222 | if ( ALLOC_ARRAY( ba->BaseRecord, count, HB_BaseRecord ) ) partially evaluated: ( (ba->BaseRecord) = _hb_alloc( (count)*sizeof(HB_BaseRecord), &error ), error != 0 )| no Evaluation Count:0 | yes Evaluation Count:1298 |
| 0-1298 |
| 2223 | return error; never executed: return error; | 0 |
| 2224 | | - |
| 2225 | br = ba->BaseRecord; executed (the execution status of this line is deduced): br = ba->BaseRecord; | - |
| 2226 | | - |
| 2227 | bans = NULL; executed (the execution status of this line is deduced): bans = ((void *)0); | - |
| 2228 | | - |
| 2229 | if ( ALLOC_ARRAY( bans, count * num_classes, HB_Anchor ) ) partially evaluated: ( (bans) = _hb_alloc( (count * num_classes)*sizeof(HB_Anchor), &error ), error != 0 )| no Evaluation Count:0 | yes Evaluation Count:1298 |
| 0-1298 |
| 2230 | goto Fail; never executed: goto Fail; | 0 |
| 2231 | | - |
| 2232 | for ( m = 0; m < count; m++ ) evaluated: m < count| yes Evaluation Count:305405 | yes Evaluation Count:1298 |
| 1298-305405 |
| 2233 | { | - |
| 2234 | br[m].BaseAnchor = NULL; executed (the execution status of this line is deduced): br[m].BaseAnchor = ((void *)0); | - |
| 2235 | | - |
| 2236 | ban = br[m].BaseAnchor = bans + m * num_classes; executed (the execution status of this line is deduced): ban = br[m].BaseAnchor = bans + m * num_classes; | - |
| 2237 | | - |
| 2238 | for ( n = 0; n < num_classes; n++ ) evaluated: n < num_classes| yes Evaluation Count:311919 | yes Evaluation Count:305405 |
| 305405-311919 |
| 2239 | { | - |
| 2240 | if ( ACCESS_Frame( 2L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:311919 |
| 0-311919 |
| 2241 | goto Fail; never executed: goto Fail; | 0 |
| 2242 | | - |
| 2243 | new_offset = GET_UShort() + base_offset; executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 2244 | | - |
| 2245 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 2246 | | - |
| 2247 | if (new_offset == base_offset) { evaluated: new_offset == base_offset| yes Evaluation Count:4110 | yes Evaluation Count:307809 |
| 4110-307809 |
| 2248 | /* XXX | - |
| 2249 | * Doulos SIL Regular is buggy and has zero offsets here. | - |
| 2250 | * Skip it | - |
| 2251 | */ | - |
| 2252 | ban[n].PosFormat = 0; executed (the execution status of this line is deduced): ban[n].PosFormat = 0; | - |
| 2253 | continue; executed: continue;Execution Count:4110 | 4110 |
| 2254 | } | - |
| 2255 | | - |
| 2256 | cur_offset = FILE_Pos(); executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 2257 | if ( FILE_Seek( new_offset ) || partially evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:307809 |
| 0-307809 |
| 2258 | ( error = Load_Anchor( &ban[n], stream ) ) != HB_Err_Ok ) partially evaluated: ( error = Load_Anchor( &ban[n], stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:307809 |
| 0-307809 |
| 2259 | goto Fail; never executed: goto Fail; | 0 |
| 2260 | (void)FILE_Seek( cur_offset ); executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 2261 | } executed: }Execution Count:307809 | 307809 |
| 2262 | } executed: }Execution Count:305405 | 305405 |
| 2263 | | - |
| 2264 | return HB_Err_Ok; executed: return HB_Err_Ok;Execution Count:1298 | 1298 |
| 2265 | | - |
| 2266 | Fail: | - |
| 2267 | FREE( bans ); never executed: } never executed: } never evaluated: (bans) never evaluated: 0 | 0 |
| 2268 | FREE( br ); never executed: } never executed: } never evaluated: (br) never evaluated: 0 | 0 |
| 2269 | return error; never executed: return error; | 0 |
| 2270 | } | - |
| 2271 | | - |
| 2272 | | - |
| 2273 | static void Free_BaseArray( HB_BaseArray* ba, | - |
| 2274 | HB_UShort num_classes ) | - |
| 2275 | { | - |
| 2276 | HB_BaseRecord *br; executed (the execution status of this line is deduced): HB_BaseRecord *br; | - |
| 2277 | HB_Anchor *bans; executed (the execution status of this line is deduced): HB_Anchor *bans; | - |
| 2278 | | - |
| 2279 | if ( ba->BaseRecord ) partially evaluated: ba->BaseRecord| yes Evaluation Count:1233 | no Evaluation Count:0 |
| 0-1233 |
| 2280 | { | - |
| 2281 | br = ba->BaseRecord; executed (the execution status of this line is deduced): br = ba->BaseRecord; | - |
| 2282 | | - |
| 2283 | if ( ba->BaseCount ) partially evaluated: ba->BaseCount| yes Evaluation Count:1233 | no Evaluation Count:0 |
| 0-1233 |
| 2284 | { | - |
| 2285 | HB_UShort i, count; executed (the execution status of this line is deduced): HB_UShort i, count; | - |
| 2286 | count = num_classes * ba->BaseCount; executed (the execution status of this line is deduced): count = num_classes * ba->BaseCount; | - |
| 2287 | bans = br[0].BaseAnchor; executed (the execution status of this line is deduced): bans = br[0].BaseAnchor; | - |
| 2288 | for (i = 0; i < count; i++) evaluated: i < count| yes Evaluation Count:295524 | yes Evaluation Count:1233 |
| 1233-295524 |
| 2289 | Free_Anchor (&bans[i]); executed: Free_Anchor (&bans[i]);Execution Count:295524 | 295524 |
| 2290 | FREE( bans ); executed: }Execution Count:1233 executed: }Execution Count:1233 partially evaluated: (bans)| yes Evaluation Count:1233 | no Evaluation Count:0 |
partially evaluated: 0| no Evaluation Count:0 | yes Evaluation Count:1233 |
| 0-1233 |
| 2291 | } executed: }Execution Count:1233 | 1233 |
| 2292 | | - |
| 2293 | FREE( br ); executed: }Execution Count:1233 executed: }Execution Count:1233 partially evaluated: (br)| yes Evaluation Count:1233 | no Evaluation Count:0 |
partially evaluated: 0| no Evaluation Count:0 | yes Evaluation Count:1233 |
| 0-1233 |
| 2294 | } executed: }Execution Count:1233 | 1233 |
| 2295 | } executed: }Execution Count:1233 | 1233 |
| 2296 | | - |
| 2297 | | - |
| 2298 | /* MarkBasePosFormat1 */ | - |
| 2299 | | - |
| 2300 | static HB_Error Load_MarkBasePos( HB_GPOS_SubTable* st, | - |
| 2301 | HB_Stream stream ) | - |
| 2302 | { | - |
| 2303 | HB_Error error; executed (the execution status of this line is deduced): HB_Error error; | - |
| 2304 | HB_MarkBasePos* mbp = &st->markbase; executed (the execution status of this line is deduced): HB_MarkBasePos* mbp = &st->markbase; | - |
| 2305 | | - |
| 2306 | HB_UInt cur_offset, new_offset, base_offset; executed (the execution status of this line is deduced): HB_UInt cur_offset, new_offset, base_offset; | - |
| 2307 | | - |
| 2308 | | - |
| 2309 | base_offset = FILE_Pos(); executed (the execution status of this line is deduced): base_offset = _hb_stream_pos( stream ); | - |
| 2310 | | - |
| 2311 | if ( ACCESS_Frame( 4L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 4L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:1298 |
| 0-1298 |
| 2312 | return error; never executed: return error; | 0 |
| 2313 | | - |
| 2314 | mbp->PosFormat = GET_UShort(); executed (the execution status of this line is deduced): mbp->PosFormat = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 2315 | new_offset = GET_UShort() + base_offset; executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 2316 | | - |
| 2317 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 2318 | | - |
| 2319 | if (mbp->PosFormat != 1) partially evaluated: mbp->PosFormat != 1| no Evaluation Count:0 | yes Evaluation Count:1298 |
| 0-1298 |
| 2320 | return ERR(HB_Err_Invalid_SubTable_Format); never executed: return _hb_err (HB_Err_Invalid_SubTable_Format); | 0 |
| 2321 | | - |
| 2322 | cur_offset = FILE_Pos(); executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 2323 | if ( FILE_Seek( new_offset ) || partially evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:1298 |
| 0-1298 |
| 2324 | ( error = _HB_OPEN_Load_Coverage( &mbp->MarkCoverage, stream ) ) != HB_Err_Ok ) partially evaluated: ( error = _HB_OPEN_Load_Coverage( &mbp->MarkCoverage, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:1298 |
| 0-1298 |
| 2325 | return error; never executed: return error; | 0 |
| 2326 | (void)FILE_Seek( cur_offset ); executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 2327 | | - |
| 2328 | if ( ACCESS_Frame( 2L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:1298 |
| 0-1298 |
| 2329 | goto Fail3; never executed: goto Fail3; | 0 |
| 2330 | | - |
| 2331 | new_offset = GET_UShort() + base_offset; executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 2332 | | - |
| 2333 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 2334 | | - |
| 2335 | cur_offset = FILE_Pos(); executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 2336 | if ( FILE_Seek( new_offset ) || partially evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:1298 |
| 0-1298 |
| 2337 | ( error = _HB_OPEN_Load_Coverage( &mbp->BaseCoverage, stream ) ) != HB_Err_Ok ) partially evaluated: ( error = _HB_OPEN_Load_Coverage( &mbp->BaseCoverage, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:1298 |
| 0-1298 |
| 2338 | goto Fail3; never executed: goto Fail3; | 0 |
| 2339 | (void)FILE_Seek( cur_offset ); executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 2340 | | - |
| 2341 | if ( ACCESS_Frame( 4L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 4L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:1298 |
| 0-1298 |
| 2342 | goto Fail2; never executed: goto Fail2; | 0 |
| 2343 | | - |
| 2344 | mbp->ClassCount = GET_UShort(); executed (the execution status of this line is deduced): mbp->ClassCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 2345 | new_offset = GET_UShort() + base_offset; executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 2346 | | - |
| 2347 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 2348 | | - |
| 2349 | cur_offset = FILE_Pos(); executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 2350 | if ( FILE_Seek( new_offset ) || partially evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:1298 |
| 0-1298 |
| 2351 | ( error = Load_MarkArray( &mbp->MarkArray, stream ) ) != HB_Err_Ok ) partially evaluated: ( error = Load_MarkArray( &mbp->MarkArray, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:1298 |
| 0-1298 |
| 2352 | goto Fail2; never executed: goto Fail2; | 0 |
| 2353 | (void)FILE_Seek( cur_offset ); executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 2354 | | - |
| 2355 | if ( ACCESS_Frame( 2L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:1298 |
| 0-1298 |
| 2356 | goto Fail1; never executed: goto Fail1; | 0 |
| 2357 | | - |
| 2358 | new_offset = GET_UShort() + base_offset; executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 2359 | | - |
| 2360 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 2361 | | - |
| 2362 | cur_offset = FILE_Pos(); executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 2363 | if ( FILE_Seek( new_offset ) || partially evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:1298 |
| 0-1298 |
| 2364 | ( error = Load_BaseArray( &mbp->BaseArray, mbp->ClassCount, partially evaluated: ( error = Load_BaseArray( &mbp->BaseArray, mbp->ClassCount, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:1298 |
| 0-1298 |
| 2365 | stream ) ) != HB_Err_Ok ) partially evaluated: ( error = Load_BaseArray( &mbp->BaseArray, mbp->ClassCount, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:1298 |
| 0-1298 |
| 2366 | goto Fail1; never executed: goto Fail1; | 0 |
| 2367 | | - |
| 2368 | return HB_Err_Ok; executed: return HB_Err_Ok;Execution Count:1298 | 1298 |
| 2369 | | - |
| 2370 | Fail1: | - |
| 2371 | Free_MarkArray( &mbp->MarkArray ); never executed (the execution status of this line is deduced): Free_MarkArray( &mbp->MarkArray ); | - |
| 2372 | | - |
| 2373 | Fail2: code before this statement never executed: Fail2: | 0 |
| 2374 | _HB_OPEN_Free_Coverage( &mbp->BaseCoverage ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_Coverage( &mbp->BaseCoverage ); | - |
| 2375 | | - |
| 2376 | Fail3: code before this statement never executed: Fail3: | 0 |
| 2377 | _HB_OPEN_Free_Coverage( &mbp->MarkCoverage ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_Coverage( &mbp->MarkCoverage ); | - |
| 2378 | return error; never executed: return error; | 0 |
| 2379 | } | - |
| 2380 | | - |
| 2381 | | - |
| 2382 | static void Free_MarkBasePos( HB_GPOS_SubTable* st ) | - |
| 2383 | { | - |
| 2384 | HB_MarkBasePos* mbp = &st->markbase; executed (the execution status of this line is deduced): HB_MarkBasePos* mbp = &st->markbase; | - |
| 2385 | | - |
| 2386 | Free_BaseArray( &mbp->BaseArray, mbp->ClassCount ); executed (the execution status of this line is deduced): Free_BaseArray( &mbp->BaseArray, mbp->ClassCount ); | - |
| 2387 | Free_MarkArray( &mbp->MarkArray ); executed (the execution status of this line is deduced): Free_MarkArray( &mbp->MarkArray ); | - |
| 2388 | _HB_OPEN_Free_Coverage( &mbp->BaseCoverage ); executed (the execution status of this line is deduced): _HB_OPEN_Free_Coverage( &mbp->BaseCoverage ); | - |
| 2389 | _HB_OPEN_Free_Coverage( &mbp->MarkCoverage ); executed (the execution status of this line is deduced): _HB_OPEN_Free_Coverage( &mbp->MarkCoverage ); | - |
| 2390 | } executed: }Execution Count:1233 | 1233 |
| 2391 | | - |
| 2392 | | - |
| 2393 | static HB_Error Lookup_MarkBasePos( GPOS_Instance* gpi, | - |
| 2394 | HB_GPOS_SubTable* st, | - |
| 2395 | HB_Buffer buffer, | - |
| 2396 | HB_UShort flags, | - |
| 2397 | HB_UShort context_length, | - |
| 2398 | int nesting_level ) | - |
| 2399 | { | - |
| 2400 | HB_UShort i, j, mark_index, base_index, property, class; executed (the execution status of this line is deduced): HB_UShort i, j, mark_index, base_index, property, class; | - |
| 2401 | HB_Fixed x_mark_value, y_mark_value, x_base_value, y_base_value; executed (the execution status of this line is deduced): HB_Fixed x_mark_value, y_mark_value, x_base_value, y_base_value; | - |
| 2402 | HB_Error error; executed (the execution status of this line is deduced): HB_Error error; | - |
| 2403 | HB_GPOSHeader* gpos = gpi->gpos; executed (the execution status of this line is deduced): HB_GPOSHeader* gpos = gpi->gpos; | - |
| 2404 | HB_MarkBasePos* mbp = &st->markbase; executed (the execution status of this line is deduced): HB_MarkBasePos* mbp = &st->markbase; | - |
| 2405 | | - |
| 2406 | HB_MarkArray* ma; executed (the execution status of this line is deduced): HB_MarkArray* ma; | - |
| 2407 | HB_BaseArray* ba; executed (the execution status of this line is deduced): HB_BaseArray* ba; | - |
| 2408 | HB_BaseRecord* br; executed (the execution status of this line is deduced): HB_BaseRecord* br; | - |
| 2409 | HB_Anchor* mark_anchor; executed (the execution status of this line is deduced): HB_Anchor* mark_anchor; | - |
| 2410 | HB_Anchor* base_anchor; executed (the execution status of this line is deduced): HB_Anchor* base_anchor; | - |
| 2411 | | - |
| 2412 | HB_Position o; executed (the execution status of this line is deduced): HB_Position o; | - |
| 2413 | | - |
| 2414 | HB_UNUSED(nesting_level); executed (the execution status of this line is deduced): ((nesting_level) = (nesting_level)); | - |
| 2415 | | - |
| 2416 | if ( context_length != 0xFFFF && context_length < 1 ) partially evaluated: context_length != 0xFFFF| no Evaluation Count:0 | yes Evaluation Count:16167399 |
never evaluated: context_length < 1 | 0-16167399 |
| 2417 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 2418 | | - |
| 2419 | if ( flags & HB_LOOKUP_FLAG_IGNORE_BASE_GLYPHS ) partially evaluated: flags & 0x0002| no Evaluation Count:0 | yes Evaluation Count:16167399 |
| 0-16167399 |
| 2420 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 2421 | | - |
| 2422 | if ( CHECK_Property( gpos->gdef, IN_CURITEM(), evaluated: ( ( error = _HB_GDEF_Check_Property( (gpos->gdef), ((&buffer->in_string[buffer->in_pos])), (flags), (&property) ) ) != HB_Err_Ok )| yes Evaluation Count:49510 | yes Evaluation Count:16117889 |
| 49510-16117889 |
| 2423 | flags, &property ) ) | - |
| 2424 | return error; executed: return error;Execution Count:49510 | 49510 |
| 2425 | | - |
| 2426 | error = _HB_OPEN_Coverage_Index( &mbp->MarkCoverage, IN_CURGLYPH(), executed (the execution status of this line is deduced): error = _HB_OPEN_Coverage_Index( &mbp->MarkCoverage, (buffer->in_string[buffer->in_pos].gindex), | - |
| 2427 | &mark_index ); executed (the execution status of this line is deduced): &mark_index ); | - |
| 2428 | if ( error ) evaluated: error| yes Evaluation Count:15912905 | yes Evaluation Count:204984 |
| 204984-15912905 |
| 2429 | return error; executed: return error;Execution Count:15912905 | 15912905 |
| 2430 | | - |
| 2431 | /* now we search backwards for a non-mark glyph */ | - |
| 2432 | | - |
| 2433 | i = 1; executed (the execution status of this line is deduced): i = 1; | - |
| 2434 | j = buffer->in_pos - 1; executed (the execution status of this line is deduced): j = buffer->in_pos - 1; | - |
| 2435 | | - |
| 2436 | while ( i <= buffer->in_pos ) partially evaluated: i <= buffer->in_pos| yes Evaluation Count:205024 | no Evaluation Count:0 |
| 0-205024 |
| 2437 | { | - |
| 2438 | error = HB_GDEF_Get_Glyph_Property( gpos->gdef, IN_GLYPH( j ), executed (the execution status of this line is deduced): error = HB_GDEF_Get_Glyph_Property( gpos->gdef, (buffer->in_string[(j)].gindex), | - |
| 2439 | &property ); executed (the execution status of this line is deduced): &property ); | - |
| 2440 | if ( error ) partially evaluated: error| no Evaluation Count:0 | yes Evaluation Count:205024 |
| 0-205024 |
| 2441 | return error; never executed: return error; | 0 |
| 2442 | | - |
| 2443 | if ( !( property == HB_GDEF_MARK || property & HB_LOOKUP_FLAG_IGNORE_SPECIAL_MARKS ) ) evaluated: property == 0x0008| yes Evaluation Count:40 | yes Evaluation Count:204984 |
partially evaluated: property & 0xFF00| no Evaluation Count:0 | yes Evaluation Count:204984 |
| 0-204984 |
| 2444 | break; executed: break;Execution Count:204984 | 204984 |
| 2445 | | - |
| 2446 | i++; executed (the execution status of this line is deduced): i++; | - |
| 2447 | j--; executed (the execution status of this line is deduced): j--; | - |
| 2448 | } executed: }Execution Count:40 | 40 |
| 2449 | | - |
| 2450 | /* The following assertion is too strong -- at least for mangal.ttf. */ | - |
| 2451 | #if 0 | - |
| 2452 | if ( property != HB_GDEF_BASE_GLYPH ) | - |
| 2453 | return HB_Err_Not_Covered; | - |
| 2454 | #endif | - |
| 2455 | | - |
| 2456 | if ( i > buffer->in_pos ) partially evaluated: i > buffer->in_pos| no Evaluation Count:0 | yes Evaluation Count:204984 |
| 0-204984 |
| 2457 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 2458 | | - |
| 2459 | error = _HB_OPEN_Coverage_Index( &mbp->BaseCoverage, IN_GLYPH( j ), executed (the execution status of this line is deduced): error = _HB_OPEN_Coverage_Index( &mbp->BaseCoverage, (buffer->in_string[(j)].gindex), | - |
| 2460 | &base_index ); executed (the execution status of this line is deduced): &base_index ); | - |
| 2461 | if ( error ) evaluated: error| yes Evaluation Count:203776 | yes Evaluation Count:1208 |
| 1208-203776 |
| 2462 | return error; executed: return error;Execution Count:203776 | 203776 |
| 2463 | | - |
| 2464 | ma = &mbp->MarkArray; executed (the execution status of this line is deduced): ma = &mbp->MarkArray; | - |
| 2465 | | - |
| 2466 | if ( mark_index >= ma->MarkCount ) partially evaluated: mark_index >= ma->MarkCount| no Evaluation Count:0 | yes Evaluation Count:1208 |
| 0-1208 |
| 2467 | return ERR(HB_Err_Invalid_SubTable); never executed: return _hb_err (HB_Err_Invalid_SubTable); | 0 |
| 2468 | | - |
| 2469 | class = ma->MarkRecord[mark_index].Class; executed (the execution status of this line is deduced): class = ma->MarkRecord[mark_index].Class; | - |
| 2470 | mark_anchor = &ma->MarkRecord[mark_index].MarkAnchor; executed (the execution status of this line is deduced): mark_anchor = &ma->MarkRecord[mark_index].MarkAnchor; | - |
| 2471 | | - |
| 2472 | if ( class >= mbp->ClassCount ) partially evaluated: class >= mbp->ClassCount| no Evaluation Count:0 | yes Evaluation Count:1208 |
| 0-1208 |
| 2473 | return ERR(HB_Err_Invalid_SubTable); never executed: return _hb_err (HB_Err_Invalid_SubTable); | 0 |
| 2474 | | - |
| 2475 | ba = &mbp->BaseArray; executed (the execution status of this line is deduced): ba = &mbp->BaseArray; | - |
| 2476 | | - |
| 2477 | if ( base_index >= ba->BaseCount ) partially evaluated: base_index >= ba->BaseCount| no Evaluation Count:0 | yes Evaluation Count:1208 |
| 0-1208 |
| 2478 | return ERR(HB_Err_Invalid_SubTable); never executed: return _hb_err (HB_Err_Invalid_SubTable); | 0 |
| 2479 | | - |
| 2480 | br = &ba->BaseRecord[base_index]; executed (the execution status of this line is deduced): br = &ba->BaseRecord[base_index]; | - |
| 2481 | base_anchor = &br->BaseAnchor[class]; executed (the execution status of this line is deduced): base_anchor = &br->BaseAnchor[class]; | - |
| 2482 | | - |
| 2483 | error = Get_Anchor( gpi, mark_anchor, IN_CURGLYPH(), executed (the execution status of this line is deduced): error = Get_Anchor( gpi, mark_anchor, (buffer->in_string[buffer->in_pos].gindex), | - |
| 2484 | &x_mark_value, &y_mark_value ); executed (the execution status of this line is deduced): &x_mark_value, &y_mark_value ); | - |
| 2485 | if ( error ) partially evaluated: error| no Evaluation Count:0 | yes Evaluation Count:1208 |
| 0-1208 |
| 2486 | return error; never executed: return error; | 0 |
| 2487 | | - |
| 2488 | error = Get_Anchor( gpi, base_anchor, IN_GLYPH( j ), executed (the execution status of this line is deduced): error = Get_Anchor( gpi, base_anchor, (buffer->in_string[(j)].gindex), | - |
| 2489 | &x_base_value, &y_base_value ); executed (the execution status of this line is deduced): &x_base_value, &y_base_value ); | - |
| 2490 | if ( error ) partially evaluated: error| no Evaluation Count:0 | yes Evaluation Count:1208 |
| 0-1208 |
| 2491 | return error; never executed: return error; | 0 |
| 2492 | | - |
| 2493 | /* anchor points are not cumulative */ | - |
| 2494 | | - |
| 2495 | o = POSITION( buffer->in_pos ); executed (the execution status of this line is deduced): o = (&buffer->positions[(buffer->in_pos)]); | - |
| 2496 | | - |
| 2497 | o->x_pos = x_base_value - x_mark_value; executed (the execution status of this line is deduced): o->x_pos = x_base_value - x_mark_value; | - |
| 2498 | o->y_pos = y_base_value - y_mark_value; executed (the execution status of this line is deduced): o->y_pos = y_base_value - y_mark_value; | - |
| 2499 | o->x_advance = 0; executed (the execution status of this line is deduced): o->x_advance = 0; | - |
| 2500 | o->y_advance = 0; executed (the execution status of this line is deduced): o->y_advance = 0; | - |
| 2501 | o->back = i; executed (the execution status of this line is deduced): o->back = i; | - |
| 2502 | | - |
| 2503 | (buffer->in_pos)++; executed (the execution status of this line is deduced): (buffer->in_pos)++; | - |
| 2504 | | - |
| 2505 | return HB_Err_Ok; executed: return HB_Err_Ok;Execution Count:1208 | 1208 |
| 2506 | } | - |
| 2507 | | - |
| 2508 | | - |
| 2509 | /* LookupType 5 */ | - |
| 2510 | | - |
| 2511 | /* LigatureAttach */ | - |
| 2512 | | - |
| 2513 | static HB_Error Load_LigatureAttach( HB_LigatureAttach* lat, | - |
| 2514 | HB_UShort num_classes, | - |
| 2515 | HB_Stream stream ) | - |
| 2516 | { | - |
| 2517 | HB_Error error; executed (the execution status of this line is deduced): HB_Error error; | - |
| 2518 | | - |
| 2519 | HB_UShort m, n, k, count; executed (the execution status of this line is deduced): HB_UShort m, n, k, count; | - |
| 2520 | HB_UInt cur_offset, new_offset, base_offset; executed (the execution status of this line is deduced): HB_UInt cur_offset, new_offset, base_offset; | - |
| 2521 | | - |
| 2522 | HB_ComponentRecord* cr; executed (the execution status of this line is deduced): HB_ComponentRecord* cr; | - |
| 2523 | HB_Anchor* lan; executed (the execution status of this line is deduced): HB_Anchor* lan; | - |
| 2524 | | - |
| 2525 | | - |
| 2526 | base_offset = FILE_Pos(); executed (the execution status of this line is deduced): base_offset = _hb_stream_pos( stream ); | - |
| 2527 | | - |
| 2528 | if ( ACCESS_Frame( 2L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:2107 |
| 0-2107 |
| 2529 | return error; never executed: return error; | 0 |
| 2530 | | - |
| 2531 | count = lat->ComponentCount = GET_UShort(); executed (the execution status of this line is deduced): count = lat->ComponentCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 2532 | | - |
| 2533 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 2534 | | - |
| 2535 | lat->ComponentRecord = NULL; executed (the execution status of this line is deduced): lat->ComponentRecord = ((void *)0); | - |
| 2536 | | - |
| 2537 | if ( ALLOC_ARRAY( lat->ComponentRecord, count, HB_ComponentRecord ) ) partially evaluated: ( (lat->ComponentRecord) = _hb_alloc( (count)*sizeof(HB_ComponentRecord), &error ), error != 0 )| no Evaluation Count:0 | yes Evaluation Count:2107 |
| 0-2107 |
| 2538 | return error; never executed: return error; | 0 |
| 2539 | | - |
| 2540 | cr = lat->ComponentRecord; executed (the execution status of this line is deduced): cr = lat->ComponentRecord; | - |
| 2541 | | - |
| 2542 | for ( m = 0; m < count; m++ ) evaluated: m < count| yes Evaluation Count:4123 | yes Evaluation Count:2107 |
| 2107-4123 |
| 2543 | { | - |
| 2544 | cr[m].LigatureAnchor = NULL; executed (the execution status of this line is deduced): cr[m].LigatureAnchor = ((void *)0); | - |
| 2545 | | - |
| 2546 | if ( ALLOC_ARRAY( cr[m].LigatureAnchor, num_classes, HB_Anchor ) ) partially evaluated: ( (cr[m].LigatureAnchor) = _hb_alloc( (num_classes)*sizeof(HB_Anchor), &error ), error != 0 )| no Evaluation Count:0 | yes Evaluation Count:4123 |
| 0-4123 |
| 2547 | goto Fail; never executed: goto Fail; | 0 |
| 2548 | | - |
| 2549 | lan = cr[m].LigatureAnchor; executed (the execution status of this line is deduced): lan = cr[m].LigatureAnchor; | - |
| 2550 | | - |
| 2551 | for ( n = 0; n < num_classes; n++ ) evaluated: n < num_classes| yes Evaluation Count:4123 | yes Evaluation Count:4123 |
| 4123 |
| 2552 | { | - |
| 2553 | if ( ACCESS_Frame( 2L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:4123 |
| 0-4123 |
| 2554 | goto Fail0; never executed: goto Fail0; | 0 |
| 2555 | | - |
| 2556 | new_offset = GET_UShort(); executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 2557 | | - |
| 2558 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 2559 | | - |
| 2560 | if ( new_offset ) partially evaluated: new_offset| yes Evaluation Count:4123 | no Evaluation Count:0 |
| 0-4123 |
| 2561 | { | - |
| 2562 | new_offset += base_offset; executed (the execution status of this line is deduced): new_offset += base_offset; | - |
| 2563 | | - |
| 2564 | cur_offset = FILE_Pos(); executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 2565 | if ( FILE_Seek( new_offset ) || partially evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:4123 |
| 0-4123 |
| 2566 | ( error = Load_Anchor( &lan[n], stream ) ) != HB_Err_Ok ) partially evaluated: ( error = Load_Anchor( &lan[n], stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:4123 |
| 0-4123 |
| 2567 | goto Fail0; never executed: goto Fail0; | 0 |
| 2568 | (void)FILE_Seek( cur_offset ); executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 2569 | } executed: }Execution Count:4123 | 4123 |
| 2570 | else | - |
| 2571 | lan[n].PosFormat = 0; never executed: lan[n].PosFormat = 0; | 0 |
| 2572 | } | - |
| 2573 | | - |
| 2574 | continue; executed: continue;Execution Count:4123 | 4123 |
| 2575 | Fail0: | - |
| 2576 | for ( k = 0; k < n; k++ ) | 0 |
| 2577 | Free_Anchor( &lan[k] ); never executed: Free_Anchor( &lan[k] ); | 0 |
| 2578 | goto Fail; never executed: goto Fail; | 0 |
| 2579 | } | - |
| 2580 | | - |
| 2581 | return HB_Err_Ok; executed: return HB_Err_Ok;Execution Count:2107 | 2107 |
| 2582 | | - |
| 2583 | Fail: | - |
| 2584 | for ( k = 0; k < m; k++ ) | 0 |
| 2585 | { | - |
| 2586 | lan = cr[k].LigatureAnchor; never executed (the execution status of this line is deduced): lan = cr[k].LigatureAnchor; | - |
| 2587 | | - |
| 2588 | for ( n = 0; n < num_classes; n++ ) never evaluated: n < num_classes | 0 |
| 2589 | Free_Anchor( &lan[n] ); never executed: Free_Anchor( &lan[n] ); | 0 |
| 2590 | | - |
| 2591 | FREE( lan ); never executed: } never executed: } never evaluated: (lan) never evaluated: 0 | 0 |
| 2592 | } | 0 |
| 2593 | | - |
| 2594 | FREE( cr ); never executed: } never executed: } never evaluated: (cr) never evaluated: 0 | 0 |
| 2595 | return error; never executed: return error; | 0 |
| 2596 | } | - |
| 2597 | | - |
| 2598 | | - |
| 2599 | static void Free_LigatureAttach( HB_LigatureAttach* lat, | - |
| 2600 | HB_UShort num_classes ) | - |
| 2601 | { | - |
| 2602 | HB_UShort m, n, count; executed (the execution status of this line is deduced): HB_UShort m, n, count; | - |
| 2603 | | - |
| 2604 | HB_ComponentRecord* cr; executed (the execution status of this line is deduced): HB_ComponentRecord* cr; | - |
| 2605 | HB_Anchor* lan; executed (the execution status of this line is deduced): HB_Anchor* lan; | - |
| 2606 | | - |
| 2607 | | - |
| 2608 | if ( lat->ComponentRecord ) partially evaluated: lat->ComponentRecord| yes Evaluation Count:1989 | no Evaluation Count:0 |
| 0-1989 |
| 2609 | { | - |
| 2610 | count = lat->ComponentCount; executed (the execution status of this line is deduced): count = lat->ComponentCount; | - |
| 2611 | cr = lat->ComponentRecord; executed (the execution status of this line is deduced): cr = lat->ComponentRecord; | - |
| 2612 | | - |
| 2613 | for ( m = 0; m < count; m++ ) evaluated: m < count| yes Evaluation Count:3893 | yes Evaluation Count:1989 |
| 1989-3893 |
| 2614 | { | - |
| 2615 | lan = cr[m].LigatureAnchor; executed (the execution status of this line is deduced): lan = cr[m].LigatureAnchor; | - |
| 2616 | | - |
| 2617 | for ( n = 0; n < num_classes; n++ ) evaluated: n < num_classes| yes Evaluation Count:3893 | yes Evaluation Count:3893 |
| 3893 |
| 2618 | Free_Anchor( &lan[n] ); executed: Free_Anchor( &lan[n] );Execution Count:3893 | 3893 |
| 2619 | | - |
| 2620 | FREE( lan ); executed: }Execution Count:3893 executed: }Execution Count:3893 partially evaluated: (lan)| yes Evaluation Count:3893 | no Evaluation Count:0 |
partially evaluated: 0| no Evaluation Count:0 | yes Evaluation Count:3893 |
| 0-3893 |
| 2621 | } executed: }Execution Count:3893 | 3893 |
| 2622 | | - |
| 2623 | FREE( cr ); executed: }Execution Count:1989 executed: }Execution Count:1989 partially evaluated: (cr)| yes Evaluation Count:1989 | no Evaluation Count:0 |
partially evaluated: 0| no Evaluation Count:0 | yes Evaluation Count:1989 |
| 0-1989 |
| 2624 | } executed: }Execution Count:1989 | 1989 |
| 2625 | } executed: }Execution Count:1989 | 1989 |
| 2626 | | - |
| 2627 | | - |
| 2628 | /* LigatureArray */ | - |
| 2629 | | - |
| 2630 | static HB_Error Load_LigatureArray( HB_LigatureArray* la, | - |
| 2631 | HB_UShort num_classes, | - |
| 2632 | HB_Stream stream ) | - |
| 2633 | { | - |
| 2634 | HB_Error error; executed (the execution status of this line is deduced): HB_Error error; | - |
| 2635 | | - |
| 2636 | HB_UShort n, m, count; executed (the execution status of this line is deduced): HB_UShort n, m, count; | - |
| 2637 | HB_UInt cur_offset, new_offset, base_offset; executed (the execution status of this line is deduced): HB_UInt cur_offset, new_offset, base_offset; | - |
| 2638 | | - |
| 2639 | HB_LigatureAttach* lat; executed (the execution status of this line is deduced): HB_LigatureAttach* lat; | - |
| 2640 | | - |
| 2641 | | - |
| 2642 | base_offset = FILE_Pos(); executed (the execution status of this line is deduced): base_offset = _hb_stream_pos( stream ); | - |
| 2643 | | - |
| 2644 | if ( ACCESS_Frame( 2L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:343 |
| 0-343 |
| 2645 | return error; never executed: return error; | 0 |
| 2646 | | - |
| 2647 | count = la->LigatureCount = GET_UShort(); executed (the execution status of this line is deduced): count = la->LigatureCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 2648 | | - |
| 2649 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 2650 | | - |
| 2651 | la->LigatureAttach = NULL; executed (the execution status of this line is deduced): la->LigatureAttach = ((void *)0); | - |
| 2652 | | - |
| 2653 | if ( ALLOC_ARRAY( la->LigatureAttach, count, HB_LigatureAttach ) ) partially evaluated: ( (la->LigatureAttach) = _hb_alloc( (count)*sizeof(HB_LigatureAttach), &error ), error != 0 )| no Evaluation Count:0 | yes Evaluation Count:343 |
| 0-343 |
| 2654 | return error; never executed: return error; | 0 |
| 2655 | | - |
| 2656 | lat = la->LigatureAttach; executed (the execution status of this line is deduced): lat = la->LigatureAttach; | - |
| 2657 | | - |
| 2658 | for ( n = 0; n < count; n++ ) evaluated: n < count| yes Evaluation Count:2107 | yes Evaluation Count:343 |
| 343-2107 |
| 2659 | { | - |
| 2660 | if ( ACCESS_Frame( 2L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:2107 |
| 0-2107 |
| 2661 | goto Fail; never executed: goto Fail; | 0 |
| 2662 | | - |
| 2663 | new_offset = GET_UShort() + base_offset; executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 2664 | | - |
| 2665 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 2666 | | - |
| 2667 | cur_offset = FILE_Pos(); executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 2668 | if ( FILE_Seek( new_offset ) || partially evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:2107 |
| 0-2107 |
| 2669 | ( error = Load_LigatureAttach( &lat[n], num_classes, partially evaluated: ( error = Load_LigatureAttach( &lat[n], num_classes, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:2107 |
| 0-2107 |
| 2670 | stream ) ) != HB_Err_Ok ) partially evaluated: ( error = Load_LigatureAttach( &lat[n], num_classes, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:2107 |
| 0-2107 |
| 2671 | goto Fail; never executed: goto Fail; | 0 |
| 2672 | (void)FILE_Seek( cur_offset ); executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 2673 | } executed: }Execution Count:2107 | 2107 |
| 2674 | | - |
| 2675 | return HB_Err_Ok; executed: return HB_Err_Ok;Execution Count:343 | 343 |
| 2676 | | - |
| 2677 | Fail: | - |
| 2678 | for ( m = 0; m < n; m++ ) | 0 |
| 2679 | Free_LigatureAttach( &lat[m], num_classes ); never executed: Free_LigatureAttach( &lat[m], num_classes ); | 0 |
| 2680 | | - |
| 2681 | FREE( lat ); never executed: } never executed: } never evaluated: (lat) never evaluated: 0 | 0 |
| 2682 | return error; never executed: return error; | 0 |
| 2683 | } | - |
| 2684 | | - |
| 2685 | | - |
| 2686 | static void Free_LigatureArray( HB_LigatureArray* la, | - |
| 2687 | HB_UShort num_classes ) | - |
| 2688 | { | - |
| 2689 | HB_UShort n, count; executed (the execution status of this line is deduced): HB_UShort n, count; | - |
| 2690 | | - |
| 2691 | HB_LigatureAttach* lat; executed (the execution status of this line is deduced): HB_LigatureAttach* lat; | - |
| 2692 | | - |
| 2693 | | - |
| 2694 | if ( la->LigatureAttach ) partially evaluated: la->LigatureAttach| yes Evaluation Count:323 | no Evaluation Count:0 |
| 0-323 |
| 2695 | { | - |
| 2696 | count = la->LigatureCount; executed (the execution status of this line is deduced): count = la->LigatureCount; | - |
| 2697 | lat = la->LigatureAttach; executed (the execution status of this line is deduced): lat = la->LigatureAttach; | - |
| 2698 | | - |
| 2699 | for ( n = 0; n < count; n++ ) evaluated: n < count| yes Evaluation Count:1989 | yes Evaluation Count:323 |
| 323-1989 |
| 2700 | Free_LigatureAttach( &lat[n], num_classes ); executed: Free_LigatureAttach( &lat[n], num_classes );Execution Count:1989 | 1989 |
| 2701 | | - |
| 2702 | FREE( lat ); executed: }Execution Count:323 executed: }Execution Count:323 partially evaluated: (lat)| yes Evaluation Count:323 | no Evaluation Count:0 |
partially evaluated: 0| no Evaluation Count:0 | yes Evaluation Count:323 |
| 0-323 |
| 2703 | } executed: }Execution Count:323 | 323 |
| 2704 | } executed: }Execution Count:323 | 323 |
| 2705 | | - |
| 2706 | | - |
| 2707 | /* MarkLigPosFormat1 */ | - |
| 2708 | | - |
| 2709 | static HB_Error Load_MarkLigPos( HB_GPOS_SubTable* st, | - |
| 2710 | HB_Stream stream ) | - |
| 2711 | { | - |
| 2712 | HB_Error error; executed (the execution status of this line is deduced): HB_Error error; | - |
| 2713 | HB_MarkLigPos* mlp = &st->marklig; executed (the execution status of this line is deduced): HB_MarkLigPos* mlp = &st->marklig; | - |
| 2714 | | - |
| 2715 | HB_UInt cur_offset, new_offset, base_offset; executed (the execution status of this line is deduced): HB_UInt cur_offset, new_offset, base_offset; | - |
| 2716 | | - |
| 2717 | | - |
| 2718 | base_offset = FILE_Pos(); executed (the execution status of this line is deduced): base_offset = _hb_stream_pos( stream ); | - |
| 2719 | | - |
| 2720 | if ( ACCESS_Frame( 4L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 4L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:343 |
| 0-343 |
| 2721 | return error; never executed: return error; | 0 |
| 2722 | | - |
| 2723 | mlp->PosFormat = GET_UShort(); executed (the execution status of this line is deduced): mlp->PosFormat = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 2724 | new_offset = GET_UShort() + base_offset; executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 2725 | | - |
| 2726 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 2727 | | - |
| 2728 | cur_offset = FILE_Pos(); executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 2729 | if ( FILE_Seek( new_offset ) || partially evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:343 |
| 0-343 |
| 2730 | ( error = _HB_OPEN_Load_Coverage( &mlp->MarkCoverage, stream ) ) != HB_Err_Ok ) partially evaluated: ( error = _HB_OPEN_Load_Coverage( &mlp->MarkCoverage, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:343 |
| 0-343 |
| 2731 | return error; never executed: return error; | 0 |
| 2732 | (void)FILE_Seek( cur_offset ); executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 2733 | | - |
| 2734 | if ( ACCESS_Frame( 2L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:343 |
| 0-343 |
| 2735 | goto Fail3; never executed: goto Fail3; | 0 |
| 2736 | | - |
| 2737 | new_offset = GET_UShort() + base_offset; executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 2738 | | - |
| 2739 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 2740 | | - |
| 2741 | cur_offset = FILE_Pos(); executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 2742 | if ( FILE_Seek( new_offset ) || partially evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:343 |
| 0-343 |
| 2743 | ( error = _HB_OPEN_Load_Coverage( &mlp->LigatureCoverage, partially evaluated: ( error = _HB_OPEN_Load_Coverage( &mlp->LigatureCoverage, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:343 |
| 0-343 |
| 2744 | stream ) ) != HB_Err_Ok ) partially evaluated: ( error = _HB_OPEN_Load_Coverage( &mlp->LigatureCoverage, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:343 |
| 0-343 |
| 2745 | goto Fail3; never executed: goto Fail3; | 0 |
| 2746 | (void)FILE_Seek( cur_offset ); executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 2747 | | - |
| 2748 | if ( ACCESS_Frame( 4L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 4L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:343 |
| 0-343 |
| 2749 | goto Fail2; never executed: goto Fail2; | 0 |
| 2750 | | - |
| 2751 | mlp->ClassCount = GET_UShort(); executed (the execution status of this line is deduced): mlp->ClassCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 2752 | new_offset = GET_UShort() + base_offset; executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 2753 | | - |
| 2754 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 2755 | | - |
| 2756 | cur_offset = FILE_Pos(); executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 2757 | if ( FILE_Seek( new_offset ) || partially evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:343 |
| 0-343 |
| 2758 | ( error = Load_MarkArray( &mlp->MarkArray, stream ) ) != HB_Err_Ok ) partially evaluated: ( error = Load_MarkArray( &mlp->MarkArray, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:343 |
| 0-343 |
| 2759 | goto Fail2; never executed: goto Fail2; | 0 |
| 2760 | (void)FILE_Seek( cur_offset ); executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 2761 | | - |
| 2762 | if ( ACCESS_Frame( 2L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:343 |
| 0-343 |
| 2763 | goto Fail1; never executed: goto Fail1; | 0 |
| 2764 | | - |
| 2765 | new_offset = GET_UShort() + base_offset; executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 2766 | | - |
| 2767 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 2768 | | - |
| 2769 | cur_offset = FILE_Pos(); executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 2770 | if ( FILE_Seek( new_offset ) || partially evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:343 |
| 0-343 |
| 2771 | ( error = Load_LigatureArray( &mlp->LigatureArray, mlp->ClassCount, partially evaluated: ( error = Load_LigatureArray( &mlp->LigatureArray, mlp->ClassCount, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:343 |
| 0-343 |
| 2772 | stream ) ) != HB_Err_Ok ) partially evaluated: ( error = Load_LigatureArray( &mlp->LigatureArray, mlp->ClassCount, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:343 |
| 0-343 |
| 2773 | goto Fail1; never executed: goto Fail1; | 0 |
| 2774 | | - |
| 2775 | return HB_Err_Ok; executed: return HB_Err_Ok;Execution Count:343 | 343 |
| 2776 | | - |
| 2777 | Fail1: | - |
| 2778 | Free_MarkArray( &mlp->MarkArray ); never executed (the execution status of this line is deduced): Free_MarkArray( &mlp->MarkArray ); | - |
| 2779 | | - |
| 2780 | Fail2: code before this statement never executed: Fail2: | 0 |
| 2781 | _HB_OPEN_Free_Coverage( &mlp->LigatureCoverage ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_Coverage( &mlp->LigatureCoverage ); | - |
| 2782 | | - |
| 2783 | Fail3: code before this statement never executed: Fail3: | 0 |
| 2784 | _HB_OPEN_Free_Coverage( &mlp->MarkCoverage ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_Coverage( &mlp->MarkCoverage ); | - |
| 2785 | return error; never executed: return error; | 0 |
| 2786 | } | - |
| 2787 | | - |
| 2788 | | - |
| 2789 | static void Free_MarkLigPos( HB_GPOS_SubTable* st) | - |
| 2790 | { | - |
| 2791 | HB_MarkLigPos* mlp = &st->marklig; executed (the execution status of this line is deduced): HB_MarkLigPos* mlp = &st->marklig; | - |
| 2792 | | - |
| 2793 | Free_LigatureArray( &mlp->LigatureArray, mlp->ClassCount ); executed (the execution status of this line is deduced): Free_LigatureArray( &mlp->LigatureArray, mlp->ClassCount ); | - |
| 2794 | Free_MarkArray( &mlp->MarkArray ); executed (the execution status of this line is deduced): Free_MarkArray( &mlp->MarkArray ); | - |
| 2795 | _HB_OPEN_Free_Coverage( &mlp->LigatureCoverage ); executed (the execution status of this line is deduced): _HB_OPEN_Free_Coverage( &mlp->LigatureCoverage ); | - |
| 2796 | _HB_OPEN_Free_Coverage( &mlp->MarkCoverage ); executed (the execution status of this line is deduced): _HB_OPEN_Free_Coverage( &mlp->MarkCoverage ); | - |
| 2797 | } executed: }Execution Count:323 | 323 |
| 2798 | | - |
| 2799 | | - |
| 2800 | static HB_Error Lookup_MarkLigPos( GPOS_Instance* gpi, | - |
| 2801 | HB_GPOS_SubTable* st, | - |
| 2802 | HB_Buffer buffer, | - |
| 2803 | HB_UShort flags, | - |
| 2804 | HB_UShort context_length, | - |
| 2805 | int nesting_level ) | - |
| 2806 | { | - |
| 2807 | HB_UShort i, j, mark_index, lig_index, property, class; executed (the execution status of this line is deduced): HB_UShort i, j, mark_index, lig_index, property, class; | - |
| 2808 | HB_UShort mark_glyph; executed (the execution status of this line is deduced): HB_UShort mark_glyph; | - |
| 2809 | HB_Fixed x_mark_value, y_mark_value, x_lig_value, y_lig_value; executed (the execution status of this line is deduced): HB_Fixed x_mark_value, y_mark_value, x_lig_value, y_lig_value; | - |
| 2810 | HB_Error error; executed (the execution status of this line is deduced): HB_Error error; | - |
| 2811 | HB_GPOSHeader* gpos = gpi->gpos; executed (the execution status of this line is deduced): HB_GPOSHeader* gpos = gpi->gpos; | - |
| 2812 | HB_MarkLigPos* mlp = &st->marklig; executed (the execution status of this line is deduced): HB_MarkLigPos* mlp = &st->marklig; | - |
| 2813 | | - |
| 2814 | HB_MarkArray* ma; executed (the execution status of this line is deduced): HB_MarkArray* ma; | - |
| 2815 | HB_LigatureArray* la; executed (the execution status of this line is deduced): HB_LigatureArray* la; | - |
| 2816 | HB_LigatureAttach* lat; executed (the execution status of this line is deduced): HB_LigatureAttach* lat; | - |
| 2817 | HB_ComponentRecord* cr; executed (the execution status of this line is deduced): HB_ComponentRecord* cr; | - |
| 2818 | HB_UShort comp_index; executed (the execution status of this line is deduced): HB_UShort comp_index; | - |
| 2819 | HB_Anchor* mark_anchor; executed (the execution status of this line is deduced): HB_Anchor* mark_anchor; | - |
| 2820 | HB_Anchor* lig_anchor; executed (the execution status of this line is deduced): HB_Anchor* lig_anchor; | - |
| 2821 | | - |
| 2822 | HB_Position o; executed (the execution status of this line is deduced): HB_Position o; | - |
| 2823 | | - |
| 2824 | HB_UNUSED(nesting_level); executed (the execution status of this line is deduced): ((nesting_level) = (nesting_level)); | - |
| 2825 | | - |
| 2826 | if ( context_length != 0xFFFF && context_length < 1 ) partially evaluated: context_length != 0xFFFF| no Evaluation Count:0 | yes Evaluation Count:2853864 |
never evaluated: context_length < 1 | 0-2853864 |
| 2827 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 2828 | | - |
| 2829 | if ( flags & HB_LOOKUP_FLAG_IGNORE_LIGATURES ) partially evaluated: flags & 0x0004| no Evaluation Count:0 | yes Evaluation Count:2853864 |
| 0-2853864 |
| 2830 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 2831 | | - |
| 2832 | mark_glyph = IN_CURGLYPH(); executed (the execution status of this line is deduced): mark_glyph = (buffer->in_string[buffer->in_pos].gindex); | - |
| 2833 | | - |
| 2834 | if ( CHECK_Property( gpos->gdef, IN_CURITEM(), flags, &property ) ) partially evaluated: ( ( error = _HB_GDEF_Check_Property( (gpos->gdef), ((&buffer->in_string[buffer->in_pos])), (flags), (&property) ) ) != HB_Err_Ok )| no Evaluation Count:0 | yes Evaluation Count:2853864 |
| 0-2853864 |
| 2835 | return error; never executed: return error; | 0 |
| 2836 | | - |
| 2837 | error = _HB_OPEN_Coverage_Index( &mlp->MarkCoverage, mark_glyph, &mark_index ); executed (the execution status of this line is deduced): error = _HB_OPEN_Coverage_Index( &mlp->MarkCoverage, mark_glyph, &mark_index ); | - |
| 2838 | if ( error ) partially evaluated: error| yes Evaluation Count:2853864 | no Evaluation Count:0 |
| 0-2853864 |
| 2839 | return error; executed: return error;Execution Count:2853864 | 2853864 |
| 2840 | | - |
| 2841 | /* now we search backwards for a non-mark glyph */ | - |
| 2842 | | - |
| 2843 | i = 1; never executed (the execution status of this line is deduced): i = 1; | - |
| 2844 | j = buffer->in_pos - 1; never executed (the execution status of this line is deduced): j = buffer->in_pos - 1; | - |
| 2845 | | - |
| 2846 | while ( i <= buffer->in_pos ) never evaluated: i <= buffer->in_pos | 0 |
| 2847 | { | - |
| 2848 | error = HB_GDEF_Get_Glyph_Property( gpos->gdef, IN_GLYPH( j ), never executed (the execution status of this line is deduced): error = HB_GDEF_Get_Glyph_Property( gpos->gdef, (buffer->in_string[(j)].gindex), | - |
| 2849 | &property ); never executed (the execution status of this line is deduced): &property ); | - |
| 2850 | if ( error ) | 0 |
| 2851 | return error; never executed: return error; | 0 |
| 2852 | | - |
| 2853 | if ( !( property == HB_GDEF_MARK || property & HB_LOOKUP_FLAG_IGNORE_SPECIAL_MARKS ) ) never evaluated: property == 0x0008 never evaluated: property & 0xFF00 | 0 |
| 2854 | break; | 0 |
| 2855 | | - |
| 2856 | i++; never executed (the execution status of this line is deduced): i++; | - |
| 2857 | j--; never executed (the execution status of this line is deduced): j--; | - |
| 2858 | } | 0 |
| 2859 | | - |
| 2860 | /* Similar to Lookup_MarkBasePos(), I suspect that this assertion is | - |
| 2861 | too strong, thus it is commented out. */ | - |
| 2862 | #if 0 | - |
| 2863 | if ( property != HB_GDEF_LIGATURE ) | - |
| 2864 | return HB_Err_Not_Covered; | - |
| 2865 | #endif | - |
| 2866 | | - |
| 2867 | if ( i > buffer->in_pos ) never evaluated: i > buffer->in_pos | 0 |
| 2868 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 2869 | | - |
| 2870 | error = _HB_OPEN_Coverage_Index( &mlp->LigatureCoverage, IN_GLYPH( j ), never executed (the execution status of this line is deduced): error = _HB_OPEN_Coverage_Index( &mlp->LigatureCoverage, (buffer->in_string[(j)].gindex), | - |
| 2871 | &lig_index ); never executed (the execution status of this line is deduced): &lig_index ); | - |
| 2872 | if ( error ) | 0 |
| 2873 | return error; never executed: return error; | 0 |
| 2874 | | - |
| 2875 | ma = &mlp->MarkArray; never executed (the execution status of this line is deduced): ma = &mlp->MarkArray; | - |
| 2876 | | - |
| 2877 | if ( mark_index >= ma->MarkCount ) never evaluated: mark_index >= ma->MarkCount | 0 |
| 2878 | return ERR(HB_Err_Invalid_SubTable); never executed: return _hb_err (HB_Err_Invalid_SubTable); | 0 |
| 2879 | | - |
| 2880 | class = ma->MarkRecord[mark_index].Class; never executed (the execution status of this line is deduced): class = ma->MarkRecord[mark_index].Class; | - |
| 2881 | mark_anchor = &ma->MarkRecord[mark_index].MarkAnchor; never executed (the execution status of this line is deduced): mark_anchor = &ma->MarkRecord[mark_index].MarkAnchor; | - |
| 2882 | | - |
| 2883 | if ( class >= mlp->ClassCount ) never evaluated: class >= mlp->ClassCount | 0 |
| 2884 | return ERR(HB_Err_Invalid_SubTable); never executed: return _hb_err (HB_Err_Invalid_SubTable); | 0 |
| 2885 | | - |
| 2886 | la = &mlp->LigatureArray; never executed (the execution status of this line is deduced): la = &mlp->LigatureArray; | - |
| 2887 | | - |
| 2888 | if ( lig_index >= la->LigatureCount ) never evaluated: lig_index >= la->LigatureCount | 0 |
| 2889 | return ERR(HB_Err_Invalid_SubTable); never executed: return _hb_err (HB_Err_Invalid_SubTable); | 0 |
| 2890 | | - |
| 2891 | lat = &la->LigatureAttach[lig_index]; never executed (the execution status of this line is deduced): lat = &la->LigatureAttach[lig_index]; | - |
| 2892 | | - |
| 2893 | /* We must now check whether the ligature ID of the current mark glyph | - |
| 2894 | is identical to the ligature ID of the found ligature. If yes, we | - |
| 2895 | can directly use the component index. If not, we attach the mark | - |
| 2896 | glyph to the last component of the ligature. */ | - |
| 2897 | | - |
| 2898 | if ( IN_LIGID( j ) == IN_LIGID( buffer->in_pos) ) never evaluated: (buffer->in_string[(j)].ligID) == (buffer->in_string[(buffer->in_pos)].ligID) | 0 |
| 2899 | { | - |
| 2900 | comp_index = IN_COMPONENT( buffer->in_pos ); never executed (the execution status of this line is deduced): comp_index = (buffer->in_string[(buffer->in_pos)].component); | - |
| 2901 | if ( comp_index >= lat->ComponentCount ) never evaluated: comp_index >= lat->ComponentCount | 0 |
| 2902 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 2903 | } | 0 |
| 2904 | else | - |
| 2905 | comp_index = lat->ComponentCount - 1; never executed: comp_index = lat->ComponentCount - 1; | 0 |
| 2906 | | - |
| 2907 | cr = &lat->ComponentRecord[comp_index]; never executed (the execution status of this line is deduced): cr = &lat->ComponentRecord[comp_index]; | - |
| 2908 | lig_anchor = &cr->LigatureAnchor[class]; never executed (the execution status of this line is deduced): lig_anchor = &cr->LigatureAnchor[class]; | - |
| 2909 | | - |
| 2910 | error = Get_Anchor( gpi, mark_anchor, IN_CURGLYPH(), never executed (the execution status of this line is deduced): error = Get_Anchor( gpi, mark_anchor, (buffer->in_string[buffer->in_pos].gindex), | - |
| 2911 | &x_mark_value, &y_mark_value ); never executed (the execution status of this line is deduced): &x_mark_value, &y_mark_value ); | - |
| 2912 | if ( error ) | 0 |
| 2913 | return error; never executed: return error; | 0 |
| 2914 | error = Get_Anchor( gpi, lig_anchor, IN_GLYPH( j ), never executed (the execution status of this line is deduced): error = Get_Anchor( gpi, lig_anchor, (buffer->in_string[(j)].gindex), | - |
| 2915 | &x_lig_value, &y_lig_value ); never executed (the execution status of this line is deduced): &x_lig_value, &y_lig_value ); | - |
| 2916 | if ( error ) | 0 |
| 2917 | return error; never executed: return error; | 0 |
| 2918 | | - |
| 2919 | /* anchor points are not cumulative */ | - |
| 2920 | | - |
| 2921 | o = POSITION( buffer->in_pos ); never executed (the execution status of this line is deduced): o = (&buffer->positions[(buffer->in_pos)]); | - |
| 2922 | | - |
| 2923 | o->x_pos = x_lig_value - x_mark_value; never executed (the execution status of this line is deduced): o->x_pos = x_lig_value - x_mark_value; | - |
| 2924 | o->y_pos = y_lig_value - y_mark_value; never executed (the execution status of this line is deduced): o->y_pos = y_lig_value - y_mark_value; | - |
| 2925 | o->x_advance = 0; never executed (the execution status of this line is deduced): o->x_advance = 0; | - |
| 2926 | o->y_advance = 0; never executed (the execution status of this line is deduced): o->y_advance = 0; | - |
| 2927 | o->back = i; never executed (the execution status of this line is deduced): o->back = i; | - |
| 2928 | | - |
| 2929 | (buffer->in_pos)++; never executed (the execution status of this line is deduced): (buffer->in_pos)++; | - |
| 2930 | | - |
| 2931 | return HB_Err_Ok; never executed: return HB_Err_Ok; | 0 |
| 2932 | } | - |
| 2933 | | - |
| 2934 | | - |
| 2935 | /* LookupType 6 */ | - |
| 2936 | | - |
| 2937 | /* Mark2Array */ | - |
| 2938 | | - |
| 2939 | static HB_Error Load_Mark2Array( HB_Mark2Array* m2a, | - |
| 2940 | HB_UShort num_classes, | - |
| 2941 | HB_Stream stream ) | - |
| 2942 | { | - |
| 2943 | HB_Error error; executed (the execution status of this line is deduced): HB_Error error; | - |
| 2944 | | - |
| 2945 | HB_UShort m, n, count; executed (the execution status of this line is deduced): HB_UShort m, n, count; | - |
| 2946 | HB_UInt cur_offset, new_offset, base_offset; executed (the execution status of this line is deduced): HB_UInt cur_offset, new_offset, base_offset; | - |
| 2947 | | - |
| 2948 | HB_Mark2Record *m2r; executed (the execution status of this line is deduced): HB_Mark2Record *m2r; | - |
| 2949 | HB_Anchor *m2an, *m2ans; executed (the execution status of this line is deduced): HB_Anchor *m2an, *m2ans; | - |
| 2950 | | - |
| 2951 | | - |
| 2952 | base_offset = FILE_Pos(); executed (the execution status of this line is deduced): base_offset = _hb_stream_pos( stream ); | - |
| 2953 | | - |
| 2954 | if ( ACCESS_Frame( 2L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:753 |
| 0-753 |
| 2955 | return error; never executed: return error; | 0 |
| 2956 | | - |
| 2957 | count = m2a->Mark2Count = GET_UShort(); executed (the execution status of this line is deduced): count = m2a->Mark2Count = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 2958 | | - |
| 2959 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 2960 | | - |
| 2961 | m2a->Mark2Record = NULL; executed (the execution status of this line is deduced): m2a->Mark2Record = ((void *)0); | - |
| 2962 | | - |
| 2963 | if ( ALLOC_ARRAY( m2a->Mark2Record, count, HB_Mark2Record ) ) partially evaluated: ( (m2a->Mark2Record) = _hb_alloc( (count)*sizeof(HB_Mark2Record), &error ), error != 0 )| no Evaluation Count:0 | yes Evaluation Count:753 |
| 0-753 |
| 2964 | return error; never executed: return error; | 0 |
| 2965 | | - |
| 2966 | m2r = m2a->Mark2Record; executed (the execution status of this line is deduced): m2r = m2a->Mark2Record; | - |
| 2967 | | - |
| 2968 | m2ans = NULL; executed (the execution status of this line is deduced): m2ans = ((void *)0); | - |
| 2969 | | - |
| 2970 | if ( ALLOC_ARRAY( m2ans, count * num_classes, HB_Anchor ) ) partially evaluated: ( (m2ans) = _hb_alloc( (count * num_classes)*sizeof(HB_Anchor), &error ), error != 0 )| no Evaluation Count:0 | yes Evaluation Count:753 |
| 0-753 |
| 2971 | goto Fail; never executed: goto Fail; | 0 |
| 2972 | | - |
| 2973 | for ( m = 0; m < count; m++ ) evaluated: m < count| yes Evaluation Count:15078 | yes Evaluation Count:753 |
| 753-15078 |
| 2974 | { | - |
| 2975 | m2an = m2r[m].Mark2Anchor = m2ans + m * num_classes; executed (the execution status of this line is deduced): m2an = m2r[m].Mark2Anchor = m2ans + m * num_classes; | - |
| 2976 | | - |
| 2977 | for ( n = 0; n < num_classes; n++ ) evaluated: n < num_classes| yes Evaluation Count:15360 | yes Evaluation Count:15078 |
| 15078-15360 |
| 2978 | { | - |
| 2979 | if ( ACCESS_Frame( 2L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:15360 |
| 0-15360 |
| 2980 | goto Fail; never executed: goto Fail; | 0 |
| 2981 | | - |
| 2982 | new_offset = GET_UShort() + base_offset; executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 2983 | | - |
| 2984 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 2985 | | - |
| 2986 | if (new_offset == base_offset) { partially evaluated: new_offset == base_offset| no Evaluation Count:0 | yes Evaluation Count:15360 |
| 0-15360 |
| 2987 | /* Anchor table not provided. Skip loading. | - |
| 2988 | * Some versions of FreeSans hit this. */ | - |
| 2989 | m2an[n].PosFormat = 0; never executed (the execution status of this line is deduced): m2an[n].PosFormat = 0; | - |
| 2990 | continue; never executed: continue; | 0 |
| 2991 | } | - |
| 2992 | | - |
| 2993 | cur_offset = FILE_Pos(); executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 2994 | if ( FILE_Seek( new_offset ) || partially evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:15360 |
| 0-15360 |
| 2995 | ( error = Load_Anchor( &m2an[n], stream ) ) != HB_Err_Ok ) partially evaluated: ( error = Load_Anchor( &m2an[n], stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:15360 |
| 0-15360 |
| 2996 | goto Fail; never executed: goto Fail; | 0 |
| 2997 | (void)FILE_Seek( cur_offset ); executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 2998 | } executed: }Execution Count:15360 | 15360 |
| 2999 | } executed: }Execution Count:15078 | 15078 |
| 3000 | | - |
| 3001 | return HB_Err_Ok; executed: return HB_Err_Ok;Execution Count:753 | 753 |
| 3002 | | - |
| 3003 | Fail: | - |
| 3004 | FREE( m2ans ); never executed: } never executed: } never evaluated: (m2ans) never evaluated: 0 | 0 |
| 3005 | FREE( m2r ); never executed: } never executed: } never evaluated: (m2r) never evaluated: 0 | 0 |
| 3006 | return error; never executed: return error; | 0 |
| 3007 | } | - |
| 3008 | | - |
| 3009 | | - |
| 3010 | static void Free_Mark2Array( HB_Mark2Array* m2a, | - |
| 3011 | HB_UShort num_classes ) | - |
| 3012 | { | - |
| 3013 | HB_Mark2Record *m2r; executed (the execution status of this line is deduced): HB_Mark2Record *m2r; | - |
| 3014 | HB_Anchor *m2ans; executed (the execution status of this line is deduced): HB_Anchor *m2ans; | - |
| 3015 | | - |
| 3016 | HB_UNUSED(num_classes); executed (the execution status of this line is deduced): ((num_classes) = (num_classes)); | - |
| 3017 | | - |
| 3018 | if ( m2a->Mark2Record ) partially evaluated: m2a->Mark2Record| yes Evaluation Count:715 | no Evaluation Count:0 |
| 0-715 |
| 3019 | { | - |
| 3020 | m2r = m2a->Mark2Record; executed (the execution status of this line is deduced): m2r = m2a->Mark2Record; | - |
| 3021 | | - |
| 3022 | if ( m2a->Mark2Count ) partially evaluated: m2a->Mark2Count| yes Evaluation Count:715 | no Evaluation Count:0 |
| 0-715 |
| 3023 | { | - |
| 3024 | m2ans = m2r[0].Mark2Anchor; executed (the execution status of this line is deduced): m2ans = m2r[0].Mark2Anchor; | - |
| 3025 | FREE( m2ans ); executed: }Execution Count:715 executed: }Execution Count:715 partially evaluated: (m2ans)| yes Evaluation Count:715 | no Evaluation Count:0 |
partially evaluated: 0| no Evaluation Count:0 | yes Evaluation Count:715 |
| 0-715 |
| 3026 | } executed: }Execution Count:715 | 715 |
| 3027 | | - |
| 3028 | FREE( m2r ); executed: }Execution Count:715 executed: }Execution Count:715 partially evaluated: (m2r)| yes Evaluation Count:715 | no Evaluation Count:0 |
partially evaluated: 0| no Evaluation Count:0 | yes Evaluation Count:715 |
| 0-715 |
| 3029 | } executed: }Execution Count:715 | 715 |
| 3030 | } executed: }Execution Count:715 | 715 |
| 3031 | | - |
| 3032 | | - |
| 3033 | /* MarkMarkPosFormat1 */ | - |
| 3034 | | - |
| 3035 | static HB_Error Load_MarkMarkPos( HB_GPOS_SubTable* st, | - |
| 3036 | HB_Stream stream ) | - |
| 3037 | { | - |
| 3038 | HB_Error error; executed (the execution status of this line is deduced): HB_Error error; | - |
| 3039 | HB_MarkMarkPos* mmp = &st->markmark; executed (the execution status of this line is deduced): HB_MarkMarkPos* mmp = &st->markmark; | - |
| 3040 | | - |
| 3041 | HB_UInt cur_offset, new_offset, base_offset; executed (the execution status of this line is deduced): HB_UInt cur_offset, new_offset, base_offset; | - |
| 3042 | | - |
| 3043 | | - |
| 3044 | base_offset = FILE_Pos(); executed (the execution status of this line is deduced): base_offset = _hb_stream_pos( stream ); | - |
| 3045 | | - |
| 3046 | if ( ACCESS_Frame( 4L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 4L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:753 |
| 0-753 |
| 3047 | return error; never executed: return error; | 0 |
| 3048 | | - |
| 3049 | mmp->PosFormat = GET_UShort(); executed (the execution status of this line is deduced): mmp->PosFormat = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 3050 | new_offset = GET_UShort() + base_offset; executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 3051 | | - |
| 3052 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 3053 | | - |
| 3054 | cur_offset = FILE_Pos(); executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 3055 | if ( FILE_Seek( new_offset ) || partially evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:753 |
| 0-753 |
| 3056 | ( error = _HB_OPEN_Load_Coverage( &mmp->Mark1Coverage, partially evaluated: ( error = _HB_OPEN_Load_Coverage( &mmp->Mark1Coverage, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:753 |
| 0-753 |
| 3057 | stream ) ) != HB_Err_Ok ) partially evaluated: ( error = _HB_OPEN_Load_Coverage( &mmp->Mark1Coverage, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:753 |
| 0-753 |
| 3058 | return error; never executed: return error; | 0 |
| 3059 | (void)FILE_Seek( cur_offset ); executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 3060 | | - |
| 3061 | if ( ACCESS_Frame( 2L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:753 |
| 0-753 |
| 3062 | goto Fail3; never executed: goto Fail3; | 0 |
| 3063 | | - |
| 3064 | new_offset = GET_UShort() + base_offset; executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 3065 | | - |
| 3066 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 3067 | | - |
| 3068 | cur_offset = FILE_Pos(); executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 3069 | if ( FILE_Seek( new_offset ) || partially evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:753 |
| 0-753 |
| 3070 | ( error = _HB_OPEN_Load_Coverage( &mmp->Mark2Coverage, partially evaluated: ( error = _HB_OPEN_Load_Coverage( &mmp->Mark2Coverage, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:753 |
| 0-753 |
| 3071 | stream ) ) != HB_Err_Ok ) partially evaluated: ( error = _HB_OPEN_Load_Coverage( &mmp->Mark2Coverage, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:753 |
| 0-753 |
| 3072 | goto Fail3; never executed: goto Fail3; | 0 |
| 3073 | (void)FILE_Seek( cur_offset ); executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 3074 | | - |
| 3075 | if ( ACCESS_Frame( 4L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 4L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:753 |
| 0-753 |
| 3076 | goto Fail2; never executed: goto Fail2; | 0 |
| 3077 | | - |
| 3078 | mmp->ClassCount = GET_UShort(); executed (the execution status of this line is deduced): mmp->ClassCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 3079 | new_offset = GET_UShort() + base_offset; executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 3080 | | - |
| 3081 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 3082 | | - |
| 3083 | cur_offset = FILE_Pos(); executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 3084 | if ( FILE_Seek( new_offset ) || partially evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:753 |
| 0-753 |
| 3085 | ( error = Load_MarkArray( &mmp->Mark1Array, stream ) ) != HB_Err_Ok ) partially evaluated: ( error = Load_MarkArray( &mmp->Mark1Array, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:753 |
| 0-753 |
| 3086 | goto Fail2; never executed: goto Fail2; | 0 |
| 3087 | (void)FILE_Seek( cur_offset ); executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 3088 | | - |
| 3089 | if ( ACCESS_Frame( 2L ) ) partially evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:753 |
| 0-753 |
| 3090 | goto Fail1; never executed: goto Fail1; | 0 |
| 3091 | | - |
| 3092 | new_offset = GET_UShort() + base_offset; executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 3093 | | - |
| 3094 | FORGET_Frame(); executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 3095 | | - |
| 3096 | cur_offset = FILE_Pos(); executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 3097 | if ( FILE_Seek( new_offset ) || partially evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 )| no Evaluation Count:0 | yes Evaluation Count:753 |
| 0-753 |
| 3098 | ( error = Load_Mark2Array( &mmp->Mark2Array, mmp->ClassCount, partially evaluated: ( error = Load_Mark2Array( &mmp->Mark2Array, mmp->ClassCount, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:753 |
| 0-753 |
| 3099 | stream ) ) != HB_Err_Ok ) partially evaluated: ( error = Load_Mark2Array( &mmp->Mark2Array, mmp->ClassCount, stream ) ) != HB_Err_Ok| no Evaluation Count:0 | yes Evaluation Count:753 |
| 0-753 |
| 3100 | goto Fail1; never executed: goto Fail1; | 0 |
| 3101 | | - |
| 3102 | return HB_Err_Ok; executed: return HB_Err_Ok;Execution Count:753 | 753 |
| 3103 | | - |
| 3104 | Fail1: | - |
| 3105 | Free_MarkArray( &mmp->Mark1Array ); never executed (the execution status of this line is deduced): Free_MarkArray( &mmp->Mark1Array ); | - |
| 3106 | | - |
| 3107 | Fail2: code before this statement never executed: Fail2: | 0 |
| 3108 | _HB_OPEN_Free_Coverage( &mmp->Mark2Coverage ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_Coverage( &mmp->Mark2Coverage ); | - |
| 3109 | | - |
| 3110 | Fail3: code before this statement never executed: Fail3: | 0 |
| 3111 | _HB_OPEN_Free_Coverage( &mmp->Mark1Coverage ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_Coverage( &mmp->Mark1Coverage ); | - |
| 3112 | return error; never executed: return error; | 0 |
| 3113 | } | - |
| 3114 | | - |
| 3115 | | - |
| 3116 | static void Free_MarkMarkPos( HB_GPOS_SubTable* st) | - |
| 3117 | { | - |
| 3118 | HB_MarkMarkPos* mmp = &st->markmark; executed (the execution status of this line is deduced): HB_MarkMarkPos* mmp = &st->markmark; | - |
| 3119 | | - |
| 3120 | Free_Mark2Array( &mmp->Mark2Array, mmp->ClassCount ); executed (the execution status of this line is deduced): Free_Mark2Array( &mmp->Mark2Array, mmp->ClassCount ); | - |
| 3121 | Free_MarkArray( &mmp->Mark1Array ); executed (the execution status of this line is deduced): Free_MarkArray( &mmp->Mark1Array ); | - |
| 3122 | _HB_OPEN_Free_Coverage( &mmp->Mark2Coverage ); executed (the execution status of this line is deduced): _HB_OPEN_Free_Coverage( &mmp->Mark2Coverage ); | - |
| 3123 | _HB_OPEN_Free_Coverage( &mmp->Mark1Coverage ); executed (the execution status of this line is deduced): _HB_OPEN_Free_Coverage( &mmp->Mark1Coverage ); | - |
| 3124 | } executed: }Execution Count:715 | 715 |
| 3125 | | - |
| 3126 | | - |
| 3127 | static HB_Error Lookup_MarkMarkPos( GPOS_Instance* gpi, | - |
| 3128 | HB_GPOS_SubTable* st, | - |
| 3129 | HB_Buffer buffer, | - |
| 3130 | HB_UShort flags, | - |
| 3131 | HB_UShort context_length, | - |
| 3132 | int nesting_level ) | - |
| 3133 | { | - |
| 3134 | HB_UShort i, j, mark1_index, mark2_index, property, class; executed (the execution status of this line is deduced): HB_UShort i, j, mark1_index, mark2_index, property, class; | - |
| 3135 | HB_Fixed x_mark1_value, y_mark1_value, executed (the execution status of this line is deduced): HB_Fixed x_mark1_value, y_mark1_value, | - |
| 3136 | x_mark2_value, y_mark2_value; executed (the execution status of this line is deduced): x_mark2_value, y_mark2_value; | - |
| 3137 | HB_Error error; executed (the execution status of this line is deduced): HB_Error error; | - |
| 3138 | HB_GPOSHeader* gpos = gpi->gpos; executed (the execution status of this line is deduced): HB_GPOSHeader* gpos = gpi->gpos; | - |
| 3139 | HB_MarkMarkPos* mmp = &st->markmark; executed (the execution status of this line is deduced): HB_MarkMarkPos* mmp = &st->markmark; | - |
| 3140 | | - |
| 3141 | HB_MarkArray* ma1; executed (the execution status of this line is deduced): HB_MarkArray* ma1; | - |
| 3142 | HB_Mark2Array* ma2; executed (the execution status of this line is deduced): HB_Mark2Array* ma2; | - |
| 3143 | HB_Mark2Record* m2r; executed (the execution status of this line is deduced): HB_Mark2Record* m2r; | - |
| 3144 | HB_Anchor* mark1_anchor; executed (the execution status of this line is deduced): HB_Anchor* mark1_anchor; | - |
| 3145 | HB_Anchor* mark2_anchor; executed (the execution status of this line is deduced): HB_Anchor* mark2_anchor; | - |
| 3146 | | - |
| 3147 | HB_Position o; executed (the execution status of this line is deduced): HB_Position o; | - |
| 3148 | | - |
| 3149 | HB_UNUSED(nesting_level); executed (the execution status of this line is deduced): ((nesting_level) = (nesting_level)); | - |
| 3150 | | - |
| 3151 | if ( context_length != 0xFFFF && context_length < 1 ) partially evaluated: context_length != 0xFFFF| no Evaluation Count:0 | yes Evaluation Count:6632244 |
never evaluated: context_length < 1 | 0-6632244 |
| 3152 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 3153 | | - |
| 3154 | if ( flags & HB_LOOKUP_FLAG_IGNORE_MARKS ) partially evaluated: flags & 0x0008| no Evaluation Count:0 | yes Evaluation Count:6632244 |
| 0-6632244 |
| 3155 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 3156 | | - |
| 3157 | if ( CHECK_Property( gpos->gdef, IN_CURITEM(), evaluated: ( ( error = _HB_GDEF_Check_Property( (gpos->gdef), ((&buffer->in_string[buffer->in_pos])), (flags), (&property) ) ) != HB_Err_Ok )| yes Evaluation Count:19804 | yes Evaluation Count:6612440 |
| 19804-6612440 |
| 3158 | flags, &property ) ) | - |
| 3159 | return error; executed: return error;Execution Count:19804 | 19804 |
| 3160 | | - |
| 3161 | error = _HB_OPEN_Coverage_Index( &mmp->Mark1Coverage, IN_CURGLYPH(), executed (the execution status of this line is deduced): error = _HB_OPEN_Coverage_Index( &mmp->Mark1Coverage, (buffer->in_string[buffer->in_pos].gindex), | - |
| 3162 | &mark1_index ); executed (the execution status of this line is deduced): &mark1_index ); | - |
| 3163 | if ( error ) evaluated: error| yes Evaluation Count:6612340 | yes Evaluation Count:100 |
| 100-6612340 |
| 3164 | return error; executed: return error;Execution Count:6612340 | 6612340 |
| 3165 | | - |
| 3166 | /* now we search backwards for a suitable mark glyph until a non-mark | - |
| 3167 | glyph */ | - |
| 3168 | | - |
| 3169 | if ( buffer->in_pos == 0 ) partially evaluated: buffer->in_pos == 0| no Evaluation Count:0 | yes Evaluation Count:100 |
| 0-100 |
| 3170 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 3171 | | - |
| 3172 | i = 1; executed (the execution status of this line is deduced): i = 1; | - |
| 3173 | j = buffer->in_pos - 1; executed (the execution status of this line is deduced): j = buffer->in_pos - 1; | - |
| 3174 | while ( i <= buffer->in_pos ) partially evaluated: i <= buffer->in_pos| yes Evaluation Count:100 | no Evaluation Count:0 |
| 0-100 |
| 3175 | { | - |
| 3176 | error = HB_GDEF_Get_Glyph_Property( gpos->gdef, IN_GLYPH( j ), executed (the execution status of this line is deduced): error = HB_GDEF_Get_Glyph_Property( gpos->gdef, (buffer->in_string[(j)].gindex), | - |
| 3177 | &property ); executed (the execution status of this line is deduced): &property ); | - |
| 3178 | if ( error ) partially evaluated: error| no Evaluation Count:0 | yes Evaluation Count:100 |
| 0-100 |
| 3179 | return error; never executed: return error; | 0 |
| 3180 | | - |
| 3181 | if ( !( property == HB_GDEF_MARK || property & HB_LOOKUP_FLAG_IGNORE_SPECIAL_MARKS ) ) evaluated: property == 0x0008| yes Evaluation Count:40 | yes Evaluation Count:60 |
partially evaluated: property & 0xFF00| no Evaluation Count:0 | yes Evaluation Count:60 |
| 0-60 |
| 3182 | return HB_Err_Not_Covered; executed: return HB_Err_Not_Covered;Execution Count:60 | 60 |
| 3183 | | - |
| 3184 | if ( flags & HB_LOOKUP_FLAG_IGNORE_SPECIAL_MARKS ) partially evaluated: flags & 0xFF00| no Evaluation Count:0 | yes Evaluation Count:40 |
| 0-40 |
| 3185 | { | - |
| 3186 | if ( property == (flags & 0xFF00) ) never evaluated: property == (flags & 0xFF00) | 0 |
| 3187 | break; | 0 |
| 3188 | } | 0 |
| 3189 | else | - |
| 3190 | break; executed: break;Execution Count:40 | 40 |
| 3191 | | - |
| 3192 | i++; never executed (the execution status of this line is deduced): i++; | - |
| 3193 | j--; never executed (the execution status of this line is deduced): j--; | - |
| 3194 | } | 0 |
| 3195 | | - |
| 3196 | error = _HB_OPEN_Coverage_Index( &mmp->Mark2Coverage, IN_GLYPH( j ), executed (the execution status of this line is deduced): error = _HB_OPEN_Coverage_Index( &mmp->Mark2Coverage, (buffer->in_string[(j)].gindex), | - |
| 3197 | &mark2_index ); executed (the execution status of this line is deduced): &mark2_index ); | - |
| 3198 | if ( error ) evaluated: error| yes Evaluation Count:24 | yes Evaluation Count:16 |
| 16-24 |
| 3199 | return error; executed: return error;Execution Count:24 | 24 |
| 3200 | | - |
| 3201 | ma1 = &mmp->Mark1Array; executed (the execution status of this line is deduced): ma1 = &mmp->Mark1Array; | - |
| 3202 | | - |
| 3203 | if ( mark1_index >= ma1->MarkCount ) partially evaluated: mark1_index >= ma1->MarkCount| no Evaluation Count:0 | yes Evaluation Count:16 |
| 0-16 |
| 3204 | return ERR(HB_Err_Invalid_SubTable); never executed: return _hb_err (HB_Err_Invalid_SubTable); | 0 |
| 3205 | | - |
| 3206 | class = ma1->MarkRecord[mark1_index].Class; executed (the execution status of this line is deduced): class = ma1->MarkRecord[mark1_index].Class; | - |
| 3207 | mark1_anchor = &ma1->MarkRecord[mark1_index].MarkAnchor; executed (the execution status of this line is deduced): mark1_anchor = &ma1->MarkRecord[mark1_index].MarkAnchor; | - |
| 3208 | | - |
| 3209 | if ( class >= mmp->ClassCount ) partially evaluated: class >= mmp->ClassCount| no Evaluation Count:0 | yes Evaluation Count:16 |
| 0-16 |
| 3210 | return ERR(HB_Err_Invalid_SubTable); never executed: return _hb_err (HB_Err_Invalid_SubTable); | 0 |
| 3211 | | - |
| 3212 | ma2 = &mmp->Mark2Array; executed (the execution status of this line is deduced): ma2 = &mmp->Mark2Array; | - |
| 3213 | | - |
| 3214 | if ( mark2_index >= ma2->Mark2Count ) partially evaluated: mark2_index >= ma2->Mark2Count| no Evaluation Count:0 | yes Evaluation Count:16 |
| 0-16 |
| 3215 | return ERR(HB_Err_Invalid_SubTable); never executed: return _hb_err (HB_Err_Invalid_SubTable); | 0 |
| 3216 | | - |
| 3217 | m2r = &ma2->Mark2Record[mark2_index]; executed (the execution status of this line is deduced): m2r = &ma2->Mark2Record[mark2_index]; | - |
| 3218 | mark2_anchor = &m2r->Mark2Anchor[class]; executed (the execution status of this line is deduced): mark2_anchor = &m2r->Mark2Anchor[class]; | - |
| 3219 | | - |
| 3220 | error = Get_Anchor( gpi, mark1_anchor, IN_CURGLYPH(), executed (the execution status of this line is deduced): error = Get_Anchor( gpi, mark1_anchor, (buffer->in_string[buffer->in_pos].gindex), | - |
| 3221 | &x_mark1_value, &y_mark1_value ); executed (the execution status of this line is deduced): &x_mark1_value, &y_mark1_value ); | - |
| 3222 | if ( error ) partially evaluated: error| no Evaluation Count:0 | yes Evaluation Count:16 |
| 0-16 |
| 3223 | return error; never executed: return error; | 0 |
| 3224 | error = Get_Anchor( gpi, mark2_anchor, IN_GLYPH( j ), executed (the execution status of this line is deduced): error = Get_Anchor( gpi, mark2_anchor, (buffer->in_string[(j)].gindex), | - |
| 3225 | &x_mark2_value, &y_mark2_value ); executed (the execution status of this line is deduced): &x_mark2_value, &y_mark2_value ); | - |
| 3226 | if ( error ) partially evaluated: error| no Evaluation Count:0 | yes Evaluation Count:16 |
| 0-16 |
| 3227 | return error; never executed: return error; | 0 |
| 3228 | | - |
| 3229 | /* anchor points are not cumulative */ | - |
| 3230 | | - |
| 3231 | o = POSITION( buffer->in_pos ); executed (the execution status of this line is deduced): o = (&buffer->positions[(buffer->in_pos)]); | - |
| 3232 | | - |
| 3233 | o->x_pos = x_mark2_value - x_mark1_value; executed (the execution status of this line is deduced): o->x_pos = x_mark2_value - x_mark1_value; | - |
| 3234 | o->y_pos = y_mark2_value - y_mark1_value; executed (the execution status of this line is deduced): o->y_pos = y_mark2_value - y_mark1_value; | - |
| 3235 | o->x_advance = 0; executed (the execution status of this line is deduced): o->x_advance = 0; | - |
| 3236 | o->y_advance = 0; executed (the execution status of this line is deduced): o->y_advance = 0; | - |
| 3237 | o->back = 1; executed (the execution status of this line is deduced): o->back = 1; | - |
| 3238 | | - |
| 3239 | (buffer->in_pos)++; executed (the execution status of this line is deduced): (buffer->in_pos)++; | - |
| 3240 | | - |
| 3241 | return HB_Err_Ok; executed: return HB_Err_Ok;Execution Count:16 | 16 |
| 3242 | } | - |
| 3243 | | - |
| 3244 | | - |
| 3245 | /* Do the actual positioning for a context positioning (either format | - |
| 3246 | 7 or 8). This is only called after we've determined that the stream | - |
| 3247 | matches the subrule. */ | - |
| 3248 | | - |
| 3249 | static HB_Error Do_ContextPos( GPOS_Instance* gpi, | - |
| 3250 | HB_UShort GlyphCount, | - |
| 3251 | HB_UShort PosCount, | - |
| 3252 | HB_PosLookupRecord* pos, | - |
| 3253 | HB_Buffer buffer, | - |
| 3254 | int nesting_level ) | - |
| 3255 | { | - |
| 3256 | HB_Error error; never executed (the execution status of this line is deduced): HB_Error error; | - |
| 3257 | HB_UInt i, old_pos; never executed (the execution status of this line is deduced): HB_UInt i, old_pos; | - |
| 3258 | | - |
| 3259 | | - |
| 3260 | i = 0; never executed (the execution status of this line is deduced): i = 0; | - |
| 3261 | | - |
| 3262 | while ( i < GlyphCount ) never evaluated: i < GlyphCount | 0 |
| 3263 | { | - |
| 3264 | if ( PosCount && i == pos->SequenceIndex ) never evaluated: PosCount never evaluated: i == pos->SequenceIndex | 0 |
| 3265 | { | - |
| 3266 | old_pos = buffer->in_pos; never executed (the execution status of this line is deduced): old_pos = buffer->in_pos; | - |
| 3267 | | - |
| 3268 | /* Do a positioning */ | - |
| 3269 | | - |
| 3270 | error = GPOS_Do_Glyph_Lookup( gpi, pos->LookupListIndex, buffer, never executed (the execution status of this line is deduced): error = GPOS_Do_Glyph_Lookup( gpi, pos->LookupListIndex, buffer, | - |
| 3271 | GlyphCount, nesting_level ); never executed (the execution status of this line is deduced): GlyphCount, nesting_level ); | - |
| 3272 | | - |
| 3273 | if ( error ) | 0 |
| 3274 | return error; never executed: return error; | 0 |
| 3275 | | - |
| 3276 | pos++; never executed (the execution status of this line is deduced): pos++; | - |
| 3277 | PosCount--; never executed (the execution status of this line is deduced): PosCount--; | - |
| 3278 | i += buffer->in_pos - old_pos; never executed (the execution status of this line is deduced): i += buffer->in_pos - old_pos; | - |
| 3279 | } | 0 |
| 3280 | else | - |
| 3281 | { | - |
| 3282 | i++; never executed (the execution status of this line is deduced): i++; | - |
| 3283 | (buffer->in_pos)++; never executed (the execution status of this line is deduced): (buffer->in_pos)++; | - |
| 3284 | } | 0 |
| 3285 | } | - |
| 3286 | | - |
| 3287 | return HB_Err_Ok; never executed: return HB_Err_Ok; | 0 |
| 3288 | } | - |
| 3289 | | - |
| 3290 | | - |
| 3291 | /* LookupType 7 */ | - |
| 3292 | | - |
| 3293 | /* PosRule */ | - |
| 3294 | | - |
| 3295 | static HB_Error Load_PosRule( HB_PosRule* pr, | - |
| 3296 | HB_Stream stream ) | - |
| 3297 | { | - |
| 3298 | HB_Error error; never executed (the execution status of this line is deduced): HB_Error error; | - |
| 3299 | | - |
| 3300 | HB_UShort n, count; never executed (the execution status of this line is deduced): HB_UShort n, count; | - |
| 3301 | HB_UShort* i; never executed (the execution status of this line is deduced): HB_UShort* i; | - |
| 3302 | | - |
| 3303 | HB_PosLookupRecord* plr; never executed (the execution status of this line is deduced): HB_PosLookupRecord* plr; | - |
| 3304 | | - |
| 3305 | | - |
| 3306 | if ( ACCESS_Frame( 4L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 4L ))) != 0 ) | 0 |
| 3307 | return error; never executed: return error; | 0 |
| 3308 | | - |
| 3309 | pr->GlyphCount = GET_UShort(); never executed (the execution status of this line is deduced): pr->GlyphCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 3310 | pr->PosCount = GET_UShort(); never executed (the execution status of this line is deduced): pr->PosCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 3311 | | - |
| 3312 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 3313 | | - |
| 3314 | pr->Input = NULL; never executed (the execution status of this line is deduced): pr->Input = ((void *)0); | - |
| 3315 | | - |
| 3316 | count = pr->GlyphCount - 1; /* only GlyphCount - 1 elements */ never executed (the execution status of this line is deduced): count = pr->GlyphCount - 1; | - |
| 3317 | | - |
| 3318 | if ( ALLOC_ARRAY( pr->Input, count, HB_UShort ) ) never evaluated: ( (pr->Input) = _hb_alloc( (count)*sizeof(HB_UShort), &error ), error != 0 ) | 0 |
| 3319 | return error; never executed: return error; | 0 |
| 3320 | | - |
| 3321 | i = pr->Input; never executed (the execution status of this line is deduced): i = pr->Input; | - |
| 3322 | | - |
| 3323 | if ( ACCESS_Frame( count * 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, count * 2L ))) != 0 ) | 0 |
| 3324 | goto Fail2; never executed: goto Fail2; | 0 |
| 3325 | | - |
| 3326 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 3327 | i[n] = GET_UShort(); never executed: i[n] = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | 0 |
| 3328 | | - |
| 3329 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 3330 | | - |
| 3331 | pr->PosLookupRecord = NULL; never executed (the execution status of this line is deduced): pr->PosLookupRecord = ((void *)0); | - |
| 3332 | | - |
| 3333 | count = pr->PosCount; never executed (the execution status of this line is deduced): count = pr->PosCount; | - |
| 3334 | | - |
| 3335 | if ( ALLOC_ARRAY( pr->PosLookupRecord, count, HB_PosLookupRecord ) ) never evaluated: ( (pr->PosLookupRecord) = _hb_alloc( (count)*sizeof(HB_PosLookupRecord), &error ), error != 0 ) | 0 |
| 3336 | goto Fail2; never executed: goto Fail2; | 0 |
| 3337 | | - |
| 3338 | plr = pr->PosLookupRecord; never executed (the execution status of this line is deduced): plr = pr->PosLookupRecord; | - |
| 3339 | | - |
| 3340 | if ( ACCESS_Frame( count * 4L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, count * 4L ))) != 0 ) | 0 |
| 3341 | goto Fail1; never executed: goto Fail1; | 0 |
| 3342 | | - |
| 3343 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 3344 | { | - |
| 3345 | plr[n].SequenceIndex = GET_UShort(); never executed (the execution status of this line is deduced): plr[n].SequenceIndex = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 3346 | plr[n].LookupListIndex = GET_UShort(); never executed (the execution status of this line is deduced): plr[n].LookupListIndex = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 3347 | } | 0 |
| 3348 | | - |
| 3349 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 3350 | | - |
| 3351 | return HB_Err_Ok; never executed: return HB_Err_Ok; | 0 |
| 3352 | | - |
| 3353 | Fail1: | - |
| 3354 | FREE( plr ); never executed: } never executed: } never evaluated: (plr) never evaluated: 0 | 0 |
| 3355 | | - |
| 3356 | Fail2: code before this statement never executed: Fail2: | 0 |
| 3357 | FREE( i ); never executed: } never executed: } never evaluated: (i) never evaluated: 0 | 0 |
| 3358 | return error; never executed: return error; | 0 |
| 3359 | } | - |
| 3360 | | - |
| 3361 | | - |
| 3362 | static void Free_PosRule( HB_PosRule* pr ) | - |
| 3363 | { | - |
| 3364 | FREE( pr->PosLookupRecord ); never executed: } never executed: } never evaluated: (pr->PosLookupRecord) never evaluated: 0 | 0 |
| 3365 | FREE( pr->Input ); never executed: } never executed: } never evaluated: (pr->Input) never evaluated: 0 | 0 |
| 3366 | } | 0 |
| 3367 | | - |
| 3368 | | - |
| 3369 | /* PosRuleSet */ | - |
| 3370 | | - |
| 3371 | static HB_Error Load_PosRuleSet( HB_PosRuleSet* prs, | - |
| 3372 | HB_Stream stream ) | - |
| 3373 | { | - |
| 3374 | HB_Error error; never executed (the execution status of this line is deduced): HB_Error error; | - |
| 3375 | | - |
| 3376 | HB_UShort n, m, count; never executed (the execution status of this line is deduced): HB_UShort n, m, count; | - |
| 3377 | HB_UInt cur_offset, new_offset, base_offset; never executed (the execution status of this line is deduced): HB_UInt cur_offset, new_offset, base_offset; | - |
| 3378 | | - |
| 3379 | HB_PosRule* pr; never executed (the execution status of this line is deduced): HB_PosRule* pr; | - |
| 3380 | | - |
| 3381 | | - |
| 3382 | base_offset = FILE_Pos(); never executed (the execution status of this line is deduced): base_offset = _hb_stream_pos( stream ); | - |
| 3383 | | - |
| 3384 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 3385 | return error; never executed: return error; | 0 |
| 3386 | | - |
| 3387 | count = prs->PosRuleCount = GET_UShort(); never executed (the execution status of this line is deduced): count = prs->PosRuleCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 3388 | | - |
| 3389 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 3390 | | - |
| 3391 | prs->PosRule = NULL; never executed (the execution status of this line is deduced): prs->PosRule = ((void *)0); | - |
| 3392 | | - |
| 3393 | if ( ALLOC_ARRAY( prs->PosRule, count, HB_PosRule ) ) never evaluated: ( (prs->PosRule) = _hb_alloc( (count)*sizeof(HB_PosRule), &error ), error != 0 ) | 0 |
| 3394 | return error; never executed: return error; | 0 |
| 3395 | | - |
| 3396 | pr = prs->PosRule; never executed (the execution status of this line is deduced): pr = prs->PosRule; | - |
| 3397 | | - |
| 3398 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 3399 | { | - |
| 3400 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 3401 | goto Fail; never executed: goto Fail; | 0 |
| 3402 | | - |
| 3403 | new_offset = GET_UShort() + base_offset; never executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 3404 | | - |
| 3405 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 3406 | | - |
| 3407 | cur_offset = FILE_Pos(); never executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 3408 | if ( FILE_Seek( new_offset ) || never evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 ) | 0 |
| 3409 | ( error = Load_PosRule( &pr[n], stream ) ) != HB_Err_Ok ) never evaluated: ( error = Load_PosRule( &pr[n], stream ) ) != HB_Err_Ok | 0 |
| 3410 | goto Fail; never executed: goto Fail; | 0 |
| 3411 | (void)FILE_Seek( cur_offset ); never executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 3412 | } | 0 |
| 3413 | | - |
| 3414 | return HB_Err_Ok; never executed: return HB_Err_Ok; | 0 |
| 3415 | | - |
| 3416 | Fail: | - |
| 3417 | for ( m = 0; m < n; m++ ) | 0 |
| 3418 | Free_PosRule( &pr[m] ); never executed: Free_PosRule( &pr[m] ); | 0 |
| 3419 | | - |
| 3420 | FREE( pr ); never executed: } never executed: } never evaluated: (pr) never evaluated: 0 | 0 |
| 3421 | return error; never executed: return error; | 0 |
| 3422 | } | - |
| 3423 | | - |
| 3424 | | - |
| 3425 | static void Free_PosRuleSet( HB_PosRuleSet* prs ) | - |
| 3426 | { | - |
| 3427 | HB_UShort n, count; never executed (the execution status of this line is deduced): HB_UShort n, count; | - |
| 3428 | | - |
| 3429 | HB_PosRule* pr; never executed (the execution status of this line is deduced): HB_PosRule* pr; | - |
| 3430 | | - |
| 3431 | | - |
| 3432 | if ( prs->PosRule ) never evaluated: prs->PosRule | 0 |
| 3433 | { | - |
| 3434 | count = prs->PosRuleCount; never executed (the execution status of this line is deduced): count = prs->PosRuleCount; | - |
| 3435 | pr = prs->PosRule; never executed (the execution status of this line is deduced): pr = prs->PosRule; | - |
| 3436 | | - |
| 3437 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 3438 | Free_PosRule( &pr[n] ); never executed: Free_PosRule( &pr[n] ); | 0 |
| 3439 | | - |
| 3440 | FREE( pr ); never executed: } never executed: } never evaluated: (pr) never evaluated: 0 | 0 |
| 3441 | } | 0 |
| 3442 | } | 0 |
| 3443 | | - |
| 3444 | | - |
| 3445 | /* ContextPosFormat1 */ | - |
| 3446 | | - |
| 3447 | static HB_Error Load_ContextPos1( HB_ContextPosFormat1* cpf1, | - |
| 3448 | HB_Stream stream ) | - |
| 3449 | { | - |
| 3450 | HB_Error error; never executed (the execution status of this line is deduced): HB_Error error; | - |
| 3451 | | - |
| 3452 | HB_UShort n, m, count; never executed (the execution status of this line is deduced): HB_UShort n, m, count; | - |
| 3453 | HB_UInt cur_offset, new_offset, base_offset; never executed (the execution status of this line is deduced): HB_UInt cur_offset, new_offset, base_offset; | - |
| 3454 | | - |
| 3455 | HB_PosRuleSet* prs; never executed (the execution status of this line is deduced): HB_PosRuleSet* prs; | - |
| 3456 | | - |
| 3457 | | - |
| 3458 | base_offset = FILE_Pos() - 2L; never executed (the execution status of this line is deduced): base_offset = _hb_stream_pos( stream ) - 2L; | - |
| 3459 | | - |
| 3460 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 3461 | return error; never executed: return error; | 0 |
| 3462 | | - |
| 3463 | new_offset = GET_UShort() + base_offset; never executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 3464 | | - |
| 3465 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 3466 | | - |
| 3467 | cur_offset = FILE_Pos(); never executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 3468 | if ( FILE_Seek( new_offset ) || never evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 ) | 0 |
| 3469 | ( error = _HB_OPEN_Load_Coverage( &cpf1->Coverage, stream ) ) != HB_Err_Ok ) never evaluated: ( error = _HB_OPEN_Load_Coverage( &cpf1->Coverage, stream ) ) != HB_Err_Ok | 0 |
| 3470 | return error; never executed: return error; | 0 |
| 3471 | (void)FILE_Seek( cur_offset ); never executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 3472 | | - |
| 3473 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 3474 | goto Fail2; never executed: goto Fail2; | 0 |
| 3475 | | - |
| 3476 | count = cpf1->PosRuleSetCount = GET_UShort(); never executed (the execution status of this line is deduced): count = cpf1->PosRuleSetCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 3477 | | - |
| 3478 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 3479 | | - |
| 3480 | cpf1->PosRuleSet = NULL; never executed (the execution status of this line is deduced): cpf1->PosRuleSet = ((void *)0); | - |
| 3481 | | - |
| 3482 | if ( ALLOC_ARRAY( cpf1->PosRuleSet, count, HB_PosRuleSet ) ) never evaluated: ( (cpf1->PosRuleSet) = _hb_alloc( (count)*sizeof(HB_PosRuleSet), &error ), error != 0 ) | 0 |
| 3483 | goto Fail2; never executed: goto Fail2; | 0 |
| 3484 | | - |
| 3485 | prs = cpf1->PosRuleSet; never executed (the execution status of this line is deduced): prs = cpf1->PosRuleSet; | - |
| 3486 | | - |
| 3487 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 3488 | { | - |
| 3489 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 3490 | goto Fail1; never executed: goto Fail1; | 0 |
| 3491 | | - |
| 3492 | new_offset = GET_UShort() + base_offset; never executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 3493 | | - |
| 3494 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 3495 | | - |
| 3496 | cur_offset = FILE_Pos(); never executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 3497 | if ( FILE_Seek( new_offset ) || never evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 ) | 0 |
| 3498 | ( error = Load_PosRuleSet( &prs[n], stream ) ) != HB_Err_Ok ) never evaluated: ( error = Load_PosRuleSet( &prs[n], stream ) ) != HB_Err_Ok | 0 |
| 3499 | goto Fail1; never executed: goto Fail1; | 0 |
| 3500 | (void)FILE_Seek( cur_offset ); never executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 3501 | } | 0 |
| 3502 | | - |
| 3503 | return HB_Err_Ok; never executed: return HB_Err_Ok; | 0 |
| 3504 | | - |
| 3505 | Fail1: | - |
| 3506 | for ( m = 0; m < n; m++ ) | 0 |
| 3507 | Free_PosRuleSet( &prs[m] ); never executed: Free_PosRuleSet( &prs[m] ); | 0 |
| 3508 | | - |
| 3509 | FREE( prs ); never executed: } never executed: } never evaluated: (prs) never evaluated: 0 | 0 |
| 3510 | | - |
| 3511 | Fail2: code before this statement never executed: Fail2: | 0 |
| 3512 | _HB_OPEN_Free_Coverage( &cpf1->Coverage ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_Coverage( &cpf1->Coverage ); | - |
| 3513 | return error; never executed: return error; | 0 |
| 3514 | } | - |
| 3515 | | - |
| 3516 | | - |
| 3517 | static void Free_ContextPos1( HB_ContextPosFormat1* cpf1 ) | - |
| 3518 | { | - |
| 3519 | HB_UShort n, count; never executed (the execution status of this line is deduced): HB_UShort n, count; | - |
| 3520 | | - |
| 3521 | HB_PosRuleSet* prs; never executed (the execution status of this line is deduced): HB_PosRuleSet* prs; | - |
| 3522 | | - |
| 3523 | | - |
| 3524 | if ( cpf1->PosRuleSet ) never evaluated: cpf1->PosRuleSet | 0 |
| 3525 | { | - |
| 3526 | count = cpf1->PosRuleSetCount; never executed (the execution status of this line is deduced): count = cpf1->PosRuleSetCount; | - |
| 3527 | prs = cpf1->PosRuleSet; never executed (the execution status of this line is deduced): prs = cpf1->PosRuleSet; | - |
| 3528 | | - |
| 3529 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 3530 | Free_PosRuleSet( &prs[n] ); never executed: Free_PosRuleSet( &prs[n] ); | 0 |
| 3531 | | - |
| 3532 | FREE( prs ); never executed: } never executed: } never evaluated: (prs) never evaluated: 0 | 0 |
| 3533 | } | 0 |
| 3534 | | - |
| 3535 | _HB_OPEN_Free_Coverage( &cpf1->Coverage ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_Coverage( &cpf1->Coverage ); | - |
| 3536 | } | 0 |
| 3537 | | - |
| 3538 | | - |
| 3539 | /* PosClassRule */ | - |
| 3540 | | - |
| 3541 | static HB_Error Load_PosClassRule( HB_ContextPosFormat2* cpf2, | - |
| 3542 | HB_PosClassRule* pcr, | - |
| 3543 | HB_Stream stream ) | - |
| 3544 | { | - |
| 3545 | HB_Error error; never executed (the execution status of this line is deduced): HB_Error error; | - |
| 3546 | | - |
| 3547 | HB_UShort n, count; never executed (the execution status of this line is deduced): HB_UShort n, count; | - |
| 3548 | | - |
| 3549 | HB_UShort* c; never executed (the execution status of this line is deduced): HB_UShort* c; | - |
| 3550 | HB_PosLookupRecord* plr; never executed (the execution status of this line is deduced): HB_PosLookupRecord* plr; | - |
| 3551 | | - |
| 3552 | | - |
| 3553 | if ( ACCESS_Frame( 4L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 4L ))) != 0 ) | 0 |
| 3554 | return error; never executed: return error; | 0 |
| 3555 | | - |
| 3556 | pcr->GlyphCount = GET_UShort(); never executed (the execution status of this line is deduced): pcr->GlyphCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 3557 | pcr->PosCount = GET_UShort(); never executed (the execution status of this line is deduced): pcr->PosCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 3558 | | - |
| 3559 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 3560 | | - |
| 3561 | if ( pcr->GlyphCount > cpf2->MaxContextLength ) never evaluated: pcr->GlyphCount > cpf2->MaxContextLength | 0 |
| 3562 | cpf2->MaxContextLength = pcr->GlyphCount; never executed: cpf2->MaxContextLength = pcr->GlyphCount; | 0 |
| 3563 | | - |
| 3564 | pcr->Class = NULL; never executed (the execution status of this line is deduced): pcr->Class = ((void *)0); | - |
| 3565 | | - |
| 3566 | count = pcr->GlyphCount - 1; /* only GlyphCount - 1 elements */ never executed (the execution status of this line is deduced): count = pcr->GlyphCount - 1; | - |
| 3567 | | - |
| 3568 | if ( ALLOC_ARRAY( pcr->Class, count, HB_UShort ) ) never evaluated: ( (pcr->Class) = _hb_alloc( (count)*sizeof(HB_UShort), &error ), error != 0 ) | 0 |
| 3569 | return error; never executed: return error; | 0 |
| 3570 | | - |
| 3571 | c = pcr->Class; never executed (the execution status of this line is deduced): c = pcr->Class; | - |
| 3572 | | - |
| 3573 | if ( ACCESS_Frame( count * 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, count * 2L ))) != 0 ) | 0 |
| 3574 | goto Fail2; never executed: goto Fail2; | 0 |
| 3575 | | - |
| 3576 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 3577 | c[n] = GET_UShort(); never executed: c[n] = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | 0 |
| 3578 | | - |
| 3579 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 3580 | | - |
| 3581 | pcr->PosLookupRecord = NULL; never executed (the execution status of this line is deduced): pcr->PosLookupRecord = ((void *)0); | - |
| 3582 | | - |
| 3583 | count = pcr->PosCount; never executed (the execution status of this line is deduced): count = pcr->PosCount; | - |
| 3584 | | - |
| 3585 | if ( ALLOC_ARRAY( pcr->PosLookupRecord, count, HB_PosLookupRecord ) ) never evaluated: ( (pcr->PosLookupRecord) = _hb_alloc( (count)*sizeof(HB_PosLookupRecord), &error ), error != 0 ) | 0 |
| 3586 | goto Fail2; never executed: goto Fail2; | 0 |
| 3587 | | - |
| 3588 | plr = pcr->PosLookupRecord; never executed (the execution status of this line is deduced): plr = pcr->PosLookupRecord; | - |
| 3589 | | - |
| 3590 | if ( ACCESS_Frame( count * 4L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, count * 4L ))) != 0 ) | 0 |
| 3591 | goto Fail1; never executed: goto Fail1; | 0 |
| 3592 | | - |
| 3593 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 3594 | { | - |
| 3595 | plr[n].SequenceIndex = GET_UShort(); never executed (the execution status of this line is deduced): plr[n].SequenceIndex = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 3596 | plr[n].LookupListIndex = GET_UShort(); never executed (the execution status of this line is deduced): plr[n].LookupListIndex = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 3597 | } | 0 |
| 3598 | | - |
| 3599 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 3600 | | - |
| 3601 | return HB_Err_Ok; never executed: return HB_Err_Ok; | 0 |
| 3602 | | - |
| 3603 | Fail1: | - |
| 3604 | FREE( plr ); never executed: } never executed: } never evaluated: (plr) never evaluated: 0 | 0 |
| 3605 | | - |
| 3606 | Fail2: code before this statement never executed: Fail2: | 0 |
| 3607 | FREE( c ); never executed: } never executed: } never evaluated: (c) never evaluated: 0 | 0 |
| 3608 | return error; never executed: return error; | 0 |
| 3609 | } | - |
| 3610 | | - |
| 3611 | | - |
| 3612 | static void Free_PosClassRule( HB_PosClassRule* pcr ) | - |
| 3613 | { | - |
| 3614 | FREE( pcr->PosLookupRecord ); never executed: } never executed: } never evaluated: (pcr->PosLookupRecord) never evaluated: 0 | 0 |
| 3615 | FREE( pcr->Class ); never executed: } never executed: } never evaluated: (pcr->Class) never evaluated: 0 | 0 |
| 3616 | } | 0 |
| 3617 | | - |
| 3618 | | - |
| 3619 | /* PosClassSet */ | - |
| 3620 | | - |
| 3621 | static HB_Error Load_PosClassSet( HB_ContextPosFormat2* cpf2, | - |
| 3622 | HB_PosClassSet* pcs, | - |
| 3623 | HB_Stream stream ) | - |
| 3624 | { | - |
| 3625 | HB_Error error; never executed (the execution status of this line is deduced): HB_Error error; | - |
| 3626 | | - |
| 3627 | HB_UShort n, m, count; never executed (the execution status of this line is deduced): HB_UShort n, m, count; | - |
| 3628 | HB_UInt cur_offset, new_offset, base_offset; never executed (the execution status of this line is deduced): HB_UInt cur_offset, new_offset, base_offset; | - |
| 3629 | | - |
| 3630 | HB_PosClassRule* pcr; never executed (the execution status of this line is deduced): HB_PosClassRule* pcr; | - |
| 3631 | | - |
| 3632 | | - |
| 3633 | base_offset = FILE_Pos(); never executed (the execution status of this line is deduced): base_offset = _hb_stream_pos( stream ); | - |
| 3634 | | - |
| 3635 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 3636 | return error; never executed: return error; | 0 |
| 3637 | | - |
| 3638 | count = pcs->PosClassRuleCount = GET_UShort(); never executed (the execution status of this line is deduced): count = pcs->PosClassRuleCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 3639 | | - |
| 3640 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 3641 | | - |
| 3642 | pcs->PosClassRule = NULL; never executed (the execution status of this line is deduced): pcs->PosClassRule = ((void *)0); | - |
| 3643 | | - |
| 3644 | if ( ALLOC_ARRAY( pcs->PosClassRule, count, HB_PosClassRule ) ) never evaluated: ( (pcs->PosClassRule) = _hb_alloc( (count)*sizeof(HB_PosClassRule), &error ), error != 0 ) | 0 |
| 3645 | return error; never executed: return error; | 0 |
| 3646 | | - |
| 3647 | pcr = pcs->PosClassRule; never executed (the execution status of this line is deduced): pcr = pcs->PosClassRule; | - |
| 3648 | | - |
| 3649 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 3650 | { | - |
| 3651 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 3652 | goto Fail; never executed: goto Fail; | 0 |
| 3653 | | - |
| 3654 | new_offset = GET_UShort() + base_offset; never executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 3655 | | - |
| 3656 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 3657 | | - |
| 3658 | cur_offset = FILE_Pos(); never executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 3659 | if ( FILE_Seek( new_offset ) || never evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 ) | 0 |
| 3660 | ( error = Load_PosClassRule( cpf2, &pcr[n], never evaluated: ( error = Load_PosClassRule( cpf2, &pcr[n], stream ) ) != HB_Err_Ok | 0 |
| 3661 | stream ) ) != HB_Err_Ok ) never evaluated: ( error = Load_PosClassRule( cpf2, &pcr[n], stream ) ) != HB_Err_Ok | 0 |
| 3662 | goto Fail; never executed: goto Fail; | 0 |
| 3663 | (void)FILE_Seek( cur_offset ); never executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 3664 | } | 0 |
| 3665 | | - |
| 3666 | return HB_Err_Ok; never executed: return HB_Err_Ok; | 0 |
| 3667 | | - |
| 3668 | Fail: | - |
| 3669 | for ( m = 0; m < n; m++ ) | 0 |
| 3670 | Free_PosClassRule( &pcr[m] ); never executed: Free_PosClassRule( &pcr[m] ); | 0 |
| 3671 | | - |
| 3672 | FREE( pcr ); never executed: } never executed: } never evaluated: (pcr) never evaluated: 0 | 0 |
| 3673 | return error; never executed: return error; | 0 |
| 3674 | } | - |
| 3675 | | - |
| 3676 | | - |
| 3677 | static void Free_PosClassSet( HB_PosClassSet* pcs ) | - |
| 3678 | { | - |
| 3679 | HB_UShort n, count; never executed (the execution status of this line is deduced): HB_UShort n, count; | - |
| 3680 | | - |
| 3681 | HB_PosClassRule* pcr; never executed (the execution status of this line is deduced): HB_PosClassRule* pcr; | - |
| 3682 | | - |
| 3683 | | - |
| 3684 | if ( pcs->PosClassRule ) never evaluated: pcs->PosClassRule | 0 |
| 3685 | { | - |
| 3686 | count = pcs->PosClassRuleCount; never executed (the execution status of this line is deduced): count = pcs->PosClassRuleCount; | - |
| 3687 | pcr = pcs->PosClassRule; never executed (the execution status of this line is deduced): pcr = pcs->PosClassRule; | - |
| 3688 | | - |
| 3689 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 3690 | Free_PosClassRule( &pcr[n] ); never executed: Free_PosClassRule( &pcr[n] ); | 0 |
| 3691 | | - |
| 3692 | FREE( pcr ); never executed: } never executed: } never evaluated: (pcr) never evaluated: 0 | 0 |
| 3693 | } | 0 |
| 3694 | } | 0 |
| 3695 | | - |
| 3696 | | - |
| 3697 | /* ContextPosFormat2 */ | - |
| 3698 | | - |
| 3699 | static HB_Error Load_ContextPos2( HB_ContextPosFormat2* cpf2, | - |
| 3700 | HB_Stream stream ) | - |
| 3701 | { | - |
| 3702 | HB_Error error; never executed (the execution status of this line is deduced): HB_Error error; | - |
| 3703 | | - |
| 3704 | HB_UShort n, m, count; never executed (the execution status of this line is deduced): HB_UShort n, m, count; | - |
| 3705 | HB_UInt cur_offset, new_offset, base_offset; never executed (the execution status of this line is deduced): HB_UInt cur_offset, new_offset, base_offset; | - |
| 3706 | | - |
| 3707 | HB_PosClassSet* pcs; never executed (the execution status of this line is deduced): HB_PosClassSet* pcs; | - |
| 3708 | | - |
| 3709 | | - |
| 3710 | base_offset = FILE_Pos() - 2; never executed (the execution status of this line is deduced): base_offset = _hb_stream_pos( stream ) - 2; | - |
| 3711 | | - |
| 3712 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 3713 | return error; never executed: return error; | 0 |
| 3714 | | - |
| 3715 | new_offset = GET_UShort() + base_offset; never executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 3716 | | - |
| 3717 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 3718 | | - |
| 3719 | cur_offset = FILE_Pos(); never executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 3720 | if ( FILE_Seek( new_offset ) || never evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 ) | 0 |
| 3721 | ( error = _HB_OPEN_Load_Coverage( &cpf2->Coverage, stream ) ) != HB_Err_Ok ) never evaluated: ( error = _HB_OPEN_Load_Coverage( &cpf2->Coverage, stream ) ) != HB_Err_Ok | 0 |
| 3722 | return error; never executed: return error; | 0 |
| 3723 | (void)FILE_Seek( cur_offset ); never executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 3724 | | - |
| 3725 | if ( ACCESS_Frame( 4L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 4L ))) != 0 ) | 0 |
| 3726 | goto Fail3; never executed: goto Fail3; | 0 |
| 3727 | | - |
| 3728 | new_offset = GET_UShort() + base_offset; never executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 3729 | | - |
| 3730 | /* `PosClassSetCount' is the upper limit for class values, thus we | - |
| 3731 | read it now to make an additional safety check. */ | - |
| 3732 | | - |
| 3733 | count = cpf2->PosClassSetCount = GET_UShort(); never executed (the execution status of this line is deduced): count = cpf2->PosClassSetCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 3734 | | - |
| 3735 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 3736 | | - |
| 3737 | cur_offset = FILE_Pos(); never executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 3738 | if ( FILE_Seek( new_offset ) || never evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 ) | 0 |
| 3739 | ( error = _HB_OPEN_Load_ClassDefinition( &cpf2->ClassDef, count, never evaluated: ( error = _HB_OPEN_Load_ClassDefinition( &cpf2->ClassDef, count, stream ) ) != HB_Err_Ok | 0 |
| 3740 | stream ) ) != HB_Err_Ok ) never evaluated: ( error = _HB_OPEN_Load_ClassDefinition( &cpf2->ClassDef, count, stream ) ) != HB_Err_Ok | 0 |
| 3741 | goto Fail3; never executed: goto Fail3; | 0 |
| 3742 | (void)FILE_Seek( cur_offset ); never executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 3743 | | - |
| 3744 | cpf2->PosClassSet = NULL; never executed (the execution status of this line is deduced): cpf2->PosClassSet = ((void *)0); | - |
| 3745 | cpf2->MaxContextLength = 0; never executed (the execution status of this line is deduced): cpf2->MaxContextLength = 0; | - |
| 3746 | | - |
| 3747 | if ( ALLOC_ARRAY( cpf2->PosClassSet, count, HB_PosClassSet ) ) never evaluated: ( (cpf2->PosClassSet) = _hb_alloc( (count)*sizeof(HB_PosClassSet), &error ), error != 0 ) | 0 |
| 3748 | goto Fail2; never executed: goto Fail2; | 0 |
| 3749 | | - |
| 3750 | pcs = cpf2->PosClassSet; never executed (the execution status of this line is deduced): pcs = cpf2->PosClassSet; | - |
| 3751 | | - |
| 3752 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 3753 | { | - |
| 3754 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 3755 | goto Fail1; never executed: goto Fail1; | 0 |
| 3756 | | - |
| 3757 | new_offset = GET_UShort() + base_offset; never executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 3758 | | - |
| 3759 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 3760 | | - |
| 3761 | if ( new_offset != base_offset ) /* not a NULL offset */ never evaluated: new_offset != base_offset | 0 |
| 3762 | { | - |
| 3763 | cur_offset = FILE_Pos(); never executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 3764 | if ( FILE_Seek( new_offset ) || never evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 ) | 0 |
| 3765 | ( error = Load_PosClassSet( cpf2, &pcs[n], never evaluated: ( error = Load_PosClassSet( cpf2, &pcs[n], stream ) ) != HB_Err_Ok | 0 |
| 3766 | stream ) ) != HB_Err_Ok ) never evaluated: ( error = Load_PosClassSet( cpf2, &pcs[n], stream ) ) != HB_Err_Ok | 0 |
| 3767 | goto Fail1; never executed: goto Fail1; | 0 |
| 3768 | (void)FILE_Seek( cur_offset ); never executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 3769 | } | 0 |
| 3770 | else | - |
| 3771 | { | - |
| 3772 | /* we create a PosClassSet table with no entries */ | - |
| 3773 | | - |
| 3774 | cpf2->PosClassSet[n].PosClassRuleCount = 0; never executed (the execution status of this line is deduced): cpf2->PosClassSet[n].PosClassRuleCount = 0; | - |
| 3775 | cpf2->PosClassSet[n].PosClassRule = NULL; never executed (the execution status of this line is deduced): cpf2->PosClassSet[n].PosClassRule = ((void *)0); | - |
| 3776 | } | 0 |
| 3777 | } | - |
| 3778 | | - |
| 3779 | return HB_Err_Ok; never executed: return HB_Err_Ok; | 0 |
| 3780 | | - |
| 3781 | Fail1: | - |
| 3782 | for ( m = 0; m < n; n++ ) | 0 |
| 3783 | Free_PosClassSet( &pcs[m] ); never executed: Free_PosClassSet( &pcs[m] ); | 0 |
| 3784 | | - |
| 3785 | FREE( pcs ); never executed: } never executed: } never evaluated: (pcs) never evaluated: 0 | 0 |
| 3786 | | - |
| 3787 | Fail2: code before this statement never executed: Fail2: | 0 |
| 3788 | _HB_OPEN_Free_ClassDefinition( &cpf2->ClassDef ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_ClassDefinition( &cpf2->ClassDef ); | - |
| 3789 | | - |
| 3790 | Fail3: code before this statement never executed: Fail3: | 0 |
| 3791 | _HB_OPEN_Free_Coverage( &cpf2->Coverage ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_Coverage( &cpf2->Coverage ); | - |
| 3792 | return error; never executed: return error; | 0 |
| 3793 | } | - |
| 3794 | | - |
| 3795 | | - |
| 3796 | static void Free_ContextPos2( HB_ContextPosFormat2* cpf2 ) | - |
| 3797 | { | - |
| 3798 | HB_UShort n, count; never executed (the execution status of this line is deduced): HB_UShort n, count; | - |
| 3799 | | - |
| 3800 | HB_PosClassSet* pcs; never executed (the execution status of this line is deduced): HB_PosClassSet* pcs; | - |
| 3801 | | - |
| 3802 | | - |
| 3803 | if ( cpf2->PosClassSet ) never evaluated: cpf2->PosClassSet | 0 |
| 3804 | { | - |
| 3805 | count = cpf2->PosClassSetCount; never executed (the execution status of this line is deduced): count = cpf2->PosClassSetCount; | - |
| 3806 | pcs = cpf2->PosClassSet; never executed (the execution status of this line is deduced): pcs = cpf2->PosClassSet; | - |
| 3807 | | - |
| 3808 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 3809 | Free_PosClassSet( &pcs[n] ); never executed: Free_PosClassSet( &pcs[n] ); | 0 |
| 3810 | | - |
| 3811 | FREE( pcs ); never executed: } never executed: } never evaluated: (pcs) never evaluated: 0 | 0 |
| 3812 | } | 0 |
| 3813 | | - |
| 3814 | _HB_OPEN_Free_ClassDefinition( &cpf2->ClassDef ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_ClassDefinition( &cpf2->ClassDef ); | - |
| 3815 | _HB_OPEN_Free_Coverage( &cpf2->Coverage ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_Coverage( &cpf2->Coverage ); | - |
| 3816 | } | 0 |
| 3817 | | - |
| 3818 | | - |
| 3819 | /* ContextPosFormat3 */ | - |
| 3820 | | - |
| 3821 | static HB_Error Load_ContextPos3( HB_ContextPosFormat3* cpf3, | - |
| 3822 | HB_Stream stream ) | - |
| 3823 | { | - |
| 3824 | HB_Error error; never executed (the execution status of this line is deduced): HB_Error error; | - |
| 3825 | | - |
| 3826 | HB_UShort n, count; never executed (the execution status of this line is deduced): HB_UShort n, count; | - |
| 3827 | HB_UInt cur_offset, new_offset, base_offset; never executed (the execution status of this line is deduced): HB_UInt cur_offset, new_offset, base_offset; | - |
| 3828 | | - |
| 3829 | HB_Coverage* c; never executed (the execution status of this line is deduced): HB_Coverage* c; | - |
| 3830 | HB_PosLookupRecord* plr; never executed (the execution status of this line is deduced): HB_PosLookupRecord* plr; | - |
| 3831 | | - |
| 3832 | | - |
| 3833 | base_offset = FILE_Pos() - 2L; never executed (the execution status of this line is deduced): base_offset = _hb_stream_pos( stream ) - 2L; | - |
| 3834 | | - |
| 3835 | if ( ACCESS_Frame( 4L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 4L ))) != 0 ) | 0 |
| 3836 | return error; never executed: return error; | 0 |
| 3837 | | - |
| 3838 | cpf3->GlyphCount = GET_UShort(); never executed (the execution status of this line is deduced): cpf3->GlyphCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 3839 | cpf3->PosCount = GET_UShort(); never executed (the execution status of this line is deduced): cpf3->PosCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 3840 | | - |
| 3841 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 3842 | | - |
| 3843 | cpf3->Coverage = NULL; never executed (the execution status of this line is deduced): cpf3->Coverage = ((void *)0); | - |
| 3844 | | - |
| 3845 | count = cpf3->GlyphCount; never executed (the execution status of this line is deduced): count = cpf3->GlyphCount; | - |
| 3846 | | - |
| 3847 | if ( ALLOC_ARRAY( cpf3->Coverage, count, HB_Coverage ) ) never evaluated: ( (cpf3->Coverage) = _hb_alloc( (count)*sizeof(HB_Coverage), &error ), error != 0 ) | 0 |
| 3848 | return error; never executed: return error; | 0 |
| 3849 | | - |
| 3850 | c = cpf3->Coverage; never executed (the execution status of this line is deduced): c = cpf3->Coverage; | - |
| 3851 | | - |
| 3852 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 3853 | { | - |
| 3854 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 3855 | goto Fail2; never executed: goto Fail2; | 0 |
| 3856 | | - |
| 3857 | new_offset = GET_UShort() + base_offset; never executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 3858 | | - |
| 3859 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 3860 | | - |
| 3861 | cur_offset = FILE_Pos(); never executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 3862 | if ( FILE_Seek( new_offset ) || never evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 ) | 0 |
| 3863 | ( error = _HB_OPEN_Load_Coverage( &c[n], stream ) ) != HB_Err_Ok ) never evaluated: ( error = _HB_OPEN_Load_Coverage( &c[n], stream ) ) != HB_Err_Ok | 0 |
| 3864 | goto Fail2; never executed: goto Fail2; | 0 |
| 3865 | (void)FILE_Seek( cur_offset ); never executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 3866 | } | 0 |
| 3867 | | - |
| 3868 | cpf3->PosLookupRecord = NULL; never executed (the execution status of this line is deduced): cpf3->PosLookupRecord = ((void *)0); | - |
| 3869 | | - |
| 3870 | count = cpf3->PosCount; never executed (the execution status of this line is deduced): count = cpf3->PosCount; | - |
| 3871 | | - |
| 3872 | if ( ALLOC_ARRAY( cpf3->PosLookupRecord, count, HB_PosLookupRecord ) ) never evaluated: ( (cpf3->PosLookupRecord) = _hb_alloc( (count)*sizeof(HB_PosLookupRecord), &error ), error != 0 ) | 0 |
| 3873 | goto Fail2; never executed: goto Fail2; | 0 |
| 3874 | | - |
| 3875 | plr = cpf3->PosLookupRecord; never executed (the execution status of this line is deduced): plr = cpf3->PosLookupRecord; | - |
| 3876 | | - |
| 3877 | if ( ACCESS_Frame( count * 4L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, count * 4L ))) != 0 ) | 0 |
| 3878 | goto Fail1; never executed: goto Fail1; | 0 |
| 3879 | | - |
| 3880 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 3881 | { | - |
| 3882 | plr[n].SequenceIndex = GET_UShort(); never executed (the execution status of this line is deduced): plr[n].SequenceIndex = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 3883 | plr[n].LookupListIndex = GET_UShort(); never executed (the execution status of this line is deduced): plr[n].LookupListIndex = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 3884 | } | 0 |
| 3885 | | - |
| 3886 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 3887 | | - |
| 3888 | return HB_Err_Ok; never executed: return HB_Err_Ok; | 0 |
| 3889 | | - |
| 3890 | Fail1: | - |
| 3891 | FREE( plr ); never executed: } never executed: } never evaluated: (plr) never evaluated: 0 | 0 |
| 3892 | | - |
| 3893 | Fail2: code before this statement never executed: Fail2: | 0 |
| 3894 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 3895 | _HB_OPEN_Free_Coverage( &c[n] ); never executed: _HB_OPEN_Free_Coverage( &c[n] ); | 0 |
| 3896 | | - |
| 3897 | FREE( c ); never executed: } never executed: } never evaluated: (c) never evaluated: 0 | 0 |
| 3898 | return error; never executed: return error; | 0 |
| 3899 | } | - |
| 3900 | | - |
| 3901 | | - |
| 3902 | static void Free_ContextPos3( HB_ContextPosFormat3* cpf3 ) | - |
| 3903 | { | - |
| 3904 | HB_UShort n, count; never executed (the execution status of this line is deduced): HB_UShort n, count; | - |
| 3905 | | - |
| 3906 | HB_Coverage* c; never executed (the execution status of this line is deduced): HB_Coverage* c; | - |
| 3907 | | - |
| 3908 | | - |
| 3909 | FREE( cpf3->PosLookupRecord ); never executed: } never executed: } never evaluated: (cpf3->PosLookupRecord) never evaluated: 0 | 0 |
| 3910 | | - |
| 3911 | if ( cpf3->Coverage ) never evaluated: cpf3->Coverage | 0 |
| 3912 | { | - |
| 3913 | count = cpf3->GlyphCount; never executed (the execution status of this line is deduced): count = cpf3->GlyphCount; | - |
| 3914 | c = cpf3->Coverage; never executed (the execution status of this line is deduced): c = cpf3->Coverage; | - |
| 3915 | | - |
| 3916 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 3917 | _HB_OPEN_Free_Coverage( &c[n] ); never executed: _HB_OPEN_Free_Coverage( &c[n] ); | 0 |
| 3918 | | - |
| 3919 | FREE( c ); never executed: } never executed: } never evaluated: (c) never evaluated: 0 | 0 |
| 3920 | } | 0 |
| 3921 | } | 0 |
| 3922 | | - |
| 3923 | | - |
| 3924 | /* ContextPos */ | - |
| 3925 | | - |
| 3926 | static HB_Error Load_ContextPos( HB_GPOS_SubTable* st, | - |
| 3927 | HB_Stream stream ) | - |
| 3928 | { | - |
| 3929 | HB_Error error; never executed (the execution status of this line is deduced): HB_Error error; | - |
| 3930 | HB_ContextPos* cp = &st->context; never executed (the execution status of this line is deduced): HB_ContextPos* cp = &st->context; | - |
| 3931 | | - |
| 3932 | | - |
| 3933 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 3934 | return error; never executed: return error; | 0 |
| 3935 | | - |
| 3936 | cp->PosFormat = GET_UShort(); never executed (the execution status of this line is deduced): cp->PosFormat = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 3937 | | - |
| 3938 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 3939 | | - |
| 3940 | switch ( cp->PosFormat ) | - |
| 3941 | { | - |
| 3942 | case 1: | - |
| 3943 | return Load_ContextPos1( &cp->cpf.cpf1, stream ); never executed: return Load_ContextPos1( &cp->cpf.cpf1, stream ); | 0 |
| 3944 | | - |
| 3945 | case 2: | - |
| 3946 | return Load_ContextPos2( &cp->cpf.cpf2, stream ); never executed: return Load_ContextPos2( &cp->cpf.cpf2, stream ); | 0 |
| 3947 | | - |
| 3948 | case 3: | - |
| 3949 | return Load_ContextPos3( &cp->cpf.cpf3, stream ); never executed: return Load_ContextPos3( &cp->cpf.cpf3, stream ); | 0 |
| 3950 | | - |
| 3951 | default: | - |
| 3952 | return ERR(HB_Err_Invalid_SubTable_Format); never executed: return _hb_err (HB_Err_Invalid_SubTable_Format); | 0 |
| 3953 | } | - |
| 3954 | | - |
| 3955 | return HB_Err_Ok; /* never reached */ never executed: return HB_Err_Ok; | 0 |
| 3956 | } | - |
| 3957 | | - |
| 3958 | | - |
| 3959 | static void Free_ContextPos( HB_GPOS_SubTable* st ) | - |
| 3960 | { | - |
| 3961 | HB_ContextPos* cp = &st->context; never executed (the execution status of this line is deduced): HB_ContextPos* cp = &st->context; | - |
| 3962 | | - |
| 3963 | switch ( cp->PosFormat ) | - |
| 3964 | { | - |
| 3965 | case 1: Free_ContextPos1( &cp->cpf.cpf1 ); break; | 0 |
| 3966 | case 2: Free_ContextPos2( &cp->cpf.cpf2 ); break; | 0 |
| 3967 | case 3: Free_ContextPos3( &cp->cpf.cpf3 ); break; | 0 |
| 3968 | default: break; | 0 |
| 3969 | } | - |
| 3970 | } | 0 |
| 3971 | | - |
| 3972 | | - |
| 3973 | static HB_Error Lookup_ContextPos1( GPOS_Instance* gpi, | - |
| 3974 | HB_ContextPosFormat1* cpf1, | - |
| 3975 | HB_Buffer buffer, | - |
| 3976 | HB_UShort flags, | - |
| 3977 | HB_UShort context_length, | - |
| 3978 | int nesting_level ) | - |
| 3979 | { | - |
| 3980 | HB_UShort index, property; never executed (the execution status of this line is deduced): HB_UShort index, property; | - |
| 3981 | HB_UShort i, j, k, numpr; never executed (the execution status of this line is deduced): HB_UShort i, j, k, numpr; | - |
| 3982 | HB_Error error; never executed (the execution status of this line is deduced): HB_Error error; | - |
| 3983 | HB_GPOSHeader* gpos = gpi->gpos; never executed (the execution status of this line is deduced): HB_GPOSHeader* gpos = gpi->gpos; | - |
| 3984 | | - |
| 3985 | HB_PosRule* pr; never executed (the execution status of this line is deduced): HB_PosRule* pr; | - |
| 3986 | HB_GDEFHeader* gdef; never executed (the execution status of this line is deduced): HB_GDEFHeader* gdef; | - |
| 3987 | | - |
| 3988 | | - |
| 3989 | gdef = gpos->gdef; never executed (the execution status of this line is deduced): gdef = gpos->gdef; | - |
| 3990 | | - |
| 3991 | if ( CHECK_Property( gdef, IN_CURITEM(), flags, &property ) ) never evaluated: ( ( error = _HB_GDEF_Check_Property( (gdef), ((&buffer->in_string[buffer->in_pos])), (flags), (&property) ) ) != HB_Err_Ok ) | 0 |
| 3992 | return error; never executed: return error; | 0 |
| 3993 | | - |
| 3994 | error = _HB_OPEN_Coverage_Index( &cpf1->Coverage, IN_CURGLYPH(), &index ); never executed (the execution status of this line is deduced): error = _HB_OPEN_Coverage_Index( &cpf1->Coverage, (buffer->in_string[buffer->in_pos].gindex), &index ); | - |
| 3995 | if ( error ) | 0 |
| 3996 | return error; never executed: return error; | 0 |
| 3997 | | - |
| 3998 | pr = cpf1->PosRuleSet[index].PosRule; never executed (the execution status of this line is deduced): pr = cpf1->PosRuleSet[index].PosRule; | - |
| 3999 | numpr = cpf1->PosRuleSet[index].PosRuleCount; never executed (the execution status of this line is deduced): numpr = cpf1->PosRuleSet[index].PosRuleCount; | - |
| 4000 | | - |
| 4001 | for ( k = 0; k < numpr; k++ ) never evaluated: k < numpr | 0 |
| 4002 | { | - |
| 4003 | if ( context_length != 0xFFFF && context_length < pr[k].GlyphCount ) never evaluated: context_length != 0xFFFF never evaluated: context_length < pr[k].GlyphCount | 0 |
| 4004 | goto next_posrule; never executed: goto next_posrule; | 0 |
| 4005 | | - |
| 4006 | if ( buffer->in_pos + pr[k].GlyphCount > buffer->in_length ) never evaluated: buffer->in_pos + pr[k].GlyphCount > buffer->in_length | 0 |
| 4007 | goto next_posrule; /* context is too long */ never executed: goto next_posrule; | 0 |
| 4008 | | - |
| 4009 | for ( i = 1, j = buffer->in_pos + 1; i < pr[k].GlyphCount; i++, j++ ) never evaluated: i < pr[k].GlyphCount | 0 |
| 4010 | { | - |
| 4011 | while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) ) never evaluated: ( ( error = _HB_GDEF_Check_Property( (gdef), ((&buffer->in_string[(j)])), (flags), (&property) ) ) != HB_Err_Ok ) | 0 |
| 4012 | { | - |
| 4013 | if ( error && error != HB_Err_Not_Covered ) never evaluated: error never evaluated: error != HB_Err_Not_Covered | 0 |
| 4014 | return error; never executed: return error; | 0 |
| 4015 | | - |
| 4016 | if ( j + pr[k].GlyphCount - i == (HB_Int)buffer->in_length ) never evaluated: j + pr[k].GlyphCount - i == (HB_Int)buffer->in_length | 0 |
| 4017 | goto next_posrule; never executed: goto next_posrule; | 0 |
| 4018 | j++; never executed (the execution status of this line is deduced): j++; | - |
| 4019 | } | 0 |
| 4020 | | - |
| 4021 | if ( IN_GLYPH( j ) != pr[k].Input[i - 1] ) never evaluated: (buffer->in_string[(j)].gindex) != pr[k].Input[i - 1] | 0 |
| 4022 | goto next_posrule; never executed: goto next_posrule; | 0 |
| 4023 | } | 0 |
| 4024 | | - |
| 4025 | return Do_ContextPos( gpi, pr[k].GlyphCount, never executed: return Do_ContextPos( gpi, pr[k].GlyphCount, pr[k].PosCount, pr[k].PosLookupRecord, buffer, nesting_level ); | 0 |
| 4026 | pr[k].PosCount, pr[k].PosLookupRecord, never executed: return Do_ContextPos( gpi, pr[k].GlyphCount, pr[k].PosCount, pr[k].PosLookupRecord, buffer, nesting_level ); | 0 |
| 4027 | buffer, never executed: return Do_ContextPos( gpi, pr[k].GlyphCount, pr[k].PosCount, pr[k].PosLookupRecord, buffer, nesting_level ); | 0 |
| 4028 | nesting_level ); never executed: return Do_ContextPos( gpi, pr[k].GlyphCount, pr[k].PosCount, pr[k].PosLookupRecord, buffer, nesting_level ); | 0 |
| 4029 | | - |
| 4030 | next_posrule: | - |
| 4031 | ; | - |
| 4032 | } | 0 |
| 4033 | | - |
| 4034 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 4035 | } | - |
| 4036 | | - |
| 4037 | | - |
| 4038 | static HB_Error Lookup_ContextPos2( GPOS_Instance* gpi, | - |
| 4039 | HB_ContextPosFormat2* cpf2, | - |
| 4040 | HB_Buffer buffer, | - |
| 4041 | HB_UShort flags, | - |
| 4042 | HB_UShort context_length, | - |
| 4043 | int nesting_level ) | - |
| 4044 | { | - |
| 4045 | HB_UShort index, property; never executed (the execution status of this line is deduced): HB_UShort index, property; | - |
| 4046 | HB_Error error; never executed (the execution status of this line is deduced): HB_Error error; | - |
| 4047 | HB_UShort i, j, k, known_classes; never executed (the execution status of this line is deduced): HB_UShort i, j, k, known_classes; | - |
| 4048 | | - |
| 4049 | HB_UShort* classes; never executed (the execution status of this line is deduced): HB_UShort* classes; | - |
| 4050 | HB_UShort* cl; never executed (the execution status of this line is deduced): HB_UShort* cl; | - |
| 4051 | HB_GPOSHeader* gpos = gpi->gpos; never executed (the execution status of this line is deduced): HB_GPOSHeader* gpos = gpi->gpos; | - |
| 4052 | | - |
| 4053 | HB_PosClassSet* pcs; never executed (the execution status of this line is deduced): HB_PosClassSet* pcs; | - |
| 4054 | HB_PosClassRule* pr; never executed (the execution status of this line is deduced): HB_PosClassRule* pr; | - |
| 4055 | HB_GDEFHeader* gdef; never executed (the execution status of this line is deduced): HB_GDEFHeader* gdef; | - |
| 4056 | | - |
| 4057 | | - |
| 4058 | gdef = gpos->gdef; never executed (the execution status of this line is deduced): gdef = gpos->gdef; | - |
| 4059 | | - |
| 4060 | if ( CHECK_Property( gdef, IN_CURITEM(), flags, &property ) ) never evaluated: ( ( error = _HB_GDEF_Check_Property( (gdef), ((&buffer->in_string[buffer->in_pos])), (flags), (&property) ) ) != HB_Err_Ok ) | 0 |
| 4061 | return error; never executed: return error; | 0 |
| 4062 | | - |
| 4063 | /* Note: The coverage table in format 2 doesn't give an index into | - |
| 4064 | anything. It just lets us know whether or not we need to | - |
| 4065 | do any lookup at all. */ | - |
| 4066 | | - |
| 4067 | error = _HB_OPEN_Coverage_Index( &cpf2->Coverage, IN_CURGLYPH(), &index ); never executed (the execution status of this line is deduced): error = _HB_OPEN_Coverage_Index( &cpf2->Coverage, (buffer->in_string[buffer->in_pos].gindex), &index ); | - |
| 4068 | if ( error ) | 0 |
| 4069 | return error; never executed: return error; | 0 |
| 4070 | | - |
| 4071 | if (cpf2->MaxContextLength < 1) never evaluated: cpf2->MaxContextLength < 1 | 0 |
| 4072 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 4073 | | - |
| 4074 | if ( ALLOC_ARRAY( classes, cpf2->MaxContextLength, HB_UShort ) ) never evaluated: ( (classes) = _hb_alloc( (cpf2->MaxContextLength)*sizeof(HB_UShort), &error ), error != 0 ) | 0 |
| 4075 | return error; never executed: return error; | 0 |
| 4076 | | - |
| 4077 | error = _HB_OPEN_Get_Class( &cpf2->ClassDef, IN_CURGLYPH(), never executed (the execution status of this line is deduced): error = _HB_OPEN_Get_Class( &cpf2->ClassDef, (buffer->in_string[buffer->in_pos].gindex), | - |
| 4078 | &classes[0], NULL ); never executed (the execution status of this line is deduced): &classes[0], ((void *)0) ); | - |
| 4079 | if ( error && error != HB_Err_Not_Covered ) never evaluated: error never evaluated: error != HB_Err_Not_Covered | 0 |
| 4080 | goto End; never executed: goto End; | 0 |
| 4081 | known_classes = 0; never executed (the execution status of this line is deduced): known_classes = 0; | - |
| 4082 | | - |
| 4083 | pcs = &cpf2->PosClassSet[classes[0]]; never executed (the execution status of this line is deduced): pcs = &cpf2->PosClassSet[classes[0]]; | - |
| 4084 | if ( !pcs ) | 0 |
| 4085 | { | - |
| 4086 | error = ERR(HB_Err_Invalid_SubTable); never executed (the execution status of this line is deduced): error = _hb_err (HB_Err_Invalid_SubTable); | - |
| 4087 | goto End; never executed: goto End; | 0 |
| 4088 | } | - |
| 4089 | | - |
| 4090 | for ( k = 0; k < pcs->PosClassRuleCount; k++ ) never evaluated: k < pcs->PosClassRuleCount | 0 |
| 4091 | { | - |
| 4092 | pr = &pcs->PosClassRule[k]; never executed (the execution status of this line is deduced): pr = &pcs->PosClassRule[k]; | - |
| 4093 | | - |
| 4094 | if ( context_length != 0xFFFF && context_length < pr->GlyphCount ) never evaluated: context_length != 0xFFFF never evaluated: context_length < pr->GlyphCount | 0 |
| 4095 | goto next_posclassrule; never executed: goto next_posclassrule; | 0 |
| 4096 | | - |
| 4097 | if ( buffer->in_pos + pr->GlyphCount > buffer->in_length ) never evaluated: buffer->in_pos + pr->GlyphCount > buffer->in_length | 0 |
| 4098 | goto next_posclassrule; /* context is too long */ never executed: goto next_posclassrule; | 0 |
| 4099 | | - |
| 4100 | cl = pr->Class; never executed (the execution status of this line is deduced): cl = pr->Class; | - |
| 4101 | | - |
| 4102 | /* Start at 1 because [0] is implied */ | - |
| 4103 | | - |
| 4104 | for ( i = 1, j = buffer->in_pos + 1; i < pr->GlyphCount; i++, j++ ) never evaluated: i < pr->GlyphCount | 0 |
| 4105 | { | - |
| 4106 | while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) ) never evaluated: ( ( error = _HB_GDEF_Check_Property( (gdef), ((&buffer->in_string[(j)])), (flags), (&property) ) ) != HB_Err_Ok ) | 0 |
| 4107 | { | - |
| 4108 | if ( error && error != HB_Err_Not_Covered ) never evaluated: error never evaluated: error != HB_Err_Not_Covered | 0 |
| 4109 | goto End; never executed: goto End; | 0 |
| 4110 | | - |
| 4111 | if ( j + pr->GlyphCount - i == (HB_Int)buffer->in_length ) never evaluated: j + pr->GlyphCount - i == (HB_Int)buffer->in_length | 0 |
| 4112 | goto next_posclassrule; never executed: goto next_posclassrule; | 0 |
| 4113 | j++; never executed (the execution status of this line is deduced): j++; | - |
| 4114 | } | 0 |
| 4115 | | - |
| 4116 | if ( i > known_classes ) never evaluated: i > known_classes | 0 |
| 4117 | { | - |
| 4118 | /* Keeps us from having to do this for each rule */ | - |
| 4119 | | - |
| 4120 | error = _HB_OPEN_Get_Class( &cpf2->ClassDef, IN_GLYPH( j ), &classes[i], NULL ); never executed (the execution status of this line is deduced): error = _HB_OPEN_Get_Class( &cpf2->ClassDef, (buffer->in_string[(j)].gindex), &classes[i], ((void *)0) ); | - |
| 4121 | if ( error && error != HB_Err_Not_Covered ) never evaluated: error never evaluated: error != HB_Err_Not_Covered | 0 |
| 4122 | goto End; never executed: goto End; | 0 |
| 4123 | known_classes = i; never executed (the execution status of this line is deduced): known_classes = i; | - |
| 4124 | } | 0 |
| 4125 | | - |
| 4126 | if ( cl[i - 1] != classes[i] ) never evaluated: cl[i - 1] != classes[i] | 0 |
| 4127 | goto next_posclassrule; never executed: goto next_posclassrule; | 0 |
| 4128 | } | 0 |
| 4129 | | - |
| 4130 | error = Do_ContextPos( gpi, pr->GlyphCount, never executed (the execution status of this line is deduced): error = Do_ContextPos( gpi, pr->GlyphCount, | - |
| 4131 | pr->PosCount, pr->PosLookupRecord, never executed (the execution status of this line is deduced): pr->PosCount, pr->PosLookupRecord, | - |
| 4132 | buffer, never executed (the execution status of this line is deduced): buffer, | - |
| 4133 | nesting_level ); never executed (the execution status of this line is deduced): nesting_level ); | - |
| 4134 | goto End; never executed: goto End; | 0 |
| 4135 | | - |
| 4136 | next_posclassrule: | - |
| 4137 | ; | - |
| 4138 | } | 0 |
| 4139 | | - |
| 4140 | error = HB_Err_Not_Covered; never executed (the execution status of this line is deduced): error = HB_Err_Not_Covered; | - |
| 4141 | | - |
| 4142 | End: code before this statement never executed: End: | 0 |
| 4143 | FREE( classes ); never executed: } never executed: } never evaluated: (classes) never evaluated: 0 | 0 |
| 4144 | return error; never executed: return error; | 0 |
| 4145 | } | - |
| 4146 | | - |
| 4147 | | - |
| 4148 | static HB_Error Lookup_ContextPos3( GPOS_Instance* gpi, | - |
| 4149 | HB_ContextPosFormat3* cpf3, | - |
| 4150 | HB_Buffer buffer, | - |
| 4151 | HB_UShort flags, | - |
| 4152 | HB_UShort context_length, | - |
| 4153 | int nesting_level ) | - |
| 4154 | { | - |
| 4155 | HB_Error error; never executed (the execution status of this line is deduced): HB_Error error; | - |
| 4156 | HB_UShort index, i, j, property; never executed (the execution status of this line is deduced): HB_UShort index, i, j, property; | - |
| 4157 | HB_GPOSHeader* gpos = gpi->gpos; never executed (the execution status of this line is deduced): HB_GPOSHeader* gpos = gpi->gpos; | - |
| 4158 | | - |
| 4159 | HB_Coverage* c; never executed (the execution status of this line is deduced): HB_Coverage* c; | - |
| 4160 | HB_GDEFHeader* gdef; never executed (the execution status of this line is deduced): HB_GDEFHeader* gdef; | - |
| 4161 | | - |
| 4162 | | - |
| 4163 | gdef = gpos->gdef; never executed (the execution status of this line is deduced): gdef = gpos->gdef; | - |
| 4164 | | - |
| 4165 | if ( CHECK_Property( gdef, IN_CURITEM(), flags, &property ) ) never evaluated: ( ( error = _HB_GDEF_Check_Property( (gdef), ((&buffer->in_string[buffer->in_pos])), (flags), (&property) ) ) != HB_Err_Ok ) | 0 |
| 4166 | return error; never executed: return error; | 0 |
| 4167 | | - |
| 4168 | if ( context_length != 0xFFFF && context_length < cpf3->GlyphCount ) never evaluated: context_length != 0xFFFF never evaluated: context_length < cpf3->GlyphCount | 0 |
| 4169 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 4170 | | - |
| 4171 | if ( buffer->in_pos + cpf3->GlyphCount > buffer->in_length ) never evaluated: buffer->in_pos + cpf3->GlyphCount > buffer->in_length | 0 |
| 4172 | return HB_Err_Not_Covered; /* context is too long */ never executed: return HB_Err_Not_Covered; | 0 |
| 4173 | | - |
| 4174 | c = cpf3->Coverage; never executed (the execution status of this line is deduced): c = cpf3->Coverage; | - |
| 4175 | | - |
| 4176 | for ( i = 1, j = 1; i < cpf3->GlyphCount; i++, j++ ) never evaluated: i < cpf3->GlyphCount | 0 |
| 4177 | { | - |
| 4178 | while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) ) never evaluated: ( ( error = _HB_GDEF_Check_Property( (gdef), ((&buffer->in_string[(j)])), (flags), (&property) ) ) != HB_Err_Ok ) | 0 |
| 4179 | { | - |
| 4180 | if ( error && error != HB_Err_Not_Covered ) never evaluated: error never evaluated: error != HB_Err_Not_Covered | 0 |
| 4181 | return error; never executed: return error; | 0 |
| 4182 | | - |
| 4183 | if ( j + cpf3->GlyphCount - i == (HB_Int)buffer->in_length ) never evaluated: j + cpf3->GlyphCount - i == (HB_Int)buffer->in_length | 0 |
| 4184 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 4185 | j++; never executed (the execution status of this line is deduced): j++; | - |
| 4186 | } | 0 |
| 4187 | | - |
| 4188 | error = _HB_OPEN_Coverage_Index( &c[i], IN_GLYPH( j ), &index ); never executed (the execution status of this line is deduced): error = _HB_OPEN_Coverage_Index( &c[i], (buffer->in_string[(j)].gindex), &index ); | - |
| 4189 | if ( error ) | 0 |
| 4190 | return error; never executed: return error; | 0 |
| 4191 | } | 0 |
| 4192 | | - |
| 4193 | return Do_ContextPos( gpi, cpf3->GlyphCount, never executed: return Do_ContextPos( gpi, cpf3->GlyphCount, cpf3->PosCount, cpf3->PosLookupRecord, buffer, nesting_level ); | 0 |
| 4194 | cpf3->PosCount, cpf3->PosLookupRecord, never executed: return Do_ContextPos( gpi, cpf3->GlyphCount, cpf3->PosCount, cpf3->PosLookupRecord, buffer, nesting_level ); | 0 |
| 4195 | buffer, never executed: return Do_ContextPos( gpi, cpf3->GlyphCount, cpf3->PosCount, cpf3->PosLookupRecord, buffer, nesting_level ); | 0 |
| 4196 | nesting_level ); never executed: return Do_ContextPos( gpi, cpf3->GlyphCount, cpf3->PosCount, cpf3->PosLookupRecord, buffer, nesting_level ); | 0 |
| 4197 | } | - |
| 4198 | | - |
| 4199 | | - |
| 4200 | static HB_Error Lookup_ContextPos( GPOS_Instance* gpi, | - |
| 4201 | HB_GPOS_SubTable* st, | - |
| 4202 | HB_Buffer buffer, | - |
| 4203 | HB_UShort flags, | - |
| 4204 | HB_UShort context_length, | - |
| 4205 | int nesting_level ) | - |
| 4206 | { | - |
| 4207 | HB_ContextPos* cp = &st->context; never executed (the execution status of this line is deduced): HB_ContextPos* cp = &st->context; | - |
| 4208 | | - |
| 4209 | switch ( cp->PosFormat ) | - |
| 4210 | { | - |
| 4211 | case 1: | - |
| 4212 | return Lookup_ContextPos1( gpi, &cp->cpf.cpf1, buffer, never executed: return Lookup_ContextPos1( gpi, &cp->cpf.cpf1, buffer, flags, context_length, nesting_level ); | 0 |
| 4213 | flags, context_length, nesting_level ); never executed: return Lookup_ContextPos1( gpi, &cp->cpf.cpf1, buffer, flags, context_length, nesting_level ); | 0 |
| 4214 | | - |
| 4215 | case 2: | - |
| 4216 | return Lookup_ContextPos2( gpi, &cp->cpf.cpf2, buffer, never executed: return Lookup_ContextPos2( gpi, &cp->cpf.cpf2, buffer, flags, context_length, nesting_level ); | 0 |
| 4217 | flags, context_length, nesting_level ); never executed: return Lookup_ContextPos2( gpi, &cp->cpf.cpf2, buffer, flags, context_length, nesting_level ); | 0 |
| 4218 | | - |
| 4219 | case 3: | - |
| 4220 | return Lookup_ContextPos3( gpi, &cp->cpf.cpf3, buffer, never executed: return Lookup_ContextPos3( gpi, &cp->cpf.cpf3, buffer, flags, context_length, nesting_level ); | 0 |
| 4221 | flags, context_length, nesting_level ); never executed: return Lookup_ContextPos3( gpi, &cp->cpf.cpf3, buffer, flags, context_length, nesting_level ); | 0 |
| 4222 | | - |
| 4223 | default: | - |
| 4224 | return ERR(HB_Err_Invalid_SubTable_Format); never executed: return _hb_err (HB_Err_Invalid_SubTable_Format); | 0 |
| 4225 | } | - |
| 4226 | | - |
| 4227 | return HB_Err_Ok; /* never reached */ never executed: return HB_Err_Ok; | 0 |
| 4228 | } | - |
| 4229 | | - |
| 4230 | | - |
| 4231 | /* LookupType 8 */ | - |
| 4232 | | - |
| 4233 | /* ChainPosRule */ | - |
| 4234 | | - |
| 4235 | static HB_Error Load_ChainPosRule( HB_ChainPosRule* cpr, | - |
| 4236 | HB_Stream stream ) | - |
| 4237 | { | - |
| 4238 | HB_Error error; never executed (the execution status of this line is deduced): HB_Error error; | - |
| 4239 | | - |
| 4240 | HB_UShort n, count; never executed (the execution status of this line is deduced): HB_UShort n, count; | - |
| 4241 | HB_UShort* b; never executed (the execution status of this line is deduced): HB_UShort* b; | - |
| 4242 | HB_UShort* i; never executed (the execution status of this line is deduced): HB_UShort* i; | - |
| 4243 | HB_UShort* l; never executed (the execution status of this line is deduced): HB_UShort* l; | - |
| 4244 | | - |
| 4245 | HB_PosLookupRecord* plr; never executed (the execution status of this line is deduced): HB_PosLookupRecord* plr; | - |
| 4246 | | - |
| 4247 | | - |
| 4248 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 4249 | return error; never executed: return error; | 0 |
| 4250 | | - |
| 4251 | cpr->BacktrackGlyphCount = GET_UShort(); never executed (the execution status of this line is deduced): cpr->BacktrackGlyphCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 4252 | | - |
| 4253 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4254 | | - |
| 4255 | cpr->Backtrack = NULL; never executed (the execution status of this line is deduced): cpr->Backtrack = ((void *)0); | - |
| 4256 | | - |
| 4257 | count = cpr->BacktrackGlyphCount; never executed (the execution status of this line is deduced): count = cpr->BacktrackGlyphCount; | - |
| 4258 | | - |
| 4259 | if ( ALLOC_ARRAY( cpr->Backtrack, count, HB_UShort ) ) never evaluated: ( (cpr->Backtrack) = _hb_alloc( (count)*sizeof(HB_UShort), &error ), error != 0 ) | 0 |
| 4260 | return error; never executed: return error; | 0 |
| 4261 | | - |
| 4262 | b = cpr->Backtrack; never executed (the execution status of this line is deduced): b = cpr->Backtrack; | - |
| 4263 | | - |
| 4264 | if ( ACCESS_Frame( count * 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, count * 2L ))) != 0 ) | 0 |
| 4265 | goto Fail4; never executed: goto Fail4; | 0 |
| 4266 | | - |
| 4267 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 4268 | b[n] = GET_UShort(); never executed: b[n] = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | 0 |
| 4269 | | - |
| 4270 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4271 | | - |
| 4272 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 4273 | goto Fail4; never executed: goto Fail4; | 0 |
| 4274 | | - |
| 4275 | cpr->InputGlyphCount = GET_UShort(); never executed (the execution status of this line is deduced): cpr->InputGlyphCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 4276 | | - |
| 4277 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4278 | | - |
| 4279 | cpr->Input = NULL; never executed (the execution status of this line is deduced): cpr->Input = ((void *)0); | - |
| 4280 | | - |
| 4281 | count = cpr->InputGlyphCount - 1; /* only InputGlyphCount - 1 elements */ never executed (the execution status of this line is deduced): count = cpr->InputGlyphCount - 1; | - |
| 4282 | | - |
| 4283 | if ( ALLOC_ARRAY( cpr->Input, count, HB_UShort ) ) never evaluated: ( (cpr->Input) = _hb_alloc( (count)*sizeof(HB_UShort), &error ), error != 0 ) | 0 |
| 4284 | goto Fail4; never executed: goto Fail4; | 0 |
| 4285 | | - |
| 4286 | i = cpr->Input; never executed (the execution status of this line is deduced): i = cpr->Input; | - |
| 4287 | | - |
| 4288 | if ( ACCESS_Frame( count * 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, count * 2L ))) != 0 ) | 0 |
| 4289 | goto Fail3; never executed: goto Fail3; | 0 |
| 4290 | | - |
| 4291 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 4292 | i[n] = GET_UShort(); never executed: i[n] = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | 0 |
| 4293 | | - |
| 4294 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4295 | | - |
| 4296 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 4297 | goto Fail3; never executed: goto Fail3; | 0 |
| 4298 | | - |
| 4299 | cpr->LookaheadGlyphCount = GET_UShort(); never executed (the execution status of this line is deduced): cpr->LookaheadGlyphCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 4300 | | - |
| 4301 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4302 | | - |
| 4303 | cpr->Lookahead = NULL; never executed (the execution status of this line is deduced): cpr->Lookahead = ((void *)0); | - |
| 4304 | | - |
| 4305 | count = cpr->LookaheadGlyphCount; never executed (the execution status of this line is deduced): count = cpr->LookaheadGlyphCount; | - |
| 4306 | | - |
| 4307 | if ( ALLOC_ARRAY( cpr->Lookahead, count, HB_UShort ) ) never evaluated: ( (cpr->Lookahead) = _hb_alloc( (count)*sizeof(HB_UShort), &error ), error != 0 ) | 0 |
| 4308 | goto Fail3; never executed: goto Fail3; | 0 |
| 4309 | | - |
| 4310 | l = cpr->Lookahead; never executed (the execution status of this line is deduced): l = cpr->Lookahead; | - |
| 4311 | | - |
| 4312 | if ( ACCESS_Frame( count * 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, count * 2L ))) != 0 ) | 0 |
| 4313 | goto Fail2; never executed: goto Fail2; | 0 |
| 4314 | | - |
| 4315 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 4316 | l[n] = GET_UShort(); never executed: l[n] = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | 0 |
| 4317 | | - |
| 4318 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4319 | | - |
| 4320 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 4321 | goto Fail2; never executed: goto Fail2; | 0 |
| 4322 | | - |
| 4323 | cpr->PosCount = GET_UShort(); never executed (the execution status of this line is deduced): cpr->PosCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 4324 | | - |
| 4325 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4326 | | - |
| 4327 | cpr->PosLookupRecord = NULL; never executed (the execution status of this line is deduced): cpr->PosLookupRecord = ((void *)0); | - |
| 4328 | | - |
| 4329 | count = cpr->PosCount; never executed (the execution status of this line is deduced): count = cpr->PosCount; | - |
| 4330 | | - |
| 4331 | if ( ALLOC_ARRAY( cpr->PosLookupRecord, count, HB_PosLookupRecord ) ) never evaluated: ( (cpr->PosLookupRecord) = _hb_alloc( (count)*sizeof(HB_PosLookupRecord), &error ), error != 0 ) | 0 |
| 4332 | goto Fail2; never executed: goto Fail2; | 0 |
| 4333 | | - |
| 4334 | plr = cpr->PosLookupRecord; never executed (the execution status of this line is deduced): plr = cpr->PosLookupRecord; | - |
| 4335 | | - |
| 4336 | if ( ACCESS_Frame( count * 4L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, count * 4L ))) != 0 ) | 0 |
| 4337 | goto Fail1; never executed: goto Fail1; | 0 |
| 4338 | | - |
| 4339 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 4340 | { | - |
| 4341 | plr[n].SequenceIndex = GET_UShort(); never executed (the execution status of this line is deduced): plr[n].SequenceIndex = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 4342 | plr[n].LookupListIndex = GET_UShort(); never executed (the execution status of this line is deduced): plr[n].LookupListIndex = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 4343 | } | 0 |
| 4344 | | - |
| 4345 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4346 | | - |
| 4347 | return HB_Err_Ok; never executed: return HB_Err_Ok; | 0 |
| 4348 | | - |
| 4349 | Fail1: | - |
| 4350 | FREE( plr ); never executed: } never executed: } never evaluated: (plr) never evaluated: 0 | 0 |
| 4351 | | - |
| 4352 | Fail2: code before this statement never executed: Fail2: | 0 |
| 4353 | FREE( l ); never executed: } never executed: } never evaluated: (l) never evaluated: 0 | 0 |
| 4354 | | - |
| 4355 | Fail3: code before this statement never executed: Fail3: | 0 |
| 4356 | FREE( i ); never executed: } never executed: } never evaluated: (i) never evaluated: 0 | 0 |
| 4357 | | - |
| 4358 | Fail4: code before this statement never executed: Fail4: | 0 |
| 4359 | FREE( b ); never executed: } never executed: } never evaluated: (b) never evaluated: 0 | 0 |
| 4360 | return error; never executed: return error; | 0 |
| 4361 | } | - |
| 4362 | | - |
| 4363 | | - |
| 4364 | static void Free_ChainPosRule( HB_ChainPosRule* cpr ) | - |
| 4365 | { | - |
| 4366 | FREE( cpr->PosLookupRecord ); never executed: } never executed: } never evaluated: (cpr->PosLookupRecord) never evaluated: 0 | 0 |
| 4367 | FREE( cpr->Lookahead ); never executed: } never executed: } never evaluated: (cpr->Lookahead) never evaluated: 0 | 0 |
| 4368 | FREE( cpr->Input ); never executed: } never executed: } never evaluated: (cpr->Input) never evaluated: 0 | 0 |
| 4369 | FREE( cpr->Backtrack ); never executed: } never executed: } never evaluated: (cpr->Backtrack) never evaluated: 0 | 0 |
| 4370 | } | 0 |
| 4371 | | - |
| 4372 | | - |
| 4373 | /* ChainPosRuleSet */ | - |
| 4374 | | - |
| 4375 | static HB_Error Load_ChainPosRuleSet( HB_ChainPosRuleSet* cprs, | - |
| 4376 | HB_Stream stream ) | - |
| 4377 | { | - |
| 4378 | HB_Error error; never executed (the execution status of this line is deduced): HB_Error error; | - |
| 4379 | | - |
| 4380 | HB_UShort n, m, count; never executed (the execution status of this line is deduced): HB_UShort n, m, count; | - |
| 4381 | HB_UInt cur_offset, new_offset, base_offset; never executed (the execution status of this line is deduced): HB_UInt cur_offset, new_offset, base_offset; | - |
| 4382 | | - |
| 4383 | HB_ChainPosRule* cpr; never executed (the execution status of this line is deduced): HB_ChainPosRule* cpr; | - |
| 4384 | | - |
| 4385 | | - |
| 4386 | base_offset = FILE_Pos(); never executed (the execution status of this line is deduced): base_offset = _hb_stream_pos( stream ); | - |
| 4387 | | - |
| 4388 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 4389 | return error; never executed: return error; | 0 |
| 4390 | | - |
| 4391 | count = cprs->ChainPosRuleCount = GET_UShort(); never executed (the execution status of this line is deduced): count = cprs->ChainPosRuleCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 4392 | | - |
| 4393 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4394 | | - |
| 4395 | cprs->ChainPosRule = NULL; never executed (the execution status of this line is deduced): cprs->ChainPosRule = ((void *)0); | - |
| 4396 | | - |
| 4397 | if ( ALLOC_ARRAY( cprs->ChainPosRule, count, HB_ChainPosRule ) ) never evaluated: ( (cprs->ChainPosRule) = _hb_alloc( (count)*sizeof(HB_ChainPosRule), &error ), error != 0 ) | 0 |
| 4398 | return error; never executed: return error; | 0 |
| 4399 | | - |
| 4400 | cpr = cprs->ChainPosRule; never executed (the execution status of this line is deduced): cpr = cprs->ChainPosRule; | - |
| 4401 | | - |
| 4402 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 4403 | { | - |
| 4404 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 4405 | goto Fail; never executed: goto Fail; | 0 |
| 4406 | | - |
| 4407 | new_offset = GET_UShort() + base_offset; never executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 4408 | | - |
| 4409 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4410 | | - |
| 4411 | cur_offset = FILE_Pos(); never executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 4412 | if ( FILE_Seek( new_offset ) || never evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 ) | 0 |
| 4413 | ( error = Load_ChainPosRule( &cpr[n], stream ) ) != HB_Err_Ok ) never evaluated: ( error = Load_ChainPosRule( &cpr[n], stream ) ) != HB_Err_Ok | 0 |
| 4414 | goto Fail; never executed: goto Fail; | 0 |
| 4415 | (void)FILE_Seek( cur_offset ); never executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 4416 | } | 0 |
| 4417 | | - |
| 4418 | return HB_Err_Ok; never executed: return HB_Err_Ok; | 0 |
| 4419 | | - |
| 4420 | Fail: | - |
| 4421 | for ( m = 0; m < n; m++ ) | 0 |
| 4422 | Free_ChainPosRule( &cpr[m] ); never executed: Free_ChainPosRule( &cpr[m] ); | 0 |
| 4423 | | - |
| 4424 | FREE( cpr ); never executed: } never executed: } never evaluated: (cpr) never evaluated: 0 | 0 |
| 4425 | return error; never executed: return error; | 0 |
| 4426 | } | - |
| 4427 | | - |
| 4428 | | - |
| 4429 | static void Free_ChainPosRuleSet( HB_ChainPosRuleSet* cprs ) | - |
| 4430 | { | - |
| 4431 | HB_UShort n, count; never executed (the execution status of this line is deduced): HB_UShort n, count; | - |
| 4432 | | - |
| 4433 | HB_ChainPosRule* cpr; never executed (the execution status of this line is deduced): HB_ChainPosRule* cpr; | - |
| 4434 | | - |
| 4435 | | - |
| 4436 | if ( cprs->ChainPosRule ) never evaluated: cprs->ChainPosRule | 0 |
| 4437 | { | - |
| 4438 | count = cprs->ChainPosRuleCount; never executed (the execution status of this line is deduced): count = cprs->ChainPosRuleCount; | - |
| 4439 | cpr = cprs->ChainPosRule; never executed (the execution status of this line is deduced): cpr = cprs->ChainPosRule; | - |
| 4440 | | - |
| 4441 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 4442 | Free_ChainPosRule( &cpr[n] ); never executed: Free_ChainPosRule( &cpr[n] ); | 0 |
| 4443 | | - |
| 4444 | FREE( cpr ); never executed: } never executed: } never evaluated: (cpr) never evaluated: 0 | 0 |
| 4445 | } | 0 |
| 4446 | } | 0 |
| 4447 | | - |
| 4448 | | - |
| 4449 | /* ChainContextPosFormat1 */ | - |
| 4450 | | - |
| 4451 | static HB_Error Load_ChainContextPos1( HB_ChainContextPosFormat1* ccpf1, | - |
| 4452 | HB_Stream stream ) | - |
| 4453 | { | - |
| 4454 | HB_Error error; never executed (the execution status of this line is deduced): HB_Error error; | - |
| 4455 | | - |
| 4456 | HB_UShort n, m, count; never executed (the execution status of this line is deduced): HB_UShort n, m, count; | - |
| 4457 | HB_UInt cur_offset, new_offset, base_offset; never executed (the execution status of this line is deduced): HB_UInt cur_offset, new_offset, base_offset; | - |
| 4458 | | - |
| 4459 | HB_ChainPosRuleSet* cprs; never executed (the execution status of this line is deduced): HB_ChainPosRuleSet* cprs; | - |
| 4460 | | - |
| 4461 | | - |
| 4462 | base_offset = FILE_Pos() - 2L; never executed (the execution status of this line is deduced): base_offset = _hb_stream_pos( stream ) - 2L; | - |
| 4463 | | - |
| 4464 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 4465 | return error; never executed: return error; | 0 |
| 4466 | | - |
| 4467 | new_offset = GET_UShort() + base_offset; never executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 4468 | | - |
| 4469 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4470 | | - |
| 4471 | cur_offset = FILE_Pos(); never executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 4472 | if ( FILE_Seek( new_offset ) || never evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 ) | 0 |
| 4473 | ( error = _HB_OPEN_Load_Coverage( &ccpf1->Coverage, stream ) ) != HB_Err_Ok ) never evaluated: ( error = _HB_OPEN_Load_Coverage( &ccpf1->Coverage, stream ) ) != HB_Err_Ok | 0 |
| 4474 | return error; never executed: return error; | 0 |
| 4475 | (void)FILE_Seek( cur_offset ); never executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 4476 | | - |
| 4477 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 4478 | goto Fail2; never executed: goto Fail2; | 0 |
| 4479 | | - |
| 4480 | count = ccpf1->ChainPosRuleSetCount = GET_UShort(); never executed (the execution status of this line is deduced): count = ccpf1->ChainPosRuleSetCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 4481 | | - |
| 4482 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4483 | | - |
| 4484 | ccpf1->ChainPosRuleSet = NULL; never executed (the execution status of this line is deduced): ccpf1->ChainPosRuleSet = ((void *)0); | - |
| 4485 | | - |
| 4486 | if ( ALLOC_ARRAY( ccpf1->ChainPosRuleSet, count, HB_ChainPosRuleSet ) ) never evaluated: ( (ccpf1->ChainPosRuleSet) = _hb_alloc( (count)*sizeof(HB_ChainPosRuleSet), &error ), error != 0 ) | 0 |
| 4487 | goto Fail2; never executed: goto Fail2; | 0 |
| 4488 | | - |
| 4489 | cprs = ccpf1->ChainPosRuleSet; never executed (the execution status of this line is deduced): cprs = ccpf1->ChainPosRuleSet; | - |
| 4490 | | - |
| 4491 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 4492 | { | - |
| 4493 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 4494 | goto Fail1; never executed: goto Fail1; | 0 |
| 4495 | | - |
| 4496 | new_offset = GET_UShort() + base_offset; never executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 4497 | | - |
| 4498 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4499 | | - |
| 4500 | cur_offset = FILE_Pos(); never executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 4501 | if ( FILE_Seek( new_offset ) || never evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 ) | 0 |
| 4502 | ( error = Load_ChainPosRuleSet( &cprs[n], stream ) ) != HB_Err_Ok ) never evaluated: ( error = Load_ChainPosRuleSet( &cprs[n], stream ) ) != HB_Err_Ok | 0 |
| 4503 | goto Fail1; never executed: goto Fail1; | 0 |
| 4504 | (void)FILE_Seek( cur_offset ); never executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 4505 | } | 0 |
| 4506 | | - |
| 4507 | return HB_Err_Ok; never executed: return HB_Err_Ok; | 0 |
| 4508 | | - |
| 4509 | Fail1: | - |
| 4510 | for ( m = 0; m < n; m++ ) | 0 |
| 4511 | Free_ChainPosRuleSet( &cprs[m] ); never executed: Free_ChainPosRuleSet( &cprs[m] ); | 0 |
| 4512 | | - |
| 4513 | FREE( cprs ); never executed: } never executed: } never evaluated: (cprs) never evaluated: 0 | 0 |
| 4514 | | - |
| 4515 | Fail2: code before this statement never executed: Fail2: | 0 |
| 4516 | _HB_OPEN_Free_Coverage( &ccpf1->Coverage ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_Coverage( &ccpf1->Coverage ); | - |
| 4517 | return error; never executed: return error; | 0 |
| 4518 | } | - |
| 4519 | | - |
| 4520 | | - |
| 4521 | static void Free_ChainContextPos1( HB_ChainContextPosFormat1* ccpf1 ) | - |
| 4522 | { | - |
| 4523 | HB_UShort n, count; never executed (the execution status of this line is deduced): HB_UShort n, count; | - |
| 4524 | | - |
| 4525 | HB_ChainPosRuleSet* cprs; never executed (the execution status of this line is deduced): HB_ChainPosRuleSet* cprs; | - |
| 4526 | | - |
| 4527 | | - |
| 4528 | if ( ccpf1->ChainPosRuleSet ) never evaluated: ccpf1->ChainPosRuleSet | 0 |
| 4529 | { | - |
| 4530 | count = ccpf1->ChainPosRuleSetCount; never executed (the execution status of this line is deduced): count = ccpf1->ChainPosRuleSetCount; | - |
| 4531 | cprs = ccpf1->ChainPosRuleSet; never executed (the execution status of this line is deduced): cprs = ccpf1->ChainPosRuleSet; | - |
| 4532 | | - |
| 4533 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 4534 | Free_ChainPosRuleSet( &cprs[n] ); never executed: Free_ChainPosRuleSet( &cprs[n] ); | 0 |
| 4535 | | - |
| 4536 | FREE( cprs ); never executed: } never executed: } never evaluated: (cprs) never evaluated: 0 | 0 |
| 4537 | } | 0 |
| 4538 | | - |
| 4539 | _HB_OPEN_Free_Coverage( &ccpf1->Coverage ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_Coverage( &ccpf1->Coverage ); | - |
| 4540 | } | 0 |
| 4541 | | - |
| 4542 | | - |
| 4543 | /* ChainPosClassRule */ | - |
| 4544 | | - |
| 4545 | static HB_Error Load_ChainPosClassRule( | - |
| 4546 | HB_ChainContextPosFormat2* ccpf2, | - |
| 4547 | HB_ChainPosClassRule* cpcr, | - |
| 4548 | HB_Stream stream ) | - |
| 4549 | { | - |
| 4550 | HB_Error error; never executed (the execution status of this line is deduced): HB_Error error; | - |
| 4551 | | - |
| 4552 | HB_UShort n, count; never executed (the execution status of this line is deduced): HB_UShort n, count; | - |
| 4553 | | - |
| 4554 | HB_UShort* b; never executed (the execution status of this line is deduced): HB_UShort* b; | - |
| 4555 | HB_UShort* i; never executed (the execution status of this line is deduced): HB_UShort* i; | - |
| 4556 | HB_UShort* l; never executed (the execution status of this line is deduced): HB_UShort* l; | - |
| 4557 | HB_PosLookupRecord* plr; never executed (the execution status of this line is deduced): HB_PosLookupRecord* plr; | - |
| 4558 | | - |
| 4559 | | - |
| 4560 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 4561 | return error; never executed: return error; | 0 |
| 4562 | | - |
| 4563 | cpcr->BacktrackGlyphCount = GET_UShort(); never executed (the execution status of this line is deduced): cpcr->BacktrackGlyphCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 4564 | | - |
| 4565 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4566 | | - |
| 4567 | if ( cpcr->BacktrackGlyphCount > ccpf2->MaxBacktrackLength ) never evaluated: cpcr->BacktrackGlyphCount > ccpf2->MaxBacktrackLength | 0 |
| 4568 | ccpf2->MaxBacktrackLength = cpcr->BacktrackGlyphCount; never executed: ccpf2->MaxBacktrackLength = cpcr->BacktrackGlyphCount; | 0 |
| 4569 | | - |
| 4570 | cpcr->Backtrack = NULL; never executed (the execution status of this line is deduced): cpcr->Backtrack = ((void *)0); | - |
| 4571 | | - |
| 4572 | count = cpcr->BacktrackGlyphCount; never executed (the execution status of this line is deduced): count = cpcr->BacktrackGlyphCount; | - |
| 4573 | | - |
| 4574 | if ( ALLOC_ARRAY( cpcr->Backtrack, count, HB_UShort ) ) never evaluated: ( (cpcr->Backtrack) = _hb_alloc( (count)*sizeof(HB_UShort), &error ), error != 0 ) | 0 |
| 4575 | return error; never executed: return error; | 0 |
| 4576 | | - |
| 4577 | b = cpcr->Backtrack; never executed (the execution status of this line is deduced): b = cpcr->Backtrack; | - |
| 4578 | | - |
| 4579 | if ( ACCESS_Frame( count * 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, count * 2L ))) != 0 ) | 0 |
| 4580 | goto Fail4; never executed: goto Fail4; | 0 |
| 4581 | | - |
| 4582 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 4583 | b[n] = GET_UShort(); never executed: b[n] = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | 0 |
| 4584 | | - |
| 4585 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4586 | | - |
| 4587 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 4588 | goto Fail4; never executed: goto Fail4; | 0 |
| 4589 | | - |
| 4590 | cpcr->InputGlyphCount = GET_UShort(); never executed (the execution status of this line is deduced): cpcr->InputGlyphCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 4591 | | - |
| 4592 | if ( cpcr->InputGlyphCount > ccpf2->MaxInputLength ) never evaluated: cpcr->InputGlyphCount > ccpf2->MaxInputLength | 0 |
| 4593 | ccpf2->MaxInputLength = cpcr->InputGlyphCount; never executed: ccpf2->MaxInputLength = cpcr->InputGlyphCount; | 0 |
| 4594 | | - |
| 4595 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4596 | | - |
| 4597 | cpcr->Input = NULL; never executed (the execution status of this line is deduced): cpcr->Input = ((void *)0); | - |
| 4598 | | - |
| 4599 | count = cpcr->InputGlyphCount - 1; /* only InputGlyphCount - 1 elements */ never executed (the execution status of this line is deduced): count = cpcr->InputGlyphCount - 1; | - |
| 4600 | | - |
| 4601 | if ( ALLOC_ARRAY( cpcr->Input, count, HB_UShort ) ) never evaluated: ( (cpcr->Input) = _hb_alloc( (count)*sizeof(HB_UShort), &error ), error != 0 ) | 0 |
| 4602 | goto Fail4; never executed: goto Fail4; | 0 |
| 4603 | | - |
| 4604 | i = cpcr->Input; never executed (the execution status of this line is deduced): i = cpcr->Input; | - |
| 4605 | | - |
| 4606 | if ( ACCESS_Frame( count * 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, count * 2L ))) != 0 ) | 0 |
| 4607 | goto Fail3; never executed: goto Fail3; | 0 |
| 4608 | | - |
| 4609 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 4610 | i[n] = GET_UShort(); never executed: i[n] = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | 0 |
| 4611 | | - |
| 4612 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4613 | | - |
| 4614 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 4615 | goto Fail3; never executed: goto Fail3; | 0 |
| 4616 | | - |
| 4617 | cpcr->LookaheadGlyphCount = GET_UShort(); never executed (the execution status of this line is deduced): cpcr->LookaheadGlyphCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 4618 | | - |
| 4619 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4620 | | - |
| 4621 | if ( cpcr->LookaheadGlyphCount > ccpf2->MaxLookaheadLength ) never evaluated: cpcr->LookaheadGlyphCount > ccpf2->MaxLookaheadLength | 0 |
| 4622 | ccpf2->MaxLookaheadLength = cpcr->LookaheadGlyphCount; never executed: ccpf2->MaxLookaheadLength = cpcr->LookaheadGlyphCount; | 0 |
| 4623 | | - |
| 4624 | cpcr->Lookahead = NULL; never executed (the execution status of this line is deduced): cpcr->Lookahead = ((void *)0); | - |
| 4625 | | - |
| 4626 | count = cpcr->LookaheadGlyphCount; never executed (the execution status of this line is deduced): count = cpcr->LookaheadGlyphCount; | - |
| 4627 | | - |
| 4628 | if ( ALLOC_ARRAY( cpcr->Lookahead, count, HB_UShort ) ) never evaluated: ( (cpcr->Lookahead) = _hb_alloc( (count)*sizeof(HB_UShort), &error ), error != 0 ) | 0 |
| 4629 | goto Fail3; never executed: goto Fail3; | 0 |
| 4630 | | - |
| 4631 | l = cpcr->Lookahead; never executed (the execution status of this line is deduced): l = cpcr->Lookahead; | - |
| 4632 | | - |
| 4633 | if ( ACCESS_Frame( count * 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, count * 2L ))) != 0 ) | 0 |
| 4634 | goto Fail2; never executed: goto Fail2; | 0 |
| 4635 | | - |
| 4636 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 4637 | l[n] = GET_UShort(); never executed: l[n] = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | 0 |
| 4638 | | - |
| 4639 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4640 | | - |
| 4641 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 4642 | goto Fail2; never executed: goto Fail2; | 0 |
| 4643 | | - |
| 4644 | cpcr->PosCount = GET_UShort(); never executed (the execution status of this line is deduced): cpcr->PosCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 4645 | | - |
| 4646 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4647 | | - |
| 4648 | cpcr->PosLookupRecord = NULL; never executed (the execution status of this line is deduced): cpcr->PosLookupRecord = ((void *)0); | - |
| 4649 | | - |
| 4650 | count = cpcr->PosCount; never executed (the execution status of this line is deduced): count = cpcr->PosCount; | - |
| 4651 | | - |
| 4652 | if ( ALLOC_ARRAY( cpcr->PosLookupRecord, count, HB_PosLookupRecord ) ) never evaluated: ( (cpcr->PosLookupRecord) = _hb_alloc( (count)*sizeof(HB_PosLookupRecord), &error ), error != 0 ) | 0 |
| 4653 | goto Fail2; never executed: goto Fail2; | 0 |
| 4654 | | - |
| 4655 | plr = cpcr->PosLookupRecord; never executed (the execution status of this line is deduced): plr = cpcr->PosLookupRecord; | - |
| 4656 | | - |
| 4657 | if ( ACCESS_Frame( count * 4L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, count * 4L ))) != 0 ) | 0 |
| 4658 | goto Fail1; never executed: goto Fail1; | 0 |
| 4659 | | - |
| 4660 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 4661 | { | - |
| 4662 | plr[n].SequenceIndex = GET_UShort(); never executed (the execution status of this line is deduced): plr[n].SequenceIndex = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 4663 | plr[n].LookupListIndex = GET_UShort(); never executed (the execution status of this line is deduced): plr[n].LookupListIndex = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 4664 | } | 0 |
| 4665 | | - |
| 4666 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4667 | | - |
| 4668 | return HB_Err_Ok; never executed: return HB_Err_Ok; | 0 |
| 4669 | | - |
| 4670 | Fail1: | - |
| 4671 | FREE( plr ); never executed: } never executed: } never evaluated: (plr) never evaluated: 0 | 0 |
| 4672 | | - |
| 4673 | Fail2: code before this statement never executed: Fail2: | 0 |
| 4674 | FREE( l ); never executed: } never executed: } never evaluated: (l) never evaluated: 0 | 0 |
| 4675 | | - |
| 4676 | Fail3: code before this statement never executed: Fail3: | 0 |
| 4677 | FREE( i ); never executed: } never executed: } never evaluated: (i) never evaluated: 0 | 0 |
| 4678 | | - |
| 4679 | Fail4: code before this statement never executed: Fail4: | 0 |
| 4680 | FREE( b ); never executed: } never executed: } never evaluated: (b) never evaluated: 0 | 0 |
| 4681 | return error; never executed: return error; | 0 |
| 4682 | } | - |
| 4683 | | - |
| 4684 | | - |
| 4685 | static void Free_ChainPosClassRule( HB_ChainPosClassRule* cpcr ) | - |
| 4686 | { | - |
| 4687 | FREE( cpcr->PosLookupRecord ); never executed: } never executed: } never evaluated: (cpcr->PosLookupRecord) never evaluated: 0 | 0 |
| 4688 | FREE( cpcr->Lookahead ); never executed: } never executed: } never evaluated: (cpcr->Lookahead) never evaluated: 0 | 0 |
| 4689 | FREE( cpcr->Input ); never executed: } never executed: } never evaluated: (cpcr->Input) never evaluated: 0 | 0 |
| 4690 | FREE( cpcr->Backtrack ); never executed: } never executed: } never evaluated: (cpcr->Backtrack) never evaluated: 0 | 0 |
| 4691 | } | 0 |
| 4692 | | - |
| 4693 | | - |
| 4694 | /* PosClassSet */ | - |
| 4695 | | - |
| 4696 | static HB_Error Load_ChainPosClassSet( | - |
| 4697 | HB_ChainContextPosFormat2* ccpf2, | - |
| 4698 | HB_ChainPosClassSet* cpcs, | - |
| 4699 | HB_Stream stream ) | - |
| 4700 | { | - |
| 4701 | HB_Error error; never executed (the execution status of this line is deduced): HB_Error error; | - |
| 4702 | | - |
| 4703 | HB_UShort n, m, count; never executed (the execution status of this line is deduced): HB_UShort n, m, count; | - |
| 4704 | HB_UInt cur_offset, new_offset, base_offset; never executed (the execution status of this line is deduced): HB_UInt cur_offset, new_offset, base_offset; | - |
| 4705 | | - |
| 4706 | HB_ChainPosClassRule* cpcr; never executed (the execution status of this line is deduced): HB_ChainPosClassRule* cpcr; | - |
| 4707 | | - |
| 4708 | | - |
| 4709 | base_offset = FILE_Pos(); never executed (the execution status of this line is deduced): base_offset = _hb_stream_pos( stream ); | - |
| 4710 | | - |
| 4711 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 4712 | return error; never executed: return error; | 0 |
| 4713 | | - |
| 4714 | count = cpcs->ChainPosClassRuleCount = GET_UShort(); never executed (the execution status of this line is deduced): count = cpcs->ChainPosClassRuleCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 4715 | | - |
| 4716 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4717 | | - |
| 4718 | cpcs->ChainPosClassRule = NULL; never executed (the execution status of this line is deduced): cpcs->ChainPosClassRule = ((void *)0); | - |
| 4719 | | - |
| 4720 | if ( ALLOC_ARRAY( cpcs->ChainPosClassRule, count, never evaluated: ( (cpcs->ChainPosClassRule) = _hb_alloc( (count)*sizeof(HB_ChainPosClassRule), &error ), error != 0 ) | 0 |
| 4721 | HB_ChainPosClassRule ) ) | - |
| 4722 | return error; never executed: return error; | 0 |
| 4723 | | - |
| 4724 | cpcr = cpcs->ChainPosClassRule; never executed (the execution status of this line is deduced): cpcr = cpcs->ChainPosClassRule; | - |
| 4725 | | - |
| 4726 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 4727 | { | - |
| 4728 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 4729 | goto Fail; never executed: goto Fail; | 0 |
| 4730 | | - |
| 4731 | new_offset = GET_UShort() + base_offset; never executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 4732 | | - |
| 4733 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4734 | | - |
| 4735 | cur_offset = FILE_Pos(); never executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 4736 | if ( FILE_Seek( new_offset ) || never evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 ) | 0 |
| 4737 | ( error = Load_ChainPosClassRule( ccpf2, &cpcr[n], never evaluated: ( error = Load_ChainPosClassRule( ccpf2, &cpcr[n], stream ) ) != HB_Err_Ok | 0 |
| 4738 | stream ) ) != HB_Err_Ok ) never evaluated: ( error = Load_ChainPosClassRule( ccpf2, &cpcr[n], stream ) ) != HB_Err_Ok | 0 |
| 4739 | goto Fail; never executed: goto Fail; | 0 |
| 4740 | (void)FILE_Seek( cur_offset ); never executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 4741 | } | 0 |
| 4742 | | - |
| 4743 | return HB_Err_Ok; never executed: return HB_Err_Ok; | 0 |
| 4744 | | - |
| 4745 | Fail: | - |
| 4746 | for ( m = 0; m < n; m++ ) | 0 |
| 4747 | Free_ChainPosClassRule( &cpcr[m] ); never executed: Free_ChainPosClassRule( &cpcr[m] ); | 0 |
| 4748 | | - |
| 4749 | FREE( cpcr ); never executed: } never executed: } never evaluated: (cpcr) never evaluated: 0 | 0 |
| 4750 | return error; never executed: return error; | 0 |
| 4751 | } | - |
| 4752 | | - |
| 4753 | | - |
| 4754 | static void Free_ChainPosClassSet( HB_ChainPosClassSet* cpcs ) | - |
| 4755 | { | - |
| 4756 | HB_UShort n, count; never executed (the execution status of this line is deduced): HB_UShort n, count; | - |
| 4757 | | - |
| 4758 | HB_ChainPosClassRule* cpcr; never executed (the execution status of this line is deduced): HB_ChainPosClassRule* cpcr; | - |
| 4759 | | - |
| 4760 | | - |
| 4761 | if ( cpcs->ChainPosClassRule ) never evaluated: cpcs->ChainPosClassRule | 0 |
| 4762 | { | - |
| 4763 | count = cpcs->ChainPosClassRuleCount; never executed (the execution status of this line is deduced): count = cpcs->ChainPosClassRuleCount; | - |
| 4764 | cpcr = cpcs->ChainPosClassRule; never executed (the execution status of this line is deduced): cpcr = cpcs->ChainPosClassRule; | - |
| 4765 | | - |
| 4766 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 4767 | Free_ChainPosClassRule( &cpcr[n] ); never executed: Free_ChainPosClassRule( &cpcr[n] ); | 0 |
| 4768 | | - |
| 4769 | FREE( cpcr ); never executed: } never executed: } never evaluated: (cpcr) never evaluated: 0 | 0 |
| 4770 | } | 0 |
| 4771 | } | 0 |
| 4772 | | - |
| 4773 | | - |
| 4774 | /* ChainContextPosFormat2 */ | - |
| 4775 | | - |
| 4776 | static HB_Error Load_ChainContextPos2( HB_ChainContextPosFormat2* ccpf2, | - |
| 4777 | HB_Stream stream ) | - |
| 4778 | { | - |
| 4779 | HB_Error error; never executed (the execution status of this line is deduced): HB_Error error; | - |
| 4780 | | - |
| 4781 | HB_UShort n, m, count; never executed (the execution status of this line is deduced): HB_UShort n, m, count; | - |
| 4782 | HB_UInt cur_offset, new_offset, base_offset; never executed (the execution status of this line is deduced): HB_UInt cur_offset, new_offset, base_offset; | - |
| 4783 | HB_UInt backtrack_offset, input_offset, lookahead_offset; never executed (the execution status of this line is deduced): HB_UInt backtrack_offset, input_offset, lookahead_offset; | - |
| 4784 | | - |
| 4785 | HB_ChainPosClassSet* cpcs; never executed (the execution status of this line is deduced): HB_ChainPosClassSet* cpcs; | - |
| 4786 | | - |
| 4787 | | - |
| 4788 | base_offset = FILE_Pos() - 2; never executed (the execution status of this line is deduced): base_offset = _hb_stream_pos( stream ) - 2; | - |
| 4789 | | - |
| 4790 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 4791 | return error; never executed: return error; | 0 |
| 4792 | | - |
| 4793 | new_offset = GET_UShort() + base_offset; never executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 4794 | | - |
| 4795 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4796 | | - |
| 4797 | cur_offset = FILE_Pos(); never executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 4798 | if ( FILE_Seek( new_offset ) || never evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 ) | 0 |
| 4799 | ( error = _HB_OPEN_Load_Coverage( &ccpf2->Coverage, stream ) ) != HB_Err_Ok ) never evaluated: ( error = _HB_OPEN_Load_Coverage( &ccpf2->Coverage, stream ) ) != HB_Err_Ok | 0 |
| 4800 | return error; never executed: return error; | 0 |
| 4801 | (void)FILE_Seek( cur_offset ); never executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 4802 | | - |
| 4803 | if ( ACCESS_Frame( 8L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 8L ))) != 0 ) | 0 |
| 4804 | goto Fail5; never executed: goto Fail5; | 0 |
| 4805 | | - |
| 4806 | backtrack_offset = GET_UShort(); never executed (the execution status of this line is deduced): backtrack_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 4807 | input_offset = GET_UShort(); never executed (the execution status of this line is deduced): input_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 4808 | lookahead_offset = GET_UShort(); never executed (the execution status of this line is deduced): lookahead_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 4809 | | - |
| 4810 | /* `ChainPosClassSetCount' is the upper limit for input class values, | - |
| 4811 | thus we read it now to make an additional safety check. No limit | - |
| 4812 | is known or needed for the other two class definitions */ | - |
| 4813 | | - |
| 4814 | count = ccpf2->ChainPosClassSetCount = GET_UShort(); never executed (the execution status of this line is deduced): count = ccpf2->ChainPosClassSetCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 4815 | | - |
| 4816 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4817 | | - |
| 4818 | if ( ( error = _HB_OPEN_Load_EmptyOrClassDefinition( &ccpf2->BacktrackClassDef, 65535, never evaluated: ( error = _HB_OPEN_Load_EmptyOrClassDefinition( &ccpf2->BacktrackClassDef, 65535, backtrack_offset, base_offset, stream ) ) != HB_Err_Ok | 0 |
| 4819 | backtrack_offset, base_offset, never evaluated: ( error = _HB_OPEN_Load_EmptyOrClassDefinition( &ccpf2->BacktrackClassDef, 65535, backtrack_offset, base_offset, stream ) ) != HB_Err_Ok | 0 |
| 4820 | stream ) ) != HB_Err_Ok ) never evaluated: ( error = _HB_OPEN_Load_EmptyOrClassDefinition( &ccpf2->BacktrackClassDef, 65535, backtrack_offset, base_offset, stream ) ) != HB_Err_Ok | 0 |
| 4821 | goto Fail5; never executed: goto Fail5; | 0 |
| 4822 | if ( ( error = _HB_OPEN_Load_EmptyOrClassDefinition( &ccpf2->InputClassDef, count, never evaluated: ( error = _HB_OPEN_Load_EmptyOrClassDefinition( &ccpf2->InputClassDef, count, input_offset, base_offset, stream ) ) != HB_Err_Ok | 0 |
| 4823 | input_offset, base_offset, never evaluated: ( error = _HB_OPEN_Load_EmptyOrClassDefinition( &ccpf2->InputClassDef, count, input_offset, base_offset, stream ) ) != HB_Err_Ok | 0 |
| 4824 | stream ) ) != HB_Err_Ok ) never evaluated: ( error = _HB_OPEN_Load_EmptyOrClassDefinition( &ccpf2->InputClassDef, count, input_offset, base_offset, stream ) ) != HB_Err_Ok | 0 |
| 4825 | goto Fail4; never executed: goto Fail4; | 0 |
| 4826 | if ( ( error = _HB_OPEN_Load_EmptyOrClassDefinition( &ccpf2->LookaheadClassDef, 65535, never evaluated: ( error = _HB_OPEN_Load_EmptyOrClassDefinition( &ccpf2->LookaheadClassDef, 65535, lookahead_offset, base_offset, stream ) ) != HB_Err_Ok | 0 |
| 4827 | lookahead_offset, base_offset, never evaluated: ( error = _HB_OPEN_Load_EmptyOrClassDefinition( &ccpf2->LookaheadClassDef, 65535, lookahead_offset, base_offset, stream ) ) != HB_Err_Ok | 0 |
| 4828 | stream ) ) != HB_Err_Ok ) never evaluated: ( error = _HB_OPEN_Load_EmptyOrClassDefinition( &ccpf2->LookaheadClassDef, 65535, lookahead_offset, base_offset, stream ) ) != HB_Err_Ok | 0 |
| 4829 | goto Fail3; never executed: goto Fail3; | 0 |
| 4830 | | - |
| 4831 | ccpf2->ChainPosClassSet = NULL; never executed (the execution status of this line is deduced): ccpf2->ChainPosClassSet = ((void *)0); | - |
| 4832 | ccpf2->MaxBacktrackLength = 0; never executed (the execution status of this line is deduced): ccpf2->MaxBacktrackLength = 0; | - |
| 4833 | ccpf2->MaxInputLength = 0; never executed (the execution status of this line is deduced): ccpf2->MaxInputLength = 0; | - |
| 4834 | ccpf2->MaxLookaheadLength = 0; never executed (the execution status of this line is deduced): ccpf2->MaxLookaheadLength = 0; | - |
| 4835 | | - |
| 4836 | if ( ALLOC_ARRAY( ccpf2->ChainPosClassSet, count, HB_ChainPosClassSet ) ) never evaluated: ( (ccpf2->ChainPosClassSet) = _hb_alloc( (count)*sizeof(HB_ChainPosClassSet), &error ), error != 0 ) | 0 |
| 4837 | goto Fail2; never executed: goto Fail2; | 0 |
| 4838 | | - |
| 4839 | cpcs = ccpf2->ChainPosClassSet; never executed (the execution status of this line is deduced): cpcs = ccpf2->ChainPosClassSet; | - |
| 4840 | | - |
| 4841 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 4842 | { | - |
| 4843 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 4844 | goto Fail1; never executed: goto Fail1; | 0 |
| 4845 | | - |
| 4846 | new_offset = GET_UShort() + base_offset; never executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 4847 | | - |
| 4848 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4849 | | - |
| 4850 | if ( new_offset != base_offset ) /* not a NULL offset */ never evaluated: new_offset != base_offset | 0 |
| 4851 | { | - |
| 4852 | cur_offset = FILE_Pos(); never executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 4853 | if ( FILE_Seek( new_offset ) || never evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 ) | 0 |
| 4854 | ( error = Load_ChainPosClassSet( ccpf2, &cpcs[n], never evaluated: ( error = Load_ChainPosClassSet( ccpf2, &cpcs[n], stream ) ) != HB_Err_Ok | 0 |
| 4855 | stream ) ) != HB_Err_Ok ) never evaluated: ( error = Load_ChainPosClassSet( ccpf2, &cpcs[n], stream ) ) != HB_Err_Ok | 0 |
| 4856 | goto Fail1; never executed: goto Fail1; | 0 |
| 4857 | (void)FILE_Seek( cur_offset ); never executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 4858 | } | 0 |
| 4859 | else | - |
| 4860 | { | - |
| 4861 | /* we create a ChainPosClassSet table with no entries */ | - |
| 4862 | | - |
| 4863 | ccpf2->ChainPosClassSet[n].ChainPosClassRuleCount = 0; never executed (the execution status of this line is deduced): ccpf2->ChainPosClassSet[n].ChainPosClassRuleCount = 0; | - |
| 4864 | ccpf2->ChainPosClassSet[n].ChainPosClassRule = NULL; never executed (the execution status of this line is deduced): ccpf2->ChainPosClassSet[n].ChainPosClassRule = ((void *)0); | - |
| 4865 | } | 0 |
| 4866 | } | - |
| 4867 | | - |
| 4868 | return HB_Err_Ok; never executed: return HB_Err_Ok; | 0 |
| 4869 | | - |
| 4870 | Fail1: | - |
| 4871 | for ( m = 0; m < n; m++ ) | 0 |
| 4872 | Free_ChainPosClassSet( &cpcs[m] ); never executed: Free_ChainPosClassSet( &cpcs[m] ); | 0 |
| 4873 | | - |
| 4874 | FREE( cpcs ); never executed: } never executed: } never evaluated: (cpcs) never evaluated: 0 | 0 |
| 4875 | | - |
| 4876 | Fail2: code before this statement never executed: Fail2: | 0 |
| 4877 | _HB_OPEN_Free_ClassDefinition( &ccpf2->LookaheadClassDef ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_ClassDefinition( &ccpf2->LookaheadClassDef ); | - |
| 4878 | | - |
| 4879 | Fail3: code before this statement never executed: Fail3: | 0 |
| 4880 | _HB_OPEN_Free_ClassDefinition( &ccpf2->InputClassDef ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_ClassDefinition( &ccpf2->InputClassDef ); | - |
| 4881 | | - |
| 4882 | Fail4: code before this statement never executed: Fail4: | 0 |
| 4883 | _HB_OPEN_Free_ClassDefinition( &ccpf2->BacktrackClassDef ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_ClassDefinition( &ccpf2->BacktrackClassDef ); | - |
| 4884 | | - |
| 4885 | Fail5: code before this statement never executed: Fail5: | 0 |
| 4886 | _HB_OPEN_Free_Coverage( &ccpf2->Coverage ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_Coverage( &ccpf2->Coverage ); | - |
| 4887 | return error; never executed: return error; | 0 |
| 4888 | } | - |
| 4889 | | - |
| 4890 | | - |
| 4891 | static void Free_ChainContextPos2( HB_ChainContextPosFormat2* ccpf2 ) | - |
| 4892 | { | - |
| 4893 | HB_UShort n, count; never executed (the execution status of this line is deduced): HB_UShort n, count; | - |
| 4894 | | - |
| 4895 | HB_ChainPosClassSet* cpcs; never executed (the execution status of this line is deduced): HB_ChainPosClassSet* cpcs; | - |
| 4896 | | - |
| 4897 | | - |
| 4898 | if ( ccpf2->ChainPosClassSet ) never evaluated: ccpf2->ChainPosClassSet | 0 |
| 4899 | { | - |
| 4900 | count = ccpf2->ChainPosClassSetCount; never executed (the execution status of this line is deduced): count = ccpf2->ChainPosClassSetCount; | - |
| 4901 | cpcs = ccpf2->ChainPosClassSet; never executed (the execution status of this line is deduced): cpcs = ccpf2->ChainPosClassSet; | - |
| 4902 | | - |
| 4903 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 4904 | Free_ChainPosClassSet( &cpcs[n] ); never executed: Free_ChainPosClassSet( &cpcs[n] ); | 0 |
| 4905 | | - |
| 4906 | FREE( cpcs ); never executed: } never executed: } never evaluated: (cpcs) never evaluated: 0 | 0 |
| 4907 | } | 0 |
| 4908 | | - |
| 4909 | _HB_OPEN_Free_ClassDefinition( &ccpf2->LookaheadClassDef ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_ClassDefinition( &ccpf2->LookaheadClassDef ); | - |
| 4910 | _HB_OPEN_Free_ClassDefinition( &ccpf2->InputClassDef ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_ClassDefinition( &ccpf2->InputClassDef ); | - |
| 4911 | _HB_OPEN_Free_ClassDefinition( &ccpf2->BacktrackClassDef ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_ClassDefinition( &ccpf2->BacktrackClassDef ); | - |
| 4912 | | - |
| 4913 | _HB_OPEN_Free_Coverage( &ccpf2->Coverage ); never executed (the execution status of this line is deduced): _HB_OPEN_Free_Coverage( &ccpf2->Coverage ); | - |
| 4914 | } | 0 |
| 4915 | | - |
| 4916 | | - |
| 4917 | /* ChainContextPosFormat3 */ | - |
| 4918 | | - |
| 4919 | static HB_Error Load_ChainContextPos3( HB_ChainContextPosFormat3* ccpf3, | - |
| 4920 | HB_Stream stream ) | - |
| 4921 | { | - |
| 4922 | HB_Error error; never executed (the execution status of this line is deduced): HB_Error error; | - |
| 4923 | | - |
| 4924 | HB_UShort n, nb, ni, nl, m, count; never executed (the execution status of this line is deduced): HB_UShort n, nb, ni, nl, m, count; | - |
| 4925 | HB_UShort backtrack_count, input_count, lookahead_count; never executed (the execution status of this line is deduced): HB_UShort backtrack_count, input_count, lookahead_count; | - |
| 4926 | HB_UInt cur_offset, new_offset, base_offset; never executed (the execution status of this line is deduced): HB_UInt cur_offset, new_offset, base_offset; | - |
| 4927 | | - |
| 4928 | HB_Coverage* b; never executed (the execution status of this line is deduced): HB_Coverage* b; | - |
| 4929 | HB_Coverage* i; never executed (the execution status of this line is deduced): HB_Coverage* i; | - |
| 4930 | HB_Coverage* l; never executed (the execution status of this line is deduced): HB_Coverage* l; | - |
| 4931 | HB_PosLookupRecord* plr; never executed (the execution status of this line is deduced): HB_PosLookupRecord* plr; | - |
| 4932 | | - |
| 4933 | | - |
| 4934 | base_offset = FILE_Pos() - 2L; never executed (the execution status of this line is deduced): base_offset = _hb_stream_pos( stream ) - 2L; | - |
| 4935 | | - |
| 4936 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 4937 | return error; never executed: return error; | 0 |
| 4938 | | - |
| 4939 | ccpf3->BacktrackGlyphCount = GET_UShort(); never executed (the execution status of this line is deduced): ccpf3->BacktrackGlyphCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 4940 | | - |
| 4941 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4942 | | - |
| 4943 | ccpf3->BacktrackCoverage = NULL; never executed (the execution status of this line is deduced): ccpf3->BacktrackCoverage = ((void *)0); | - |
| 4944 | | - |
| 4945 | backtrack_count = ccpf3->BacktrackGlyphCount; never executed (the execution status of this line is deduced): backtrack_count = ccpf3->BacktrackGlyphCount; | - |
| 4946 | | - |
| 4947 | if ( ALLOC_ARRAY( ccpf3->BacktrackCoverage, backtrack_count, never evaluated: ( (ccpf3->BacktrackCoverage) = _hb_alloc( (backtrack_count)*sizeof(HB_Coverage), &error ), error != 0 ) | 0 |
| 4948 | HB_Coverage ) ) | - |
| 4949 | return error; never executed: return error; | 0 |
| 4950 | | - |
| 4951 | b = ccpf3->BacktrackCoverage; never executed (the execution status of this line is deduced): b = ccpf3->BacktrackCoverage; | - |
| 4952 | | - |
| 4953 | for ( nb = 0; nb < backtrack_count; nb++ ) never evaluated: nb < backtrack_count | 0 |
| 4954 | { | - |
| 4955 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 4956 | goto Fail4; never executed: goto Fail4; | 0 |
| 4957 | | - |
| 4958 | new_offset = GET_UShort() + base_offset; never executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 4959 | | - |
| 4960 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4961 | | - |
| 4962 | cur_offset = FILE_Pos(); never executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 4963 | if ( FILE_Seek( new_offset ) || never evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 ) | 0 |
| 4964 | ( error = _HB_OPEN_Load_Coverage( &b[nb], stream ) ) != HB_Err_Ok ) never evaluated: ( error = _HB_OPEN_Load_Coverage( &b[nb], stream ) ) != HB_Err_Ok | 0 |
| 4965 | goto Fail4; never executed: goto Fail4; | 0 |
| 4966 | (void)FILE_Seek( cur_offset ); never executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 4967 | } | 0 |
| 4968 | | - |
| 4969 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 4970 | goto Fail4; never executed: goto Fail4; | 0 |
| 4971 | | - |
| 4972 | ccpf3->InputGlyphCount = GET_UShort(); never executed (the execution status of this line is deduced): ccpf3->InputGlyphCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 4973 | | - |
| 4974 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4975 | | - |
| 4976 | ccpf3->InputCoverage = NULL; never executed (the execution status of this line is deduced): ccpf3->InputCoverage = ((void *)0); | - |
| 4977 | | - |
| 4978 | input_count = ccpf3->InputGlyphCount; never executed (the execution status of this line is deduced): input_count = ccpf3->InputGlyphCount; | - |
| 4979 | | - |
| 4980 | if ( ALLOC_ARRAY( ccpf3->InputCoverage, input_count, HB_Coverage ) ) never evaluated: ( (ccpf3->InputCoverage) = _hb_alloc( (input_count)*sizeof(HB_Coverage), &error ), error != 0 ) | 0 |
| 4981 | goto Fail4; never executed: goto Fail4; | 0 |
| 4982 | | - |
| 4983 | i = ccpf3->InputCoverage; never executed (the execution status of this line is deduced): i = ccpf3->InputCoverage; | - |
| 4984 | | - |
| 4985 | for ( ni = 0; ni < input_count; ni++ ) never evaluated: ni < input_count | 0 |
| 4986 | { | - |
| 4987 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 4988 | goto Fail3; never executed: goto Fail3; | 0 |
| 4989 | | - |
| 4990 | new_offset = GET_UShort() + base_offset; never executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 4991 | | - |
| 4992 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 4993 | | - |
| 4994 | cur_offset = FILE_Pos(); never executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 4995 | if ( FILE_Seek( new_offset ) || never evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 ) | 0 |
| 4996 | ( error = _HB_OPEN_Load_Coverage( &i[ni], stream ) ) != HB_Err_Ok ) never evaluated: ( error = _HB_OPEN_Load_Coverage( &i[ni], stream ) ) != HB_Err_Ok | 0 |
| 4997 | goto Fail3; never executed: goto Fail3; | 0 |
| 4998 | (void)FILE_Seek( cur_offset ); never executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 4999 | } | 0 |
| 5000 | | - |
| 5001 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 5002 | goto Fail3; never executed: goto Fail3; | 0 |
| 5003 | | - |
| 5004 | ccpf3->LookaheadGlyphCount = GET_UShort(); never executed (the execution status of this line is deduced): ccpf3->LookaheadGlyphCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 5005 | | - |
| 5006 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 5007 | | - |
| 5008 | ccpf3->LookaheadCoverage = NULL; never executed (the execution status of this line is deduced): ccpf3->LookaheadCoverage = ((void *)0); | - |
| 5009 | | - |
| 5010 | lookahead_count = ccpf3->LookaheadGlyphCount; never executed (the execution status of this line is deduced): lookahead_count = ccpf3->LookaheadGlyphCount; | - |
| 5011 | | - |
| 5012 | if ( ALLOC_ARRAY( ccpf3->LookaheadCoverage, lookahead_count, never evaluated: ( (ccpf3->LookaheadCoverage) = _hb_alloc( (lookahead_count)*sizeof(HB_Coverage), &error ), error != 0 ) | 0 |
| 5013 | HB_Coverage ) ) | - |
| 5014 | goto Fail3; never executed: goto Fail3; | 0 |
| 5015 | | - |
| 5016 | l = ccpf3->LookaheadCoverage; never executed (the execution status of this line is deduced): l = ccpf3->LookaheadCoverage; | - |
| 5017 | | - |
| 5018 | for ( nl = 0; nl < lookahead_count; nl++ ) never evaluated: nl < lookahead_count | 0 |
| 5019 | { | - |
| 5020 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 5021 | goto Fail2; never executed: goto Fail2; | 0 |
| 5022 | | - |
| 5023 | new_offset = GET_UShort() + base_offset; never executed (the execution status of this line is deduced): new_offset = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))) + base_offset; | - |
| 5024 | | - |
| 5025 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 5026 | | - |
| 5027 | cur_offset = FILE_Pos(); never executed (the execution status of this line is deduced): cur_offset = _hb_stream_pos( stream ); | - |
| 5028 | if ( FILE_Seek( new_offset ) || never evaluated: ( (error = (_hb_stream_seek( stream, new_offset ))) != 0 ) | 0 |
| 5029 | ( error = _HB_OPEN_Load_Coverage( &l[nl], stream ) ) != HB_Err_Ok ) never evaluated: ( error = _HB_OPEN_Load_Coverage( &l[nl], stream ) ) != HB_Err_Ok | 0 |
| 5030 | goto Fail2; never executed: goto Fail2; | 0 |
| 5031 | (void)FILE_Seek( cur_offset ); never executed (the execution status of this line is deduced): (void)( (error = (_hb_stream_seek( stream, cur_offset ))) != 0 ); | - |
| 5032 | } | 0 |
| 5033 | | - |
| 5034 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 5035 | goto Fail2; never executed: goto Fail2; | 0 |
| 5036 | | - |
| 5037 | ccpf3->PosCount = GET_UShort(); never executed (the execution status of this line is deduced): ccpf3->PosCount = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 5038 | | - |
| 5039 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 5040 | | - |
| 5041 | ccpf3->PosLookupRecord = NULL; never executed (the execution status of this line is deduced): ccpf3->PosLookupRecord = ((void *)0); | - |
| 5042 | | - |
| 5043 | count = ccpf3->PosCount; never executed (the execution status of this line is deduced): count = ccpf3->PosCount; | - |
| 5044 | | - |
| 5045 | if ( ALLOC_ARRAY( ccpf3->PosLookupRecord, count, HB_PosLookupRecord ) ) never evaluated: ( (ccpf3->PosLookupRecord) = _hb_alloc( (count)*sizeof(HB_PosLookupRecord), &error ), error != 0 ) | 0 |
| 5046 | goto Fail2; never executed: goto Fail2; | 0 |
| 5047 | | - |
| 5048 | plr = ccpf3->PosLookupRecord; never executed (the execution status of this line is deduced): plr = ccpf3->PosLookupRecord; | - |
| 5049 | | - |
| 5050 | if ( ACCESS_Frame( count * 4L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, count * 4L ))) != 0 ) | 0 |
| 5051 | goto Fail1; never executed: goto Fail1; | 0 |
| 5052 | | - |
| 5053 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 5054 | { | - |
| 5055 | plr[n].SequenceIndex = GET_UShort(); never executed (the execution status of this line is deduced): plr[n].SequenceIndex = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 5056 | plr[n].LookupListIndex = GET_UShort(); never executed (the execution status of this line is deduced): plr[n].LookupListIndex = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 5057 | } | 0 |
| 5058 | | - |
| 5059 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 5060 | | - |
| 5061 | return HB_Err_Ok; never executed: return HB_Err_Ok; | 0 |
| 5062 | | - |
| 5063 | Fail1: | - |
| 5064 | FREE( plr ); never executed: } never executed: } never evaluated: (plr) never evaluated: 0 | 0 |
| 5065 | | - |
| 5066 | Fail2: code before this statement never executed: Fail2: | 0 |
| 5067 | for ( m = 0; m < nl; m++ ) | 0 |
| 5068 | _HB_OPEN_Free_Coverage( &l[m] ); never executed: _HB_OPEN_Free_Coverage( &l[m] ); | 0 |
| 5069 | | - |
| 5070 | FREE( l ); never executed: } never executed: } never evaluated: (l) never evaluated: 0 | 0 |
| 5071 | | - |
| 5072 | Fail3: code before this statement never executed: Fail3: | 0 |
| 5073 | for ( m = 0; m < ni; m++ ) | 0 |
| 5074 | _HB_OPEN_Free_Coverage( &i[m] ); never executed: _HB_OPEN_Free_Coverage( &i[m] ); | 0 |
| 5075 | | - |
| 5076 | FREE( i ); never executed: } never executed: } never evaluated: (i) never evaluated: 0 | 0 |
| 5077 | | - |
| 5078 | Fail4: code before this statement never executed: Fail4: | 0 |
| 5079 | for ( m = 0; m < nb; m++ ) | 0 |
| 5080 | _HB_OPEN_Free_Coverage( &b[m] ); never executed: _HB_OPEN_Free_Coverage( &b[m] ); | 0 |
| 5081 | | - |
| 5082 | FREE( b ); never executed: } never executed: } never evaluated: (b) never evaluated: 0 | 0 |
| 5083 | return error; never executed: return error; | 0 |
| 5084 | } | - |
| 5085 | | - |
| 5086 | | - |
| 5087 | static void Free_ChainContextPos3( HB_ChainContextPosFormat3* ccpf3 ) | - |
| 5088 | { | - |
| 5089 | HB_UShort n, count; never executed (the execution status of this line is deduced): HB_UShort n, count; | - |
| 5090 | | - |
| 5091 | HB_Coverage* c; never executed (the execution status of this line is deduced): HB_Coverage* c; | - |
| 5092 | | - |
| 5093 | | - |
| 5094 | FREE( ccpf3->PosLookupRecord ); never executed: } never executed: } never evaluated: (ccpf3->PosLookupRecord) never evaluated: 0 | 0 |
| 5095 | | - |
| 5096 | if ( ccpf3->LookaheadCoverage ) never evaluated: ccpf3->LookaheadCoverage | 0 |
| 5097 | { | - |
| 5098 | count = ccpf3->LookaheadGlyphCount; never executed (the execution status of this line is deduced): count = ccpf3->LookaheadGlyphCount; | - |
| 5099 | c = ccpf3->LookaheadCoverage; never executed (the execution status of this line is deduced): c = ccpf3->LookaheadCoverage; | - |
| 5100 | | - |
| 5101 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 5102 | _HB_OPEN_Free_Coverage( &c[n] ); never executed: _HB_OPEN_Free_Coverage( &c[n] ); | 0 |
| 5103 | | - |
| 5104 | FREE( c ); never executed: } never executed: } never evaluated: (c) never evaluated: 0 | 0 |
| 5105 | } | 0 |
| 5106 | | - |
| 5107 | if ( ccpf3->InputCoverage ) never evaluated: ccpf3->InputCoverage | 0 |
| 5108 | { | - |
| 5109 | count = ccpf3->InputGlyphCount; never executed (the execution status of this line is deduced): count = ccpf3->InputGlyphCount; | - |
| 5110 | c = ccpf3->InputCoverage; never executed (the execution status of this line is deduced): c = ccpf3->InputCoverage; | - |
| 5111 | | - |
| 5112 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 5113 | _HB_OPEN_Free_Coverage( &c[n] ); never executed: _HB_OPEN_Free_Coverage( &c[n] ); | 0 |
| 5114 | | - |
| 5115 | FREE( c ); never executed: } never executed: } never evaluated: (c) never evaluated: 0 | 0 |
| 5116 | } | 0 |
| 5117 | | - |
| 5118 | if ( ccpf3->BacktrackCoverage ) never evaluated: ccpf3->BacktrackCoverage | 0 |
| 5119 | { | - |
| 5120 | count = ccpf3->BacktrackGlyphCount; never executed (the execution status of this line is deduced): count = ccpf3->BacktrackGlyphCount; | - |
| 5121 | c = ccpf3->BacktrackCoverage; never executed (the execution status of this line is deduced): c = ccpf3->BacktrackCoverage; | - |
| 5122 | | - |
| 5123 | for ( n = 0; n < count; n++ ) never evaluated: n < count | 0 |
| 5124 | _HB_OPEN_Free_Coverage( &c[n] ); never executed: _HB_OPEN_Free_Coverage( &c[n] ); | 0 |
| 5125 | | - |
| 5126 | FREE( c ); never executed: } never executed: } never evaluated: (c) never evaluated: 0 | 0 |
| 5127 | } | 0 |
| 5128 | } | 0 |
| 5129 | | - |
| 5130 | | - |
| 5131 | /* ChainContextPos */ | - |
| 5132 | | - |
| 5133 | static HB_Error Load_ChainContextPos( HB_GPOS_SubTable* st, | - |
| 5134 | HB_Stream stream ) | - |
| 5135 | { | - |
| 5136 | HB_Error error; never executed (the execution status of this line is deduced): HB_Error error; | - |
| 5137 | HB_ChainContextPos* ccp = &st->chain; never executed (the execution status of this line is deduced): HB_ChainContextPos* ccp = &st->chain; | - |
| 5138 | | - |
| 5139 | | - |
| 5140 | if ( ACCESS_Frame( 2L ) ) never evaluated: ( (error = (_hb_stream_frame_enter( stream, 2L ))) != 0 ) | 0 |
| 5141 | return error; never executed: return error; | 0 |
| 5142 | | - |
| 5143 | ccp->PosFormat = GET_UShort(); never executed (the execution status of this line is deduced): ccp->PosFormat = ((HB_UShort)(stream->cursor += 2, (HB_Short)( (*(((HB_Byte*)stream->cursor)-2) << 8) | *(((HB_Byte*)stream->cursor)-1) ))); | - |
| 5144 | | - |
| 5145 | FORGET_Frame(); never executed (the execution status of this line is deduced): _hb_stream_frame_exit( stream ); | - |
| 5146 | | - |
| 5147 | switch ( ccp->PosFormat ) | - |
| 5148 | { | - |
| 5149 | case 1: | - |
| 5150 | return Load_ChainContextPos1( &ccp->ccpf.ccpf1, stream ); never executed: return Load_ChainContextPos1( &ccp->ccpf.ccpf1, stream ); | 0 |
| 5151 | | - |
| 5152 | case 2: | - |
| 5153 | return Load_ChainContextPos2( &ccp->ccpf.ccpf2, stream ); never executed: return Load_ChainContextPos2( &ccp->ccpf.ccpf2, stream ); | 0 |
| 5154 | | - |
| 5155 | case 3: | - |
| 5156 | return Load_ChainContextPos3( &ccp->ccpf.ccpf3, stream ); never executed: return Load_ChainContextPos3( &ccp->ccpf.ccpf3, stream ); | 0 |
| 5157 | | - |
| 5158 | default: | - |
| 5159 | return ERR(HB_Err_Invalid_SubTable_Format); never executed: return _hb_err (HB_Err_Invalid_SubTable_Format); | 0 |
| 5160 | } | - |
| 5161 | | - |
| 5162 | return HB_Err_Ok; /* never reached */ never executed: return HB_Err_Ok; | 0 |
| 5163 | } | - |
| 5164 | | - |
| 5165 | | - |
| 5166 | static void Free_ChainContextPos( HB_GPOS_SubTable* st ) | - |
| 5167 | { | - |
| 5168 | HB_ChainContextPos* ccp = &st->chain; never executed (the execution status of this line is deduced): HB_ChainContextPos* ccp = &st->chain; | - |
| 5169 | | - |
| 5170 | switch ( ccp->PosFormat ) | - |
| 5171 | { | - |
| 5172 | case 1: Free_ChainContextPos1( &ccp->ccpf.ccpf1 ); break; | 0 |
| 5173 | case 2: Free_ChainContextPos2( &ccp->ccpf.ccpf2 ); break; | 0 |
| 5174 | case 3: Free_ChainContextPos3( &ccp->ccpf.ccpf3 ); break; | 0 |
| 5175 | default: break; | 0 |
| 5176 | } | - |
| 5177 | } | 0 |
| 5178 | | - |
| 5179 | | - |
| 5180 | static HB_Error Lookup_ChainContextPos1( | - |
| 5181 | GPOS_Instance* gpi, | - |
| 5182 | HB_ChainContextPosFormat1* ccpf1, | - |
| 5183 | HB_Buffer buffer, | - |
| 5184 | HB_UShort flags, | - |
| 5185 | HB_UShort context_length, | - |
| 5186 | int nesting_level ) | - |
| 5187 | { | - |
| 5188 | HB_UShort index, property; never executed (the execution status of this line is deduced): HB_UShort index, property; | - |
| 5189 | HB_UShort i, j, k, num_cpr; never executed (the execution status of this line is deduced): HB_UShort i, j, k, num_cpr; | - |
| 5190 | HB_UShort bgc, igc, lgc; never executed (the execution status of this line is deduced): HB_UShort bgc, igc, lgc; | - |
| 5191 | HB_Error error; never executed (the execution status of this line is deduced): HB_Error error; | - |
| 5192 | HB_GPOSHeader* gpos = gpi->gpos; never executed (the execution status of this line is deduced): HB_GPOSHeader* gpos = gpi->gpos; | - |
| 5193 | | - |
| 5194 | HB_ChainPosRule* cpr; never executed (the execution status of this line is deduced): HB_ChainPosRule* cpr; | - |
| 5195 | HB_ChainPosRule curr_cpr; never executed (the execution status of this line is deduced): HB_ChainPosRule curr_cpr; | - |
| 5196 | HB_GDEFHeader* gdef; never executed (the execution status of this line is deduced): HB_GDEFHeader* gdef; | - |
| 5197 | | - |
| 5198 | | - |
| 5199 | gdef = gpos->gdef; never executed (the execution status of this line is deduced): gdef = gpos->gdef; | - |
| 5200 | | - |
| 5201 | if ( CHECK_Property( gdef, IN_CURITEM(), flags, &property ) ) never evaluated: ( ( error = _HB_GDEF_Check_Property( (gdef), ((&buffer->in_string[buffer->in_pos])), (flags), (&property) ) ) != HB_Err_Ok ) | 0 |
| 5202 | return error; never executed: return error; | 0 |
| 5203 | | - |
| 5204 | error = _HB_OPEN_Coverage_Index( &ccpf1->Coverage, IN_CURGLYPH(), &index ); never executed (the execution status of this line is deduced): error = _HB_OPEN_Coverage_Index( &ccpf1->Coverage, (buffer->in_string[buffer->in_pos].gindex), &index ); | - |
| 5205 | if ( error ) | 0 |
| 5206 | return error; never executed: return error; | 0 |
| 5207 | | - |
| 5208 | cpr = ccpf1->ChainPosRuleSet[index].ChainPosRule; never executed (the execution status of this line is deduced): cpr = ccpf1->ChainPosRuleSet[index].ChainPosRule; | - |
| 5209 | num_cpr = ccpf1->ChainPosRuleSet[index].ChainPosRuleCount; never executed (the execution status of this line is deduced): num_cpr = ccpf1->ChainPosRuleSet[index].ChainPosRuleCount; | - |
| 5210 | | - |
| 5211 | for ( k = 0; k < num_cpr; k++ ) never evaluated: k < num_cpr | 0 |
| 5212 | { | - |
| 5213 | curr_cpr = cpr[k]; never executed (the execution status of this line is deduced): curr_cpr = cpr[k]; | - |
| 5214 | bgc = curr_cpr.BacktrackGlyphCount; never executed (the execution status of this line is deduced): bgc = curr_cpr.BacktrackGlyphCount; | - |
| 5215 | igc = curr_cpr.InputGlyphCount; never executed (the execution status of this line is deduced): igc = curr_cpr.InputGlyphCount; | - |
| 5216 | lgc = curr_cpr.LookaheadGlyphCount; never executed (the execution status of this line is deduced): lgc = curr_cpr.LookaheadGlyphCount; | - |
| 5217 | | - |
| 5218 | if ( context_length != 0xFFFF && context_length < igc ) never evaluated: context_length != 0xFFFF never evaluated: context_length < igc | 0 |
| 5219 | goto next_chainposrule; never executed: goto next_chainposrule; | 0 |
| 5220 | | - |
| 5221 | /* check whether context is too long; it is a first guess only */ | - |
| 5222 | | - |
| 5223 | if ( bgc > buffer->in_pos || buffer->in_pos + igc + lgc > buffer->in_length ) never evaluated: bgc > buffer->in_pos never evaluated: buffer->in_pos + igc + lgc > buffer->in_length | 0 |
| 5224 | goto next_chainposrule; never executed: goto next_chainposrule; | 0 |
| 5225 | | - |
| 5226 | if ( bgc ) | 0 |
| 5227 | { | - |
| 5228 | /* Since we don't know in advance the number of glyphs to inspect, | - |
| 5229 | we search backwards for matches in the backtrack glyph array */ | - |
| 5230 | | - |
| 5231 | for ( i = 0, j = buffer->in_pos - 1; i < bgc; i++, j-- ) | 0 |
| 5232 | { | - |
| 5233 | while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) ) never evaluated: ( ( error = _HB_GDEF_Check_Property( (gdef), ((&buffer->in_string[(j)])), (flags), (&property) ) ) != HB_Err_Ok ) | 0 |
| 5234 | { | - |
| 5235 | if ( error && error != HB_Err_Not_Covered ) never evaluated: error never evaluated: error != HB_Err_Not_Covered | 0 |
| 5236 | return error; never executed: return error; | 0 |
| 5237 | | - |
| 5238 | if ( j + 1 == bgc - i ) never evaluated: j + 1 == bgc - i | 0 |
| 5239 | goto next_chainposrule; never executed: goto next_chainposrule; | 0 |
| 5240 | j--; never executed (the execution status of this line is deduced): j--; | - |
| 5241 | } | 0 |
| 5242 | | - |
| 5243 | /* In OpenType 1.3, it is undefined whether the offsets of | - |
| 5244 | backtrack glyphs is in logical order or not. Version 1.4 | - |
| 5245 | will clarify this: | - |
| 5246 | | - |
| 5247 | Logical order - a b c d e f g h i j | - |
| 5248 | i | - |
| 5249 | Input offsets - 0 1 | - |
| 5250 | Backtrack offsets - 3 2 1 0 | - |
| 5251 | Lookahead offsets - 0 1 2 3 */ | - |
| 5252 | | - |
| 5253 | if ( IN_GLYPH( j ) != curr_cpr.Backtrack[i] ) never evaluated: (buffer->in_string[(j)].gindex) != curr_cpr.Backtrack[i] | 0 |
| 5254 | goto next_chainposrule; never executed: goto next_chainposrule; | 0 |
| 5255 | } | 0 |
| 5256 | } | 0 |
| 5257 | | - |
| 5258 | /* Start at 1 because [0] is implied */ | - |
| 5259 | | - |
| 5260 | for ( i = 1, j = buffer->in_pos + 1; i < igc; i++, j++ ) | 0 |
| 5261 | { | - |
| 5262 | while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) ) never evaluated: ( ( error = _HB_GDEF_Check_Property( (gdef), ((&buffer->in_string[(j)])), (flags), (&property) ) ) != HB_Err_Ok ) | 0 |
| 5263 | { | - |
| 5264 | if ( error && error != HB_Err_Not_Covered ) never evaluated: error never evaluated: error != HB_Err_Not_Covered | 0 |
| 5265 | return error; never executed: return error; | 0 |
| 5266 | | - |
| 5267 | if ( j + igc - i + lgc == (HB_Int)buffer->in_length ) never evaluated: j + igc - i + lgc == (HB_Int)buffer->in_length | 0 |
| 5268 | goto next_chainposrule; never executed: goto next_chainposrule; | 0 |
| 5269 | j++; never executed (the execution status of this line is deduced): j++; | - |
| 5270 | } | 0 |
| 5271 | | - |
| 5272 | if ( IN_GLYPH( j ) != curr_cpr.Input[i - 1] ) never evaluated: (buffer->in_string[(j)].gindex) != curr_cpr.Input[i - 1] | 0 |
| 5273 | goto next_chainposrule; never executed: goto next_chainposrule; | 0 |
| 5274 | } | 0 |
| 5275 | | - |
| 5276 | /* we are starting to check for lookahead glyphs right after the | - |
| 5277 | last context glyph */ | - |
| 5278 | | - |
| 5279 | for ( i = 0; i < lgc; i++, j++ ) | 0 |
| 5280 | { | - |
| 5281 | while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) ) never evaluated: ( ( error = _HB_GDEF_Check_Property( (gdef), ((&buffer->in_string[(j)])), (flags), (&property) ) ) != HB_Err_Ok ) | 0 |
| 5282 | { | - |
| 5283 | if ( error && error != HB_Err_Not_Covered ) never evaluated: error never evaluated: error != HB_Err_Not_Covered | 0 |
| 5284 | return error; never executed: return error; | 0 |
| 5285 | | - |
| 5286 | if ( j + lgc - i == (HB_Int)buffer->in_length ) never evaluated: j + lgc - i == (HB_Int)buffer->in_length | 0 |
| 5287 | goto next_chainposrule; never executed: goto next_chainposrule; | 0 |
| 5288 | j++; never executed (the execution status of this line is deduced): j++; | - |
| 5289 | } | 0 |
| 5290 | | - |
| 5291 | if ( IN_GLYPH( j ) != curr_cpr.Lookahead[i] ) never evaluated: (buffer->in_string[(j)].gindex) != curr_cpr.Lookahead[i] | 0 |
| 5292 | goto next_chainposrule; never executed: goto next_chainposrule; | 0 |
| 5293 | } | 0 |
| 5294 | | - |
| 5295 | return Do_ContextPos( gpi, igc, never executed: return Do_ContextPos( gpi, igc, curr_cpr.PosCount, curr_cpr.PosLookupRecord, buffer, nesting_level ); | 0 |
| 5296 | curr_cpr.PosCount, never executed: return Do_ContextPos( gpi, igc, curr_cpr.PosCount, curr_cpr.PosLookupRecord, buffer, nesting_level ); | 0 |
| 5297 | curr_cpr.PosLookupRecord, never executed: return Do_ContextPos( gpi, igc, curr_cpr.PosCount, curr_cpr.PosLookupRecord, buffer, nesting_level ); | 0 |
| 5298 | buffer, never executed: return Do_ContextPos( gpi, igc, curr_cpr.PosCount, curr_cpr.PosLookupRecord, buffer, nesting_level ); | 0 |
| 5299 | nesting_level ); never executed: return Do_ContextPos( gpi, igc, curr_cpr.PosCount, curr_cpr.PosLookupRecord, buffer, nesting_level ); | 0 |
| 5300 | | - |
| 5301 | next_chainposrule: | - |
| 5302 | ; | - |
| 5303 | } | 0 |
| 5304 | | - |
| 5305 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 5306 | } | - |
| 5307 | | - |
| 5308 | | - |
| 5309 | static HB_Error Lookup_ChainContextPos2( | - |
| 5310 | GPOS_Instance* gpi, | - |
| 5311 | HB_ChainContextPosFormat2* ccpf2, | - |
| 5312 | HB_Buffer buffer, | - |
| 5313 | HB_UShort flags, | - |
| 5314 | HB_UShort context_length, | - |
| 5315 | int nesting_level ) | - |
| 5316 | { | - |
| 5317 | HB_UShort index, property; never executed (the execution status of this line is deduced): HB_UShort index, property; | - |
| 5318 | HB_Error error; never executed (the execution status of this line is deduced): HB_Error error; | - |
| 5319 | HB_UShort i, j, k; never executed (the execution status of this line is deduced): HB_UShort i, j, k; | - |
| 5320 | HB_UShort bgc, igc, lgc; never executed (the execution status of this line is deduced): HB_UShort bgc, igc, lgc; | - |
| 5321 | HB_UShort known_backtrack_classes, never executed (the execution status of this line is deduced): HB_UShort known_backtrack_classes, | - |
| 5322 | known_input_classes, never executed (the execution status of this line is deduced): known_input_classes, | - |
| 5323 | known_lookahead_classes; never executed (the execution status of this line is deduced): known_lookahead_classes; | - |
| 5324 | | - |
| 5325 | HB_UShort* backtrack_classes; never executed (the execution status of this line is deduced): HB_UShort* backtrack_classes; | - |
| 5326 | HB_UShort* input_classes; never executed (the execution status of this line is deduced): HB_UShort* input_classes; | - |
| 5327 | HB_UShort* lookahead_classes; never executed (the execution status of this line is deduced): HB_UShort* lookahead_classes; | - |
| 5328 | | - |
| 5329 | HB_UShort* bc; never executed (the execution status of this line is deduced): HB_UShort* bc; | - |
| 5330 | HB_UShort* ic; never executed (the execution status of this line is deduced): HB_UShort* ic; | - |
| 5331 | HB_UShort* lc; never executed (the execution status of this line is deduced): HB_UShort* lc; | - |
| 5332 | HB_GPOSHeader* gpos = gpi->gpos; never executed (the execution status of this line is deduced): HB_GPOSHeader* gpos = gpi->gpos; | - |
| 5333 | | - |
| 5334 | HB_ChainPosClassSet* cpcs; never executed (the execution status of this line is deduced): HB_ChainPosClassSet* cpcs; | - |
| 5335 | HB_ChainPosClassRule cpcr; never executed (the execution status of this line is deduced): HB_ChainPosClassRule cpcr; | - |
| 5336 | HB_GDEFHeader* gdef; never executed (the execution status of this line is deduced): HB_GDEFHeader* gdef; | - |
| 5337 | | - |
| 5338 | | - |
| 5339 | gdef = gpos->gdef; never executed (the execution status of this line is deduced): gdef = gpos->gdef; | - |
| 5340 | | - |
| 5341 | if ( CHECK_Property( gdef, IN_CURITEM(), flags, &property ) ) never evaluated: ( ( error = _HB_GDEF_Check_Property( (gdef), ((&buffer->in_string[buffer->in_pos])), (flags), (&property) ) ) != HB_Err_Ok ) | 0 |
| 5342 | return error; never executed: return error; | 0 |
| 5343 | | - |
| 5344 | /* Note: The coverage table in format 2 doesn't give an index into | - |
| 5345 | anything. It just lets us know whether or not we need to | - |
| 5346 | do any lookup at all. */ | - |
| 5347 | | - |
| 5348 | error = _HB_OPEN_Coverage_Index( &ccpf2->Coverage, IN_CURGLYPH(), &index ); never executed (the execution status of this line is deduced): error = _HB_OPEN_Coverage_Index( &ccpf2->Coverage, (buffer->in_string[buffer->in_pos].gindex), &index ); | - |
| 5349 | if ( error ) | 0 |
| 5350 | return error; never executed: return error; | 0 |
| 5351 | | - |
| 5352 | if ( ALLOC_ARRAY( backtrack_classes, ccpf2->MaxBacktrackLength, HB_UShort ) ) never evaluated: ( (backtrack_classes) = _hb_alloc( (ccpf2->MaxBacktrackLength)*sizeof(HB_UShort), &error ), error != 0 ) | 0 |
| 5353 | return error; never executed: return error; | 0 |
| 5354 | known_backtrack_classes = 0; never executed (the execution status of this line is deduced): known_backtrack_classes = 0; | - |
| 5355 | | - |
| 5356 | if (ccpf2->MaxInputLength < 1) never evaluated: ccpf2->MaxInputLength < 1 | 0 |
| 5357 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 5358 | | - |
| 5359 | if ( ALLOC_ARRAY( input_classes, ccpf2->MaxInputLength, HB_UShort ) ) never evaluated: ( (input_classes) = _hb_alloc( (ccpf2->MaxInputLength)*sizeof(HB_UShort), &error ), error != 0 ) | 0 |
| 5360 | goto End3; never executed: goto End3; | 0 |
| 5361 | known_input_classes = 1; never executed (the execution status of this line is deduced): known_input_classes = 1; | - |
| 5362 | | - |
| 5363 | if ( ALLOC_ARRAY( lookahead_classes, ccpf2->MaxLookaheadLength, HB_UShort ) ) never evaluated: ( (lookahead_classes) = _hb_alloc( (ccpf2->MaxLookaheadLength)*sizeof(HB_UShort), &error ), error != 0 ) | 0 |
| 5364 | goto End2; never executed: goto End2; | 0 |
| 5365 | known_lookahead_classes = 0; never executed (the execution status of this line is deduced): known_lookahead_classes = 0; | - |
| 5366 | | - |
| 5367 | error = _HB_OPEN_Get_Class( &ccpf2->InputClassDef, IN_CURGLYPH(), never executed (the execution status of this line is deduced): error = _HB_OPEN_Get_Class( &ccpf2->InputClassDef, (buffer->in_string[buffer->in_pos].gindex), | - |
| 5368 | &input_classes[0], NULL ); never executed (the execution status of this line is deduced): &input_classes[0], ((void *)0) ); | - |
| 5369 | if ( error && error != HB_Err_Not_Covered ) never evaluated: error never evaluated: error != HB_Err_Not_Covered | 0 |
| 5370 | goto End1; never executed: goto End1; | 0 |
| 5371 | | - |
| 5372 | cpcs = &ccpf2->ChainPosClassSet[input_classes[0]]; never executed (the execution status of this line is deduced): cpcs = &ccpf2->ChainPosClassSet[input_classes[0]]; | - |
| 5373 | if ( !cpcs ) | 0 |
| 5374 | { | - |
| 5375 | error = ERR(HB_Err_Invalid_SubTable); never executed (the execution status of this line is deduced): error = _hb_err (HB_Err_Invalid_SubTable); | - |
| 5376 | goto End1; never executed: goto End1; | 0 |
| 5377 | } | - |
| 5378 | | - |
| 5379 | for ( k = 0; k < cpcs->ChainPosClassRuleCount; k++ ) never evaluated: k < cpcs->ChainPosClassRuleCount | 0 |
| 5380 | { | - |
| 5381 | cpcr = cpcs->ChainPosClassRule[k]; never executed (the execution status of this line is deduced): cpcr = cpcs->ChainPosClassRule[k]; | - |
| 5382 | bgc = cpcr.BacktrackGlyphCount; never executed (the execution status of this line is deduced): bgc = cpcr.BacktrackGlyphCount; | - |
| 5383 | igc = cpcr.InputGlyphCount; never executed (the execution status of this line is deduced): igc = cpcr.InputGlyphCount; | - |
| 5384 | lgc = cpcr.LookaheadGlyphCount; never executed (the execution status of this line is deduced): lgc = cpcr.LookaheadGlyphCount; | - |
| 5385 | | - |
| 5386 | if ( context_length != 0xFFFF && context_length < igc ) never evaluated: context_length != 0xFFFF never evaluated: context_length < igc | 0 |
| 5387 | goto next_chainposclassrule; never executed: goto next_chainposclassrule; | 0 |
| 5388 | | - |
| 5389 | /* check whether context is too long; it is a first guess only */ | - |
| 5390 | | - |
| 5391 | if ( bgc > buffer->in_pos || buffer->in_pos + igc + lgc > buffer->in_length ) never evaluated: bgc > buffer->in_pos never evaluated: buffer->in_pos + igc + lgc > buffer->in_length | 0 |
| 5392 | goto next_chainposclassrule; never executed: goto next_chainposclassrule; | 0 |
| 5393 | | - |
| 5394 | if ( bgc ) | 0 |
| 5395 | { | - |
| 5396 | /* Since we don't know in advance the number of glyphs to inspect, | - |
| 5397 | we search backwards for matches in the backtrack glyph array. | - |
| 5398 | Note that `known_backtrack_classes' starts at index 0. */ | - |
| 5399 | | - |
| 5400 | bc = cpcr.Backtrack; never executed (the execution status of this line is deduced): bc = cpcr.Backtrack; | - |
| 5401 | | - |
| 5402 | for ( i = 0, j = buffer->in_pos - 1; i < bgc; i++, j-- ) | 0 |
| 5403 | { | - |
| 5404 | while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) ) never evaluated: ( ( error = _HB_GDEF_Check_Property( (gdef), ((&buffer->in_string[(j)])), (flags), (&property) ) ) != HB_Err_Ok ) | 0 |
| 5405 | { | - |
| 5406 | if ( error && error != HB_Err_Not_Covered ) never evaluated: error never evaluated: error != HB_Err_Not_Covered | 0 |
| 5407 | goto End1; never executed: goto End1; | 0 |
| 5408 | | - |
| 5409 | if ( j + 1 == bgc - i ) never evaluated: j + 1 == bgc - i | 0 |
| 5410 | goto next_chainposclassrule; never executed: goto next_chainposclassrule; | 0 |
| 5411 | j++; never executed (the execution status of this line is deduced): j++; | - |
| 5412 | } | 0 |
| 5413 | | - |
| 5414 | if ( i >= known_backtrack_classes ) never evaluated: i >= known_backtrack_classes | 0 |
| 5415 | { | - |
| 5416 | /* Keeps us from having to do this for each rule */ | - |
| 5417 | | - |
| 5418 | error = _HB_OPEN_Get_Class( &ccpf2->BacktrackClassDef, IN_GLYPH( j ), never executed (the execution status of this line is deduced): error = _HB_OPEN_Get_Class( &ccpf2->BacktrackClassDef, (buffer->in_string[(j)].gindex), | - |
| 5419 | &backtrack_classes[i], NULL ); never executed (the execution status of this line is deduced): &backtrack_classes[i], ((void *)0) ); | - |
| 5420 | if ( error && error != HB_Err_Not_Covered ) never evaluated: error never evaluated: error != HB_Err_Not_Covered | 0 |
| 5421 | goto End1; never executed: goto End1; | 0 |
| 5422 | known_backtrack_classes = i; never executed (the execution status of this line is deduced): known_backtrack_classes = i; | - |
| 5423 | } | 0 |
| 5424 | | - |
| 5425 | if ( bc[i] != backtrack_classes[i] ) never evaluated: bc[i] != backtrack_classes[i] | 0 |
| 5426 | goto next_chainposclassrule; never executed: goto next_chainposclassrule; | 0 |
| 5427 | } | 0 |
| 5428 | } | 0 |
| 5429 | | - |
| 5430 | ic = cpcr.Input; never executed (the execution status of this line is deduced): ic = cpcr.Input; | - |
| 5431 | | - |
| 5432 | /* Start at 1 because [0] is implied */ | - |
| 5433 | | - |
| 5434 | for ( i = 1, j = buffer->in_pos + 1; i < igc; i++, j++ ) | 0 |
| 5435 | { | - |
| 5436 | while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) ) never evaluated: ( ( error = _HB_GDEF_Check_Property( (gdef), ((&buffer->in_string[(j)])), (flags), (&property) ) ) != HB_Err_Ok ) | 0 |
| 5437 | { | - |
| 5438 | if ( error && error != HB_Err_Not_Covered ) never evaluated: error never evaluated: error != HB_Err_Not_Covered | 0 |
| 5439 | goto End1; never executed: goto End1; | 0 |
| 5440 | | - |
| 5441 | if ( j + igc - i + lgc == (HB_Int)buffer->in_length ) never evaluated: j + igc - i + lgc == (HB_Int)buffer->in_length | 0 |
| 5442 | goto next_chainposclassrule; never executed: goto next_chainposclassrule; | 0 |
| 5443 | j++; never executed (the execution status of this line is deduced): j++; | - |
| 5444 | } | 0 |
| 5445 | | - |
| 5446 | if ( i >= known_input_classes ) never evaluated: i >= known_input_classes | 0 |
| 5447 | { | - |
| 5448 | error = _HB_OPEN_Get_Class( &ccpf2->InputClassDef, IN_GLYPH( j ), never executed (the execution status of this line is deduced): error = _HB_OPEN_Get_Class( &ccpf2->InputClassDef, (buffer->in_string[(j)].gindex), | - |
| 5449 | &input_classes[i], NULL ); never executed (the execution status of this line is deduced): &input_classes[i], ((void *)0) ); | - |
| 5450 | if ( error && error != HB_Err_Not_Covered ) never evaluated: error never evaluated: error != HB_Err_Not_Covered | 0 |
| 5451 | goto End1; never executed: goto End1; | 0 |
| 5452 | known_input_classes = i; never executed (the execution status of this line is deduced): known_input_classes = i; | - |
| 5453 | } | 0 |
| 5454 | | - |
| 5455 | if ( ic[i - 1] != input_classes[i] ) never evaluated: ic[i - 1] != input_classes[i] | 0 |
| 5456 | goto next_chainposclassrule; never executed: goto next_chainposclassrule; | 0 |
| 5457 | } | 0 |
| 5458 | | - |
| 5459 | /* we are starting to check for lookahead glyphs right after the | - |
| 5460 | last context glyph */ | - |
| 5461 | | - |
| 5462 | lc = cpcr.Lookahead; never executed (the execution status of this line is deduced): lc = cpcr.Lookahead; | - |
| 5463 | | - |
| 5464 | for ( i = 0; i < lgc; i++, j++ ) | 0 |
| 5465 | { | - |
| 5466 | while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) ) never evaluated: ( ( error = _HB_GDEF_Check_Property( (gdef), ((&buffer->in_string[(j)])), (flags), (&property) ) ) != HB_Err_Ok ) | 0 |
| 5467 | { | - |
| 5468 | if ( error && error != HB_Err_Not_Covered ) never evaluated: error never evaluated: error != HB_Err_Not_Covered | 0 |
| 5469 | goto End1; never executed: goto End1; | 0 |
| 5470 | | - |
| 5471 | if ( j + lgc - i == (HB_Int)buffer->in_length ) never evaluated: j + lgc - i == (HB_Int)buffer->in_length | 0 |
| 5472 | goto next_chainposclassrule; never executed: goto next_chainposclassrule; | 0 |
| 5473 | j++; never executed (the execution status of this line is deduced): j++; | - |
| 5474 | } | 0 |
| 5475 | | - |
| 5476 | if ( i >= known_lookahead_classes ) never evaluated: i >= known_lookahead_classes | 0 |
| 5477 | { | - |
| 5478 | error = _HB_OPEN_Get_Class( &ccpf2->LookaheadClassDef, IN_GLYPH( j ), never executed (the execution status of this line is deduced): error = _HB_OPEN_Get_Class( &ccpf2->LookaheadClassDef, (buffer->in_string[(j)].gindex), | - |
| 5479 | &lookahead_classes[i], NULL ); never executed (the execution status of this line is deduced): &lookahead_classes[i], ((void *)0) ); | - |
| 5480 | if ( error && error != HB_Err_Not_Covered ) never evaluated: error never evaluated: error != HB_Err_Not_Covered | 0 |
| 5481 | goto End1; never executed: goto End1; | 0 |
| 5482 | known_lookahead_classes = i; never executed (the execution status of this line is deduced): known_lookahead_classes = i; | - |
| 5483 | } | 0 |
| 5484 | | - |
| 5485 | if ( lc[i] != lookahead_classes[i] ) never evaluated: lc[i] != lookahead_classes[i] | 0 |
| 5486 | goto next_chainposclassrule; never executed: goto next_chainposclassrule; | 0 |
| 5487 | } | 0 |
| 5488 | | - |
| 5489 | error = Do_ContextPos( gpi, igc, never executed (the execution status of this line is deduced): error = Do_ContextPos( gpi, igc, | - |
| 5490 | cpcr.PosCount, never executed (the execution status of this line is deduced): cpcr.PosCount, | - |
| 5491 | cpcr.PosLookupRecord, never executed (the execution status of this line is deduced): cpcr.PosLookupRecord, | - |
| 5492 | buffer, never executed (the execution status of this line is deduced): buffer, | - |
| 5493 | nesting_level ); never executed (the execution status of this line is deduced): nesting_level ); | - |
| 5494 | goto End1; never executed: goto End1; | 0 |
| 5495 | | - |
| 5496 | next_chainposclassrule: | - |
| 5497 | ; | - |
| 5498 | } | 0 |
| 5499 | | - |
| 5500 | error = HB_Err_Not_Covered; never executed (the execution status of this line is deduced): error = HB_Err_Not_Covered; | - |
| 5501 | | - |
| 5502 | End1: code before this statement never executed: End1: | 0 |
| 5503 | FREE( lookahead_classes ); never executed: } never executed: } never evaluated: (lookahead_classes) never evaluated: 0 | 0 |
| 5504 | | - |
| 5505 | End2: code before this statement never executed: End2: | 0 |
| 5506 | FREE( input_classes ); never executed: } never executed: } never evaluated: (input_classes) never evaluated: 0 | 0 |
| 5507 | | - |
| 5508 | End3: code before this statement never executed: End3: | 0 |
| 5509 | FREE( backtrack_classes ); never executed: } never executed: } never evaluated: (backtrack_classes) never evaluated: 0 | 0 |
| 5510 | return error; never executed: return error; | 0 |
| 5511 | } | - |
| 5512 | | - |
| 5513 | | - |
| 5514 | static HB_Error Lookup_ChainContextPos3( | - |
| 5515 | GPOS_Instance* gpi, | - |
| 5516 | HB_ChainContextPosFormat3* ccpf3, | - |
| 5517 | HB_Buffer buffer, | - |
| 5518 | HB_UShort flags, | - |
| 5519 | HB_UShort context_length, | - |
| 5520 | int nesting_level ) | - |
| 5521 | { | - |
| 5522 | HB_UShort index, i, j, property; never executed (the execution status of this line is deduced): HB_UShort index, i, j, property; | - |
| 5523 | HB_UShort bgc, igc, lgc; never executed (the execution status of this line is deduced): HB_UShort bgc, igc, lgc; | - |
| 5524 | HB_Error error; never executed (the execution status of this line is deduced): HB_Error error; | - |
| 5525 | HB_GPOSHeader* gpos = gpi->gpos; never executed (the execution status of this line is deduced): HB_GPOSHeader* gpos = gpi->gpos; | - |
| 5526 | | - |
| 5527 | HB_Coverage* bc; never executed (the execution status of this line is deduced): HB_Coverage* bc; | - |
| 5528 | HB_Coverage* ic; never executed (the execution status of this line is deduced): HB_Coverage* ic; | - |
| 5529 | HB_Coverage* lc; never executed (the execution status of this line is deduced): HB_Coverage* lc; | - |
| 5530 | HB_GDEFHeader* gdef; never executed (the execution status of this line is deduced): HB_GDEFHeader* gdef; | - |
| 5531 | | - |
| 5532 | | - |
| 5533 | gdef = gpos->gdef; never executed (the execution status of this line is deduced): gdef = gpos->gdef; | - |
| 5534 | | - |
| 5535 | if ( CHECK_Property( gdef, IN_CURITEM(), flags, &property ) ) never evaluated: ( ( error = _HB_GDEF_Check_Property( (gdef), ((&buffer->in_string[buffer->in_pos])), (flags), (&property) ) ) != HB_Err_Ok ) | 0 |
| 5536 | return error; never executed: return error; | 0 |
| 5537 | | - |
| 5538 | bgc = ccpf3->BacktrackGlyphCount; never executed (the execution status of this line is deduced): bgc = ccpf3->BacktrackGlyphCount; | - |
| 5539 | igc = ccpf3->InputGlyphCount; never executed (the execution status of this line is deduced): igc = ccpf3->InputGlyphCount; | - |
| 5540 | lgc = ccpf3->LookaheadGlyphCount; never executed (the execution status of this line is deduced): lgc = ccpf3->LookaheadGlyphCount; | - |
| 5541 | | - |
| 5542 | if ( context_length != 0xFFFF && context_length < igc ) never evaluated: context_length != 0xFFFF never evaluated: context_length < igc | 0 |
| 5543 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 5544 | | - |
| 5545 | /* check whether context is too long; it is a first guess only */ | - |
| 5546 | | - |
| 5547 | if ( bgc > buffer->in_pos || buffer->in_pos + igc + lgc > buffer->in_length ) never evaluated: bgc > buffer->in_pos never evaluated: buffer->in_pos + igc + lgc > buffer->in_length | 0 |
| 5548 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 5549 | | - |
| 5550 | if ( bgc ) | 0 |
| 5551 | { | - |
| 5552 | /* Since we don't know in advance the number of glyphs to inspect, | - |
| 5553 | we search backwards for matches in the backtrack glyph array */ | - |
| 5554 | | - |
| 5555 | bc = ccpf3->BacktrackCoverage; never executed (the execution status of this line is deduced): bc = ccpf3->BacktrackCoverage; | - |
| 5556 | | - |
| 5557 | for ( i = 0, j = buffer->in_pos - 1; i < bgc; i++, j-- ) | 0 |
| 5558 | { | - |
| 5559 | while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) ) never evaluated: ( ( error = _HB_GDEF_Check_Property( (gdef), ((&buffer->in_string[(j)])), (flags), (&property) ) ) != HB_Err_Ok ) | 0 |
| 5560 | { | - |
| 5561 | if ( error && error != HB_Err_Not_Covered ) never evaluated: error never evaluated: error != HB_Err_Not_Covered | 0 |
| 5562 | return error; never executed: return error; | 0 |
| 5563 | | - |
| 5564 | if ( j + 1 == bgc - i ) never evaluated: j + 1 == bgc - i | 0 |
| 5565 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 5566 | j--; never executed (the execution status of this line is deduced): j--; | - |
| 5567 | } | 0 |
| 5568 | | - |
| 5569 | error = _HB_OPEN_Coverage_Index( &bc[i], IN_GLYPH( j ), &index ); never executed (the execution status of this line is deduced): error = _HB_OPEN_Coverage_Index( &bc[i], (buffer->in_string[(j)].gindex), &index ); | - |
| 5570 | if ( error ) | 0 |
| 5571 | return error; never executed: return error; | 0 |
| 5572 | } | 0 |
| 5573 | } | 0 |
| 5574 | | - |
| 5575 | ic = ccpf3->InputCoverage; never executed (the execution status of this line is deduced): ic = ccpf3->InputCoverage; | - |
| 5576 | | - |
| 5577 | for ( i = 0, j = buffer->in_pos; i < igc; i++, j++ ) | 0 |
| 5578 | { | - |
| 5579 | /* We already called CHECK_Property for IN_GLYPH ( buffer->in_pos ) */ | - |
| 5580 | while ( j > buffer->in_pos && CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) ) never evaluated: j > buffer->in_pos never evaluated: ( ( error = _HB_GDEF_Check_Property( (gdef), ((&buffer->in_string[(j)])), (flags), (&property) ) ) != HB_Err_Ok ) | 0 |
| 5581 | { | - |
| 5582 | if ( error && error != HB_Err_Not_Covered ) never evaluated: error never evaluated: error != HB_Err_Not_Covered | 0 |
| 5583 | return error; never executed: return error; | 0 |
| 5584 | | - |
| 5585 | if ( j + igc - i + lgc == (HB_Int)buffer->in_length ) never evaluated: j + igc - i + lgc == (HB_Int)buffer->in_length | 0 |
| 5586 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 5587 | j++; never executed (the execution status of this line is deduced): j++; | - |
| 5588 | } | 0 |
| 5589 | | - |
| 5590 | error = _HB_OPEN_Coverage_Index( &ic[i], IN_GLYPH( j ), &index ); never executed (the execution status of this line is deduced): error = _HB_OPEN_Coverage_Index( &ic[i], (buffer->in_string[(j)].gindex), &index ); | - |
| 5591 | if ( error ) | 0 |
| 5592 | return error; never executed: return error; | 0 |
| 5593 | } | 0 |
| 5594 | | - |
| 5595 | /* we are starting to check for lookahead glyphs right after the | - |
| 5596 | last context glyph */ | - |
| 5597 | | - |
| 5598 | lc = ccpf3->LookaheadCoverage; never executed (the execution status of this line is deduced): lc = ccpf3->LookaheadCoverage; | - |
| 5599 | | - |
| 5600 | for ( i = 0; i < lgc; i++, j++ ) | 0 |
| 5601 | { | - |
| 5602 | while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) ) never evaluated: ( ( error = _HB_GDEF_Check_Property( (gdef), ((&buffer->in_string[(j)])), (flags), (&property) ) ) != HB_Err_Ok ) | 0 |
| 5603 | { | - |
| 5604 | if ( error && error != HB_Err_Not_Covered ) never evaluated: error never evaluated: error != HB_Err_Not_Covered | 0 |
| 5605 | return error; never executed: return error; | 0 |
| 5606 | | - |
| 5607 | if ( j + lgc - i == (HB_Int)buffer->in_length ) never evaluated: j + lgc - i == (HB_Int)buffer->in_length | 0 |
| 5608 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 5609 | j++; never executed (the execution status of this line is deduced): j++; | - |
| 5610 | } | 0 |
| 5611 | | - |
| 5612 | error = _HB_OPEN_Coverage_Index( &lc[i], IN_GLYPH( j ), &index ); never executed (the execution status of this line is deduced): error = _HB_OPEN_Coverage_Index( &lc[i], (buffer->in_string[(j)].gindex), &index ); | - |
| 5613 | if ( error ) | 0 |
| 5614 | return error; never executed: return error; | 0 |
| 5615 | } | 0 |
| 5616 | | - |
| 5617 | return Do_ContextPos( gpi, igc, never executed: return Do_ContextPos( gpi, igc, ccpf3->PosCount, ccpf3->PosLookupRecord, buffer, nesting_level ); | 0 |
| 5618 | ccpf3->PosCount, never executed: return Do_ContextPos( gpi, igc, ccpf3->PosCount, ccpf3->PosLookupRecord, buffer, nesting_level ); | 0 |
| 5619 | ccpf3->PosLookupRecord, never executed: return Do_ContextPos( gpi, igc, ccpf3->PosCount, ccpf3->PosLookupRecord, buffer, nesting_level ); | 0 |
| 5620 | buffer, never executed: return Do_ContextPos( gpi, igc, ccpf3->PosCount, ccpf3->PosLookupRecord, buffer, nesting_level ); | 0 |
| 5621 | nesting_level ); never executed: return Do_ContextPos( gpi, igc, ccpf3->PosCount, ccpf3->PosLookupRecord, buffer, nesting_level ); | 0 |
| 5622 | } | - |
| 5623 | | - |
| 5624 | | - |
| 5625 | static HB_Error Lookup_ChainContextPos( | - |
| 5626 | GPOS_Instance* gpi, | - |
| 5627 | HB_GPOS_SubTable* st, | - |
| 5628 | HB_Buffer buffer, | - |
| 5629 | HB_UShort flags, | - |
| 5630 | HB_UShort context_length, | - |
| 5631 | int nesting_level ) | - |
| 5632 | { | - |
| 5633 | HB_ChainContextPos* ccp = &st->chain; never executed (the execution status of this line is deduced): HB_ChainContextPos* ccp = &st->chain; | - |
| 5634 | | - |
| 5635 | switch ( ccp->PosFormat ) | - |
| 5636 | { | - |
| 5637 | case 1: | - |
| 5638 | return Lookup_ChainContextPos1( gpi, &ccp->ccpf.ccpf1, buffer, never executed: return Lookup_ChainContextPos1( gpi, &ccp->ccpf.ccpf1, buffer, flags, context_length, nesting_level ); | 0 |
| 5639 | flags, context_length, never executed: return Lookup_ChainContextPos1( gpi, &ccp->ccpf.ccpf1, buffer, flags, context_length, nesting_level ); | 0 |
| 5640 | nesting_level ); never executed: return Lookup_ChainContextPos1( gpi, &ccp->ccpf.ccpf1, buffer, flags, context_length, nesting_level ); | 0 |
| 5641 | | - |
| 5642 | case 2: | - |
| 5643 | return Lookup_ChainContextPos2( gpi, &ccp->ccpf.ccpf2, buffer, never executed: return Lookup_ChainContextPos2( gpi, &ccp->ccpf.ccpf2, buffer, flags, context_length, nesting_level ); | 0 |
| 5644 | flags, context_length, never executed: return Lookup_ChainContextPos2( gpi, &ccp->ccpf.ccpf2, buffer, flags, context_length, nesting_level ); | 0 |
| 5645 | nesting_level ); never executed: return Lookup_ChainContextPos2( gpi, &ccp->ccpf.ccpf2, buffer, flags, context_length, nesting_level ); | 0 |
| 5646 | | - |
| 5647 | case 3: | - |
| 5648 | return Lookup_ChainContextPos3( gpi, &ccp->ccpf.ccpf3, buffer, never executed: return Lookup_ChainContextPos3( gpi, &ccp->ccpf.ccpf3, buffer, flags, context_length, nesting_level ); | 0 |
| 5649 | flags, context_length, never executed: return Lookup_ChainContextPos3( gpi, &ccp->ccpf.ccpf3, buffer, flags, context_length, nesting_level ); | 0 |
| 5650 | nesting_level ); never executed: return Lookup_ChainContextPos3( gpi, &ccp->ccpf.ccpf3, buffer, flags, context_length, nesting_level ); | 0 |
| 5651 | | - |
| 5652 | default: | - |
| 5653 | return ERR(HB_Err_Invalid_SubTable_Format); never executed: return _hb_err (HB_Err_Invalid_SubTable_Format); | 0 |
| 5654 | } | - |
| 5655 | | - |
| 5656 | return HB_Err_Ok; /* never reached */ never executed: return HB_Err_Ok; | 0 |
| 5657 | } | - |
| 5658 | | - |
| 5659 | | - |
| 5660 | | - |
| 5661 | /*********** | - |
| 5662 | * GPOS API | - |
| 5663 | ***********/ | - |
| 5664 | | - |
| 5665 | | - |
| 5666 | | - |
| 5667 | HB_Error HB_GPOS_Select_Script( HB_GPOSHeader* gpos, | - |
| 5668 | HB_UInt script_tag, | - |
| 5669 | HB_UShort* script_index ) | - |
| 5670 | { | - |
| 5671 | HB_UShort n; executed (the execution status of this line is deduced): HB_UShort n; | - |
| 5672 | | - |
| 5673 | HB_ScriptList* sl; executed (the execution status of this line is deduced): HB_ScriptList* sl; | - |
| 5674 | HB_ScriptRecord* sr; executed (the execution status of this line is deduced): HB_ScriptRecord* sr; | - |
| 5675 | | - |
| 5676 | | - |
| 5677 | if ( !gpos || !script_index ) partially evaluated: !gpos| no Evaluation Count:0 | yes Evaluation Count:460 |
partially evaluated: !script_index| no Evaluation Count:0 | yes Evaluation Count:460 |
| 0-460 |
| 5678 | return ERR(HB_Err_Invalid_Argument); never executed: return _hb_err (HB_Err_Invalid_Argument); | 0 |
| 5679 | | - |
| 5680 | sl = &gpos->ScriptList; executed (the execution status of this line is deduced): sl = &gpos->ScriptList; | - |
| 5681 | sr = sl->ScriptRecord; executed (the execution status of this line is deduced): sr = sl->ScriptRecord; | - |
| 5682 | | - |
| 5683 | for ( n = 0; n < sl->ScriptCount; n++ ) evaluated: n < sl->ScriptCount| yes Evaluation Count:5588 | yes Evaluation Count:1 |
| 1-5588 |
| 5684 | if ( script_tag == sr[n].ScriptTag ) evaluated: script_tag == sr[n].ScriptTag| yes Evaluation Count:459 | yes Evaluation Count:5129 |
| 459-5129 |
| 5685 | { | - |
| 5686 | *script_index = n; executed (the execution status of this line is deduced): *script_index = n; | - |
| 5687 | | - |
| 5688 | return HB_Err_Ok; executed: return HB_Err_Ok;Execution Count:459 | 459 |
| 5689 | } | - |
| 5690 | | - |
| 5691 | return HB_Err_Not_Covered; executed: return HB_Err_Not_Covered;Execution Count:1 | 1 |
| 5692 | } | - |
| 5693 | | - |
| 5694 | | - |
| 5695 | | - |
| 5696 | HB_Error HB_GPOS_Select_Language( HB_GPOSHeader* gpos, | - |
| 5697 | HB_UInt language_tag, | - |
| 5698 | HB_UShort script_index, | - |
| 5699 | HB_UShort* language_index, | - |
| 5700 | HB_UShort* req_feature_index ) | - |
| 5701 | { | - |
| 5702 | HB_UShort n; never executed (the execution status of this line is deduced): HB_UShort n; | - |
| 5703 | | - |
| 5704 | HB_ScriptList* sl; never executed (the execution status of this line is deduced): HB_ScriptList* sl; | - |
| 5705 | HB_ScriptRecord* sr; never executed (the execution status of this line is deduced): HB_ScriptRecord* sr; | - |
| 5706 | HB_ScriptTable* s; never executed (the execution status of this line is deduced): HB_ScriptTable* s; | - |
| 5707 | HB_LangSysRecord* lsr; never executed (the execution status of this line is deduced): HB_LangSysRecord* lsr; | - |
| 5708 | | - |
| 5709 | | - |
| 5710 | if ( !gpos || !language_index || !req_feature_index ) never evaluated: !gpos never evaluated: !language_index never evaluated: !req_feature_index | 0 |
| 5711 | return ERR(HB_Err_Invalid_Argument); never executed: return _hb_err (HB_Err_Invalid_Argument); | 0 |
| 5712 | | - |
| 5713 | sl = &gpos->ScriptList; never executed (the execution status of this line is deduced): sl = &gpos->ScriptList; | - |
| 5714 | sr = sl->ScriptRecord; never executed (the execution status of this line is deduced): sr = sl->ScriptRecord; | - |
| 5715 | | - |
| 5716 | if ( script_index >= sl->ScriptCount ) never evaluated: script_index >= sl->ScriptCount | 0 |
| 5717 | return ERR(HB_Err_Invalid_Argument); never executed: return _hb_err (HB_Err_Invalid_Argument); | 0 |
| 5718 | | - |
| 5719 | s = &sr[script_index].Script; never executed (the execution status of this line is deduced): s = &sr[script_index].Script; | - |
| 5720 | lsr = s->LangSysRecord; never executed (the execution status of this line is deduced): lsr = s->LangSysRecord; | - |
| 5721 | | - |
| 5722 | for ( n = 0; n < s->LangSysCount; n++ ) never evaluated: n < s->LangSysCount | 0 |
| 5723 | if ( language_tag == lsr[n].LangSysTag ) never evaluated: language_tag == lsr[n].LangSysTag | 0 |
| 5724 | { | - |
| 5725 | *language_index = n; never executed (the execution status of this line is deduced): *language_index = n; | - |
| 5726 | *req_feature_index = lsr[n].LangSys.ReqFeatureIndex; never executed (the execution status of this line is deduced): *req_feature_index = lsr[n].LangSys.ReqFeatureIndex; | - |
| 5727 | | - |
| 5728 | return HB_Err_Ok; never executed: return HB_Err_Ok; | 0 |
| 5729 | } | - |
| 5730 | | - |
| 5731 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 5732 | } | - |
| 5733 | | - |
| 5734 | | - |
| 5735 | /* selecting 0xFFFF for language_index asks for the values of the | - |
| 5736 | default language (DefaultLangSys) */ | - |
| 5737 | | - |
| 5738 | | - |
| 5739 | HB_Error HB_GPOS_Select_Feature( HB_GPOSHeader* gpos, | - |
| 5740 | HB_UInt feature_tag, | - |
| 5741 | HB_UShort script_index, | - |
| 5742 | HB_UShort language_index, | - |
| 5743 | HB_UShort* feature_index ) | - |
| 5744 | { | - |
| 5745 | HB_UShort n; executed (the execution status of this line is deduced): HB_UShort n; | - |
| 5746 | | - |
| 5747 | HB_ScriptList* sl; executed (the execution status of this line is deduced): HB_ScriptList* sl; | - |
| 5748 | HB_ScriptRecord* sr; executed (the execution status of this line is deduced): HB_ScriptRecord* sr; | - |
| 5749 | HB_ScriptTable* s; executed (the execution status of this line is deduced): HB_ScriptTable* s; | - |
| 5750 | HB_LangSysRecord* lsr; executed (the execution status of this line is deduced): HB_LangSysRecord* lsr; | - |
| 5751 | HB_LangSys* ls; executed (the execution status of this line is deduced): HB_LangSys* ls; | - |
| 5752 | HB_UShort* fi; executed (the execution status of this line is deduced): HB_UShort* fi; | - |
| 5753 | | - |
| 5754 | HB_FeatureList* fl; executed (the execution status of this line is deduced): HB_FeatureList* fl; | - |
| 5755 | HB_FeatureRecord* fr; executed (the execution status of this line is deduced): HB_FeatureRecord* fr; | - |
| 5756 | | - |
| 5757 | | - |
| 5758 | if ( !gpos || !feature_index ) partially evaluated: !gpos| no Evaluation Count:0 | yes Evaluation Count:1259 |
partially evaluated: !feature_index| no Evaluation Count:0 | yes Evaluation Count:1259 |
| 0-1259 |
| 5759 | return ERR(HB_Err_Invalid_Argument); never executed: return _hb_err (HB_Err_Invalid_Argument); | 0 |
| 5760 | | - |
| 5761 | sl = &gpos->ScriptList; executed (the execution status of this line is deduced): sl = &gpos->ScriptList; | - |
| 5762 | sr = sl->ScriptRecord; executed (the execution status of this line is deduced): sr = sl->ScriptRecord; | - |
| 5763 | | - |
| 5764 | fl = &gpos->FeatureList; executed (the execution status of this line is deduced): fl = &gpos->FeatureList; | - |
| 5765 | fr = fl->FeatureRecord; executed (the execution status of this line is deduced): fr = fl->FeatureRecord; | - |
| 5766 | | - |
| 5767 | if ( script_index >= sl->ScriptCount ) partially evaluated: script_index >= sl->ScriptCount| no Evaluation Count:0 | yes Evaluation Count:1259 |
| 0-1259 |
| 5768 | return ERR(HB_Err_Invalid_Argument); never executed: return _hb_err (HB_Err_Invalid_Argument); | 0 |
| 5769 | | - |
| 5770 | s = &sr[script_index].Script; executed (the execution status of this line is deduced): s = &sr[script_index].Script; | - |
| 5771 | lsr = s->LangSysRecord; executed (the execution status of this line is deduced): lsr = s->LangSysRecord; | - |
| 5772 | | - |
| 5773 | if ( language_index == 0xFFFF ) partially evaluated: language_index == 0xFFFF| yes Evaluation Count:1259 | no Evaluation Count:0 |
| 0-1259 |
| 5774 | ls = &s->DefaultLangSys; executed: ls = &s->DefaultLangSys;Execution Count:1259 | 1259 |
| 5775 | else | - |
| 5776 | { | - |
| 5777 | if ( language_index >= s->LangSysCount ) never evaluated: language_index >= s->LangSysCount | 0 |
| 5778 | return ERR(HB_Err_Invalid_Argument); never executed: return _hb_err (HB_Err_Invalid_Argument); | 0 |
| 5779 | | - |
| 5780 | ls = &lsr[language_index].LangSys; never executed (the execution status of this line is deduced): ls = &lsr[language_index].LangSys; | - |
| 5781 | } | 0 |
| 5782 | | - |
| 5783 | fi = ls->FeatureIndex; executed (the execution status of this line is deduced): fi = ls->FeatureIndex; | - |
| 5784 | | - |
| 5785 | for ( n = 0; n < ls->FeatureCount; n++ ) partially evaluated: n < ls->FeatureCount| yes Evaluation Count:2406 | no Evaluation Count:0 |
| 0-2406 |
| 5786 | { | - |
| 5787 | if ( fi[n] >= fl->FeatureCount ) partially evaluated: fi[n] >= fl->FeatureCount| no Evaluation Count:0 | yes Evaluation Count:2406 |
| 0-2406 |
| 5788 | return ERR(HB_Err_Invalid_SubTable_Format); never executed: return _hb_err (HB_Err_Invalid_SubTable_Format); | 0 |
| 5789 | | - |
| 5790 | if ( feature_tag == fr[fi[n]].FeatureTag ) evaluated: feature_tag == fr[fi[n]].FeatureTag| yes Evaluation Count:1259 | yes Evaluation Count:1147 |
| 1147-1259 |
| 5791 | { | - |
| 5792 | *feature_index = fi[n]; executed (the execution status of this line is deduced): *feature_index = fi[n]; | - |
| 5793 | | - |
| 5794 | return HB_Err_Ok; executed: return HB_Err_Ok;Execution Count:1259 | 1259 |
| 5795 | } | - |
| 5796 | } executed: }Execution Count:1147 | 1147 |
| 5797 | | - |
| 5798 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 5799 | } | - |
| 5800 | | - |
| 5801 | | - |
| 5802 | /* The next three functions return a null-terminated list */ | - |
| 5803 | | - |
| 5804 | | - |
| 5805 | HB_Error HB_GPOS_Query_Scripts( HB_GPOSHeader* gpos, | - |
| 5806 | HB_UInt** script_tag_list ) | - |
| 5807 | { | - |
| 5808 | HB_Error error; never executed (the execution status of this line is deduced): HB_Error error; | - |
| 5809 | HB_UShort n; never executed (the execution status of this line is deduced): HB_UShort n; | - |
| 5810 | HB_UInt* stl; never executed (the execution status of this line is deduced): HB_UInt* stl; | - |
| 5811 | | - |
| 5812 | HB_ScriptList* sl; never executed (the execution status of this line is deduced): HB_ScriptList* sl; | - |
| 5813 | HB_ScriptRecord* sr; never executed (the execution status of this line is deduced): HB_ScriptRecord* sr; | - |
| 5814 | | - |
| 5815 | | - |
| 5816 | if ( !gpos || !script_tag_list ) never evaluated: !gpos never evaluated: !script_tag_list | 0 |
| 5817 | return ERR(HB_Err_Invalid_Argument); never executed: return _hb_err (HB_Err_Invalid_Argument); | 0 |
| 5818 | | - |
| 5819 | sl = &gpos->ScriptList; never executed (the execution status of this line is deduced): sl = &gpos->ScriptList; | - |
| 5820 | sr = sl->ScriptRecord; never executed (the execution status of this line is deduced): sr = sl->ScriptRecord; | - |
| 5821 | | - |
| 5822 | if ( ALLOC_ARRAY( stl, sl->ScriptCount + 1, HB_UInt ) ) never evaluated: ( (stl) = _hb_alloc( (sl->ScriptCount + 1)*sizeof(HB_UInt), &error ), error != 0 ) | 0 |
| 5823 | return error; never executed: return error; | 0 |
| 5824 | | - |
| 5825 | for ( n = 0; n < sl->ScriptCount; n++ ) never evaluated: n < sl->ScriptCount | 0 |
| 5826 | stl[n] = sr[n].ScriptTag; never executed: stl[n] = sr[n].ScriptTag; | 0 |
| 5827 | stl[n] = 0; never executed (the execution status of this line is deduced): stl[n] = 0; | - |
| 5828 | | - |
| 5829 | *script_tag_list = stl; never executed (the execution status of this line is deduced): *script_tag_list = stl; | - |
| 5830 | | - |
| 5831 | return HB_Err_Ok; never executed: return HB_Err_Ok; | 0 |
| 5832 | } | - |
| 5833 | | - |
| 5834 | | - |
| 5835 | | - |
| 5836 | HB_Error HB_GPOS_Query_Languages( HB_GPOSHeader* gpos, | - |
| 5837 | HB_UShort script_index, | - |
| 5838 | HB_UInt** language_tag_list ) | - |
| 5839 | { | - |
| 5840 | HB_Error error; never executed (the execution status of this line is deduced): HB_Error error; | - |
| 5841 | HB_UShort n; never executed (the execution status of this line is deduced): HB_UShort n; | - |
| 5842 | HB_UInt* ltl; never executed (the execution status of this line is deduced): HB_UInt* ltl; | - |
| 5843 | | - |
| 5844 | HB_ScriptList* sl; never executed (the execution status of this line is deduced): HB_ScriptList* sl; | - |
| 5845 | HB_ScriptRecord* sr; never executed (the execution status of this line is deduced): HB_ScriptRecord* sr; | - |
| 5846 | HB_ScriptTable* s; never executed (the execution status of this line is deduced): HB_ScriptTable* s; | - |
| 5847 | HB_LangSysRecord* lsr; never executed (the execution status of this line is deduced): HB_LangSysRecord* lsr; | - |
| 5848 | | - |
| 5849 | | - |
| 5850 | if ( !gpos || !language_tag_list ) never evaluated: !gpos never evaluated: !language_tag_list | 0 |
| 5851 | return ERR(HB_Err_Invalid_Argument); never executed: return _hb_err (HB_Err_Invalid_Argument); | 0 |
| 5852 | | - |
| 5853 | sl = &gpos->ScriptList; never executed (the execution status of this line is deduced): sl = &gpos->ScriptList; | - |
| 5854 | sr = sl->ScriptRecord; never executed (the execution status of this line is deduced): sr = sl->ScriptRecord; | - |
| 5855 | | - |
| 5856 | if ( script_index >= sl->ScriptCount ) never evaluated: script_index >= sl->ScriptCount | 0 |
| 5857 | return ERR(HB_Err_Invalid_Argument); never executed: return _hb_err (HB_Err_Invalid_Argument); | 0 |
| 5858 | | - |
| 5859 | s = &sr[script_index].Script; never executed (the execution status of this line is deduced): s = &sr[script_index].Script; | - |
| 5860 | lsr = s->LangSysRecord; never executed (the execution status of this line is deduced): lsr = s->LangSysRecord; | - |
| 5861 | | - |
| 5862 | if ( ALLOC_ARRAY( ltl, s->LangSysCount + 1, HB_UInt ) ) never evaluated: ( (ltl) = _hb_alloc( (s->LangSysCount + 1)*sizeof(HB_UInt), &error ), error != 0 ) | 0 |
| 5863 | return error; never executed: return error; | 0 |
| 5864 | | - |
| 5865 | for ( n = 0; n < s->LangSysCount; n++ ) never evaluated: n < s->LangSysCount | 0 |
| 5866 | ltl[n] = lsr[n].LangSysTag; never executed: ltl[n] = lsr[n].LangSysTag; | 0 |
| 5867 | ltl[n] = 0; never executed (the execution status of this line is deduced): ltl[n] = 0; | - |
| 5868 | | - |
| 5869 | *language_tag_list = ltl; never executed (the execution status of this line is deduced): *language_tag_list = ltl; | - |
| 5870 | | - |
| 5871 | return HB_Err_Ok; never executed: return HB_Err_Ok; | 0 |
| 5872 | } | - |
| 5873 | | - |
| 5874 | | - |
| 5875 | /* selecting 0xFFFF for language_index asks for the values of the | - |
| 5876 | default language (DefaultLangSys) */ | - |
| 5877 | | - |
| 5878 | | - |
| 5879 | HB_Error HB_GPOS_Query_Features( HB_GPOSHeader* gpos, | - |
| 5880 | HB_UShort script_index, | - |
| 5881 | HB_UShort language_index, | - |
| 5882 | HB_UInt** feature_tag_list ) | - |
| 5883 | { | - |
| 5884 | HB_UShort n; executed (the execution status of this line is deduced): HB_UShort n; | - |
| 5885 | HB_Error error; executed (the execution status of this line is deduced): HB_Error error; | - |
| 5886 | HB_UInt* ftl; executed (the execution status of this line is deduced): HB_UInt* ftl; | - |
| 5887 | | - |
| 5888 | HB_ScriptList* sl; executed (the execution status of this line is deduced): HB_ScriptList* sl; | - |
| 5889 | HB_ScriptRecord* sr; executed (the execution status of this line is deduced): HB_ScriptRecord* sr; | - |
| 5890 | HB_ScriptTable* s; executed (the execution status of this line is deduced): HB_ScriptTable* s; | - |
| 5891 | HB_LangSysRecord* lsr; executed (the execution status of this line is deduced): HB_LangSysRecord* lsr; | - |
| 5892 | HB_LangSys* ls; executed (the execution status of this line is deduced): HB_LangSys* ls; | - |
| 5893 | HB_UShort* fi; executed (the execution status of this line is deduced): HB_UShort* fi; | - |
| 5894 | | - |
| 5895 | HB_FeatureList* fl; executed (the execution status of this line is deduced): HB_FeatureList* fl; | - |
| 5896 | HB_FeatureRecord* fr; executed (the execution status of this line is deduced): HB_FeatureRecord* fr; | - |
| 5897 | | - |
| 5898 | | - |
| 5899 | if ( !gpos || !feature_tag_list ) partially evaluated: !gpos| no Evaluation Count:0 | yes Evaluation Count:459 |
partially evaluated: !feature_tag_list| no Evaluation Count:0 | yes Evaluation Count:459 |
| 0-459 |
| 5900 | return ERR(HB_Err_Invalid_Argument); never executed: return _hb_err (HB_Err_Invalid_Argument); | 0 |
| 5901 | | - |
| 5902 | sl = &gpos->ScriptList; executed (the execution status of this line is deduced): sl = &gpos->ScriptList; | - |
| 5903 | sr = sl->ScriptRecord; executed (the execution status of this line is deduced): sr = sl->ScriptRecord; | - |
| 5904 | | - |
| 5905 | fl = &gpos->FeatureList; executed (the execution status of this line is deduced): fl = &gpos->FeatureList; | - |
| 5906 | fr = fl->FeatureRecord; executed (the execution status of this line is deduced): fr = fl->FeatureRecord; | - |
| 5907 | | - |
| 5908 | if ( script_index >= sl->ScriptCount ) partially evaluated: script_index >= sl->ScriptCount| no Evaluation Count:0 | yes Evaluation Count:459 |
| 0-459 |
| 5909 | return ERR(HB_Err_Invalid_Argument); never executed: return _hb_err (HB_Err_Invalid_Argument); | 0 |
| 5910 | | - |
| 5911 | s = &sr[script_index].Script; executed (the execution status of this line is deduced): s = &sr[script_index].Script; | - |
| 5912 | lsr = s->LangSysRecord; executed (the execution status of this line is deduced): lsr = s->LangSysRecord; | - |
| 5913 | | - |
| 5914 | if ( language_index == 0xFFFF ) partially evaluated: language_index == 0xFFFF| yes Evaluation Count:459 | no Evaluation Count:0 |
| 0-459 |
| 5915 | ls = &s->DefaultLangSys; executed: ls = &s->DefaultLangSys;Execution Count:459 | 459 |
| 5916 | else | - |
| 5917 | { | - |
| 5918 | if ( language_index >= s->LangSysCount ) never evaluated: language_index >= s->LangSysCount | 0 |
| 5919 | return ERR(HB_Err_Invalid_Argument); never executed: return _hb_err (HB_Err_Invalid_Argument); | 0 |
| 5920 | | - |
| 5921 | ls = &lsr[language_index].LangSys; never executed (the execution status of this line is deduced): ls = &lsr[language_index].LangSys; | - |
| 5922 | } | 0 |
| 5923 | | - |
| 5924 | fi = ls->FeatureIndex; executed (the execution status of this line is deduced): fi = ls->FeatureIndex; | - |
| 5925 | | - |
| 5926 | if ( ALLOC_ARRAY( ftl, ls->FeatureCount + 1, HB_UInt ) ) partially evaluated: ( (ftl) = _hb_alloc( (ls->FeatureCount + 1)*sizeof(HB_UInt), &error ), error != 0 )| no Evaluation Count:0 | yes Evaluation Count:459 |
| 0-459 |
| 5927 | return error; never executed: return error; | 0 |
| 5928 | | - |
| 5929 | for ( n = 0; n < ls->FeatureCount; n++ ) evaluated: n < ls->FeatureCount| yes Evaluation Count:1259 | yes Evaluation Count:459 |
| 459-1259 |
| 5930 | { | - |
| 5931 | if ( fi[n] >= fl->FeatureCount ) partially evaluated: fi[n] >= fl->FeatureCount| no Evaluation Count:0 | yes Evaluation Count:1259 |
| 0-1259 |
| 5932 | { | - |
| 5933 | FREE( ftl ); never executed: } never executed: } never evaluated: (ftl) never evaluated: 0 | 0 |
| 5934 | return ERR(HB_Err_Invalid_SubTable_Format); never executed: return _hb_err (HB_Err_Invalid_SubTable_Format); | 0 |
| 5935 | } | - |
| 5936 | ftl[n] = fr[fi[n]].FeatureTag; executed (the execution status of this line is deduced): ftl[n] = fr[fi[n]].FeatureTag; | - |
| 5937 | } executed: }Execution Count:1259 | 1259 |
| 5938 | ftl[n] = 0; executed (the execution status of this line is deduced): ftl[n] = 0; | - |
| 5939 | | - |
| 5940 | *feature_tag_list = ftl; executed (the execution status of this line is deduced): *feature_tag_list = ftl; | - |
| 5941 | | - |
| 5942 | return HB_Err_Ok; executed: return HB_Err_Ok;Execution Count:459 | 459 |
| 5943 | } | - |
| 5944 | | - |
| 5945 | | - |
| 5946 | /* Do an individual subtable lookup. Returns HB_Err_Ok if positioning | - |
| 5947 | has been done, or HB_Err_Not_Covered if not. */ | - |
| 5948 | static HB_Error GPOS_Do_Glyph_Lookup( GPOS_Instance* gpi, | - |
| 5949 | HB_UShort lookup_index, | - |
| 5950 | HB_Buffer buffer, | - |
| 5951 | HB_UShort context_length, | - |
| 5952 | int nesting_level ) | - |
| 5953 | { | - |
| 5954 | HB_Error error = HB_Err_Not_Covered; executed (the execution status of this line is deduced): HB_Error error = HB_Err_Not_Covered; | - |
| 5955 | HB_UShort i, flags, lookup_count; executed (the execution status of this line is deduced): HB_UShort i, flags, lookup_count; | - |
| 5956 | HB_GPOSHeader* gpos = gpi->gpos; executed (the execution status of this line is deduced): HB_GPOSHeader* gpos = gpi->gpos; | - |
| 5957 | HB_Lookup* lo; executed (the execution status of this line is deduced): HB_Lookup* lo; | - |
| 5958 | int lookup_type; executed (the execution status of this line is deduced): int lookup_type; | - |
| 5959 | | - |
| 5960 | | - |
| 5961 | nesting_level++; executed (the execution status of this line is deduced): nesting_level++; | - |
| 5962 | | - |
| 5963 | if ( nesting_level > HB_MAX_NESTING_LEVEL ) partially evaluated: nesting_level > 100| no Evaluation Count:0 | yes Evaluation Count:16119752 |
| 0-16119752 |
| 5964 | return ERR(HB_Err_Not_Covered); /* ERR() call intended */ never executed: return _hb_err (HB_Err_Not_Covered); | 0 |
| 5965 | | - |
| 5966 | lookup_count = gpos->LookupList.LookupCount; executed (the execution status of this line is deduced): lookup_count = gpos->LookupList.LookupCount; | - |
| 5967 | if (lookup_index >= lookup_count) partially evaluated: lookup_index >= lookup_count| no Evaluation Count:0 | yes Evaluation Count:16119752 |
| 0-16119752 |
| 5968 | return error; never executed: return error; | 0 |
| 5969 | | - |
| 5970 | lo = &gpos->LookupList.Lookup[lookup_index]; executed (the execution status of this line is deduced): lo = &gpos->LookupList.Lookup[lookup_index]; | - |
| 5971 | flags = lo->LookupFlag; executed (the execution status of this line is deduced): flags = lo->LookupFlag; | - |
| 5972 | lookup_type = lo->LookupType; executed (the execution status of this line is deduced): lookup_type = lo->LookupType; | - |
| 5973 | | - |
| 5974 | for ( i = 0; i < lo->SubTableCount; i++ ) evaluated: i < lo->SubTableCount| yes Evaluation Count:31873883 | yes Evaluation Count:15685084 |
| 15685084-31873883 |
| 5975 | { | - |
| 5976 | HB_GPOS_SubTable *st = &lo->SubTable[i].st.gpos; executed (the execution status of this line is deduced): HB_GPOS_SubTable *st = &lo->SubTable[i].st.gpos; | - |
| 5977 | | - |
| 5978 | switch (lookup_type) { | - |
| 5979 | case HB_GPOS_LOOKUP_SINGLE: | - |
| 5980 | error = Lookup_SinglePos ( gpi, st, buffer, flags, context_length, nesting_level ); break; executed: break;Execution Count:11 | 11 |
| 5981 | case HB_GPOS_LOOKUP_PAIR: | - |
| 5982 | error = Lookup_PairPos ( gpi, st, buffer, flags, context_length, nesting_level ); break; executed: break;Execution Count:6220365 | 6220365 |
| 5983 | case HB_GPOS_LOOKUP_CURSIVE: | - |
| 5984 | error = Lookup_CursivePos ( gpi, st, buffer, flags, context_length, nesting_level ); break; | 0 |
| 5985 | case HB_GPOS_LOOKUP_MARKBASE: | - |
| 5986 | error = Lookup_MarkBasePos ( gpi, st, buffer, flags, context_length, nesting_level ); break; executed: break;Execution Count:16167399 | 16167399 |
| 5987 | case HB_GPOS_LOOKUP_MARKLIG: | - |
| 5988 | error = Lookup_MarkLigPos ( gpi, st, buffer, flags, context_length, nesting_level ); break; executed: break;Execution Count:2853864 | 2853864 |
| 5989 | case HB_GPOS_LOOKUP_MARKMARK: | - |
| 5990 | error = Lookup_MarkMarkPos ( gpi, st, buffer, flags, context_length, nesting_level ); break; executed: break;Execution Count:6632244 | 6632244 |
| 5991 | case HB_GPOS_LOOKUP_CONTEXT: | - |
| 5992 | error = Lookup_ContextPos ( gpi, st, buffer, flags, context_length, nesting_level ); break; | 0 |
| 5993 | case HB_GPOS_LOOKUP_CHAIN: | - |
| 5994 | error = Lookup_ChainContextPos ( gpi, st, buffer, flags, context_length, nesting_level ); break; | 0 |
| 5995 | /*case HB_GPOS_LOOKUP_EXTENSION: | - |
| 5996 | error = Lookup_ExtensionPos ( gpi, st, buffer, flags, context_length, nesting_level ); break;*/ | - |
| 5997 | default: | - |
| 5998 | error = HB_Err_Not_Covered; never executed (the execution status of this line is deduced): error = HB_Err_Not_Covered; | - |
| 5999 | } | 0 |
| 6000 | | - |
| 6001 | /* Check whether we have a successful positioning or an error other | - |
| 6002 | than HB_Err_Not_Covered */ | - |
| 6003 | if ( error != HB_Err_Not_Covered ) evaluated: error != HB_Err_Not_Covered| yes Evaluation Count:434668 | yes Evaluation Count:31439215 |
| 434668-31439215 |
| 6004 | return error; executed: return error;Execution Count:434668 | 434668 |
| 6005 | } executed: }Execution Count:31439215 | 31439215 |
| 6006 | | - |
| 6007 | return HB_Err_Not_Covered; executed: return HB_Err_Not_Covered;Execution Count:15685084 | 15685084 |
| 6008 | } | - |
| 6009 | | - |
| 6010 | | - |
| 6011 | HB_INTERNAL HB_Error | - |
| 6012 | _HB_GPOS_Load_SubTable( HB_GPOS_SubTable* st, | - |
| 6013 | HB_Stream stream, | - |
| 6014 | HB_UShort lookup_type ) | - |
| 6015 | { | - |
| 6016 | switch ( lookup_type ) { | - |
| 6017 | case HB_GPOS_LOOKUP_SINGLE: return Load_SinglePos ( st, stream ); executed: return Load_SinglePos ( st, stream );Execution Count:14 | 14 |
| 6018 | case HB_GPOS_LOOKUP_PAIR: return Load_PairPos ( st, stream ); executed: return Load_PairPos ( st, stream );Execution Count:276 | 276 |
| 6019 | case HB_GPOS_LOOKUP_CURSIVE: return Load_CursivePos ( st, stream ); never executed: return Load_CursivePos ( st, stream ); | 0 |
| 6020 | case HB_GPOS_LOOKUP_MARKBASE: return Load_MarkBasePos ( st, stream ); executed: return Load_MarkBasePos ( st, stream );Execution Count:1298 | 1298 |
| 6021 | case HB_GPOS_LOOKUP_MARKLIG: return Load_MarkLigPos ( st, stream ); executed: return Load_MarkLigPos ( st, stream );Execution Count:343 | 343 |
| 6022 | case HB_GPOS_LOOKUP_MARKMARK: return Load_MarkMarkPos ( st, stream ); executed: return Load_MarkMarkPos ( st, stream );Execution Count:753 | 753 |
| 6023 | case HB_GPOS_LOOKUP_CONTEXT: return Load_ContextPos ( st, stream ); never executed: return Load_ContextPos ( st, stream ); | 0 |
| 6024 | case HB_GPOS_LOOKUP_CHAIN: return Load_ChainContextPos ( st, stream ); never executed: return Load_ChainContextPos ( st, stream ); | 0 |
| 6025 | /*case HB_GPOS_LOOKUP_EXTENSION: return Load_ExtensionPos ( st, stream );*/ | - |
| 6026 | default: return ERR(HB_Err_Invalid_SubTable_Format); never executed: return _hb_err (HB_Err_Invalid_SubTable_Format); | 0 |
| 6027 | } | - |
| 6028 | } | 0 |
| 6029 | | - |
| 6030 | | - |
| 6031 | HB_INTERNAL void | - |
| 6032 | _HB_GPOS_Free_SubTable( HB_GPOS_SubTable* st, | - |
| 6033 | HB_UShort lookup_type ) | - |
| 6034 | { | - |
| 6035 | switch ( lookup_type ) { | - |
| 6036 | case HB_GPOS_LOOKUP_SINGLE: Free_SinglePos ( st ); return; executed: return;Execution Count:12 | 12 |
| 6037 | case HB_GPOS_LOOKUP_PAIR: Free_PairPos ( st ); return; executed: return;Execution Count:264 | 264 |
| 6038 | case HB_GPOS_LOOKUP_CURSIVE: Free_CursivePos ( st ); return; | 0 |
| 6039 | case HB_GPOS_LOOKUP_MARKBASE: Free_MarkBasePos ( st ); return; executed: return;Execution Count:1233 | 1233 |
| 6040 | case HB_GPOS_LOOKUP_MARKLIG: Free_MarkLigPos ( st ); return; executed: return;Execution Count:323 | 323 |
| 6041 | case HB_GPOS_LOOKUP_MARKMARK: Free_MarkMarkPos ( st ); return; executed: return;Execution Count:715 | 715 |
| 6042 | case HB_GPOS_LOOKUP_CONTEXT: Free_ContextPos ( st ); return; | 0 |
| 6043 | case HB_GPOS_LOOKUP_CHAIN: Free_ChainContextPos ( st ); return; | 0 |
| 6044 | /*case HB_GPOS_LOOKUP_EXTENSION: Free_ExtensionPos ( st ); return;*/ | - |
| 6045 | default: return; | 0 |
| 6046 | } | - |
| 6047 | } | 0 |
| 6048 | | - |
| 6049 | | - |
| 6050 | /* apply one lookup to the input string object */ | - |
| 6051 | | - |
| 6052 | static HB_Error GPOS_Do_String_Lookup( GPOS_Instance* gpi, | - |
| 6053 | HB_UShort lookup_index, | - |
| 6054 | HB_Buffer buffer ) | - |
| 6055 | { | - |
| 6056 | HB_Error error, retError = HB_Err_Not_Covered; executed (the execution status of this line is deduced): HB_Error error, retError = HB_Err_Not_Covered; | - |
| 6057 | HB_GPOSHeader* gpos = gpi->gpos; executed (the execution status of this line is deduced): HB_GPOSHeader* gpos = gpi->gpos; | - |
| 6058 | | - |
| 6059 | HB_UInt* properties = gpos->LookupList.Properties; executed (the execution status of this line is deduced): HB_UInt* properties = gpos->LookupList.Properties; | - |
| 6060 | | - |
| 6061 | const int nesting_level = 0; executed (the execution status of this line is deduced): const int nesting_level = 0; | - |
| 6062 | /* 0xFFFF indicates that we don't have a context length yet */ | - |
| 6063 | const HB_UShort context_length = 0xFFFF; executed (the execution status of this line is deduced): const HB_UShort context_length = 0xFFFF; | - |
| 6064 | | - |
| 6065 | | - |
| 6066 | gpi->last = 0xFFFF; /* no last valid glyph for cursive pos. */ executed (the execution status of this line is deduced): gpi->last = 0xFFFF; | - |
| 6067 | | - |
| 6068 | buffer->in_pos = 0; executed (the execution status of this line is deduced): buffer->in_pos = 0; | - |
| 6069 | while ( buffer->in_pos < buffer->in_length ) evaluated: buffer->in_pos < buffer->in_length| yes Evaluation Count:16119752 | yes Evaluation Count:1214652 |
| 1214652-16119752 |
| 6070 | { | - |
| 6071 | if ( ~IN_PROPERTIES( buffer->in_pos ) & properties[lookup_index] ) partially evaluated: ~(buffer->in_string[(buffer->in_pos)].properties) & properties[lookup_index]| yes Evaluation Count:16119752 | no Evaluation Count:0 |
| 0-16119752 |
| 6072 | { | - |
| 6073 | /* Note that the connection between mark and base glyphs hold | - |
| 6074 | exactly one (string) lookup. For example, it would be possible | - |
| 6075 | that in the first lookup, mark glyph X is attached to base | - |
| 6076 | glyph A, and in the next lookup it is attached to base glyph B. | - |
| 6077 | It is up to the font designer to provide meaningful lookups and | - |
| 6078 | lookup order. */ | - |
| 6079 | | - |
| 6080 | error = GPOS_Do_Glyph_Lookup( gpi, lookup_index, buffer, context_length, nesting_level ); executed (the execution status of this line is deduced): error = GPOS_Do_Glyph_Lookup( gpi, lookup_index, buffer, context_length, nesting_level ); | - |
| 6081 | if ( error && error != HB_Err_Not_Covered ) evaluated: error| yes Evaluation Count:15685084 | yes Evaluation Count:434668 |
partially evaluated: error != HB_Err_Not_Covered| no Evaluation Count:0 | yes Evaluation Count:15685084 |
| 0-15685084 |
| 6082 | return error; never executed: return error; | 0 |
| 6083 | } executed: }Execution Count:16119752 | 16119752 |
| 6084 | else | - |
| 6085 | { | - |
| 6086 | /* Contrary to properties defined in GDEF, user-defined properties | - |
| 6087 | will always stop a possible cursive positioning. */ | - |
| 6088 | gpi->last = 0xFFFF; never executed (the execution status of this line is deduced): gpi->last = 0xFFFF; | - |
| 6089 | | - |
| 6090 | error = HB_Err_Not_Covered; never executed (the execution status of this line is deduced): error = HB_Err_Not_Covered; | - |
| 6091 | } | 0 |
| 6092 | | - |
| 6093 | if ( error == HB_Err_Not_Covered ) evaluated: error == HB_Err_Not_Covered| yes Evaluation Count:15685084 | yes Evaluation Count:434668 |
| 434668-15685084 |
| 6094 | (buffer->in_pos)++; executed: (buffer->in_pos)++;Execution Count:15685084 | 15685084 |
| 6095 | else | - |
| 6096 | retError = error; executed: retError = error;Execution Count:434668 | 434668 |
| 6097 | } | - |
| 6098 | | - |
| 6099 | return retError; executed: return retError;Execution Count:1214652 | 1214652 |
| 6100 | } | - |
| 6101 | | - |
| 6102 | | - |
| 6103 | static HB_Error Position_CursiveChain ( HB_Buffer buffer ) | - |
| 6104 | { | - |
| 6105 | HB_UInt i, j; executed (the execution status of this line is deduced): HB_UInt i, j; | - |
| 6106 | HB_Position positions = buffer->positions; executed (the execution status of this line is deduced): HB_Position positions = buffer->positions; | - |
| 6107 | | - |
| 6108 | /* First handle all left-to-right connections */ | - |
| 6109 | for (j = 0; j < buffer->in_length; j++) evaluated: j < buffer->in_length| yes Evaluation Count:3316560 | yes Evaluation Count:248112 |
| 248112-3316560 |
| 6110 | { | - |
| 6111 | if (positions[j].cursive_chain > 0) partially evaluated: positions[j].cursive_chain > 0| no Evaluation Count:0 | yes Evaluation Count:3316560 |
| 0-3316560 |
| 6112 | positions[j].y_pos += positions[j - positions[j].cursive_chain].y_pos; never executed: positions[j].y_pos += positions[j - positions[j].cursive_chain].y_pos; | 0 |
| 6113 | } executed: }Execution Count:3316560 | 3316560 |
| 6114 | | - |
| 6115 | /* Then handle all right-to-left connections */ | - |
| 6116 | for (i = buffer->in_length; i > 0; i--) evaluated: i > 0| yes Evaluation Count:3316560 | yes Evaluation Count:248112 |
| 248112-3316560 |
| 6117 | { | - |
| 6118 | j = i - 1; executed (the execution status of this line is deduced): j = i - 1; | - |
| 6119 | | - |
| 6120 | if (positions[j].cursive_chain < 0) partially evaluated: positions[j].cursive_chain < 0| no Evaluation Count:0 | yes Evaluation Count:3316560 |
| 0-3316560 |
| 6121 | positions[j].y_pos += positions[j - positions[j].cursive_chain].y_pos; never executed: positions[j].y_pos += positions[j - positions[j].cursive_chain].y_pos; | 0 |
| 6122 | } executed: }Execution Count:3316560 | 3316560 |
| 6123 | | - |
| 6124 | return HB_Err_Ok; executed: return HB_Err_Ok;Execution Count:248112 | 248112 |
| 6125 | } | - |
| 6126 | | - |
| 6127 | | - |
| 6128 | HB_Error HB_GPOS_Add_Feature( HB_GPOSHeader* gpos, | - |
| 6129 | HB_UShort feature_index, | - |
| 6130 | HB_UInt property ) | - |
| 6131 | { | - |
| 6132 | HB_UShort i; executed (the execution status of this line is deduced): HB_UShort i; | - |
| 6133 | | - |
| 6134 | HB_Feature feature; executed (the execution status of this line is deduced): HB_Feature feature; | - |
| 6135 | HB_UInt* properties; executed (the execution status of this line is deduced): HB_UInt* properties; | - |
| 6136 | HB_UShort* index; executed (the execution status of this line is deduced): HB_UShort* index; | - |
| 6137 | HB_UShort lookup_count; executed (the execution status of this line is deduced): HB_UShort lookup_count; | - |
| 6138 | | - |
| 6139 | /* Each feature can only be added once */ | - |
| 6140 | | - |
| 6141 | if ( !gpos || partially evaluated: !gpos| no Evaluation Count:0 | yes Evaluation Count:1259 |
| 0-1259 |
| 6142 | feature_index >= gpos->FeatureList.FeatureCount || partially evaluated: feature_index >= gpos->FeatureList.FeatureCount| no Evaluation Count:0 | yes Evaluation Count:1259 |
| 0-1259 |
| 6143 | gpos->FeatureList.ApplyCount == gpos->FeatureList.FeatureCount ) partially evaluated: gpos->FeatureList.ApplyCount == gpos->FeatureList.FeatureCount| no Evaluation Count:0 | yes Evaluation Count:1259 |
| 0-1259 |
| 6144 | return ERR(HB_Err_Invalid_Argument); never executed: return _hb_err (HB_Err_Invalid_Argument); | 0 |
| 6145 | | - |
| 6146 | gpos->FeatureList.ApplyOrder[gpos->FeatureList.ApplyCount++] = feature_index; executed (the execution status of this line is deduced): gpos->FeatureList.ApplyOrder[gpos->FeatureList.ApplyCount++] = feature_index; | - |
| 6147 | | - |
| 6148 | properties = gpos->LookupList.Properties; executed (the execution status of this line is deduced): properties = gpos->LookupList.Properties; | - |
| 6149 | | - |
| 6150 | feature = gpos->FeatureList.FeatureRecord[feature_index].Feature; executed (the execution status of this line is deduced): feature = gpos->FeatureList.FeatureRecord[feature_index].Feature; | - |
| 6151 | index = feature.LookupListIndex; executed (the execution status of this line is deduced): index = feature.LookupListIndex; | - |
| 6152 | lookup_count = gpos->LookupList.LookupCount; executed (the execution status of this line is deduced): lookup_count = gpos->LookupList.LookupCount; | - |
| 6153 | | - |
| 6154 | for ( i = 0; i < feature.LookupListCount; i++ ) evaluated: i < feature.LookupListCount| yes Evaluation Count:2284 | yes Evaluation Count:1259 |
| 1259-2284 |
| 6155 | { | - |
| 6156 | HB_UShort lookup_index = index[i]; executed (the execution status of this line is deduced): HB_UShort lookup_index = index[i]; | - |
| 6157 | if (lookup_index < lookup_count) partially evaluated: lookup_index < lookup_count| yes Evaluation Count:2284 | no Evaluation Count:0 |
| 0-2284 |
| 6158 | properties[lookup_index] |= property; executed: properties[lookup_index] |= property;Execution Count:2284 | 2284 |
| 6159 | } executed: }Execution Count:2284 | 2284 |
| 6160 | | - |
| 6161 | return HB_Err_Ok; executed: return HB_Err_Ok;Execution Count:1259 | 1259 |
| 6162 | } | - |
| 6163 | | - |
| 6164 | | - |
| 6165 | | - |
| 6166 | HB_Error HB_GPOS_Clear_Features( HB_GPOSHeader* gpos ) | - |
| 6167 | { | - |
| 6168 | HB_UShort i; executed (the execution status of this line is deduced): HB_UShort i; | - |
| 6169 | | - |
| 6170 | HB_UInt* properties; executed (the execution status of this line is deduced): HB_UInt* properties; | - |
| 6171 | | - |
| 6172 | | - |
| 6173 | if ( !gpos ) partially evaluated: !gpos| no Evaluation Count:0 | yes Evaluation Count:460 |
| 0-460 |
| 6174 | return ERR(HB_Err_Invalid_Argument); never executed: return _hb_err (HB_Err_Invalid_Argument); | 0 |
| 6175 | | - |
| 6176 | gpos->FeatureList.ApplyCount = 0; executed (the execution status of this line is deduced): gpos->FeatureList.ApplyCount = 0; | - |
| 6177 | | - |
| 6178 | properties = gpos->LookupList.Properties; executed (the execution status of this line is deduced): properties = gpos->LookupList.Properties; | - |
| 6179 | | - |
| 6180 | for ( i = 0; i < gpos->LookupList.LookupCount; i++ ) evaluated: i < gpos->LookupList.LookupCount| yes Evaluation Count:7176 | yes Evaluation Count:460 |
| 460-7176 |
| 6181 | properties[i] = 0; executed: properties[i] = 0;Execution Count:7176 | 7176 |
| 6182 | | - |
| 6183 | return HB_Err_Ok; executed: return HB_Err_Ok;Execution Count:460 | 460 |
| 6184 | } | - |
| 6185 | | - |
| 6186 | #ifdef HB_SUPPORT_MULTIPLE_MASTER | - |
| 6187 | HB_Error HB_GPOS_Register_MM_Function( HB_GPOSHeader* gpos, | - |
| 6188 | HB_MMFunction mmfunc, | - |
| 6189 | void* data ) | - |
| 6190 | { | - |
| 6191 | if ( !gpos ) | - |
| 6192 | return ERR(HB_Err_Invalid_Argument); | - |
| 6193 | | - |
| 6194 | gpos->mmfunc = mmfunc; | - |
| 6195 | gpos->data = data; | - |
| 6196 | | - |
| 6197 | return HB_Err_Ok; | - |
| 6198 | } | - |
| 6199 | #endif | - |
| 6200 | | - |
| 6201 | /* If `dvi' is TRUE, glyph contour points for anchor points and device | - |
| 6202 | tables are ignored -- you will get device independent values. */ | - |
| 6203 | | - |
| 6204 | | - |
| 6205 | HB_Error HB_GPOS_Apply_String( HB_Font font, | - |
| 6206 | HB_GPOSHeader* gpos, | - |
| 6207 | HB_UShort load_flags, | - |
| 6208 | HB_Buffer buffer, | - |
| 6209 | HB_Bool dvi, | - |
| 6210 | HB_Bool r2l ) | - |
| 6211 | { | - |
| 6212 | HB_Error error, retError = HB_Err_Not_Covered; executed (the execution status of this line is deduced): HB_Error error, retError = HB_Err_Not_Covered; | - |
| 6213 | GPOS_Instance gpi; executed (the execution status of this line is deduced): GPOS_Instance gpi; | - |
| 6214 | int i, j, lookup_count, num_features; executed (the execution status of this line is deduced): int i, j, lookup_count, num_features; | - |
| 6215 | | - |
| 6216 | if ( !font || !gpos || !buffer ) partially evaluated: !font| no Evaluation Count:0 | yes Evaluation Count:248113 |
partially evaluated: !gpos| no Evaluation Count:0 | yes Evaluation Count:248113 |
partially evaluated: !buffer| no Evaluation Count:0 | yes Evaluation Count:248113 |
| 0-248113 |
| 6217 | return ERR(HB_Err_Invalid_Argument); never executed: return _hb_err (HB_Err_Invalid_Argument); | 0 |
| 6218 | | - |
| 6219 | if ( buffer->in_length == 0 ) partially evaluated: buffer->in_length == 0| no Evaluation Count:0 | yes Evaluation Count:248113 |
| 0-248113 |
| 6220 | return HB_Err_Not_Covered; never executed: return HB_Err_Not_Covered; | 0 |
| 6221 | | - |
| 6222 | gpi.font = font; executed (the execution status of this line is deduced): gpi.font = font; | - |
| 6223 | gpi.gpos = gpos; executed (the execution status of this line is deduced): gpi.gpos = gpos; | - |
| 6224 | gpi.load_flags = load_flags; executed (the execution status of this line is deduced): gpi.load_flags = load_flags; | - |
| 6225 | gpi.r2l = r2l; executed (the execution status of this line is deduced): gpi.r2l = r2l; | - |
| 6226 | gpi.dvi = dvi; executed (the execution status of this line is deduced): gpi.dvi = dvi; | - |
| 6227 | | - |
| 6228 | lookup_count = gpos->LookupList.LookupCount; executed (the execution status of this line is deduced): lookup_count = gpos->LookupList.LookupCount; | - |
| 6229 | num_features = gpos->FeatureList.ApplyCount; executed (the execution status of this line is deduced): num_features = gpos->FeatureList.ApplyCount; | - |
| 6230 | | - |
| 6231 | if ( num_features ) evaluated: num_features| yes Evaluation Count:248112 | yes Evaluation Count:1 |
| 1-248112 |
| 6232 | { | - |
| 6233 | error = _hb_buffer_clear_positions( buffer ); executed (the execution status of this line is deduced): error = _hb_buffer_clear_positions( buffer ); | - |
| 6234 | if ( error ) partially evaluated: error| no Evaluation Count:0 | yes Evaluation Count:248112 |
| 0-248112 |
| 6235 | return error; never executed: return error; | 0 |
| 6236 | } executed: }Execution Count:248112 | 248112 |
| 6237 | | - |
| 6238 | for ( i = 0; i < num_features; i++ ) evaluated: i < num_features| yes Evaluation Count:744153 | yes Evaluation Count:248113 |
| 248113-744153 |
| 6239 | { | - |
| 6240 | HB_UShort feature_index = gpos->FeatureList.ApplyOrder[i]; executed (the execution status of this line is deduced): HB_UShort feature_index = gpos->FeatureList.ApplyOrder[i]; | - |
| 6241 | HB_Feature feature = gpos->FeatureList.FeatureRecord[feature_index].Feature; executed (the execution status of this line is deduced): HB_Feature feature = gpos->FeatureList.FeatureRecord[feature_index].Feature; | - |
| 6242 | | - |
| 6243 | for ( j = 0; j < feature.LookupListCount; j++ ) evaluated: j < feature.LookupListCount| yes Evaluation Count:1214652 | yes Evaluation Count:744153 |
| 744153-1214652 |
| 6244 | { | - |
| 6245 | HB_UShort lookup_index = feature.LookupListIndex[j]; executed (the execution status of this line is deduced): HB_UShort lookup_index = feature.LookupListIndex[j]; | - |
| 6246 | | - |
| 6247 | /* Skip nonexistant lookups */ | - |
| 6248 | if (lookup_index >= lookup_count) partially evaluated: lookup_index >= lookup_count| no Evaluation Count:0 | yes Evaluation Count:1214652 |
| 0-1214652 |
| 6249 | continue; never executed: continue; | 0 |
| 6250 | | - |
| 6251 | error = GPOS_Do_String_Lookup( &gpi, lookup_index, buffer ); executed (the execution status of this line is deduced): error = GPOS_Do_String_Lookup( &gpi, lookup_index, buffer ); | - |
| 6252 | if ( error ) evaluated: error| yes Evaluation Count:1129190 | yes Evaluation Count:85462 |
| 85462-1129190 |
| 6253 | { | - |
| 6254 | if ( error != HB_Err_Not_Covered ) partially evaluated: error != HB_Err_Not_Covered| no Evaluation Count:0 | yes Evaluation Count:1129190 |
| 0-1129190 |
| 6255 | return error; never executed: return error; | 0 |
| 6256 | } executed: }Execution Count:1129190 | 1129190 |
| 6257 | else | - |
| 6258 | retError = error; executed: retError = error;Execution Count:85462 | 85462 |
| 6259 | } | - |
| 6260 | } executed: }Execution Count:744153 | 744153 |
| 6261 | | - |
| 6262 | if ( num_features ) evaluated: num_features| yes Evaluation Count:248112 | yes Evaluation Count:1 |
| 1-248112 |
| 6263 | { | - |
| 6264 | error = Position_CursiveChain ( buffer ); executed (the execution status of this line is deduced): error = Position_CursiveChain ( buffer ); | - |
| 6265 | if ( error ) partially evaluated: error| no Evaluation Count:0 | yes Evaluation Count:248112 |
| 0-248112 |
| 6266 | return error; never executed: return error; | 0 |
| 6267 | } executed: }Execution Count:248112 | 248112 |
| 6268 | | - |
| 6269 | return retError; executed: return retError;Execution Count:248113 | 248113 |
| 6270 | } | - |
| 6271 | | - |
| 6272 | /* END */ | - |
| 6273 | | - |
| | |