freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype][master] 2 commits: Use FT_INT64 instead of FT_L


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] 2 commits: Use FT_INT64 instead of FT_LONG64.
Date: Thu, 19 Aug 2021 03:38:05 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

5 changed files:

Changes:

  • include/freetype/config/integer-types.h
    ... ... @@ -174,15 +174,17 @@
    174 174
     #endif
    
    175 175
     
    
    176 176
     
    
    177
    -  /* determine whether we have a 64-bit `int` type for platforms without */
    
    178
    -  /* Autoconf                                                            */
    
    177
    +  /* determine whether we have a 64-bit integer type */
    
    179 178
     #if FT_SIZEOF_LONG == ( 64 / FT_CHAR_BIT )
    
    180 179
     
    
    181
    -  /* `FT_LONG64` must be defined if a 64-bit type is available */
    
    182
    -#define FT_LONG64
    
    183 180
     #define FT_INT64   long
    
    184 181
     #define FT_UINT64  unsigned long
    
    185 182
     
    
    183
    +#elif defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L
    
    184
    +
    
    185
    +#define FT_INT64   long long int
    
    186
    +#define FT_UINT64  unsigned long long int
    
    187
    +
    
    186 188
       /**************************************************************************
    
    187 189
        *
    
    188 190
        * A 64-bit data type may create compilation problems if you compile in
    
    ... ... @@ -192,16 +194,9 @@
    192 194
        */
    
    193 195
     #elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 )
    
    194 196
     
    
    195
    -#if defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L
    
    196
    -
    
    197
    -#define FT_LONG64
    
    198
    -#define FT_INT64   long long int
    
    199
    -#define FT_UINT64  unsigned long long int
    
    200
    -
    
    201
    -#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
    
    197
    +#if defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
    
    202 198
     
    
    203 199
       /* this compiler provides the `__int64` type */
    
    204
    -#define FT_LONG64
    
    205 200
     #define FT_INT64   __int64
    
    206 201
     #define FT_UINT64  unsigned __int64
    
    207 202
     
    
    ... ... @@ -211,7 +206,6 @@
    211 206
       /*       to test the compiler version.                                 */
    
    212 207
     
    
    213 208
       /* this compiler provides the `__int64` type */
    
    214
    -#define FT_LONG64
    
    215 209
     #define FT_INT64   __int64
    
    216 210
     #define FT_UINT64  unsigned __int64
    
    217 211
     
    
    ... ... @@ -221,22 +215,20 @@
    221 215
     
    
    222 216
     #elif defined( __MWERKS__ )    /* Metrowerks CodeWarrior */
    
    223 217
     
    
    224
    -#define FT_LONG64
    
    225 218
     #define FT_INT64   long long int
    
    226 219
     #define FT_UINT64  unsigned long long int
    
    227 220
     
    
    228 221
     #elif defined( __GNUC__ )
    
    229 222
     
    
    230 223
       /* GCC provides the `long long` type */
    
    231
    -#define FT_LONG64
    
    232 224
     #define FT_INT64   long long int
    
    233 225
     #define FT_UINT64  unsigned long long int
    
    234 226
     
    
    235
    -#endif /* __STDC_VERSION__ >= 199901L */
    
    227
    +#endif /* !__STDC__ */
    
    236 228
     
    
    237 229
     #endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */
    
    238 230
     
    
    239
    -#ifdef FT_LONG64
    
    231
    +#ifdef FT_INT64
    
    240 232
       typedef FT_INT64   FT_Int64;
    
    241 233
       typedef FT_UINT64  FT_UInt64;
    
    242 234
     #endif
    

  • include/freetype/internal/ftcalc.h
    ... ... @@ -487,7 +487,7 @@ FT_BEGIN_HEADER
    487 487
     #define NEG_INT32( a )                                  \
    
    488 488
               (FT_Int32)( (FT_UInt32)0 - (FT_UInt32)(a) )
    
    489 489
     
    
    490
    -#ifdef FT_LONG64
    
    490
    +#ifdef FT_INT64
    
    491 491
     
    
    492 492
     #define ADD_INT64( a, b )                               \
    
    493 493
               (FT_Int64)( (FT_UInt64)(a) + (FT_UInt64)(b) )
    
    ... ... @@ -498,7 +498,7 @@ FT_BEGIN_HEADER
    498 498
     #define NEG_INT64( a )                                  \
    
    499 499
               (FT_Int64)( (FT_UInt64)0 - (FT_UInt64)(a) )
    
    500 500
     
    
    501
    -#endif /* FT_LONG64 */
    
    501
    +#endif /* FT_INT64 */
    
    502 502
     
    
    503 503
     
    
    504 504
     FT_END_HEADER
    

  • src/base/ftcalc.c
    ... ... @@ -45,7 +45,7 @@
    45 45
     
    
    46 46
     /* we need to emulate a 64-bit data type if a real one isn't available */
    
    47 47
     
    
    48
    -#ifndef FT_LONG64
    
    48
    +#ifndef FT_INT64
    
    49 49
     
    
    50 50
       typedef struct  FT_Int64_
    
    51 51
       {
    
    ... ... @@ -54,7 +54,7 @@
    54 54
     
    
    55 55
       } FT_Int64;
    
    56 56
     
    
    57
    -#endif /* !FT_LONG64 */
    
    57
    +#endif /* !FT_INT64 */
    
    58 58
     
    
    59 59
     
    
    60 60
       /**************************************************************************
    
    ... ... @@ -79,7 +79,7 @@
    79 79
       FT_END_STMNT
    
    80 80
     
    
    81 81
       /* The following three functions are available regardless of whether */
    
    82
    -  /* FT_LONG64 is defined.                                             */
    
    82
    +  /* FT_INT64 is defined.                                              */
    
    83 83
     
    
    84 84
       /* documentation is in freetype.h */
    
    85 85
     
    
    ... ... @@ -164,7 +164,7 @@
    164 164
       }
    
    165 165
     
    
    166 166
     
    
    167
    -#ifdef FT_LONG64
    
    167
    +#ifdef FT_INT64
    
    168 168
     
    
    169 169
     
    
    170 170
       /* documentation is in freetype.h */
    
    ... ... @@ -272,7 +272,7 @@
    272 272
       }
    
    273 273
     
    
    274 274
     
    
    275
    -#else /* !FT_LONG64 */
    
    275
    +#else /* !FT_INT64 */
    
    276 276
     
    
    277 277
     
    
    278 278
       static void
    
    ... ... @@ -651,7 +651,7 @@
    651 651
       }
    
    652 652
     
    
    653 653
     
    
    654
    -#endif /* !FT_LONG64 */
    
    654
    +#endif /* !FT_INT64 */
    
    655 655
     
    
    656 656
     
    
    657 657
       /* documentation is in ftglyph.h */
    
    ... ... @@ -985,7 +985,7 @@
    985 985
         /* we silently ignore overflow errors since such large values */
    
    986 986
         /* lead to even more (harmless) rendering errors later on     */
    
    987 987
     
    
    988
    -#ifdef FT_LONG64
    
    988
    +#ifdef FT_INT64
    
    989 989
     
    
    990 990
         FT_Int64  delta = SUB_INT64( MUL_INT64( in_x, out_y ),
    
    991 991
                                      MUL_INT64( in_y, out_x ) );
    

  • src/base/fttrigon.c
    ... ... @@ -53,7 +53,7 @@
    53 53
       };
    
    54 54
     
    
    55 55
     
    
    56
    -#ifdef FT_LONG64
    
    56
    +#ifdef FT_INT64
    
    57 57
     
    
    58 58
       /* multiply a given value by the CORDIC shrink factor */
    
    59 59
       static FT_Fixed
    
    ... ... @@ -76,7 +76,7 @@
    76 76
         return s < 0 ? -val : val;
    
    77 77
       }
    
    78 78
     
    
    79
    -#else /* !FT_LONG64 */
    
    79
    +#else /* !FT_INT64 */
    
    80 80
     
    
    81 81
       /* multiply a given value by the CORDIC shrink factor */
    
    82 82
       static FT_Fixed
    
    ... ... @@ -125,7 +125,7 @@
    125 125
         return s < 0 ? -val : val;
    
    126 126
       }
    
    127 127
     
    
    128
    -#endif /* !FT_LONG64 */
    
    128
    +#endif /* !FT_INT64 */
    
    129 129
     
    
    130 130
     
    
    131 131
       /* undefined and never called for zero vector */
    

  • src/smooth/ftgrays.c
    ... ... @@ -625,7 +625,7 @@ typedef ptrdiff_t FT_PtrDist;
    625 625
       }
    
    626 626
     
    
    627 627
     
    
    628
    -#ifndef FT_LONG64
    
    628
    +#ifndef FT_INT64
    
    629 629
     
    
    630 630
       /**************************************************************************
    
    631 631
        *
    
    ... ... @@ -1015,11 +1015,11 @@ typedef ptrdiff_t FT_PtrDist;
    1015 1015
     
    
    1016 1016
       /*
    
    1017 1017
        * For now, the code that depends on `BEZIER_USE_DDA` requires `FT_Int64`
    
    1018
    -   * to be defined.  If `FT_LONG64` is not defined, meaning there is no
    
    1018
    +   * to be defined.  If `FT_INT64` is not defined, meaning there is no
    
    1019 1019
        * 64-bit type available, disable it to avoid compilation errors.  See for
    
    1020 1020
        * example https://gitlab.freedesktop.org/freetype/freetype/-/issues/1071.
    
    1021 1021
        */
    
    1022
    -#if !defined( FT_LONG64 )
    
    1022
    +#if !defined( FT_INT64 )
    
    1023 1023
     #  undef BEZIER_USE_DDA
    
    1024 1024
     #  define BEZIER_USE_DDA  0
    
    1025 1025
     #endif
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]