/[freetype]/freetype2/src/base/ftcalc.c
ViewVC logotype

Diff of /freetype2/src/base/ftcalc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.64 by freetype, Fri Oct 28 16:14:14 2005 UTC revision 1.65 by wl, Sat Nov 12 07:34:40 2005 UTC
# Line 4  Line 4 
4  /*                                                                         */  /*                                                                         */
5  /*    Arithmetic computations (body).                                      */  /*    Arithmetic computations (body).                                      */
6  /*                                                                         */  /*                                                                         */
7  /*  Copyright 1996-2001, 2002, 2003, 2004 by                               */  /*  Copyright 1996-2001, 2002, 2003, 2004, 2005 by                         */
8  /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */  /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
9  /*                                                                         */  /*                                                                         */
10  /*  This file is part of the FreeType project, and may only be used,       */  /*  This file is part of the FreeType project, and may only be used,       */
# Line 402  Line 402 
402      if ( a == 0 || b == 0x10000L )      if ( a == 0 || b == 0x10000L )
403        return a;        return a;
404    
405      sa = (a >> (sizeof(a)*8 - 1)); a = (a^sa) - sa;      sa = ( a >> ( sizeof ( a ) * 8 - 1 ) );
406      sb = (b >> (sizeof(b)*8 - 1)); b = (b^sb) - sb;       a = ( a ^ sa ) - sa;
407        sb = ( b >> ( sizeof ( b ) * 8 - 1 ) );
408         b = ( b ^ sb ) - sb;
409    
410      ua = (FT_ULong)a;      ua = (FT_ULong)a;
411      ub = (FT_ULong)b;      ub = (FT_ULong)b;
# Line 422  Line 424 
424      }      }
425    
426      sa ^= sb,      sa ^= sb,
427      ua  = (FT_ULong)((ua ^ sa) - sa);      ua  = (FT_ULong)(( ua ^ sa ) - sa);
428    
429      return (FT_Long)ua;      return (FT_Long)ua;
430  #else  
431    #else /* 0 */
432    
433      FT_Long   s;      FT_Long   s;
434      FT_ULong  ua, ub;      FT_ULong  ua, ub;
435    
# Line 453  Line 457 
457      }      }
458    
459      return ( s < 0 ? -(FT_Long)ua : (FT_Long)ua );      return ( s < 0 ? -(FT_Long)ua : (FT_Long)ua );
460  #endif  
461    #endif /* 0 */
462    
463    }    }
464    
465    

Legend:
Removed from v.1.64  
changed lines
  Added in v.1.65

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26