OLD | NEW |
1 /***************************************************************************/ | 1 /***************************************************************************/ |
2 /* */ | 2 /* */ |
3 /* psmodule.c */ | 3 /* psmodule.c */ |
4 /* */ | 4 /* */ |
5 /* PSNames module implementation (body). */ | 5 /* PSNames module implementation (body). */ |
6 /* */ | 6 /* */ |
7 /* Copyright 1996-2003, 2005-2008, 2012, 2013 by */ | 7 /* Copyright 1996-2015 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, */ |
11 /* modified, and distributed under the terms of the FreeType project */ | 11 /* modified, and distributed under the terms of the FreeType project */ |
12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ | 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
13 /* this file you indicate that you have read the license and */ | 13 /* this file you indicate that you have read the license and */ |
14 /* understand and accept it fully. */ | 14 /* understand and accept it fully. */ |
15 /* */ | 15 /* */ |
16 /***************************************************************************/ | 16 /***************************************************************************/ |
17 | 17 |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 FT_Pointer glyph_data ) | 305 FT_Pointer glyph_data ) |
306 { | 306 { |
307 FT_Error error; | 307 FT_Error error; |
308 | 308 |
309 FT_UInt extra_glyph_list_states[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; | 309 FT_UInt extra_glyph_list_states[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; |
310 FT_UInt extra_glyphs[EXTRA_GLYPH_LIST_SIZE]; | 310 FT_UInt extra_glyphs[EXTRA_GLYPH_LIST_SIZE]; |
311 | 311 |
312 | 312 |
313 /* we first allocate the table */ | 313 /* we first allocate the table */ |
314 table->num_maps = 0; | 314 table->num_maps = 0; |
315 table->maps = 0; | 315 table->maps = NULL; |
316 | 316 |
317 if ( !FT_NEW_ARRAY( table->maps, num_glyphs + EXTRA_GLYPH_LIST_SIZE ) ) | 317 if ( !FT_NEW_ARRAY( table->maps, num_glyphs + EXTRA_GLYPH_LIST_SIZE ) ) |
318 { | 318 { |
319 FT_UInt n; | 319 FT_UInt n; |
320 FT_UInt count; | 320 FT_UInt count; |
321 PS_UniMap* map; | 321 PS_UniMap* map; |
322 FT_UInt32 uni_char; | 322 FT_UInt32 uni_char; |
323 | 323 |
324 | 324 |
325 map = table->maps; | 325 map = table->maps; |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 | 556 |
557 FT_DEFINE_SERVICEDESCREC1( | 557 FT_DEFINE_SERVICEDESCREC1( |
558 pscmaps_services, | 558 pscmaps_services, |
559 FT_SERVICE_ID_POSTSCRIPT_CMAPS, &PSCMAPS_INTERFACE_GET ) | 559 FT_SERVICE_ID_POSTSCRIPT_CMAPS, &PSCMAPS_INTERFACE_GET ) |
560 | 560 |
561 | 561 |
562 static FT_Pointer | 562 static FT_Pointer |
563 psnames_get_service( FT_Module module, | 563 psnames_get_service( FT_Module module, |
564 const char* service_id ) | 564 const char* service_id ) |
565 { | 565 { |
566 /* PSCMAPS_SERVICES_GET derefers `library' in PIC mode */ | 566 /* PSCMAPS_SERVICES_GET dereferences `library' in PIC mode */ |
567 #ifdef FT_CONFIG_OPTION_PIC | 567 #ifdef FT_CONFIG_OPTION_PIC |
568 FT_Library library; | 568 FT_Library library; |
569 | 569 |
570 | 570 |
571 if ( !module ) | 571 if ( !module ) |
572 return NULL; | 572 return NULL; |
573 library = module->library; | 573 library = module->library; |
574 if ( !library ) | 574 if ( !library ) |
575 return NULL; | 575 return NULL; |
576 #else | 576 #else |
(...skipping 23 matching lines...) Expand all Loading... |
600 0x20000L, /* driver requires FreeType 2 or above */ | 600 0x20000L, /* driver requires FreeType 2 or above */ |
601 | 601 |
602 PUT_PS_NAMES_SERVICE( | 602 PUT_PS_NAMES_SERVICE( |
603 (void*)&PSCMAPS_INTERFACE_GET ), /* module specific interface */ | 603 (void*)&PSCMAPS_INTERFACE_GET ), /* module specific interface */ |
604 (FT_Module_Constructor)NULL, | 604 (FT_Module_Constructor)NULL, |
605 (FT_Module_Destructor) NULL, | 605 (FT_Module_Destructor) NULL, |
606 (FT_Module_Requester) PUT_PS_NAMES_SERVICE( psnames_get_service ) ) | 606 (FT_Module_Requester) PUT_PS_NAMES_SERVICE( psnames_get_service ) ) |
607 | 607 |
608 | 608 |
609 /* END */ | 609 /* END */ |
OLD | NEW |