Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

static FT_Error lookup_lwfn_by_fond ( const UInt8 *  path_fond,
ConstStr255Param  base_lwfn,
UInt8 *  path_lwfn,
size_t  path_size 
) [static]

Definition at line 496 of file ftmac.c.

Referenced by count_faces(), and FT_New_Face_From_FOND().

00500   {
00501     FSRef   ref, par_ref;
00502     size_t  dirname_len;
00503 
00504 
00505     /* Pathname for FSRef can be in various formats: HFS, HFS+, and POSIX. */
00506     /* We should not extract parent directory by string manipulation.      */
00507 
00508     if ( noErr != FSPathMakeRef( path_fond, &ref, FALSE ) )
00509       return FT_Err_Invalid_Argument;
00510 
00511     if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoNone,
00512                                     NULL, NULL, NULL, &par_ref ) )
00513       return FT_Err_Invalid_Argument;
00514 
00515     if ( noErr != FSRefMakePath( &par_ref, path_lwfn, path_size ) )
00516       return FT_Err_Invalid_Argument;
00517 
00518     if ( ft_strlen( (char *)path_lwfn ) + 1 + base_lwfn[0] > path_size )
00519       return FT_Err_Invalid_Argument;
00520 
00521     /* now we have absolute dirname in path_lwfn */
00522     ft_strcat( (char *)path_lwfn, "/" );
00523     dirname_len = ft_strlen( (char *)path_lwfn );
00524     ft_strcat( (char *)path_lwfn, (char *)base_lwfn + 1 );
00525     path_lwfn[dirname_len + base_lwfn[0]] = '\0';
00526 
00527     if ( noErr != FSPathMakeRef( path_lwfn, &ref, FALSE ) )
00528       return FT_Err_Cannot_Open_Resource;
00529 
00530     if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoNone,
00531                                     NULL, NULL, NULL, NULL ) )
00532       return FT_Err_Cannot_Open_Resource;
00533 
00534     return FT_Err_Ok;
00535   }


Generated on Thu Feb 9 06:09:58 2012 for ReactOS by doxygen 1.6.3

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.