diff --git a/sdk/lib/3rdparty/freetype/include/freetype/config/ftconfig.h b/sdk/lib/3rdparty/freetype/include/freetype/config/ftconfig.h index 031b4bfdc4..10d68bb482 100644 --- a/sdk/lib/3rdparty/freetype/include/freetype/config/ftconfig.h +++ b/sdk/lib/3rdparty/freetype/include/freetype/config/ftconfig.h @@ -461,17 +461,6 @@ FT_BEGIN_HEADER #define FT_EXPORT( x ) extern x #endif -#ifndef __REACTOS__ -#ifdef _MSC_VER -#undef FT_EXPORT -#ifdef _DLL -#define FT_EXPORT( x ) __declspec( dllexport ) x -#else -#define FT_EXPORT( x ) __declspec( dllimport ) x -#endif -#endif -#endif /* !__REACTOS__ */ - #endif /* !FT_EXPORT */ diff --git a/sdk/lib/3rdparty/freetype/src/autofit/afcjk.c b/sdk/lib/3rdparty/freetype/src/autofit/afcjk.c index 40b14ac88c..d6693a5eb4 100644 --- a/sdk/lib/3rdparty/freetype/src/autofit/afcjk.c +++ b/sdk/lib/3rdparty/freetype/src/autofit/afcjk.c @@ -71,12 +71,7 @@ FT_Face face ) { /* scan the array of segments in each direction */ -#ifdef __REACTOS__ - AF_GlyphHintsRec *hints = malloc(sizeof(AF_GlyphHintsRec)); - if (!hints) return; -#else AF_GlyphHintsRec hints[1]; -#endif FT_TRACE5(( "\n" @@ -94,14 +89,7 @@ FT_Error error; FT_ULong glyph_index; int dim; -#ifdef __REACTOS__ - AF_CJKMetricsRec *dummy = malloc(sizeof(AF_CJKMetricsRec)); - if (!dummy) - goto Exit; - { -#else AF_CJKMetricsRec dummy[1]; -#endif AF_Scaler scaler = &dummy->root.scaler; #ifdef FT_CONFIG_OPTION_PIC @@ -276,19 +264,12 @@ } #endif } -#ifdef __REACTOS__ - free(dummy); - } -#endif } FT_TRACE5(( "\n" )); af_glyph_hints_done( hints ); -#ifdef __REACTOS__ - free(hints); -#endif } diff --git a/sdk/lib/3rdparty/freetype/src/autofit/aflatin.c b/sdk/lib/3rdparty/freetype/src/autofit/aflatin.c index 0fa6233b94..d4c8c0e728 100644 --- a/sdk/lib/3rdparty/freetype/src/autofit/aflatin.c +++ b/sdk/lib/3rdparty/freetype/src/autofit/aflatin.c @@ -62,12 +62,7 @@ FT_Face face ) { /* scan the array of segments in each direction */ -#ifdef __REACTOS__ - AF_GlyphHintsRec *hints = malloc(sizeof(AF_GlyphHintsRec)); - if (!hints) return; -#else AF_GlyphHintsRec hints[1]; -#endif FT_TRACE5(( "\n" @@ -85,14 +80,7 @@ FT_Error error; FT_ULong glyph_index; int dim; -#ifdef __REACTOS__ - AF_LatinMetricsRec *dummy = malloc(sizeof(AF_LatinMetricsRec)); - if (!dummy) - goto Exit; - { -#else AF_LatinMetricsRec dummy[1]; -#endif AF_Scaler scaler = &dummy->root.scaler; #ifdef FT_CONFIG_OPTION_PIC @@ -269,19 +257,12 @@ } #endif } -#ifdef __REACTOS__ - free(dummy); - } -#endif } FT_TRACE5(( "\n" )); af_glyph_hints_done( hints ); -#ifdef __REACTOS__ - free(hints); -#endif } diff --git a/sdk/lib/3rdparty/freetype/src/autofit/afmodule.c b/sdk/lib/3rdparty/freetype/src/autofit/afmodule.c index 1360284ac5..5418390696 100644 --- a/sdk/lib/3rdparty/freetype/src/autofit/afmodule.c +++ b/sdk/lib/3rdparty/freetype/src/autofit/afmodule.c @@ -549,18 +549,8 @@ #else /* !FT_DEBUG_AUTOFIT */ -#ifdef __REACTOS__ - AF_GlyphHintsRec *hints = malloc(sizeof(AF_GlyphHintsRec)); - AF_LoaderRec *loader = malloc(sizeof(AF_LoaderRec)); - if (!hints || !loader) - { - error = FT_Err_Out_Of_Memory; - goto Exit; - } -#else AF_GlyphHintsRec hints[1]; AF_LoaderRec loader[1]; -#endif FT_UNUSED( size ); @@ -574,11 +564,6 @@ af_loader_done( loader ); af_glyph_hints_done( hints ); -#ifdef __REACTOS__ -Exit: - free(hints); - free(loader); -#endif return error; diff --git a/sdk/lib/3rdparty/freetype/src/base/ftbitmap.c b/sdk/lib/3rdparty/freetype/src/base/ftbitmap.c index 5bfc13e244..c22df217d9 100644 --- a/sdk/lib/3rdparty/freetype/src/base/ftbitmap.c +++ b/sdk/lib/3rdparty/freetype/src/base/ftbitmap.c @@ -601,16 +601,6 @@ { FT_Int val = ss[0]; /* avoid a byte->int cast on each line */ -#ifdef __REACTOS__ - tt[0] = (FT_Byte)( ( val & 0x80 ) ? 0xff : 0); - tt[1] = (FT_Byte)( ( val & 0x40 ) ? 0xff : 0); - tt[2] = (FT_Byte)( ( val & 0x20 ) ? 0xff : 0); - tt[3] = (FT_Byte)( ( val & 0x10 ) ? 0xff : 0); - tt[4] = (FT_Byte)( ( val & 0x08 ) ? 0xff : 0); - tt[5] = (FT_Byte)( ( val & 0x04 ) ? 0xff : 0); - tt[6] = (FT_Byte)( ( val & 0x02 ) ? 0xff : 0); - tt[7] = (FT_Byte)( ( val & 0x01 ) ? 0xff : 0); -#else tt[0] = (FT_Byte)( ( val & 0x80 ) >> 7 ); tt[1] = (FT_Byte)( ( val & 0x40 ) >> 6 ); tt[2] = (FT_Byte)( ( val & 0x20 ) >> 5 ); @@ -619,7 +609,6 @@ tt[5] = (FT_Byte)( ( val & 0x04 ) >> 2 ); tt[6] = (FT_Byte)( ( val & 0x02 ) >> 1 ); tt[7] = (FT_Byte)( val & 0x01 ); -#endif tt += 8; ss += 1; @@ -634,11 +623,7 @@ for ( ; j > 0; j-- ) { -#ifdef __REACTOS__ - tt[0] = (FT_Byte)( ( val & 0x80 ) ? 0xff : 0); -#else tt[0] = (FT_Byte)( ( val & 0x80 ) >> 7); -#endif val <<= 1; tt += 1; } diff --git a/sdk/lib/3rdparty/freetype/src/cid/cidgload.c b/sdk/lib/3rdparty/freetype/src/cid/cidgload.c index 4ae2e051e3..d14f9a2cc9 100644 --- a/sdk/lib/3rdparty/freetype/src/cid/cidgload.c +++ b/sdk/lib/3rdparty/freetype/src/cid/cidgload.c @@ -341,15 +341,7 @@ { CID_GlyphSlot glyph = (CID_GlyphSlot)cidglyph; FT_Error error; -#ifdef __REACTOS__ - T1_DecoderRec *decoder = malloc(sizeof(T1_DecoderRec)); - if (!decoder) return FT_Err_Out_Of_Memory; -/* Ugly but it allows us to reduce the diff */ -#define decoder (*decoder) - { -#else T1_DecoderRec decoder; -#endif CID_Face face = (CID_Face)cidglyph->face; FT_Bool hinting; FT_Bool scaled; @@ -532,11 +524,6 @@ if ( must_finish_decoder ) psaux->t1_decoder_funcs->done( &decoder ); -#ifdef __REACTOS__ - free(&decoder); -#undef decoder - } -#endif return error; } diff --git a/sdk/lib/3rdparty/freetype/src/psaux/psintrp.c b/sdk/lib/3rdparty/freetype/src/psaux/psintrp.c index bc86d00b27..9cb3113637 100644 --- a/sdk/lib/3rdparty/freetype/src/psaux/psintrp.c +++ b/sdk/lib/3rdparty/freetype/src/psaux/psintrp.c @@ -525,14 +525,7 @@ CF2_ArrStackRec vStemHintArray; CF2_HintMaskRec hintMask; -#ifdef __REACTOS__ - CF2_GlyphPathRec *glyphPath = malloc(sizeof(CF2_GlyphPathRec)); - if (!glyphPath) return; -/* Ugly but it allows us to reduce the diff */ -#define glyphPath (*glyphPath) -#else CF2_GlyphPathRec glyphPath; -#endif FT_ZERO( &storage ); FT_ZERO( &results ); @@ -2612,20 +2605,8 @@ * discard `counterMask' and `counterHintMap'. * */ -#ifdef __REACTOS__ - CF2_HintMapRec *counterHintMap = malloc(sizeof(CF2_HintMapRec)); - CF2_HintMaskRec counterMask; - if (!counterHintMap) - { - lastError = FT_Err_Out_Of_Memory; - goto exit; - } -/* Ugly but it allows us to reduce the diff */ -#define counterHintMap (*counterHintMap) -#else CF2_HintMapRec counterHintMap; CF2_HintMaskRec counterMask; -#endif cf2_hintmap_init( &counterHintMap, @@ -2645,9 +2626,6 @@ &counterMask, 0, FALSE ); -#ifdef __REACTOS__ - free(&counterHintMap); -#endif } break; @@ -3052,11 +3030,6 @@ FT_TRACE4(( "\n" )); -#ifdef __REACTOS__ - free(&glyphPath); -#undef counterHintMap -#undef glyphPath -#endif return; } diff --git a/sdk/lib/3rdparty/freetype/src/raster/ftraster.c b/sdk/lib/3rdparty/freetype/src/raster/ftraster.c index 40d5d9d5a7..921ad4b55a 100644 --- a/sdk/lib/3rdparty/freetype/src/raster/ftraster.c +++ b/sdk/lib/3rdparty/freetype/src/raster/ftraster.c @@ -3146,15 +3146,9 @@ const FT_Outline* outline = (const FT_Outline*)params->source; const FT_Bitmap* target_map = params->target; -#ifdef __REACTOS__ - FT_Error ret; - black_TWorker *worker; - Long *buffer; -#else black_TWorker worker[1]; Long buffer[FT_MAX_BLACK_POOL]; -#endif if ( !raster ) @@ -3205,35 +3199,14 @@ } } -#ifdef __REACTOS__ - worker = malloc(sizeof(black_TWorker)); - buffer = malloc(FT_MAX(FT_RENDER_POOL_SIZE, 2048)); - if (!worker || !buffer) - { - free(worker); - free(buffer); - return FT_THROW( Out_Of_Memory ); - } -#endif ras.outline = *outline; ras.target = *target_map; worker->buff = buffer; -#ifdef __REACTOS__ - worker->sizeBuff = buffer + FT_MAX_BLACK_POOL; -#else worker->sizeBuff = (&buffer)[1]; /* Points to right after buffer. */ -#endif -#ifdef __REACTOS__ - ret = Render_Glyph(RAS_VAR); - free(worker); - free(buffer); - return ret; -#else return Render_Glyph( RAS_VAR ); -#endif } diff --git a/sdk/lib/3rdparty/freetype/src/smooth/ftgrays.c b/sdk/lib/3rdparty/freetype/src/smooth/ftgrays.c index a5ec55bf5a..cf1e010441 100644 --- a/sdk/lib/3rdparty/freetype/src/smooth/ftgrays.c +++ b/sdk/lib/3rdparty/freetype/src/smooth/ftgrays.c @@ -1744,24 +1744,13 @@ typedef ptrdiff_t FT_PtrDist; const TCoord xMin = ras.min_ex; const TCoord xMax = ras.max_ex; -#ifdef __REACTOS__ - TCell *buffer; -#else TCell buffer[FT_MAX_GRAY_POOL]; -#endif size_t height = (size_t)( yMax - yMin ); size_t n = FT_MAX_GRAY_POOL / 8; TCoord y; TCoord bands[32]; /* enough to accommodate bisections */ TCoord* band; -#ifdef __REACTOS__ - buffer = malloc(FT_MAX(FT_RENDER_POOL_SIZE, 2048)); - if (!buffer) - { - return 1; - } -#endif /* set up vertical bands */ if ( height > n ) @@ -1811,9 +1800,6 @@ typedef ptrdiff_t FT_PtrDist; } else if ( error != ErrRaster_Memory_Overflow ) { -#ifdef __REACTOS__ - free(buffer); -#endif return 1; } @@ -1824,9 +1810,6 @@ typedef ptrdiff_t FT_PtrDist; if ( width == 0 ) { FT_TRACE7(( "gray_convert_glyph: rotten glyph\n" )); -#ifdef __REACTOS__ - free(buffer); -#endif return 1; } @@ -1836,9 +1819,6 @@ typedef ptrdiff_t FT_PtrDist; } while ( band >= bands ); } -#ifdef __REACTOS__ - free(buffer); -#endif return 0; } diff --git a/sdk/lib/3rdparty/freetype/src/type1/t1gload.c b/sdk/lib/3rdparty/freetype/src/type1/t1gload.c index 3e78b9e43a..87d40e7566 100644 --- a/sdk/lib/3rdparty/freetype/src/type1/t1gload.c +++ b/sdk/lib/3rdparty/freetype/src/type1/t1gload.c @@ -213,16 +213,7 @@ FT_Pos* max_advance ) { FT_Error error; -#ifdef __REACTOS__ - T1_DecoderRec *decoder = malloc(sizeof(T1_DecoderRec)); - if (!decoder) - return FT_THROW( Out_Of_Memory ); - { -/* Ugly but it allows us to reduce the diff */ -#define decoder (*decoder) -#else T1_DecoderRec decoder; -#endif FT_Int glyph_index; T1_Font type1 = &face->type1; PSAux_Service psaux = (PSAux_Service)face->psaux; @@ -243,14 +234,7 @@ FT_RENDER_MODE_NORMAL, T1_Parse_Glyph ); if ( error ) -#ifdef __REACTOS__ - { - free(&decoder); - return error; - } -#else return error; -#endif decoder.builder.metrics_only = 1; decoder.builder.load_points = 0; @@ -279,11 +263,6 @@ psaux->t1_decoder_funcs->done( &decoder ); -#ifdef __REACTOS__ - free(&decoder); -#undef decoder - } -#endif return FT_Err_Ok; } @@ -296,16 +275,7 @@ FT_Fixed* advances ) { T1_Face face = (T1_Face)t1face; -#ifdef __REACTOS__ - T1_DecoderRec *decoder = malloc(sizeof(T1_DecoderRec)); - if (!decoder) - return FT_THROW( Out_Of_Memory ); -/* Ugly but it allows us to reduce the diff */ -#define decoder (*decoder) - { -#else T1_DecoderRec decoder; -#endif T1_Font type1 = &face->type1; PSAux_Service psaux = (PSAux_Service)face->psaux; FT_UInt nn; @@ -317,9 +287,6 @@ for ( nn = 0; nn < count; nn++ ) advances[nn] = 0; -#ifdef __REACTOS__ - free(&decoder); -#endif return FT_Err_Ok; } @@ -333,14 +300,7 @@ FT_RENDER_MODE_NORMAL, T1_Parse_Glyph ); if ( error ) -#ifdef __REACTOS__ - { - free(&decoder); - return error; - } -#else return error; -#endif decoder.builder.metrics_only = 1; decoder.builder.load_points = 0; @@ -362,11 +322,6 @@ advances[nn] = 0; } -#ifdef __REACTOS__ - free(&decoder); -#undef decoder - } -#endif return FT_Err_Ok; } @@ -379,16 +334,7 @@ { T1_GlyphSlot glyph = (T1_GlyphSlot)t1glyph; FT_Error error; -#ifdef __REACTOS__ - T1_DecoderRec *decoder = malloc(sizeof(T1_DecoderRec)); - if (!decoder) - return FT_THROW( Out_Of_Memory ); -/* Ugly but it allows us to reduce the diff */ -#define decoder (*decoder) - { -#else T1_DecoderRec decoder; -#endif T1_Face face = (T1_Face)t1glyph->face; FT_Bool hinting; FT_Bool scaled; @@ -637,11 +583,6 @@ if ( must_finish_decoder ) decoder_funcs->done( &decoder ); -#ifdef __REACTOS__ - free(&decoder); -#undef decoder - } -#endif return error; }