20 #include FT_INTERNAL_POSTSCRIPT_AUX_H 21 #include FT_INTERNAL_DEBUG_H 34 #define FT_COMPONENT trace_psconv 43 static const FT_Char ft_char_table[128] =
46 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
47 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
48 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
49 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1,
50 -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
51 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1,
52 -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
53 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1,
64 static const FT_Char ft_char_table[128] =
67 -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, -1, -1, -1, -1, -1, -1,
68 -1, 19, 20, 21, 22, 23, 24, 25, 26, 27, -1, -1, -1, -1, -1, -1,
69 -1, -1, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, -1,
70 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
71 -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, -1, -1, -1, -1, -1, -1,
72 -1, 19, 20, 21, 22, 23, 24, 25, 26, 27, -1, -1, -1, -1, -1, -1,
73 -1, -1, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, -1,
74 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1,
101 if ( base < 2 || base > 36 )
107 if ( *
p ==
'-' || *
p ==
'+' )
116 num_limit = 0x7FFFFFFFL / base;
117 c_limit = (
FT_Char)( 0x7FFFFFFFL % base );
127 c = ft_char_table[*
p & 0x7f];
132 if (
num > num_limit || (
num == num_limit && c > c_limit ) )
211 if ( *
p ==
'-' || *
p ==
'+' )
229 if ( integral > 0x7FFF )
248 c = ft_char_table[*
p & 0x7f];
253 if ( decimal < 0xCCCCCCCL )
255 decimal = decimal * 10 +
c;
257 if ( !integral && power_ten > 0 )
266 if (
p + 1 <
limit && ( *
p ==
'e' || *
p ==
'E' ) )
280 if ( exponent > 1000 )
282 else if ( exponent < -1000 )
290 if ( !integral && !decimal )
295 if ( have_underflow )
298 while ( power_ten > 0 )
300 if ( integral >= 0xCCCCCCCL )
304 if ( decimal >= 0xCCCCCCCL )
316 while ( power_ten < 0 )
319 if ( divider < 0xCCCCCCCL )
324 if ( !integral && !decimal )
340 integral = -integral;
349 integral = 0x7FFFFFFFL;
361 PS_Conv_StringDecode(
FT_Byte** cursor,
370 for ( p = *cursor; r < n && p <
limit; p++ )
422 b = b * 8 + *p -
'0';
427 b = b * 8 + *p -
'0';
491 c = ft_char_table[c & 0x7F];
492 if ( (
unsigned)c >= 16 )
495 pad = ( pad << 4 ) | c;
512 for (
r = 0;
r <
n;
r++ )
523 c = ft_char_table[*
p & 0x7f];
525 if ( (
unsigned)c >= 16 )
541 return (
r + 1 ) / 2;
570 for (
r = 0;
r <
n;
r++ )
576 s = ( (val +
s)*52845U + 22719 ) & 0xFFFFU;
585 for (
r = 0,
p = *cursor;
r <
n &&
p <
limit;
r++,
p++ )
FT_DivFix(FT_Long a, FT_Long b)
PS_Conv_ToFixed(FT_Byte **cursor, FT_Byte *limit, FT_Long power_ten)
PS_Conv_EexecDecode(FT_Byte **cursor, FT_Byte *limit, FT_Byte *buffer, FT_Offset n, FT_UShort *seed)
GLboolean GLboolean GLboolean b
FT_BEGIN_HEADER typedef unsigned char FT_Bool
#define FT_TRACE4(varformat)
PS_Conv_Strtol(FT_Byte **cursor, FT_Byte *limit, FT_Long base)
GLdouble GLdouble GLdouble r
PS_Conv_ASCIIHexDecode(FT_Byte **cursor, FT_Byte *limit, FT_Byte *buffer, FT_Offset n)
GLubyte GLubyte GLubyte GLubyte w
PS_Conv_ToInt(FT_Byte **cursor, FT_Byte *limit)