Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: src/psaux/psobjs.c

Issue 23555005: Update freetype to the latest version of Android external/freetype (Closed) Base URL: https://chromium.googlesource.com/chromium/src/third_party/freetype.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/psaux/psconv.c ('k') | src/psaux/t1cmap.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /***************************************************************************/ 1 /***************************************************************************/
2 /* */ 2 /* */
3 /* psobjs.c */ 3 /* psobjs.c */
4 /* */ 4 /* */
5 /* Auxiliary functions for PostScript fonts (body). */ 5 /* Auxiliary functions for PostScript fonts (body). */
6 /* */ 6 /* */
7 /* Copyright 1996-2011 by */ 7 /* Copyright 1996-2012 by */
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
9 /* */ 9 /* */
10 /* This file is part of the FreeType project, and may only be used, */ 10 /* This file is part of the FreeType project, and may only be used, */
11 /* modified, and distributed under the terms of the FreeType project */ 11 /* modified, and distributed under the terms of the FreeType project */
12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
13 /* this file you indicate that you have read the license and */ 13 /* this file you indicate that you have read the license and */
14 /* understand and accept it fully. */ 14 /* understand and accept it fully. */
15 /* */ 15 /* */
16 /***************************************************************************/ 16 /***************************************************************************/
17 17
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 178
179 if ( length < 0 ) 179 if ( length < 0 )
180 { 180 {
181 FT_ERROR(( "ps_table_add: invalid length\n" )); 181 FT_ERROR(( "ps_table_add: invalid length\n" ));
182 return PSaux_Err_Invalid_Argument; 182 return PSaux_Err_Invalid_Argument;
183 } 183 }
184 184
185 /* grow the base block if needed */ 185 /* grow the base block if needed */
186 if ( table->cursor + length > table->capacity ) 186 if ( table->cursor + length > table->capacity )
187 { 187 {
188 FT_Error error; 188 FT_Error error;
189 FT_Offset new_size = table->capacity; 189 FT_Offset new_size = table->capacity;
190 FT_PtrDist in_offset; 190 FT_PtrDist in_offset;
191 191
192 192
193 in_offset = (FT_Byte*)object - table->block; 193 in_offset = (FT_Byte*)object - table->block;
194 if ( in_offset < 0 || (FT_Offset)in_offset >= table->capacity ) 194 if ( in_offset < 0 || (FT_Offset)in_offset >= table->capacity )
195 in_offset = -1; 195 in_offset = -1;
196 196
197 while ( new_size < table->cursor + length ) 197 while ( new_size < table->cursor + length )
198 { 198 {
199 /* increase size by 25% and round up to the nearest multiple 199 /* increase size by 25% and round up to the nearest multiple
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 { 582 {
583 /* *cur might be invalid (e.g., ')' or '}'), but this */ 583 /* *cur might be invalid (e.g., ')' or '}'), but this */
584 /* is handled by the test `cur == parser->cursor' below */ 584 /* is handled by the test `cur == parser->cursor' below */
585 if ( IS_PS_DELIM( *cur ) ) 585 if ( IS_PS_DELIM( *cur ) )
586 break; 586 break;
587 587
588 cur++; 588 cur++;
589 } 589 }
590 590
591 Exit: 591 Exit:
592 if ( cur == parser->cursor ) 592 if ( cur < limit && cur == parser->cursor )
593 { 593 {
594 FT_ERROR(( "ps_parser_skip_PS_token:" 594 FT_ERROR(( "ps_parser_skip_PS_token:"
595 " current token is `%c' which is self-delimiting\n" 595 " current token is `%c' which is self-delimiting\n"
596 " " 596 " "
597 " but invalid at this point\n", 597 " but invalid at this point\n",
598 *cur )); 598 *cur ));
599 599
600 error = PSaux_Err_Invalid_File_Format; 600 error = PSaux_Err_Invalid_File_Format;
601 } 601 }
602 602
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
1701 { 1701 {
1702 PS_Conv_EexecDecode( &buffer, 1702 PS_Conv_EexecDecode( &buffer,
1703 buffer + length, 1703 buffer + length,
1704 buffer, 1704 buffer,
1705 length, 1705 length,
1706 &seed ); 1706 &seed );
1707 } 1707 }
1708 1708
1709 1709
1710 /* END */ 1710 /* END */
OLDNEW
« no previous file with comments | « src/psaux/psconv.c ('k') | src/psaux/t1cmap.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698