OLD | NEW |
1 /***************************************************************************/ | 1 /***************************************************************************/ |
2 /* */ | 2 /* */ |
3 /* psconv.c */ | 3 /* psconv.c */ |
4 /* */ | 4 /* */ |
5 /* Some convenience conversions (body). */ | 5 /* Some convenience conversions (body). */ |
6 /* */ | 6 /* */ |
7 /* Copyright 2006, 2008, 2009, 2012-2013 by */ | 7 /* Copyright 2006, 2008, 2009, 2012-2013 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, */ |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 { | 195 { |
196 FT_Byte* p = *cursor; | 196 FT_Byte* p = *cursor; |
197 FT_Byte* curp; | 197 FT_Byte* curp; |
198 // Fix the Vulnerability Report FoxIT Reader - MSVR-10-0077. | 198 // Fix the Vulnerability Report FoxIT Reader - MSVR-10-0077. |
199 // We must use 64-bit integer to avoid overflow. If there is some 64-bit
integer support. | 199 // We must use 64-bit integer to avoid overflow. If there is some 64-bit
integer support. |
200 // Since some platform doesn't support 64-bit integer, then use integer
instead. | 200 // Since some platform doesn't support 64-bit integer, then use integer
instead. |
201 #if defined(FT_INT64) | 201 #if defined(FT_INT64) |
202 FT_INT64 integral = 0; | 202 FT_INT64 integral = 0; |
203 FT_INT64 decimal = 0; | 203 FT_INT64 decimal = 0; |
204 #else | 204 #else |
205 » FT_Long integral; | 205 » FT_Long integral = 0; |
206 FT_Long decimal = 0; | 206 FT_Long decimal = 0; |
207 FT_Int temp0 = 65536; | 207 FT_Int temp0 = 65536; |
208 FT_Int temp1 = power_ten; | 208 FT_Int temp1 = power_ten; |
209 #endif | 209 #endif |
210 FT_Long divider = 1; | 210 FT_Long divider = 1; |
211 | 211 |
212 FT_Bool sign = 0; | 212 FT_Bool sign = 0; |
213 FT_Bool have_overflow = 0; | 213 FT_Bool have_overflow = 0; |
214 FT_Bool have_underflow = 0; | 214 FT_Bool have_underflow = 0; |
215 | 215 |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 FT_Byte first_char = **cursor; | 632 FT_Byte first_char = **cursor; |
633 if (first_char == '+' || first_char == '-' || (first_char >= '0' && fi
rst_char <= '9')) { | 633 if (first_char == '+' || first_char == '-' || (first_char >= '0' && fi
rst_char <= '9')) { |
634 *val = PS_Conv_ToInt(cursor, limit); | 634 *val = PS_Conv_ToInt(cursor, limit); |
635 return 1; | 635 return 1; |
636 } | 636 } |
637 return 0; | 637 return 0; |
638 } | 638 } |
639 | 639 |
640 /* END */ | 640 /* END */ |
641 | 641 |
OLD | NEW |